public abstract class ColoredListCellRenderer<T> extends SimpleColoredComponent implements javax.swing.ListCellRenderer<T>
SimpleColoredComponent.AccessibleSimpleColoredComponent, SimpleColoredComponent.BrowserLauncherTag, SimpleColoredComponent.ColoredIterator
javax.swing.JComponent.AccessibleJComponent
Modifier and Type | Field and Description |
---|---|
protected java.awt.Color |
myForeground |
protected boolean |
mySelected |
protected java.awt.Color |
mySelectionForeground |
FRAGMENT_ICON, myIconTextGap
listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
Constructor and Description |
---|
ColoredListCellRenderer() |
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 abstract void |
customizeCellRenderer(javax.swing.JList<? extends T> list,
T value,
int index,
boolean selected,
boolean hasFocus) |
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) |
void |
firePropertyChange(java.lang.String propertyName,
short oldValue,
short newValue) |
java.awt.Component |
getListCellRendererComponent(javax.swing.JList<? extends T> list,
T value,
int index,
boolean selected,
boolean hasFocus) |
java.awt.Dimension |
getPreferredSize() |
void |
invalidate() |
void |
repaint() |
void |
repaint(long tm,
int x,
int y,
int width,
int height) |
void |
repaint(java.awt.Rectangle r) |
void |
revalidate() |
void |
validate() |
append, append, append, append, appendTextPadding, appendTextPadding, applyAdditionalHints, change, clear, computePreferredSize, doPaint, doPaintFragmentBackground, doPaintIcon, doPaintText, findFragmentAt, formatToLabel, getAccessibleContext, getActiveTextColor, getBaseline, getCharSequence, getFragmentTag, getFragmentTagAt, getIcon, getIconTextGap, getIpad, getMinHeight, getMinimumSize, getMyBorder, getTextBaseLine, isIconOnTheRight, isIconOpaque, isTransparentIconBackground, iterator, iterator, paintBackground, paintComponent, paintIcon, setBorderInsets, setFocusBorderAroundIcon, setIcon, setIconOnTheRight, setIconOpaque, setIconTextGap, setIpad, setMyBorder, setPaintFocusBorder, setTextAlign, setTransparentIconBackground, shouldDrawBackground, shouldDrawDimmed, shouldDrawMacShadow, toString, updateUI
addAncestorListener, 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, 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, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
add, 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, validateTree
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, 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, 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, transferFocusUpCycle
protected boolean mySelected
protected java.awt.Color myForeground
protected java.awt.Color mySelectionForeground
public java.awt.Component getListCellRendererComponent(javax.swing.JList<? extends T> list, T value, int index, boolean selected, boolean hasFocus)
getListCellRendererComponent
in interface javax.swing.ListCellRenderer<T>
public final void append(java.lang.String fragment, SimpleTextAttributes attributes, boolean isMainText)
append
in class SimpleColoredComponent
fragment
- text fragmentattributes
- text attributesisMainText
- main text of notpublic java.awt.Dimension getPreferredSize()
getPreferredSize
in class SimpleColoredComponent
protected abstract void customizeCellRenderer(javax.swing.JList<? extends T> list, T value, int index, boolean selected, boolean hasFocus)
public void validate()
validate
in class java.awt.Container
public void invalidate()
invalidate
in class java.awt.Container
public void repaint()
repaint
in class java.awt.Component
public void revalidate()
revalidate
in class javax.swing.JComponent
public void repaint(long tm, int x, int y, int width, int height)
repaint
in class javax.swing.JComponent
public void repaint(java.awt.Rectangle r)
repaint
in class javax.swing.JComponent
public void firePropertyChange(java.lang.String propertyName, byte oldValue, byte newValue)
firePropertyChange
in class java.awt.Component
public void firePropertyChange(java.lang.String propertyName, char oldValue, char newValue)
firePropertyChange
in class javax.swing.JComponent
public void firePropertyChange(java.lang.String propertyName, short oldValue, short newValue)
firePropertyChange
in class java.awt.Component
public void firePropertyChange(java.lang.String propertyName, int oldValue, int newValue)
firePropertyChange
in class javax.swing.JComponent
public void firePropertyChange(java.lang.String propertyName, long oldValue, long newValue)
firePropertyChange
in class java.awt.Component
public void firePropertyChange(java.lang.String propertyName, float oldValue, float newValue)
firePropertyChange
in class java.awt.Component
public void firePropertyChange(java.lang.String propertyName, double oldValue, double newValue)
firePropertyChange
in class java.awt.Component
public void firePropertyChange(java.lang.String propertyName, boolean oldValue, boolean newValue)
firePropertyChange
in class javax.swing.JComponent