public class DefaultListCellRenderer extends JLabel implements ListCellRenderer, Serializable
ListCellRenderer. It provides a standard
renderer for data objects of all types via Object.toString().| Modifier and Type | Class and Description |
|---|---|
static class |
DefaultListCellRenderer.UIResource
Subclasses
DefaultListCellRenderers and implements
UIResource. |
JLabel.AccessibleJLabelJComponent.AccessibleJComponentContainer.AccessibleAWTContainerComponent.AccessibleAWTComponent, Component.BltBufferStrategy, Component.FlipBufferStrategy| Modifier and Type | Field and Description |
|---|---|
protected static Border |
noFocusBorder
This border is used whenever renderer doesn't have a focus.
|
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOWBOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENTBOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NEXT, NORTH, NORTH_EAST, NORTH_WEST, PREVIOUS, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WESTABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH| Constructor and Description |
|---|
DefaultListCellRenderer() |
| Modifier and Type | Method and Description |
|---|---|
void |
firePropertyChange(String propertyName,
boolean oldValue,
boolean newValue)
Fires a property change for a primitive boolean property.
|
void |
firePropertyChange(String propertyName,
byte oldValue,
byte newValue)
Report a change in a bound property to any registered property listeners.
|
void |
firePropertyChange(String propertyName,
char oldValue,
char newValue)
Report a change in a bound property to any registered property listeners.
|
void |
firePropertyChange(String propertyName,
double oldValue,
double newValue)
Report a change in a bound property to any registered property listeners.
|
void |
firePropertyChange(String propertyName,
float oldValue,
float newValue)
Report a change in a bound property to any registered property listeners.
|
void |
firePropertyChange(String propertyName,
int oldValue,
int newValue)
Fires a property change for a primitive integer property.
|
void |
firePropertyChange(String propertyName,
long oldValue,
long newValue)
Report a change in a bound property to any registered property listeners.
|
protected void |
firePropertyChange(String propertyName,
Object oldValue,
Object newValue)
Report a change in a bound property to any registered property listeners.
|
void |
firePropertyChange(String propertyName,
short oldValue,
short newValue)
Report a change in a bound property to any registered property listeners.
|
Component |
getListCellRendererComponent(JList list,
Object value,
int index,
boolean isSelected,
boolean cellHasFocus)
getListCellRendererComponent
|
void |
repaint(long tm,
int x,
int y,
int w,
int h)
Mark the described region of this component as dirty in the current
RepaintManager. |
void |
repaint(Rectangle rect)
Mark the described region of this component as dirty in the current
RepaintManager. |
void |
revalidate()
Queue a an invalidation and revalidation of this component, using
RepaintManager.addInvalidComponent(javax.swing.JComponent). |
void |
validate()
Re-lays out the components in this container.
|
checkHorizontalKey, checkVerticalKey, getAccessibleContext, getDisabledIcon, getDisplayedMnemonic, getDisplayedMnemonicIndex, getHorizontalAlignment, getHorizontalTextPosition, getIcon, getIconTextGap, getLabelFor, getText, getUI, getUIClassID, getVerticalAlignment, getVerticalTextPosition, imageUpdate, paramString, setDisabledIcon, setDisplayedMnemonic, setDisplayedMnemonic, setDisplayedMnemonicIndex, setFont, setHorizontalAlignment, setHorizontalTextPosition, setIcon, setIconTextGap, setLabelFor, setText, setUI, setVerticalAlignment, setVerticalTextPosition, updateUIaddAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, 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, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setNextFocusableComponent, setOpaque, 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, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalKeys, 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, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, 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, processMouseEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize, setMinimumSize, setName, setPreferredSize, setSize, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycleprotected static Border noFocusBorder
public DefaultListCellRenderer()
public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus)
getListCellRendererComponent in interface ListCellRendererlist - JList list for the 'value'value - object that should be rendered in the cellindex - index of the cellisSelected - draw cell highlighted if isSelected is truecellHasFocus - draw focus rectangle around cell if the cell has
focuspublic void validate()
Containervalidate in class ContainerComponent.invalidate(),
Component.doLayout(),
LayoutManager,
Container.validate()public void revalidate()
JComponentRepaintManager.addInvalidComponent(javax.swing.JComponent).revalidate in class JComponentpublic void repaint(long tm, int x, int y, int w, int h)
JComponentRepaintManager. This will queue an asynchronous repaint using
the system painting thread in the near future.repaint in class JComponenttm - ignoredx - coordinate of the region to mark as dirtyy - coordinate of the region to mark as dirtyw - dimension of the region to mark as dirtyh - dimension of the region to mark as dirtyComponent.update(Graphics)public void repaint(Rectangle rect)
JComponentRepaintManager. This will queue an asynchronous repaint using
the system painting thread in the near future.repaint in class JComponentrect - The rectangle to mark as dirtyprotected void firePropertyChange(String propertyName, Object oldValue, Object newValue)
ComponentfirePropertyChange in class ComponentpropertyName - the property that changedoldValue - the old property valuenewValue - the new property valuepublic void firePropertyChange(String propertyName, byte oldValue, byte newValue)
ComponentfirePropertyChange in class ComponentpropertyName - the property that changedoldValue - the old property valuenewValue - the new property valuepublic void firePropertyChange(String propertyName, char oldValue, char newValue)
ComponentfirePropertyChange in class ComponentpropertyName - the property that changedoldValue - the old property valuenewValue - the new property valuepublic void firePropertyChange(String propertyName, short oldValue, short newValue)
ComponentfirePropertyChange in class ComponentpropertyName - the property that changedoldValue - the old property valuenewValue - the new property valuepublic void firePropertyChange(String propertyName, int oldValue, int newValue)
JComponentfirePropertyChange in class JComponentpropertyName - the name of the propertyoldValue - the old value of the propertynewValue - the new value of the propertypublic void firePropertyChange(String propertyName, long oldValue, long newValue)
ComponentfirePropertyChange in class ComponentpropertyName - the property that changedoldValue - the old property valuenewValue - the new property valuepublic void firePropertyChange(String propertyName, float oldValue, float newValue)
ComponentfirePropertyChange in class ComponentpropertyName - the property that changedoldValue - the old property valuenewValue - the new property valuepublic void firePropertyChange(String propertyName, double oldValue, double newValue)
ComponentfirePropertyChange in class ComponentpropertyName - the property that changedoldValue - the old property valuenewValue - the new property valuepublic void firePropertyChange(String propertyName, boolean oldValue, boolean newValue)
JComponentfirePropertyChange in class JComponentpropertyName - the name of the propertyoldValue - the old value of the propertynewValue - the new value of the property