/** Returns the root element that views should be based upon unless some other mechanism for assigning views to element structures is provided. @return The root element. **/ public synchronized Element getDefaultRootElement () { return document_.getDefaultRootElement (); }
/** Returns the root element that views should be based upon unless some other mechanism for assigning views to element structures is provided. @return The root element. **/ public synchronized Element getDefaultRootElement () { return document_.getDefaultRootElement (); }
public Element getDefaultRootElement() { return backend.getDefaultRootElement(); }
public Element getDefaultRootElement() { return backend.getDefaultRootElement(); }
public Element getDefaultRootElement() { return backend.getDefaultRootElement(); }
/** * Prepare the text lines for rendering. The lines are wrapped to fit in the * current available space for text. Explicit line breaks are preserved. * * @param l * the label to render * @return a list of text lines to render */ protected List<String> prepareLines(final JLabel l) { final List<String> lines = new ArrayList<String>(defaultSize); final String text = l.getText(); if (text == null) { return null; // Null guard } final PlainDocument doc = new PlainDocument(); try { doc.insertString(0, text, null); } catch (final BadLocationException e) { return null; } final Element root = doc.getDefaultRootElement(); for (int i = 0, j = root.getElementCount(); i < j; i++) { wrap(lines, root.getElement(i)); } return lines; }