private void checkForLink(BasicPanel panel, Box box) { if (box == null || box.getElement() == null) { return; } String uri = findLink(panel, box.getElement()); if (uri != null) { linkClicked(panel, uri); } }
public List getElementBoxes(Element elem) { List result = new ArrayList(); for (int i = 0; i < getChildCount(); i++) { Box child = getChild(i); if (child.getElement() == elem) { result.add(child); } result.addAll(child.getElementBoxes(elem)); } return result; }
public void remove(String fieldName) { List values = (List)_radioButtonsByName.get(fieldName); if (values != null) { for (Iterator i = values.iterator(); i.hasNext();) { RadioButtonFormField field = (RadioButtonFormField)i.next(); _radioButtonsByElem.remove(field.getBox().getElement()); } } _radioButtonsByName.remove(fieldName); }
public List getElementBoxes(Element elem) { List result = new ArrayList(); for (int i = 0; i < getChildCount(); i++) { Box child = getChild(i); if (child.getElement() == elem) { result.add(child); } result.addAll(child.getElementBoxes(elem)); } return result; }
public void remove(String fieldName) { List values = (List) _radioButtonsByName.get(fieldName); if (values != null) { for (Iterator i = values.iterator(); i.hasNext();) { RadioButtonFormField field = (RadioButtonFormField) i.next(); _radioButtonsByElem.remove(field.getBox().getElement()); } } _radioButtonsByName.remove(fieldName); }
public void remove(String fieldName) { List values = (List)_radioButtonsByName.get(fieldName); if (values != null) { for (Iterator i = values.iterator(); i.hasNext();) { RadioButtonFormField field = (RadioButtonFormField)i.next(); _radioButtonsByElem.remove(field.getBox().getElement()); } } _radioButtonsByName.remove(fieldName); }
public void remove(String fieldName) { List values = (List) _radioButtonsByName.get(fieldName); if (values != null) { for (Iterator i = values.iterator(); i.hasNext();) { RadioButtonFormField field = (RadioButtonFormField) i.next(); _radioButtonsByElem.remove(field.getBox().getElement()); } } _radioButtonsByName.remove(fieldName); }
public void remove(String fieldName) { List values = (List) _radioButtonsByName.get(fieldName); if (values != null) { for (Iterator i = values.iterator(); i.hasNext();) { RadioButtonFormField field = (RadioButtonFormField) i.next(); _radioButtonsByElem.remove(field.getBox().getElement()); } } _radioButtonsByName.remove(fieldName); }
private RadioButtonFormField getChecked(List fields) { RadioButtonFormField result = null; for (Iterator i = fields.iterator(); i.hasNext(); ) { RadioButtonFormField f = (RadioButtonFormField)i.next(); if (isChecked(f.getBox().getElement())) { result = f; } } return result; }
private RadioButtonFormField getChecked(List fields) { RadioButtonFormField result = null; for (Iterator i = fields.iterator(); i.hasNext(); ) { RadioButtonFormField f = (RadioButtonFormField)i.next(); if (isChecked(f.getBox().getElement())) { result = f; } } return result; }
private RadioButtonFormField getChecked(List fields) { RadioButtonFormField result = null; for (Iterator i = fields.iterator(); i.hasNext(); ) { RadioButtonFormField f = (RadioButtonFormField)i.next(); if (isChecked(f.getBox().getElement())) { result = f; } } return result; }
private RadioButtonFormField getChecked(List fields) { RadioButtonFormField result = null; for (Iterator i = fields.iterator(); i.hasNext(); ) { RadioButtonFormField f = (RadioButtonFormField)i.next(); if (isChecked(f.getBox().getElement())) { result = f; } } return result; }
private Box getElementContainerBox(InlineText t) { Box b = t.getParent(); while (b.getElement() == null) { b = b.getParent(); } return b; }
public void detach(LayoutContext c) { super.detach(c); _factory.remove(_box.getElement()); }
protected String findLink(int x, int y) { Box box = _parent.find(x, y); if (box == null) { return null; } Element elem = box.getElement(); if (elem == null) { return null; } return findLink(elem); }
private void writeOutline(RenderingContext c, Box root) { if (_bookmarks.isEmpty()) { _bookmarks = HTMLOutline.generate(root.getElement(), root); } if (_bookmarks.size() > 0) { _writer.setViewerPreferences(PdfWriter.PageModeUseOutlines); writeBookmarks(c, root, _writer.getRootOutline(), _bookmarks); } }
private void writeOutline(RenderingContext c, Box root) { if (_bookmarks.isEmpty()) { _bookmarks = HTMLOutline.generate(root.getElement(), root); } if (_bookmarks.size() > 0) { _writer.setViewerPreferences(PdfWriter.PageModeUseOutlines); writeBookmarks(c, root, _writer.getRootOutline(), _bookmarks); } }
private static void initBoxRefs(Map<Element,Bookmark> map, Box box) { Bookmark bookmark = map.get(box.getElement()); if (bookmark != null) { bookmark.setBox(box); } for (int i = 0, len = box.getChildCount(); i < len; i++) { initBoxRefs(map, box.getChild(i)); } }
private static void initBoxRefs(Map<Element,Bookmark> map, Box box) { Bookmark bookmark = map.get(box.getElement()); if (bookmark != null) { bookmark.setBox(box); } for (int i = 0, len = box.getChildCount(); i < len; i++) { initBoxRefs(map, box.getChild(i)); } }
public void restyle(LayoutContext c) { Box parent = getParent(); Element e = parent.getElement(); if (e != null) { CalculatedStyle style = c.getSharedContext().getStyle(e, true); setStyle(style.createAnonymousStyle(IdentValue.BLOCK)); } restyleChildren(c); }