The basic L&F for a hierarchical data structure.
The basic L&F for a hierarchical data structure.
(*create-ui x)
x - javax.swing.JComponent
returns: javax.swing.plaf.ComponentUI
x - `javax.swing.JComponent` returns: `javax.swing.plaf.ComponentUI`
(cancel-editing this tree)
Cancels the current editing session.
tree - javax.swing.JTree
Cancels the current editing session. tree - `javax.swing.JTree`
(editing? this tree)
Returns true if the tree is being edited. The item that is being edited can be returned by getEditingPath().
tree - javax.swing.JTree
returns: boolean
Returns true if the tree is being edited. The item that is being edited can be returned by getEditingPath(). tree - `javax.swing.JTree` returns: `boolean`
(get-baseline this c width height)
Returns the baseline.
c - JComponent baseline is being requested for - javax.swing.JComponent
width - the width to get the baseline for - int
height - the height to get the baseline for - int
returns: baseline or a value < 0 indicating there is no reasonable
baseline - int
throws: java.lang.NullPointerException - if c is null
Returns the baseline. c - JComponent baseline is being requested for - `javax.swing.JComponent` width - the width to get the baseline for - `int` height - the height to get the baseline for - `int` returns: baseline or a value < 0 indicating there is no reasonable baseline - `int` throws: java.lang.NullPointerException - if c is null
(get-baseline-resize-behavior this c)
Returns an enum indicating how the baseline of the component changes as the size changes.
c - JComponent to return baseline resize behavior for - javax.swing.JComponent
returns: an enum indicating how the baseline changes as the component
size changes - java.awt.Component$BaselineResizeBehavior
throws: java.lang.NullPointerException - if c is null
Returns an enum indicating how the baseline of the component changes as the size changes. c - JComponent to return baseline resize behavior for - `javax.swing.JComponent` returns: an enum indicating how the baseline changes as the component size changes - `java.awt.Component$BaselineResizeBehavior` throws: java.lang.NullPointerException - if c is null
(get-closest-path-for-location this tree x y)
Returns the path to the node that is closest to x,y. If there is nothing currently visible this will return null, otherwise it'll always return a valid path. If you need to test if the returned object is exactly at x, y you should get the bounds for the returned path and test x, y against that.
tree - javax.swing.JTree
x - int
y - int
returns: javax.swing.tree.TreePath
Returns the path to the node that is closest to x,y. If there is nothing currently visible this will return null, otherwise it'll always return a valid path. If you need to test if the returned object is exactly at x, y you should get the bounds for the returned path and test x, y against that. tree - `javax.swing.JTree` x - `int` y - `int` returns: `javax.swing.tree.TreePath`
(get-collapsed-icon this)
returns: javax.swing.Icon
returns: `javax.swing.Icon`
(get-editing-path this tree)
Returns the path to the element that is being edited.
tree - javax.swing.JTree
returns: javax.swing.tree.TreePath
Returns the path to the element that is being edited. tree - `javax.swing.JTree` returns: `javax.swing.tree.TreePath`
(get-expanded-icon this)
returns: javax.swing.Icon
returns: `javax.swing.Icon`
(get-maximum-size this c)
Returns the maximum size for this component, which will be the preferred size if the instance is currently in a JTree, or 0, 0.
c - the component whose maximum size is being queried; this argument is often ignored, but might be used if the UI object is stateless and shared by multiple components - javax.swing.JComponent
returns: a Dimension object or null - java.awt.Dimension
Returns the maximum size for this component, which will be the preferred size if the instance is currently in a JTree, or 0, 0. c - the component whose maximum size is being queried; this argument is often ignored, but might be used if the UI object is stateless and shared by multiple components - `javax.swing.JComponent` returns: a Dimension object or null - `java.awt.Dimension`
(get-minimum-size this c)
Returns the minimum size for this component. Which will be the min preferred size or 0, 0.
c - the component whose minimum size is being queried; this argument is often ignored, but might be used if the UI object is stateless and shared by multiple components - javax.swing.JComponent
returns: a Dimension object or null - java.awt.Dimension
Returns the minimum size for this component. Which will be the min preferred size or 0, 0. c - the component whose minimum size is being queried; this argument is often ignored, but might be used if the UI object is stateless and shared by multiple components - `javax.swing.JComponent` returns: a Dimension object or null - `java.awt.Dimension`
(get-path-bounds this tree path)
Returns the Rectangle enclosing the label portion that the last item in path will be drawn into. Will return null if any component in path is currently valid.
tree - javax.swing.JTree
path - javax.swing.tree.TreePath
returns: java.awt.Rectangle
Returns the Rectangle enclosing the label portion that the last item in path will be drawn into. Will return null if any component in path is currently valid. tree - `javax.swing.JTree` path - `javax.swing.tree.TreePath` returns: `java.awt.Rectangle`
(get-path-for-row this tree row)
Returns the path for passed in row. If row is not visible null is returned.
tree - javax.swing.JTree
row - int
returns: javax.swing.tree.TreePath
Returns the path for passed in row. If row is not visible null is returned. tree - `javax.swing.JTree` row - `int` returns: `javax.swing.tree.TreePath`
(get-preferred-min-size this)
Returns the minimum preferred size.
returns: java.awt.Dimension
Returns the minimum preferred size. returns: `java.awt.Dimension`
(get-preferred-size this c)
(get-preferred-size this c check-consistency)
Returns the preferred size to represent the tree in c. If checkConsistency is true checkConsistency is messaged first.
c - javax.swing.JComponent
check-consistency - boolean
returns: java.awt.Dimension
Returns the preferred size to represent the tree in c. If checkConsistency is true checkConsistency is messaged first. c - `javax.swing.JComponent` check-consistency - `boolean` returns: `java.awt.Dimension`
(get-row-count this tree)
Returns the number of rows that are being displayed.
tree - javax.swing.JTree
returns: int
Returns the number of rows that are being displayed. tree - `javax.swing.JTree` returns: `int`
(get-row-for-path this tree path)
Returns the row that the last item identified in path is visible at. Will return -1 if any of the elements in path are not currently visible.
tree - javax.swing.JTree
path - javax.swing.tree.TreePath
returns: int
Returns the row that the last item identified in path is visible at. Will return -1 if any of the elements in path are not currently visible. tree - `javax.swing.JTree` path - `javax.swing.tree.TreePath` returns: `int`
(install-ui this c)
Description copied from class: ComponentUI
c - the component where this UI delegate is being installed - javax.swing.JComponent
Description copied from class: ComponentUI c - the component where this UI delegate is being installed - `javax.swing.JComponent`
(paint this g c)
Description copied from class: ComponentUI
g - the Graphics context in which to paint - java.awt.Graphics
c - the component being painted; this argument is often ignored, but might be used if the UI object is stateless and shared by multiple components - javax.swing.JComponent
Description copied from class: ComponentUI g - the Graphics context in which to paint - `java.awt.Graphics` c - the component being painted; this argument is often ignored, but might be used if the UI object is stateless and shared by multiple components - `javax.swing.JComponent`
(set-collapsed-icon this new-g)
new-g - javax.swing.Icon
new-g - `javax.swing.Icon`
(set-expanded-icon this new-g)
new-g - javax.swing.Icon
new-g - `javax.swing.Icon`
(set-left-child-indent this new-amount)
new-amount - int
new-amount - `int`
(set-preferred-min-size this new-size)
Sets the preferred minimum size.
new-size - java.awt.Dimension
Sets the preferred minimum size. new-size - `java.awt.Dimension`
(set-right-child-indent this new-amount)
new-amount - int
new-amount - `int`
(start-editing-at-path this tree path)
Selects the last item in path and tries to edit it. Editing will fail if the CellEditor won't allow it for the selected item.
tree - javax.swing.JTree
path - javax.swing.tree.TreePath
Selects the last item in path and tries to edit it. Editing will fail if the CellEditor won't allow it for the selected item. tree - `javax.swing.JTree` path - `javax.swing.tree.TreePath`
(stop-editing this tree)
Stops the current editing session. This has no effect if the tree isn't being edited. Returns true if the editor allows the editing session to stop.
tree - javax.swing.JTree
returns: boolean
Stops the current editing session. This has no effect if the tree isn't being edited. Returns true if the editor allows the editing session to stop. tree - `javax.swing.JTree` returns: `boolean`
(uninstall-ui this c)
Description copied from class: ComponentUI
c - the component from which this UI delegate is being removed; this argument is often ignored, but might be used if the UI object is stateless and shared by multiple components - javax.swing.JComponent
Description copied from class: ComponentUI c - the component from which this UI delegate is being removed; this argument is often ignored, but might be used if the UI object is stateless and shared by multiple components - `javax.swing.JComponent`
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close