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
-
public class FlatTreeUI extends javax.swing.plaf.basic.BasicTreeUI
Provides the Flat LaF UI delegate forJTree
.- UiDefault:
- Tree.font Font, Tree.background Color, Tree.hash Color, Tree.dropLineColor Color, Tree.expandedIcon Icon, Tree.collapsedIcon Icon, Tree.leftChildIndent int, Tree.rightChildIndent int, Tree.rowHeight int, Tree.scrollsOnExpand boolean, Tree.scrollsHorizontallyAndVertically boolean, Tree.paintLines boolean, Tree.lineTypeDashed boolean, Tree.showsRootHandles boolean, Tree.repaintWholeRow boolean , Tree.leafIcon Icon, Tree.closedIcon Icon, Tree.openIcon Icon, Tree.textBackground Color, Tree.textForeground Color, Tree.selectionBackground Color, Tree.selectionForeground Color, Tree.selectionBorderColor Color focus indicator border color, Tree.drawsFocusBorderAroundIcon boolean, Tree.drawDashedFocusIndicator boolean, Tree.rendererFillBackground boolean default is true, Tree.rendererMargins Insets, Tree.dropCellBackground Color, Tree.dropCellForeground Color , Tree.editorBorder Border, Tree.editorBorderSelectionColor Color , Tree.border Border, Tree.selectionBackground Color, Tree.selectionForeground Color, Tree.selectionInactiveBackground Color, Tree.selectionInactiveForeground Color, Tree.wideSelection boolean, Tree.showCellFocusIndicator boolean
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class javax.swing.plaf.basic.BasicTreeUI
javax.swing.plaf.basic.BasicTreeUI.CellEditorHandler, javax.swing.plaf.basic.BasicTreeUI.ComponentHandler, javax.swing.plaf.basic.BasicTreeUI.FocusHandler, javax.swing.plaf.basic.BasicTreeUI.KeyHandler, javax.swing.plaf.basic.BasicTreeUI.MouseHandler, javax.swing.plaf.basic.BasicTreeUI.MouseInputHandler, javax.swing.plaf.basic.BasicTreeUI.NodeDimensionsHandler, javax.swing.plaf.basic.BasicTreeUI.PropertyChangeHandler, javax.swing.plaf.basic.BasicTreeUI.SelectionModelPropertyChangeHandler, javax.swing.plaf.basic.BasicTreeUI.TreeCancelEditingAction, javax.swing.plaf.basic.BasicTreeUI.TreeExpansionHandler, javax.swing.plaf.basic.BasicTreeUI.TreeHomeAction, javax.swing.plaf.basic.BasicTreeUI.TreeIncrementAction, javax.swing.plaf.basic.BasicTreeUI.TreeModelHandler, javax.swing.plaf.basic.BasicTreeUI.TreePageAction, javax.swing.plaf.basic.BasicTreeUI.TreeSelectionHandler, javax.swing.plaf.basic.BasicTreeUI.TreeToggleAction, javax.swing.plaf.basic.BasicTreeUI.TreeTraverseAction
-
-
Field Summary
Fields Modifier and Type Field Description protected java.awt.Color
selectionBackground
protected java.awt.Color
selectionBorderColor
protected java.awt.Color
selectionForeground
protected java.awt.Color
selectionInactiveBackground
protected java.awt.Color
selectionInactiveForeground
protected boolean
showCellFocusIndicator
protected boolean
wideSelection
-
Fields 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 Constructor Description FlatTreeUI()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.awt.event.MouseListener
createMouseListener()
protected java.beans.PropertyChangeListener
createPropertyChangeListener()
static javax.swing.plaf.ComponentUI
createUI(javax.swing.JComponent c)
protected java.awt.Rectangle
getDropLineRect(javax.swing.JTree.DropLocation loc)
protected void
installDefaults()
protected boolean
isPaintSelection()
protected boolean
isWideSelection()
protected void
paintRow(java.awt.Graphics g, java.awt.Rectangle clipBounds, java.awt.Insets insets, java.awt.Rectangle bounds, javax.swing.tree.TreePath path, int row, boolean isExpanded, boolean hasBeenExpanded, boolean isLeaf)
Same as super.paintRow(), but supports wide selection and uses inactive selection background/foreground if tree is not focused.protected void
uninstallDefaults()
-
Methods 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, createTreeSelectionListener, drawCentered, drawDashedHorizontalLine, drawDashedVerticalLine, ensureRowsAreVisible, getBaseline, getBaselineResizeBehavior, getCellEditor, getCellRenderer, getClosestPathForLocation, getCollapsedIcon, getEditingPath, getExpandedIcon, getHashColor, getHorizontalLegBuffer, getLastChildPath, getLeadSelectionRow, getLeftChildIndent, getMaximumSize, getMinimumSize, getModel, getPathBounds, getPathForRow, getPreferredMinSize, getPreferredSize, getPreferredSize, getRightChildIndent, getRowCount, getRowForPath, getRowHeight, getRowX, getSelectionModel, getShowsRootHandles, getVerticalLegBuffer, handleExpandControlClick, installComponents, installKeyboardActions, installListeners, installUI, isDropLine, isEditable, isEditing, isLargeModel, isLeaf, isLocationInExpandControl, isMultiSelectEvent, isRootVisible, isToggleEvent, isToggleSelectionEvent, paint, paintDropLine, paintExpandControl, paintHorizontalLine, paintHorizontalPartOfLeg, paintVerticalLine, 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, updateRenderer, updateSize
-
-
-
-
Field Detail
-
selectionBackground
protected java.awt.Color selectionBackground
-
selectionForeground
protected java.awt.Color selectionForeground
-
selectionInactiveBackground
protected java.awt.Color selectionInactiveBackground
-
selectionInactiveForeground
protected java.awt.Color selectionInactiveForeground
-
selectionBorderColor
protected java.awt.Color selectionBorderColor
-
wideSelection
protected boolean wideSelection
-
showCellFocusIndicator
protected boolean showCellFocusIndicator
-
-
Method Detail
-
createUI
public static javax.swing.plaf.ComponentUI createUI(javax.swing.JComponent c)
-
installDefaults
protected void installDefaults()
- Overrides:
installDefaults
in classjavax.swing.plaf.basic.BasicTreeUI
-
uninstallDefaults
protected void uninstallDefaults()
- Overrides:
uninstallDefaults
in classjavax.swing.plaf.basic.BasicTreeUI
-
createMouseListener
protected java.awt.event.MouseListener createMouseListener()
- Overrides:
createMouseListener
in classjavax.swing.plaf.basic.BasicTreeUI
-
createPropertyChangeListener
protected java.beans.PropertyChangeListener createPropertyChangeListener()
- Overrides:
createPropertyChangeListener
in classjavax.swing.plaf.basic.BasicTreeUI
-
paintRow
protected void paintRow(java.awt.Graphics g, java.awt.Rectangle clipBounds, java.awt.Insets insets, java.awt.Rectangle bounds, javax.swing.tree.TreePath path, int row, boolean isExpanded, boolean hasBeenExpanded, boolean isLeaf)
Same as super.paintRow(), but supports wide selection and uses inactive selection background/foreground if tree is not focused.- Overrides:
paintRow
in classjavax.swing.plaf.basic.BasicTreeUI
-
getDropLineRect
protected java.awt.Rectangle getDropLineRect(javax.swing.JTree.DropLocation loc)
- Overrides:
getDropLineRect
in classjavax.swing.plaf.basic.BasicTreeUI
-
isWideSelection
protected boolean isWideSelection()
-
isPaintSelection
protected boolean isPaintSelection()
-
-