public abstract class ColoredTreeCellRenderer extends SimpleColoredComponent implements javax.swing.tree.TreeCellRenderer
| Modifier and Type | Class and Description |
|---|---|
protected class |
ColoredTreeCellRenderer.AccessibleColoredTreeCellRenderer |
SimpleColoredComponent.AccessibleSimpleColoredComponent, SimpleColoredComponent.BrowserLauncherTag, SimpleColoredComponent.ColoredIteratorjavax.swing.JComponent.AccessibleJComponent| Modifier and Type | Field and Description |
|---|---|
protected boolean |
mySelected
Defines whether the tree is selected or not
|
protected javax.swing.JTree |
myTree |
protected boolean |
myUsedCustomSpeedSearchHighlighting |
FRAGMENT_ICON, myIconTextGaplistenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW| Constructor and Description |
|---|
ColoredTreeCellRenderer() |
| Modifier and Type | Method and Description |
|---|---|
void |
append(java.lang.String fragment,
SimpleTextAttributes attributes,
boolean isMainText)
When the item is selected then we use default tree's selection foreground.
|
protected boolean |
calcFocusedState() |
abstract void |
customizeCellRenderer(javax.swing.JTree tree,
java.lang.Object value,
boolean selected,
boolean expanded,
boolean leaf,
int row,
boolean hasFocus)
This method is invoked only for customization of component.
|
void |
firePropertyChange(java.lang.String propertyName,
boolean oldValue,
boolean newValue) |
void |
firePropertyChange(java.lang.String propertyName,
byte oldValue,
byte newValue) |
void |
firePropertyChange(java.lang.String propertyName,
char oldValue,
char newValue) |
void |
firePropertyChange(java.lang.String propertyName,
double oldValue,
double newValue) |
void |
firePropertyChange(java.lang.String propertyName,
float oldValue,
float newValue) |
void |
firePropertyChange(java.lang.String propertyName,
int oldValue,
int newValue) |
void |
firePropertyChange(java.lang.String propertyName,
long oldValue,
long newValue) |
protected void |
firePropertyChange(java.lang.String propertyName,
java.lang.Object oldValue,
java.lang.Object newValue) |
void |
firePropertyChange(java.lang.String propertyName,
short oldValue,
short newValue) |
javax.accessibility.AccessibleContext |
getAccessibleContext() |
java.awt.Font |
getFont() |
javax.swing.JTree |
getTree() |
java.awt.Component |
getTreeCellRendererComponent(javax.swing.JTree tree,
java.lang.Object value,
boolean selected,
boolean expanded,
boolean leaf,
int row,
boolean hasFocus) |
void |
invalidate() |
protected boolean |
isFocused() |
void |
repaint(long tm,
int x,
int y,
int width,
int height) |
void |
revalidate() |
void |
setOpaque(boolean isOpaque) |
void |
validate() |
append, append, append, append, appendTextPadding, appendTextPadding, applyAdditionalHints, change, clear, computePreferredSize, doPaint, doPaintFragmentBackground, doPaintIcon, doPaintText, findFragmentAt, formatToLabel, getActiveTextColor, getBaseline, getCharSequence, getFragmentTag, getFragmentTagAt, getIcon, getIconTextGap, getIpad, getMinHeight, getMinimumSize, getMyBorder, getPreferredSize, getTextBaseLine, isIconOnTheRight, isIconOpaque, isTransparentIconBackground, iterator, iterator, paintBackground, paintComponent, paintIcon, setBorderInsets, setFocusBorderAroundIcon, setIcon, setIconOnTheRight, setIconOpaque, setIconTextGap, setIpad, setMyBorder, setPaintFocusBorder, setTextAlign, setTransparentIconBackground, shouldDrawBackground, shouldDrawDimmed, shouldDrawMacShadow, toString, updateUIaddAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getNextFocusableComponent, getPopupLocation, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getUI, getUIClassID, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, hide, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingOrigin, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintImmediately, paintImmediately, paramString, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, updateadd, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusDownCycle, validateTreeaction, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setMixingCutoutShape, setName, setSize, setSize, show, show, size, transferFocus, transferFocusBackward, transferFocusUpCycleprotected boolean mySelected
protected boolean myUsedCustomSpeedSearchHighlighting
protected javax.swing.JTree myTree
public final java.awt.Component getTreeCellRendererComponent(javax.swing.JTree tree,
java.lang.Object value,
boolean selected,
boolean expanded,
boolean leaf,
int row,
boolean hasFocus)
getTreeCellRendererComponent in interface javax.swing.tree.TreeCellRendererpublic javax.swing.JTree getTree()
protected final boolean isFocused()
protected boolean calcFocusedState()
public void setOpaque(boolean isOpaque)
setOpaque in class javax.swing.JComponentpublic java.awt.Font getFont()
getFont in interface java.awt.MenuContainergetFont in class java.awt.Componentpublic void append(java.lang.String fragment,
SimpleTextAttributes attributes,
boolean isMainText)
append in class SimpleColoredComponentfragment - text fragmentattributes - text attributesisMainText - main text of notpublic abstract void customizeCellRenderer(javax.swing.JTree tree,
java.lang.Object value,
boolean selected,
boolean expanded,
boolean leaf,
int row,
boolean hasFocus)
public javax.accessibility.AccessibleContext getAccessibleContext()
getAccessibleContext in interface javax.accessibility.AccessiblegetAccessibleContext in class SimpleColoredComponentpublic void validate()
validate in class java.awt.Containerpublic void invalidate()
invalidate in class java.awt.Containerpublic void revalidate()
revalidate in class javax.swing.JComponentpublic void repaint(long tm,
int x,
int y,
int width,
int height)
repaint in class javax.swing.JComponentprotected void firePropertyChange(java.lang.String propertyName,
java.lang.Object oldValue,
java.lang.Object newValue)
firePropertyChange in class java.awt.Componentpublic void firePropertyChange(java.lang.String propertyName,
byte oldValue,
byte newValue)
firePropertyChange in class java.awt.Componentpublic void firePropertyChange(java.lang.String propertyName,
char oldValue,
char newValue)
firePropertyChange in class javax.swing.JComponentpublic void firePropertyChange(java.lang.String propertyName,
short oldValue,
short newValue)
firePropertyChange in class java.awt.Componentpublic void firePropertyChange(java.lang.String propertyName,
int oldValue,
int newValue)
firePropertyChange in class javax.swing.JComponentpublic void firePropertyChange(java.lang.String propertyName,
long oldValue,
long newValue)
firePropertyChange in class java.awt.Componentpublic void firePropertyChange(java.lang.String propertyName,
float oldValue,
float newValue)
firePropertyChange in class java.awt.Componentpublic void firePropertyChange(java.lang.String propertyName,
double oldValue,
double newValue)
firePropertyChange in class java.awt.Componentpublic void firePropertyChange(java.lang.String propertyName,
boolean oldValue,
boolean newValue)
firePropertyChange in class javax.swing.JComponent