Package org.fife.rsta.ac.xml.tree
Class XmlTreeCellRenderer.XmlTreeCellUI
- java.lang.Object
-
- javax.swing.plaf.ComponentUI
-
- javax.swing.plaf.LabelUI
-
- javax.swing.plaf.basic.BasicLabelUI
-
- org.fife.rsta.ac.xml.tree.XmlTreeCellRenderer.XmlTreeCellUI
-
- All Implemented Interfaces:
java.beans.PropertyChangeListener,java.util.EventListener
- Enclosing class:
- XmlTreeCellRenderer
private static class XmlTreeCellRenderer.XmlTreeCellUI extends javax.swing.plaf.basic.BasicLabelUICustom UI for our renderer. This is basically a performance hack to avoid using HTML for our rendering. Swing's HTML rendering engine is very slow, making tree views many thousands of nodes large using HTML very slow for expand operations (our expandInitialNodes() method). This is caused by calls to get the preferred size of each HTML view. A "plain text" renderer that can paint the different colors itself is much faster (~ 4x faster), but still doesn't eliminate the issue for huge trees.
-
-
Constructor Summary
Constructors Modifier Constructor Description privateXmlTreeCellUI()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidinstallDefaults(javax.swing.JLabel label)protected voidpaintEnabledText(javax.swing.JLabel l, java.awt.Graphics g, java.lang.String s, int textX, int textY)protected voiduninstallDefaults(javax.swing.JLabel label)-
Methods inherited from class javax.swing.plaf.basic.BasicLabelUI
createUI, getBaseline, getBaselineResizeBehavior, getMaximumSize, getMinimumSize, getPreferredSize, installComponents, installKeyboardActions, installListeners, installUI, layoutCL, paint, paintDisabledText, propertyChange, uninstallComponents, uninstallKeyboardActions, uninstallListeners, uninstallUI
-
-
-
-
Method Detail
-
installDefaults
protected void installDefaults(javax.swing.JLabel label)
- Overrides:
installDefaultsin classjavax.swing.plaf.basic.BasicLabelUI
-
paintEnabledText
protected void paintEnabledText(javax.swing.JLabel l, java.awt.Graphics g, java.lang.String s, int textX, int textY)- Overrides:
paintEnabledTextin classjavax.swing.plaf.basic.BasicLabelUI
-
uninstallDefaults
protected void uninstallDefaults(javax.swing.JLabel label)
- Overrides:
uninstallDefaultsin classjavax.swing.plaf.basic.BasicLabelUI
-
-