Class RadianceTreeUI
java.lang.Object
javax.swing.plaf.ComponentUI
javax.swing.plaf.TreeUI
javax.swing.plaf.basic.BasicTreeUI
org.pushingpixels.radiance.theming.internal.ui.RadianceTreeUI
UI for lists in Radiance look and feel.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected classSelection listener for selection animation effects.protected classRepaints a single path during the fade animation cycle.private classListener for rollover animation effects.private classListener for selecting the entire rows.static classID of a single tree path.Nested classes/interfaces inherited from class BasicTreeUI
BasicTreeUI.CellEditorHandler, BasicTreeUI.ComponentHandler, BasicTreeUI.FocusHandler, BasicTreeUI.KeyHandler, BasicTreeUI.MouseHandler, BasicTreeUI.MouseInputHandler, BasicTreeUI.NodeDimensionsHandler, BasicTreeUI.PropertyChangeHandler, BasicTreeUI.SelectionModelPropertyChangeHandler, BasicTreeUI.TreeCancelEditingAction, BasicTreeUI.TreeExpansionHandler, BasicTreeUI.TreeHomeAction, BasicTreeUI.TreeIncrementAction, BasicTreeUI.TreeModelHandler, BasicTreeUI.TreePageAction, BasicTreeUI.TreeSelectionHandler, BasicTreeUI.TreeToggleAction, BasicTreeUI.TreeTraverseAction -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate InsetsCell renderer insets.private ContainerColorTokensThe current default color tokens.private RadianceTreeUI.TreePathIdHolds the currently rolled-over path ornullif none such.Listener for transition animations on tree rollovers.private PropertyChangeListenerListener that listens to changes on tree properties.private MouseListenerListener for selection of an entire row.private TreeSelectionListenerListener for selection animations.private Map<RadianceTreeUI.TreePathId, Object> Holds the list of currently selected paths.private Set<RadianceThemingWidget<JComponent>> Fields inherited from class BasicTreeUI
cellEditor, collapsedIcon, createdCellEditor, createdRenderer, currentCellRenderer, depthOffset, drawingCache, editingComponent, editingPath, editingRow, editorHasDifferentSize, expandedIcon, largeModel, lastSelectedRow, leftChildIndent, nodeDimensions, preferredMinSize, preferredSize, rendererPane, rightChildIndent, stopEditingInCompleteEditing, totalChildIndent, tree, treeModel, treeSelectionModel, treeState, validCachedPreferredSize -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected TreeCellRendererstatic ComponentUIcreateUI(JComponent comp) Returns the cell renderer insets of this tree.Returns the default color tokens of this tree.getPathBounds(JTree tree, TreePath path) Returns the current state for the specified path.intgetPivotRendererX(Rectangle paintBounds) Returns the pivot X for the cells rendered in the specified area.private StateTransitionTrackergetTracker(RadianceTreeUI.TreePathId pathId, boolean initialRollover, boolean initialSelected) protected voidprotected voidprotected voidvoidprotected voidpaintExpandControl(Graphics g, Rectangle clipBounds, Insets insets, Rectangle bounds, TreePath path, int row, boolean isExpanded, boolean hasBeenExpanded, boolean isLeaf) private voidpaintExpandControlEnforce(Graphics g, Rectangle clipBounds, Insets insets, Rectangle bounds, TreePath path, int row, boolean isExpanded, boolean hasBeenExpanded, boolean isLeaf) Paints the expand control of the specified row.protected voidpaintHorizontalPartOfLeg(Graphics g, Rectangle clipBounds, Insets insets, Rectangle bounds, TreePath path, int row, boolean isExpanded, boolean hasBeenExpanded, boolean isLeaf) protected voidpaintRow(Graphics g, Rectangle clipBounds, Insets insets, Rectangle bounds, TreePath path, int row, boolean isExpanded, boolean hasBeenExpanded, boolean isLeaf) protected voidpaintVerticalPartOfLeg(Graphics g, Rectangle clipBounds, Insets insets, TreePath path) protected voidprotected voidprotected voidvoidvoidupdate(Graphics g, JComponent c) Methods inherited from class BasicTreeUI
cancelEditing, checkForClickInExpandControl, completeEditing, completeEditing, completeUIInstall, completeUIUninstall, configureLayoutCache, createCellEditorListener, createCellRendererPane, createComponentListener, createDefaultCellEditor, createFocusListener, createKeyListener, createLayoutCache, createMouseListener, createNodeDimensions, createPropertyChangeListener, createSelectionModelPropertyChangeListener, createTreeExpansionListener, createTreeModelListener, createTreeSelectionListener, drawCentered, drawDashedHorizontalLine, drawDashedVerticalLine, ensureRowsAreVisible, getBaseline, getBaselineResizeBehavior, getCellEditor, getCellRenderer, getClosestPathForLocation, getCollapsedIcon, getDropLineRect, getEditingPath, getExpandedIcon, getHashColor, getHorizontalLegBuffer, getLastChildPath, getLeadSelectionRow, getLeftChildIndent, getMaximumSize, getMinimumSize, getModel, getPathForRow, getPreferredMinSize, getPreferredSize, getPreferredSize, getRightChildIndent, getRowCount, getRowForPath, getRowHeight, getRowX, getSelectionModel, getShowsRootHandles, getVerticalLegBuffer, handleExpandControlClick, installKeyboardActions, isDropLine, isEditable, isEditing, isLargeModel, isLeaf, isLocationInExpandControl, isMultiSelectEvent, isRootVisible, isToggleEvent, isToggleSelectionEvent, paint, paintDropLine, paintHorizontalLine, paintVerticalLine, pathWasCollapsed, pathWasExpanded, prepareForUIInstall, prepareForUIUninstall, selectPathForEvent, setCellEditor, setCellRenderer, setCollapsedIcon, setEditable, setExpandedIcon, setHashColor, setLargeModel, setLeftChildIndent, setModel, setPreferredMinSize, setRightChildIndent, setRootVisible, setRowHeight, setSelectionModel, setShowsRootHandles, shouldPaintExpandControl, startEditing, startEditingAtPath, stopEditing, toggleExpandState, uninstallKeyboardActions, updateCachedPreferredSize, updateCellEditor, updateDepthOffset, updateExpandedDescendants, updateLayoutCacheExpandedNodes, updateLeadSelectionRow, updateRenderer, updateSizeMethods inherited from class ComponentUI
contains, getAccessibleChild, getAccessibleChildrenCount
-
Field Details
-
selectedPaths
Holds the list of currently selected paths. -
currRolloverPathId
Holds the currently rolled-over path ornullif none such. -
radiancePropertyChangeListener
Listener that listens to changes on tree properties. -
radianceSelectionFadeListener
Listener for selection animations. -
radianceFadeRolloverListener
Listener for transition animations on tree rollovers. -
radianceRowSelectionListener
Listener for selection of an entire row. -
stateTransitionMultiTracker
-
currDefaultColorTokens
The current default color tokens. Is computed inupdate(Graphics, JComponent)and reused inRadianceDefaultTreeCellRenderer.getTreeCellRendererComponent(JTree, Object, boolean, boolean, boolean, int, boolean)for performance optimizations. -
cellRendererInsets
Cell renderer insets. Is computed ininstallDefaults()and reused inRadianceDefaultTreeCellRenderer.getTreeCellRendererComponent(JTree, Object, boolean, boolean, boolean, int, boolean)for performance optimizations. -
themingWidgets
-
-
Constructor Details
-
RadianceTreeUI
protected RadianceTreeUI()Creates a UI delegate for tree.
-
-
Method Details
-
createUI
-
installUI
- Overrides:
installUIin classBasicTreeUI
-
uninstallUI
- Overrides:
uninstallUIin classBasicTreeUI
-
installDefaults
protected void installDefaults()- Overrides:
installDefaultsin classBasicTreeUI
-
uninstallDefaults
protected void uninstallDefaults()- Overrides:
uninstallDefaultsin classBasicTreeUI
-
paintRow
-
paintExpandControl
protected void paintExpandControl(Graphics g, Rectangle clipBounds, Insets insets, Rectangle bounds, TreePath path, int row, boolean isExpanded, boolean hasBeenExpanded, boolean isLeaf) - Overrides:
paintExpandControlin classBasicTreeUI
-
paintExpandControlEnforce
private void paintExpandControlEnforce(Graphics g, Rectangle clipBounds, Insets insets, Rectangle bounds, TreePath path, int row, boolean isExpanded, boolean hasBeenExpanded, boolean isLeaf) Paints the expand control of the specified row.- Parameters:
g- Graphics context.clipBounds- Clip bounds.insets- Insets.bounds- Row bounds.path- Tree path.row- Tree row.isExpanded- Expand indication.hasBeenExpanded- Indication whether this row has ever been expanded.isLeaf- Indication whether this row is a leaf.
-
paintHorizontalPartOfLeg
protected void paintHorizontalPartOfLeg(Graphics g, Rectangle clipBounds, Insets insets, Rectangle bounds, TreePath path, int row, boolean isExpanded, boolean hasBeenExpanded, boolean isLeaf) - Overrides:
paintHorizontalPartOfLegin classBasicTreeUI
-
paintVerticalPartOfLeg
protected void paintVerticalPartOfLeg(Graphics g, Rectangle clipBounds, Insets insets, TreePath path) - Overrides:
paintVerticalPartOfLegin classBasicTreeUI
-
createDefaultCellRenderer
- Overrides:
createDefaultCellRendererin classBasicTreeUI
-
installListeners
protected void installListeners()- Overrides:
installListenersin classBasicTreeUI
-
uninstallListeners
protected void uninstallListeners()- Overrides:
uninstallListenersin classBasicTreeUI
-
installComponents
protected void installComponents()- Overrides:
installComponentsin classBasicTreeUI
-
uninstallComponents
protected void uninstallComponents()- Overrides:
uninstallComponentsin classBasicTreeUI
-
getPivotRendererX
Returns the pivot X for the cells rendered in the specified area. Used for the smart tree scroll (RadianceThemingSlices.AnimationFacet.TREE_SMART_SCROLL_ANIMATION).- Parameters:
paintBounds- Area bounds.- Returns:
- Pivot X for the cells rendered in the specified area
-
getPathState
Returns the current state for the specified path.- Parameters:
pathId- Path index.- Returns:
- The current state for the specified path.
-
getModelStateInfo
-
update
- Overrides:
updatein classComponentUI
-
getDefaultColorTokens
Returns the default color tokens of this tree. Is for internal use only.- Returns:
- The default color tokens of this tree.
-
getCellRendererInsets
Returns the cell renderer insets of this tree. Is for internal use only.- Returns:
- The cell renderer insets of this tree.
-
getPathBounds
- Overrides:
getPathBoundsin classBasicTreeUI
-
getTracker
private StateTransitionTracker getTracker(RadianceTreeUI.TreePathId pathId, boolean initialRollover, boolean initialSelected)
-