|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object ui.panel.options.CheckBoxTreeCellRenderer
public class CheckBoxTreeCellRenderer
Provides checkbox-based selection of tree nodes. Override the protected methods to adapt this renderer's behavior to your local tree table flavor. No change listener notifications are provided.
Nested Class Summary | |
---|---|
protected class |
CheckBoxTreeCellRenderer.MouseHandler
|
Field Summary | |
---|---|
static int |
FULLSELECTED
|
static int |
NOTSELECTED
|
static int |
PARTIALSELECTED
|
static int |
UNSELECTABLE
|
Constructor Summary | |
---|---|
CheckBoxTreeCellRenderer(javax.swing.JTree tree,
javax.swing.tree.TreeCellRenderer original)
Create a per-tree instance of the checkbox renderer. |
Method Summary | |
---|---|
protected void |
addMouseHandler(CheckBoxTreeCellRenderer.MouseHandler handler)
|
javax.swing.tree.TreePath[] |
getCheckedPaths()
Returns all checked paths. |
int[] |
getCheckedRows()
Returns all checked rows. |
protected javax.swing.tree.TreePath |
getPathForRow(int row)
|
protected int |
getRow(java.awt.Point p)
|
protected java.awt.Rectangle |
getRowBounds(int row)
|
protected int |
getRowForPath(javax.swing.tree.TreePath path)
|
java.awt.Component |
getTreeCellRendererComponent(javax.swing.JTree tree,
java.lang.Object value,
boolean selected,
boolean expanded,
boolean leaf,
int row,
boolean hasFocus)
|
protected void |
installMouseHandler()
|
boolean |
isChecked(javax.swing.tree.TreePath path)
Returns whether the given path is currently checked. |
boolean |
isExplicitlyChecked(javax.swing.tree.TreePath path)
|
boolean |
isPartiallyChecked(javax.swing.tree.TreePath path)
|
boolean |
isSelectable(javax.swing.tree.TreePath path)
Returns whether selecting the given path is allowed. |
static void |
main(java.lang.String[] args)
|
void |
repaint()
|
void |
repaint(java.awt.Rectangle r)
|
void |
toggleChecked(int row)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int UNSELECTABLE
public static final int FULLSELECTED
public static final int NOTSELECTED
public static final int PARTIALSELECTED
Constructor Detail |
---|
public CheckBoxTreeCellRenderer(javax.swing.JTree tree, javax.swing.tree.TreeCellRenderer original)
Method Detail |
---|
protected void installMouseHandler()
protected void addMouseHandler(CheckBoxTreeCellRenderer.MouseHandler handler)
protected int getRow(java.awt.Point p)
protected java.awt.Rectangle getRowBounds(int row)
protected javax.swing.tree.TreePath getPathForRow(int row)
protected int getRowForPath(javax.swing.tree.TreePath path)
public void repaint(java.awt.Rectangle r)
public void repaint()
public java.awt.Component getTreeCellRendererComponent(javax.swing.JTree tree, java.lang.Object value, boolean selected, boolean expanded, boolean leaf, int row, boolean hasFocus)
getTreeCellRendererComponent
in interface javax.swing.tree.TreeCellRenderer
public boolean isExplicitlyChecked(javax.swing.tree.TreePath path)
public boolean isSelectable(javax.swing.tree.TreePath path)
public boolean isChecked(javax.swing.tree.TreePath path)
public boolean isPartiallyChecked(javax.swing.tree.TreePath path)
public void toggleChecked(int row)
public int[] getCheckedRows()
public javax.swing.tree.TreePath[] getCheckedPaths()
public static void main(java.lang.String[] args)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |