Package com.formdev.flatlaf.ui
Class FlatTreeUI
java.lang.Object
javax.swing.plaf.ComponentUI
javax.swing.plaf.TreeUI
javax.swing.plaf.basic.BasicTreeUI
com.formdev.flatlaf.ui.FlatTreeUI
- All Implemented Interfaces:
FlatStylingSupport.StyleableUI
Provides the Flat LaF UI delegate for
JTree.
- Author:
- Karl Tauber
-
Nested Class Summary
Nested classes/interfaces inherited from class javax.swing.plaf.basic.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 TypeFieldDescriptionprotected Colorprotected booleanprotected intprotected Colorprotected Colorprotected Colorprotected Colorprotected Colorprotected Insetsprotected booleanprotected booleanprotected booleanprotected booleanFields inherited from class javax.swing.plaf.basic.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 voidapplyStyle(Object style) protected ObjectapplyStyleProperty(String key, Object value) protected MouseListenerprotected PropertyChangeListenerprotected TreeSelectionListenerstatic ComponentUIprotected RectanglegetPathBounds(JTree tree, TreePath path) getStyleableValue(JComponent c, String key) protected voidprotected voidvoidprotected booleanprotected booleanprotected booleanvoidpaint(Graphics g, JComponent c) protected voidpaintHorizontalLine(Graphics g, JComponent c, int y, int left, int right) protected voidpaintRow(Graphics g, Rectangle clipBounds, Insets insets, Rectangle bounds, TreePath path, int row, boolean isExpanded, boolean hasBeenExpanded, boolean isLeaf) Similar to super.paintRow(), but supports wide selection and uses inactive selection background/foreground if tree is not focused.protected voidpaintVerticalLine(Graphics g, JComponent c, int x, int top, int bottom) protected voidprotected voidMethods inherited from class javax.swing.plaf.basic.BasicTreeUI
cancelEditing, checkForClickInExpandControl, completeEditing, completeEditing, completeUIInstall, completeUIUninstall, configureLayoutCache, createCellEditorListener, createCellRendererPane, createComponentListener, createDefaultCellEditor, createDefaultCellRenderer, createFocusListener, createKeyListener, createLayoutCache, createNodeDimensions, createSelectionModelPropertyChangeListener, createTreeExpansionListener, createTreeModelListener, drawCentered, drawDashedHorizontalLine, drawDashedVerticalLine, ensureRowsAreVisible, getBaseline, getBaselineResizeBehavior, getCellEditor, getCellRenderer, getClosestPathForLocation, getCollapsedIcon, getEditingPath, getExpandedIcon, getHashColor, getHorizontalLegBuffer, getLastChildPath, getLeadSelectionRow, getLeftChildIndent, getMaximumSize, getMinimumSize, getModel, getPathForRow, getPreferredMinSize, getPreferredSize, getPreferredSize, getRightChildIndent, getRowCount, getRowForPath, getRowHeight, getRowX, getSelectionModel, getShowsRootHandles, getVerticalLegBuffer, handleExpandControlClick, installComponents, installKeyboardActions, installListeners, isDropLine, isEditable, isEditing, isLargeModel, isLeaf, isLocationInExpandControl, isMultiSelectEvent, isRootVisible, isToggleEvent, isToggleSelectionEvent, paintDropLine, paintExpandControl, paintHorizontalPartOfLeg, paintVerticalPartOfLeg, 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, uninstallComponents, uninstallKeyboardActions, uninstallListeners, uninstallUI, updateCachedPreferredSize, updateCellEditor, updateDepthOffset, updateExpandedDescendants, updateLayoutCacheExpandedNodes, updateLeadSelectionRow, updateSizeMethods inherited from class javax.swing.plaf.ComponentUI
contains, getAccessibleChild, getAccessibleChildrenCount, update
-
Field Details
-
selectionBackground
-
selectionForeground
-
selectionInactiveBackground
-
selectionInactiveForeground
-
selectionBorderColor
-
alternateRowColor
- Since:
- 3.6
-
selectionInsets
- Since:
- 3
-
selectionArc
protected int selectionArc- Since:
- 3
-
wideSelection
protected boolean wideSelection -
wideCellRenderer
protected boolean wideCellRenderer- Since:
- 3.6
-
showCellFocusIndicator
protected boolean showCellFocusIndicator -
showDefaultIcons
protected boolean showDefaultIcons- Since:
- 3
-
iconArrowType
- Since:
- 2
-
iconExpandedColor
- Since:
- 2
-
iconCollapsedColor
- Since:
- 2
-
iconLeafColor
- Since:
- 2
-
iconClosedColor
- Since:
- 2
-
iconOpenColor
- Since:
- 2
-
paintSelection
protected boolean paintSelection- Since:
- 2
-
-
Constructor Details
-
FlatTreeUI
public FlatTreeUI()
-
-
Method Details
-
createUI
-
installUI
- Overrides:
installUIin classBasicTreeUI
-
installDefaults
protected void installDefaults()- Overrides:
installDefaultsin classBasicTreeUI
-
uninstallDefaults
protected void uninstallDefaults()- Overrides:
uninstallDefaultsin classBasicTreeUI
-
updateRenderer
protected void updateRenderer()- Overrides:
updateRendererin classBasicTreeUI
-
createMouseListener
- Overrides:
createMouseListenerin classBasicTreeUI
-
createPropertyChangeListener
- Overrides:
createPropertyChangeListenerin classBasicTreeUI
-
createTreeSelectionListener
- Overrides:
createTreeSelectionListenerin classBasicTreeUI
-
getPathBounds
- Overrides:
getPathBoundsin classBasicTreeUI
-
installStyle
protected void installStyle()- Since:
- 2
-
applyStyle
- Since:
- 2
-
applyStyleProperty
- Since:
- 2
-
getStyleableInfos
- Specified by:
getStyleableInfosin interfaceFlatStylingSupport.StyleableUI- Since:
- 2
-
getStyleableValue
- Specified by:
getStyleableValuein interfaceFlatStylingSupport.StyleableUI- Since:
- 2.5
-
paint
- Overrides:
paintin classBasicTreeUI
-
paintRow
protected void paintRow(Graphics g, Rectangle clipBounds, Insets insets, Rectangle bounds, TreePath path, int row, boolean isExpanded, boolean hasBeenExpanded, boolean isLeaf) Similar to super.paintRow(), but supports wide selection and uses inactive selection background/foreground if tree is not focused.- Overrides:
paintRowin classBasicTreeUI
-
paintVerticalLine
- Overrides:
paintVerticalLinein classBasicTreeUI
-
paintHorizontalLine
- Overrides:
paintHorizontalLinein classBasicTreeUI
-
getDropLineRect
- Overrides:
getDropLineRectin classBasicTreeUI
-
isWideSelection
protected boolean isWideSelection() -
isWideCellRenderer
protected boolean isWideCellRenderer()- Since:
- 3.6
-
isPaintSelection
protected boolean isPaintSelection()
-