public class DefaultListCellRenderer extends Label implements ListCellRenderer
ListCellRenderer
for more information about the use and purpose of this classBOTTOM, BRB_CENTER_OFFSET, BRB_CONSTANT_ASCENT, BRB_CONSTANT_DESCENT, BRB_OTHER, CENTER, LEFT, RIGHT, TOP
Constructor and Description |
---|
DefaultListCellRenderer()
Creates a new instance of DefaultCellRenderer
|
DefaultListCellRenderer(boolean showNumbers)
Creates a new instance of DefaultCellRenderer
|
Modifier and Type | Method and Description |
---|---|
Component |
getListCellRendererComponent(List list,
Object value,
int index,
boolean isSelected)
Returns a component instance that is already set to render "value".
|
Component |
getListFocusComponent(List list)
Returns a component instance that is painted under the currently focused renderer
and is animated to provide smooth scrolling.
|
int |
getSelectionTransparency()
The background transparency factor to apply to the selection focus
|
boolean |
isShowNumbers()
Indicate whether numbering should exist for the default cell renderer
|
static boolean |
isShowNumbersDefault()
Inidicates whether the default list cell renderer will show numbers by default
when constructed
|
void |
refreshTheme()
Makes sure the component is up to date with the current style object
|
void |
repaint()
Overriden to do nothing and remove a performance issue where renderer changes
perform needless repaint calls
|
void |
setSelectionTransparency(int selectionTransparency)
The background transparency factor to apply to the selection focus
|
void |
setShowNumbers(boolean showNumbers)
Indicate whether numbering should exist for the default cell renderer
|
static void |
setShowNumbersDefault(boolean def)
Inidicates whether the default list cell renderer will show numbers by default
when constructed
|
animate, calcPreferredSize, getAlignment, getBaselineResizeBehavior, getGap, getIcon, getShiftText, getText, getTextPosition, getVerticalAlignment, isEndsWith3Points, isTickerEnabled, isTickerRunning, paint, paramString, setAlignment, setEndsWith3Points, setGap, setIcon, setShiftText, setText, setTextPosition, setTickerEnabled, setVerticalAlignment, shouldTickerStart, startTicker, stopTicker
addFocusListener, calcScrollSize, contains, deinitialize, deinitializeCustomStyle, dragInitiated, fireClicked, focusGained, focusLost, getAbsoluteX, getAbsoluteY, getBaseline, getBorder, getBottomGap, getBounds, getClientProperty, getComponentForm, getDirtyRegion, getHeight, getLabelForComponent, getNextFocusDown, getNextFocusLeft, getNextFocusRight, getNextFocusUp, getParent, getPreferredH, getPreferredSize, getPreferredW, getScrollAnimationSpeed, getScrollDimension, getScrollX, getScrollY, getSelectCommandText, getSelectedStyle, getSideGap, getStyle, getUIID, getUnselectedStyle, getVisibleBounds, getWidth, getX, getY, handlesInput, hasFocus, initComponent, initCustomStyle, isBorderPainted, isDragActivated, isEnabled, isFocusable, isFocusPainted, isInitialized, isRTL, isScrollable, isScrollableX, isScrollableY, isScrollVisible, isSelectableInteraction, isSmoothScrolling, isTactileTouch, isTactileTouch, isTensileDragEnabled, isVisible, keyPressed, keyReleased, keyRepeated, laidOut, longKeyPress, longPointerPress, paintBackground, paintBackgrounds, paintBorder, paintComponent, paintComponent, paintScrollbars, paintScrollbarX, paintScrollbarY, pointerDragged, pointerDragged, pointerHover, pointerHoverReleased, pointerPressed, pointerPressed, pointerReleased, pointerReleased, putClientProperty, refreshTheme, removeFocusListener, repaint, requestFocus, scrollRectToVisible, scrollRectToVisible, setBorderPainted, setCellRenderer, setDirtyRegion, setEnabled, setFocus, setFocusable, setFocusPainted, setHandlesInput, setHeight, setInitialized, setIsScrollVisible, setLabelForComponent, setNextFocusDown, setNextFocusLeft, setNextFocusRight, setNextFocusUp, setPreferredH, setPreferredSize, setPreferredW, setRTL, setScrollAnimationSpeed, setScrollSize, setScrollX, setScrollY, setSelectCommandText, setSelectedStyle, setShouldCalcPreferredSize, setSize, setSmoothScrolling, setStyle, setTactileTouch, setTensileDragEnabled, setUIID, setUnselectedStyle, setUnSelectedStyle, setVisible, setWidth, setX, setY, styleChanged, toString
public DefaultListCellRenderer()
public DefaultListCellRenderer(boolean showNumbers)
showNumbers
- indicates numbers should be shownpublic void refreshTheme()
Component
refreshTheme
in class Component
public Component getListCellRendererComponent(List list, Object value, int index, boolean isSelected)
ListCellRenderer
getListCellRendererComponent
in interface ListCellRenderer
list
- the list componentvalue
- the value to renderindex
- the index in the listisSelected
- whether the entry is selectedpublic Component getListFocusComponent(List list)
ListCellRenderer
getListFocusComponent
in interface ListCellRenderer
list
- the parent listComponent.setSmoothScrolling(boolean)
public void repaint()
public boolean isShowNumbers()
public void setShowNumbers(boolean showNumbers)
showNumbers
- indicate whether numbering should exist for the default cell rendererpublic int getSelectionTransparency()
public void setSelectionTransparency(int selectionTransparency)
selectionTransparency
- the selection transperancy valuepublic static void setShowNumbersDefault(boolean def)
def
- true to show numbers for all renderers created in the futurepublic static boolean isShowNumbersDefault()