Class RadianceListUI
java.lang.Object
javax.swing.plaf.ComponentUI
javax.swing.plaf.ListUI
javax.swing.plaf.basic.BasicListUI
org.pushingpixels.radiance.theming.internal.ui.RadianceListUI
- All Implemented Interfaces:
UpdateOptimizationAware
UI for lists in Radiance look and feel.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate class
Repaints a single cell during the fade animation cycle.private final class
private class
private class
Listener for fade animations on list rollovers.Nested classes/interfaces inherited from class javax.swing.plaf.basic.BasicListUI
BasicListUI.FocusHandler, BasicListUI.ListDataHandler, BasicListUI.ListSelectionHandler, BasicListUI.MouseInputHandler, BasicListUI.PropertyChangeHandler
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate ComponentListener
Listener for transition animations on list rollovers.private ListDataListener
private ListSelectionListener
Listener for transition animations on list selections.private PropertyChangeListener
Property listener.private int
Holds the currently rolled-over index, or -1 is there is none such.Holds the list of currently selected indices.private StateTransitionMultiTracker
<Integer> private UpdateOptimizationInfo
Fields inherited from class javax.swing.plaf.basic.BasicListUI
cellHeight, cellHeights, cellRendererChanged, cellWidth, fixedCellHeightChanged, fixedCellWidthChanged, focusListener, fontChanged, list, listDataListener, listSelectionListener, modelChanged, mouseInputListener, propertyChangeListener, prototypeCellValueChanged, rendererPane, selectionModelChanged, updateLayoutStateNeeded
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic ComponentUI
createUI
(JComponent comp) private void
Initiates the fade out effect.getCellState
(int cellIndex, Component rendererComponent) Returns the current state for the specified cell.getModelStateInfo
(int row) private StateTransitionTracker
getTracker
(int row, boolean initialRollover, boolean initialSelected) protected void
protected void
protected void
paintCell
(Graphics g, int row, Rectangle rowBounds, ListCellRenderer<Object> cellRenderer, ListModel<Object> dataModel, ListSelectionModel selModel, int leadIndex) void
Resets the rollover index.private void
protected void
protected void
void
void
update
(Graphics g, JComponent c) Methods inherited from class javax.swing.plaf.basic.BasicListUI
convertRowToY, convertYToRow, createFocusListener, createListDataListener, createListSelectionListener, createMouseInputListener, createPropertyChangeListener, getBaseline, getBaselineResizeBehavior, getCellBounds, getPreferredSize, getRowHeight, indexToLocation, installKeyboardActions, installUI, locationToIndex, maybeUpdateLayoutState, paint, selectNextIndex, selectPreviousIndex, uninstallKeyboardActions, updateLayoutState
Methods inherited from class javax.swing.plaf.ComponentUI
contains, getAccessibleChild, getAccessibleChildrenCount, getMaximumSize, getMinimumSize
-
Field Details
-
selectedIndices
Holds the list of currently selected indices. -
rolledOverIndex
private int rolledOverIndexHolds the currently rolled-over index, or -1 is there is none such. -
radiancePropertyChangeListener
Property listener. -
radianceListSelectionListener
Listener for transition animations on list selections. -
radianceFadeRolloverListener
Listener for transition animations on list rollovers. -
radianceComponentListener
-
stateTransitionMultiTracker
-
radianceListDataListener
-
updateInfo
-
-
Constructor Details
-
RadianceListUI
protected RadianceListUI()Creates a UI delegate for list.
-
-
Method Details
-
createUI
-
installDefaults
protected void installDefaults()- Overrides:
installDefaults
in classBasicListUI
-
uninstallDefaults
protected void uninstallDefaults()- Overrides:
uninstallDefaults
in classBasicListUI
-
uninstallUI
- Overrides:
uninstallUI
in classBasicListUI
-
installListeners
protected void installListeners()- Overrides:
installListeners
in classBasicListUI
-
uninstallListeners
protected void uninstallListeners()- Overrides:
uninstallListeners
in classBasicListUI
-
paintCell
protected void paintCell(Graphics g, int row, Rectangle rowBounds, ListCellRenderer<Object> cellRenderer, ListModel<Object> dataModel, ListSelectionModel selModel, int leadIndex) - Overrides:
paintCell
in classBasicListUI
-
getCellState
Returns the current state for the specified cell.- Parameters:
cellIndex
- Cell index.rendererComponent
- Renderer component for the specified cell index.- Returns:
- The current state for the specified cell.
-
getModelStateInfo
-
resetRolloverIndex
public void resetRolloverIndex()Resets the rollover index. -
fadeOutRolloverIndication
private void fadeOutRolloverIndication()Initiates the fade out effect. -
update
- Overrides:
update
in classComponentUI
-
syncModelContents
private void syncModelContents() -
getTracker
private StateTransitionTracker getTracker(int row, boolean initialRollover, boolean initialSelected) -
getUpdateOptimizationInfo
- Specified by:
getUpdateOptimizationInfo
in interfaceUpdateOptimizationAware
-