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
public class RadianceListUI extends javax.swing.plaf.basic.BasicListUI implements UpdateOptimizationAware
UI for lists in Radiance look and feel.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private class
RadianceListUI.CellRepaintCallback
Repaints a single cell during the fade animation cycle.private class
RadianceListUI.RadianceListDataListener
private class
RadianceListUI.RadianceListSelectionListener
private class
RadianceListUI.RolloverFadeListener
Listener for fade animations on list rollovers.-
Nested classes/interfaces inherited from class javax.swing.plaf.basic.BasicListUI
javax.swing.plaf.basic.BasicListUI.FocusHandler, javax.swing.plaf.basic.BasicListUI.ListDataHandler, javax.swing.plaf.basic.BasicListUI.ListSelectionHandler, javax.swing.plaf.basic.BasicListUI.MouseInputHandler, javax.swing.plaf.basic.BasicListUI.PropertyChangeHandler
-
-
Field Summary
Fields Modifier and Type Field Description private java.awt.event.ComponentListener
radianceComponentListener
private RadianceListUI.RolloverFadeListener
radianceFadeRolloverListener
Listener for transition animations on list rollovers.private javax.swing.event.ListDataListener
radianceListDataListener
private javax.swing.event.ListSelectionListener
radianceListSelectionListener
Listener for transition animations on list selections.private java.beans.PropertyChangeListener
radiancePropertyChangeListener
Property listener.private int
rolledOverIndex
Holds the currently rolled-over index, or -1 is there is none such.private java.util.Map<java.lang.Integer,java.lang.Object>
selectedIndices
Holds the list of currently selected indices.private StateTransitionMultiTracker<java.lang.Integer>
stateTransitionMultiTracker
private UpdateOptimizationInfo
updateInfo
-
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 Modifier Constructor Description protected
RadianceListUI()
Creates a UI delegate for list.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static javax.swing.plaf.ComponentUI
createUI(javax.swing.JComponent comp)
private void
fadeOutRolloverIndication()
Initiates the fade out effect.ComponentState
getCellState(int cellIndex, java.awt.Component rendererComponent)
Returns the current state for the specified cell.StateTransitionTracker.ModelStateInfo
getModelStateInfo(int row)
private StateTransitionTracker
getTracker(int row, boolean initialRollover, boolean initialSelected)
UpdateOptimizationInfo
getUpdateOptimizationInfo()
protected void
installDefaults()
protected void
installListeners()
protected void
paintCell(java.awt.Graphics g, int row, java.awt.Rectangle rowBounds, javax.swing.ListCellRenderer<java.lang.Object> cellRenderer, javax.swing.ListModel<java.lang.Object> dataModel, javax.swing.ListSelectionModel selModel, int leadIndex)
void
resetRolloverIndex()
Resets the rollover index.private void
syncModelContents()
protected void
uninstallDefaults()
protected void
uninstallListeners()
void
uninstallUI(javax.swing.JComponent c)
void
update(java.awt.Graphics g, javax.swing.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
-
-
-
-
Field Detail
-
selectedIndices
private java.util.Map<java.lang.Integer,java.lang.Object> selectedIndices
Holds the list of currently selected indices.
-
rolledOverIndex
private int rolledOverIndex
Holds the currently rolled-over index, or -1 is there is none such.
-
radiancePropertyChangeListener
private java.beans.PropertyChangeListener radiancePropertyChangeListener
Property listener.
-
radianceListSelectionListener
private javax.swing.event.ListSelectionListener radianceListSelectionListener
Listener for transition animations on list selections.
-
radianceFadeRolloverListener
private RadianceListUI.RolloverFadeListener radianceFadeRolloverListener
Listener for transition animations on list rollovers.
-
radianceComponentListener
private java.awt.event.ComponentListener radianceComponentListener
-
stateTransitionMultiTracker
private StateTransitionMultiTracker<java.lang.Integer> stateTransitionMultiTracker
-
radianceListDataListener
private javax.swing.event.ListDataListener radianceListDataListener
-
updateInfo
private UpdateOptimizationInfo updateInfo
-
-
Method Detail
-
createUI
public static javax.swing.plaf.ComponentUI createUI(javax.swing.JComponent comp)
-
installDefaults
protected void installDefaults()
- Overrides:
installDefaults
in classjavax.swing.plaf.basic.BasicListUI
-
uninstallDefaults
protected void uninstallDefaults()
- Overrides:
uninstallDefaults
in classjavax.swing.plaf.basic.BasicListUI
-
uninstallUI
public void uninstallUI(javax.swing.JComponent c)
- Overrides:
uninstallUI
in classjavax.swing.plaf.basic.BasicListUI
-
installListeners
protected void installListeners()
- Overrides:
installListeners
in classjavax.swing.plaf.basic.BasicListUI
-
uninstallListeners
protected void uninstallListeners()
- Overrides:
uninstallListeners
in classjavax.swing.plaf.basic.BasicListUI
-
paintCell
protected void paintCell(java.awt.Graphics g, int row, java.awt.Rectangle rowBounds, javax.swing.ListCellRenderer<java.lang.Object> cellRenderer, javax.swing.ListModel<java.lang.Object> dataModel, javax.swing.ListSelectionModel selModel, int leadIndex)
- Overrides:
paintCell
in classjavax.swing.plaf.basic.BasicListUI
-
getCellState
public ComponentState getCellState(int cellIndex, java.awt.Component rendererComponent)
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
public StateTransitionTracker.ModelStateInfo getModelStateInfo(int row)
-
resetRolloverIndex
public void resetRolloverIndex()
Resets the rollover index.
-
fadeOutRolloverIndication
private void fadeOutRolloverIndication()
Initiates the fade out effect.
-
update
public void update(java.awt.Graphics g, javax.swing.JComponent c)
- Overrides:
update
in classjavax.swing.plaf.ComponentUI
-
syncModelContents
private void syncModelContents()
-
getTracker
private StateTransitionTracker getTracker(int row, boolean initialRollover, boolean initialSelected)
-
getUpdateOptimizationInfo
public UpdateOptimizationInfo getUpdateOptimizationInfo()
- Specified by:
getUpdateOptimizationInfo
in interfaceUpdateOptimizationAware
-
-