- java.lang.Object
-
- java.awt.Component
-
- java.awt.Container
-
- javax.swing.JComponent
-
- javax.swing.JLabel
-
- javax.swing.DefaultListCellRenderer
-
- 实现的所有接口
-
ImageObserver
,MenuContainer
,Serializable
,Accessible
,ListCellRenderer<Object>
,SwingConstants
- 已知直接子类:
-
DefaultListCellRenderer.UIResource
,MetalFileChooserUI.FileRenderer
,MetalFileChooserUI.FilterComboBoxRenderer
public class DefaultListCellRenderer extends JLabel implements ListCellRenderer<Object>, Serializable
呈现列表中的项目。Implementation Note:该类覆盖
invalidate
,validate
,revalidate
,repaint
,isOpaque
和firePropertyChange
只是为了提高性能。 如果未被覆盖,则这些经常调用的方法将执行默认列表单元格渲染器不必要的代码路径。 如果您编写自己的渲染器,请注意权衡覆盖这些方法的优缺点。警告:此类的序列化对象与以后的Swing版本不兼容。 当前的序列化支持适用于运行相同版本Swing的应用程序之间的短期存储或RMI。 从1.4开始,
java.beans
软件包中添加了对所有JavaBeansjava.beans
长期存储的支持。 请参阅XMLEncoder
。- 从以下版本开始:
- 1.2
- 另请参见:
- Serialized Form
-
-
嵌套类汇总
嵌套类 变量和类型 类 描述 static class
DefaultListCellRenderer.UIResource
实现UIResource的DefaultListCellRenderer的子类。-
嵌套类/接口声明在类 javax.swing.JLabel
JLabel.AccessibleJLabel
-
嵌套类/接口声明在类 javax.swing.JComponent
JComponent.AccessibleJComponent
-
嵌套类/接口声明在类 java.awt.Container
Container.AccessibleAWTContainer
-
-
字段汇总
字段 变量和类型 字段 描述 protected static Border
noFocusBorder
没有焦点边界-
声明的属性在类 javax.swing.JComponent
listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
-
声明的属性在类 java.awt.Component
accessibleContext, BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
-
Fields declared in interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
-
Fields declared in interface javax.swing.SwingConstants
BOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NEXT, NORTH, NORTH_EAST, NORTH_WEST, PREVIOUS, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WEST
-
-
构造方法摘要
构造方法 构造器 描述 DefaultListCellRenderer()
为列表中的项构造默认渲染器对象。
-
方法摘要
所有方法 实例方法 具体的方法 变量和类型 方法 描述 void
firePropertyChange(String propertyName, boolean oldValue, boolean newValue)
由于性能原因而被覆盖。void
firePropertyChange(String propertyName, byte oldValue, byte newValue)
由于性能原因而被覆盖。void
firePropertyChange(String propertyName, char oldValue, char newValue)
由于性能原因而被覆盖。void
firePropertyChange(String propertyName, double oldValue, double newValue)
由于性能原因而被覆盖。void
firePropertyChange(String propertyName, float oldValue, float newValue)
由于性能原因而被覆盖。void
firePropertyChange(String propertyName, int oldValue, int newValue)
由于性能原因而被覆盖。void
firePropertyChange(String propertyName, long oldValue, long newValue)
由于性能原因而被覆盖。void
firePropertyChange(String propertyName, short oldValue, short newValue)
由于性能原因而被覆盖。protected void
firePropertyChange(String propertyName, Object oldValue, Object newValue)
由于性能原因而被覆盖。void
invalidate()
由于性能原因而被覆盖。boolean
isOpaque()
由于性能原因而被覆盖。void
repaint()
由于性能原因而被覆盖。void
repaint(long tm, int x, int y, int width, int height)
由于性能原因而被覆盖。void
repaint(Rectangle r)
由于性能原因而被覆盖。void
revalidate()
由于性能原因而被覆盖。void
validate()
由于性能原因而被覆盖。-
声明方法的类 javax.swing.JLabel
checkHorizontalKey, checkVerticalKey, getAccessibleContext, getDisabledIcon, getDisplayedMnemonic, getDisplayedMnemonicIndex, getHorizontalAlignment, getHorizontalTextPosition, getIcon, getIconTextGap, getLabelFor, getText, getUI, getUIClassID, getVerticalAlignment, getVerticalTextPosition, imageUpdate, paramString, setDisabledIcon, setDisplayedMnemonic, setDisplayedMnemonic, setDisplayedMnemonicIndex, setHorizontalAlignment, setHorizontalTextPosition, setIcon, setIconTextGap, setLabelFor, setText, setUI, setVerticalAlignment, setVerticalTextPosition, updateUI
-
声明方法的类 javax.swing.JComponent
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingOrigin, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, 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
-
声明方法的类 java.awt.Container
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
-
声明方法的类 java.awt.Component
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, 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, 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, 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, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
-
声明方法的类 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
声明方法的接口 javax.swing.ListCellRenderer
getListCellRendererComponent
-
-
-
-
字段详细信息
-
noFocusBorder
protected static Border noFocusBorder
没有焦点边界
-
-
方法详细信息
-
isOpaque
public boolean isOpaque()
由于性能原因而被覆盖。 有关更多信息,请参见Implementation Note 。- 重写:
-
isOpaque
类JComponent
- 结果
-
true
如果背景完全不透明且与JList的背景不同; 否则为false
- 从以下版本开始:
- 1.5
- 另请参见:
-
JComponent.setOpaque(boolean)
-
validate
public void validate()
由于性能原因而被覆盖。 有关更多信息,请参见Implementation Note 。
-
invalidate
public void invalidate()
由于性能原因而被覆盖。 有关更多信息,请参见Implementation Note 。- 重写:
-
invalidate
在类Container
- 从以下版本开始:
- 1.5
- 另请参见:
-
Container.validate()
,Container.layout()
,LayoutManager2
-
repaint
public void repaint()
由于性能原因而被覆盖。 有关更多信息,请参见Implementation Note 。- 重写:
-
repaint
在类Component
- 从以下版本开始:
- 1.5
- 另请参见:
-
Component.update(Graphics)
-
revalidate
public void revalidate()
由于性能原因而被覆盖。 有关更多信息,请参见Implementation Note 。
-
repaint
public void repaint(long tm, int x, int y, int width, int height)
由于性能原因而被覆盖。 有关更多信息,请参见Implementation Note 。- 重写:
-
repaint
在课堂上JComponent
- 参数
-
tm
- 未使用此参数 -
x
- 脏区域的x值 -
y
- 脏区域的y值 -
width
- 脏区的宽度 -
height
- 脏区的高度 - 另请参见:
-
JComponent.isPaintingOrigin()
,Component.isShowing()
,RepaintManager.addDirtyRegion(javax.swing.JComponent, int, int, int, int)
-
repaint
public void repaint(Rectangle r)
由于性能原因而被覆盖。 有关更多信息,请参见Implementation Note 。- 重写:
-
repaint
在类JComponent
- 参数
-
r
- 包含脏区域的Rectangle
- 另请参见:
-
JComponent.isPaintingOrigin()
,Component.isShowing()
,RepaintManager.addDirtyRegion(javax.swing.JComponent, int, int, int, int)
-
firePropertyChange
protected void firePropertyChange(String propertyName, Object oldValue, Object newValue)
由于性能原因而被覆盖。 有关更多信息,请参见Implementation Note 。- 重写:
-
firePropertyChange
在类Component
- 参数
-
propertyName
- 其值已更改的属性 -
oldValue
- 该物业以前的价值 -
newValue
- 该物业的新价值
-
firePropertyChange
public void firePropertyChange(String propertyName, byte oldValue, byte newValue)
由于性能原因而被覆盖。 有关更多信息,请参见Implementation Note 。- 重写:
-
firePropertyChange
在类Component
- 参数
-
propertyName
- 已更改的属性的编程名称 -
oldValue
- 属性的旧值(作为字节) -
newValue
- 属性的新值(作为字节) - 另请参见:
-
Component.firePropertyChange(java.lang.String, java.lang.Object, java.lang.Object)
-
firePropertyChange
public void firePropertyChange(String propertyName, char oldValue, char newValue)
由于性能原因而被覆盖。 有关更多信息,请参见Implementation Note 。- 重写:
-
firePropertyChange
在类Component
- 参数
-
propertyName
- 已更改的属性的编程名称 -
oldValue
- 属性的旧值(作为char) -
newValue
- 属性的新值(作为char) - 另请参见:
-
Component.firePropertyChange(java.lang.String, java.lang.Object, java.lang.Object)
-
firePropertyChange
public void firePropertyChange(String propertyName, short oldValue, short newValue)
由于性能原因而被覆盖。 有关更多信息,请参见Implementation Note 。- 重写:
-
firePropertyChange
在类Component
- 参数
-
propertyName
- 已更改的属性的编程名称 -
oldValue
- 该物业的旧价值(简称) -
newValue
- 该物业的新值(简称) - 另请参见:
-
Component.firePropertyChange(java.lang.String, java.lang.Object, java.lang.Object)
-
firePropertyChange
public void firePropertyChange(String propertyName, int oldValue, int newValue)
由于性能原因而被覆盖。 有关更多信息,请参见Implementation Note 。- 重写:
-
firePropertyChange
在类JComponent
- 参数
-
propertyName
- 其值已更改的属性 -
oldValue
- 该物业以前的价值 -
newValue
- 该物业的新价值
-
firePropertyChange
public void firePropertyChange(String propertyName, long oldValue, long newValue)
由于性能原因而被覆盖。 有关更多信息,请参见Implementation Note 。- 重写:
-
firePropertyChange
,类Component
- 参数
-
propertyName
- 已更改的属性的编程名称 -
oldValue
- 属性的旧值(作为long) -
newValue
- 该属性的新值(作为长) - 另请参见:
-
Component.firePropertyChange(java.lang.String, java.lang.Object, java.lang.Object)
-
firePropertyChange
public void firePropertyChange(String propertyName, float oldValue, float newValue)
由于性能原因而被覆盖。 有关更多信息,请参见Implementation Note 。- 重写:
-
firePropertyChange
在类Component
- 参数
-
propertyName
- 已更改的属性的编程名称 -
oldValue
- 属性的旧值(作为浮点数) -
newValue
- 属性的新值(作为浮点数) - 另请参见:
-
Component.firePropertyChange(java.lang.String, java.lang.Object, java.lang.Object)
-
firePropertyChange
public void firePropertyChange(String propertyName, double oldValue, double newValue)
由于性能原因而被覆盖。 有关更多信息,请参见Implementation Note 。- 重写:
-
firePropertyChange
在类Component
- 参数
-
propertyName
- 已更改的属性的编程名称 -
oldValue
- 属性的旧值(作为double) -
newValue
- 属性的新值(作为double) - 另请参见:
-
Component.firePropertyChange(java.lang.String, java.lang.Object, java.lang.Object)
-
firePropertyChange
public void firePropertyChange(String propertyName, boolean oldValue, boolean newValue)
由于性能原因而被覆盖。 有关更多信息,请参见Implementation Note 。- 重写:
-
firePropertyChange
在类JComponent
- 参数
-
propertyName
- 其值已更改的属性 -
oldValue
- 该物业以前的价值 -
newValue
- 该物业的新价值
-
-