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 classRadianceListUI.CellRepaintCallbackRepaints a single cell during the fade animation cycle.private classRadianceListUI.RadianceListDataListenerprivate classRadianceListUI.RadianceListSelectionListenerprivate classRadianceListUI.RolloverFadeListenerListener 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.ComponentListenerradianceComponentListenerprivate RadianceListUI.RolloverFadeListenerradianceFadeRolloverListenerListener for transition animations on list rollovers.private javax.swing.event.ListDataListenerradianceListDataListenerprivate javax.swing.event.ListSelectionListenerradianceListSelectionListenerListener for transition animations on list selections.private java.beans.PropertyChangeListenerradiancePropertyChangeListenerProperty listener.private introlledOverIndexHolds the currently rolled-over index, or -1 is there is none such.private java.util.Map<java.lang.Integer,java.lang.Object>selectedIndicesHolds the list of currently selected indices.private StateTransitionMultiTracker<java.lang.Integer>stateTransitionMultiTrackerprivate UpdateOptimizationInfoupdateInfo-
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 protectedRadianceListUI()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.ComponentUIcreateUI(javax.swing.JComponent comp)private voidfadeOutRolloverIndication()Initiates the fade out effect.ComponentStategetCellState(int cellIndex, java.awt.Component rendererComponent)Returns the current state for the specified cell.StateTransitionTracker.ModelStateInfogetModelStateInfo(int row)private StateTransitionTrackergetTracker(int row, boolean initialRollover, boolean initialSelected)UpdateOptimizationInfogetUpdateOptimizationInfo()protected voidinstallDefaults()protected voidinstallListeners()protected voidpaintCell(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)voidresetRolloverIndex()Resets the rollover index.private voidsyncModelContents()protected voiduninstallDefaults()protected voiduninstallListeners()voiduninstallUI(javax.swing.JComponent c)voidupdate(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:
installDefaultsin classjavax.swing.plaf.basic.BasicListUI
-
uninstallDefaults
protected void uninstallDefaults()
- Overrides:
uninstallDefaultsin classjavax.swing.plaf.basic.BasicListUI
-
uninstallUI
public void uninstallUI(javax.swing.JComponent c)
- Overrides:
uninstallUIin classjavax.swing.plaf.basic.BasicListUI
-
installListeners
protected void installListeners()
- Overrides:
installListenersin classjavax.swing.plaf.basic.BasicListUI
-
uninstallListeners
protected void uninstallListeners()
- Overrides:
uninstallListenersin 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:
paintCellin 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:
updatein classjavax.swing.plaf.ComponentUI
-
syncModelContents
private void syncModelContents()
-
getTracker
private StateTransitionTracker getTracker(int row, boolean initialRollover, boolean initialSelected)
-
getUpdateOptimizationInfo
public UpdateOptimizationInfo getUpdateOptimizationInfo()
- Specified by:
getUpdateOptimizationInfoin interfaceUpdateOptimizationAware
-
-