Package com.github.weisj.darklaf.ui.tree
Class DarkTreeUI
java.lang.Object
javax.swing.plaf.ComponentUI
javax.swing.plaf.TreeUI
javax.swing.plaf.basic.BasicTreeUI
com.github.weisj.darklaf.ui.tree.DarkTreeUI
- All Implemented Interfaces:
CellConstants
,HasRendererPane
,PropertyChangeListener
,EventListener
public class DarkTreeUI
extends BasicTreeUI
implements PropertyChangeListener, CellConstants, HasRendererPane
-
Nested Class Summary
Nested ClassesNested 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 static final Rectangle
protected Icon
protected Icon
protected Icon
protected Icon
protected Icon
protected Icon
protected Icon
protected Icon
protected Icon
protected Icon
protected Color
static final String
static final String
static final String
static final String
static final String
static final String
static final String
protected static final String
static final String
protected Insets
protected Color
protected static final com.github.weisj.darklaf.properties.icons.RotatableIcon
protected CellHintPopupListener<JTree,
?> protected DarkTreeCellRendererDelegate
protected Color
protected MouseListener
static final String
static final String
static final String
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
Fields inherited from interface com.github.weisj.darklaf.ui.cell.CellConstants
RENDER_TYPE_CHECKBOX, RENDER_TYPE_RADIOBUTTON
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected void
protected void
protected CellRendererPane
protected TreeCellEditor
protected TreeCellRenderer
protected DarkTreeExpansionAnimationListener
protected FocusListener
protected MouseListener
protected CellHintPopupListener<JTree,
?> static ComponentUI
protected void
ensureRowsAreVisible
(int beginRow, int endRow) protected Icon
getCollapsedIcon
(boolean selected, boolean focused) int
protected Icon
getExpandedIcon
(boolean selected, boolean focused) protected Color
getLineColor
(TreePath path) protected String
protected Rectangle
getPathBounds
(TreePath path, Insets insets, Rectangle bounds) protected boolean
hasFocus()
protected boolean
protected void
protected void
protected void
protected boolean
protected boolean
protected static boolean
protected boolean
protected boolean
void
paint
(Graphics g, JComponent c) protected void
paintExpandControl
(Graphics g, Rectangle clipBounds, Insets insets, Rectangle bounds, TreePath path, int row, boolean isExpanded, boolean hasBeenExpanded, boolean isLeaf) protected void
paintExpandControl
(Graphics g, Rectangle bounds, TreePath path, int row, boolean isExpanded, boolean isLeaf, boolean isFocused) protected void
paintHorizontalPartOfLeg
(Graphics g, Rectangle clipBounds, Insets insets, Rectangle bounds, TreePath path, int row, boolean isExpanded, boolean hasBeenExpanded, boolean isLeaf) void
protected void
paintRowBackground
(Graphics g, Rectangle bounds, TreePath path, int row, boolean selected) protected Rectangle
paintSingleRow
(Graphics g, Rectangle paintBounds, Insets insets, TreePath path, int row) protected void
paintVerticalLegs
(Graphics g, Rectangle clipBounds, Rectangle rowBounds, Insets insets, TreePath path) protected void
paintVerticalLine
(Graphics g, JComponent c, int x, int top, int bottom) protected void
paintVerticalPartOfLeg
(Graphics g, Rectangle clipBounds, Insets insets, TreePath path) void
protected boolean
protected void
protected void
protected void
void
update
(Graphics g, JComponent c) protected void
Methods inherited from class javax.swing.plaf.basic.BasicTreeUI
cancelEditing, checkForClickInExpandControl, completeEditing, completeUIUninstall, configureLayoutCache, createCellEditorListener, createComponentListener, createKeyListener, createLayoutCache, createMouseListener, createNodeDimensions, createPropertyChangeListener, createSelectionModelPropertyChangeListener, createTreeExpansionListener, createTreeModelListener, createTreeSelectionListener, drawCentered, drawDashedHorizontalLine, drawDashedVerticalLine, getBaseline, getBaselineResizeBehavior, getCellEditor, getClosestPathForLocation, getCollapsedIcon, getDropLineRect, 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, installUI, isDropLine, isEditable, isEditing, isLargeModel, isLeaf, isLocationInExpandControl, isMultiSelectEvent, isRootVisible, isToggleEvent, paintDropLine, paintHorizontalLine, paintRow, 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, uninstallUI, updateCachedPreferredSize, updateCellEditor, updateDepthOffset, updateExpandedDescendants, updateLayoutCacheExpandedNodes, updateLeadSelectionRow, updateSize
Methods inherited from class javax.swing.plaf.ComponentUI
contains, getAccessibleChild, getAccessibleChildrenCount
-
Field Details
-
KEY_PREFIX
- See Also:
-
KEY_ALTERNATE_ROW_COLOR
- See Also:
-
KEY_RENDER_BOOLEAN_AS_CHECKBOX
- See Also:
-
KEY_BOOLEAN_RENDER_TYPE
- See Also:
-
KEY_LINE_STYLE
- See Also:
-
KEY_MAC_ACTIONS_INSTALLED
- See Also:
-
STYLE_LINE
- See Also:
-
STYLE_DASHED
- See Also:
-
STYLE_NONE
- See Also:
-
KEY_IS_TREE_EDITOR
- See Also:
-
KEY_IS_TREE_RENDERER
- See Also:
-
KEY_IS_TABLE_TREE
- See Also:
-
boundsBuffer
-
paintingIcon
protected static final com.github.weisj.darklaf.properties.icons.RotatableIcon paintingIcon -
selectionListener
-
lineColor
-
focusSelectedLineColor
-
selectedLineColor
-
expandedFocusSelected
-
expandedSelected
-
expandedFocus
-
expanded
-
expandedDisabled
-
collapsedFocusSelected
-
collapsedSelected
-
collapsedFocus
-
collapsed
-
collapsedDisabled
-
leadSelectionBorderInsets
-
popupListener
-
rendererDelegate
-
-
Constructor Details
-
DarkTreeUI
public DarkTreeUI()
-
-
Method Details
-
createUI
-
isSelected
-
completeUIInstall
protected void completeUIInstall()- Overrides:
completeUIInstall
in classBasicTreeUI
-
installDefaults
protected void installDefaults()- Overrides:
installDefaults
in classBasicTreeUI
-
createCellRendererPane
- Overrides:
createCellRendererPane
in classBasicTreeUI
-
installListeners
protected void installListeners()- Overrides:
installListeners
in classBasicTreeUI
-
createExpansionAnimationListener
-
createMouseSelectionListener
-
createPopupMouseListener
-
installKeyboardActions
protected void installKeyboardActions()- Overrides:
installKeyboardActions
in classBasicTreeUI
-
createFocusListener
- Overrides:
createFocusListener
in classBasicTreeUI
-
hasFocus
protected boolean hasFocus() -
hasFocus
-
createDefaultCellEditor
- Overrides:
createDefaultCellEditor
in classBasicTreeUI
-
createDefaultCellRenderer
- Overrides:
createDefaultCellRenderer
in classBasicTreeUI
-
uninstallDefaults
protected void uninstallDefaults()- Overrides:
uninstallDefaults
in classBasicTreeUI
-
uninstallListeners
protected void uninstallListeners()- Overrides:
uninstallListeners
in classBasicTreeUI
-
uninstallKeyboardActions
protected void uninstallKeyboardActions()- Overrides:
uninstallKeyboardActions
in classBasicTreeUI
-
paint
- Overrides:
paint
in classBasicTreeUI
-
paintRow
-
paintSingleRow
-
paintRowBackground
-
paintVerticalLegs
-
getCellRenderer
- Overrides:
getCellRenderer
in classBasicTreeUI
-
getEditingComponent
-
getEditingRow
public int getEditingRow() -
getPathBounds
-
update
- Overrides:
update
in classComponentUI
-
getPopupListener
-
updateRenderer
protected void updateRenderer()- Overrides:
updateRenderer
in classBasicTreeUI
-
shouldPaintLines
protected boolean shouldPaintLines() -
getLineColor
-
getExpandedIcon
-
getCollapsedIcon
-
getLineStyle
-
isChildOfSelectionPath
-
isDashedLine
protected boolean isDashedLine() -
paintHorizontalPartOfLeg
protected void paintHorizontalPartOfLeg(Graphics g, Rectangle clipBounds, Insets insets, Rectangle bounds, TreePath path, int row, boolean isExpanded, boolean hasBeenExpanded, boolean isLeaf) - Overrides:
paintHorizontalPartOfLeg
in classBasicTreeUI
-
paintVerticalPartOfLeg
protected void paintVerticalPartOfLeg(Graphics g, Rectangle clipBounds, Insets insets, TreePath path) - Overrides:
paintVerticalPartOfLeg
in classBasicTreeUI
-
paintExpandControl
protected void paintExpandControl(Graphics g, Rectangle clipBounds, Insets insets, Rectangle bounds, TreePath path, int row, boolean isExpanded, boolean hasBeenExpanded, boolean isLeaf) - Overrides:
paintExpandControl
in classBasicTreeUI
-
paintExpandControl
-
paintVerticalLine
- Overrides:
paintVerticalLine
in classBasicTreeUI
-
completeEditing
protected void completeEditing()- Overrides:
completeEditing
in classBasicTreeUI
-
isToggleSelectionEvent
- Overrides:
isToggleSelectionEvent
in classBasicTreeUI
-
propertyChange
- Specified by:
propertyChange
in interfacePropertyChangeListener
-
isLeaf
-
ensureRowsAreVisible
protected void ensureRowsAreVisible(int beginRow, int endRow) - Overrides:
ensureRowsAreVisible
in classBasicTreeUI
-
getRendererPane
- Specified by:
getRendererPane
in interfaceHasRendererPane
-