|
Components |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
com.sas.swing.visuals.dualselector.DualTreeSelector
public class DualTreeSelector
DualTreeSelector implements a dual selector with two trees.
Visit the AppDev Studio Developer's Site to access step-by-step examples, white papers and additional usage information at http://support.sas.com/rnd/appdev/.
Examples for this class may be found on the Examples Site.
Field Summary | |
---|---|
protected javax.swing.tree.TreeCellRenderer |
cellRenderer
the cell renderer class for the tree cells |
protected javax.swing.tree.DefaultMutableTreeNode |
rootNode
a tree node representing the root of the trees |
protected javax.swing.JTree |
sourceJTree
the source JTree component |
protected javax.swing.JTree |
targetJTree
the target JTree component |
Constructor Summary | |
---|---|
DualTreeSelector()
Constructs a DualTreeSelector object. |
Method Summary | |
---|---|
protected void |
addListeners()
Adds a tree selection listener to each tree component. |
javax.swing.tree.TreeModel |
getModel()
Returns the TreeModel for the source component. |
javax.swing.tree.TreeCellRenderer |
getSourceCellRenderer()
Returns the cell renderer for the source component. |
javax.swing.tree.TreeCellRenderer |
getTargetCellRenderer()
Returns the cell renderer for the target component. |
javax.swing.tree.TreeModel |
getTargetModel()
Returns the TreeModel for the target component. |
boolean |
isDefaultModelAttached()
Returns true if the default model is being used, false otherwise. |
boolean |
isParentNodesMoveable()
Returns the true if the parent nodes are moveable. |
boolean |
isParentNodesOnlyMoveable()
Returns true if the parent node only is to be moved. |
boolean |
isSourceRootVisible()
Returns true if the root node of the source tree is displayed. |
boolean |
isTargetRootVisible()
Returns true if the root node of the target tree is displayed. |
void |
setModel(javax.swing.tree.TreeModel treeModel)
Sets the TreeModel for the source component. |
void |
setParentNodesMoveable(boolean moveable)
Determines whether the parent nodes, in the tree, can be moved to the list portion. |
void |
setParentNodesOnlyMoveable(boolean parentNodes)
Defines whether to move all parent nodes or parent nodes and children. |
void |
setSourceCellRenderer(javax.swing.tree.TreeCellRenderer newValue)
Sets the cell renderer for the source component. |
void |
setSourceRootVisible(boolean visible)
Determines whether or not the root node from the source tree is visible. |
void |
setSourceTargetNode(java.lang.Object sourceTargetNode)
Allows specification of a target tree node that accepts nodes from the source tree. |
void |
setTargetCellRenderer(javax.swing.tree.TreeCellRenderer newValue)
Sets the cell renderer for the target component. |
void |
setTargetModel(javax.swing.tree.TreeModel treeModel)
Sets the TreeModel for the target component. |
void |
setTargetRootVisible(boolean visible)
Determines whether or not the root node from the target tree is visible. |
void |
valueChanged(javax.swing.event.TreeSelectionEvent ie)
Event handler for the TreeSelectionEvent's received. |
Field Detail |
---|
protected javax.swing.tree.TreeCellRenderer cellRenderer
protected javax.swing.JTree sourceJTree
protected javax.swing.JTree targetJTree
protected javax.swing.tree.DefaultMutableTreeNode rootNode
Constructor Detail |
---|
public DualTreeSelector()
Method Detail |
---|
protected void addListeners()
addListeners
in class BaseDualSelector
public javax.swing.tree.TreeCellRenderer getSourceCellRenderer()
setSourceCellRenderer(javax.swing.tree.TreeCellRenderer)
public void setSourceCellRenderer(javax.swing.tree.TreeCellRenderer newValue)
newValue
- the new value for the source component cell renderergetSourceCellRenderer()
public javax.swing.tree.TreeCellRenderer getTargetCellRenderer()
setTargetCellRenderer(javax.swing.tree.TreeCellRenderer)
public void setTargetCellRenderer(javax.swing.tree.TreeCellRenderer newValue)
newValue
- the new value for the target component cell renderergetTargetCellRenderer()
public void setSourceRootVisible(boolean visible)
visible
- true if the root node of the tree is to be displayedpublic boolean isSourceRootVisible()
setSourceRootVisible(boolean)
public void setTargetRootVisible(boolean visible)
visible
- true if the root node of the tree is to be displayedpublic boolean isTargetRootVisible()
setTargetRootVisible(boolean)
public void setParentNodesOnlyMoveable(boolean parentNodes)
parentNodes
- true if the parent node only is to be movedisParentNodesOnlyMoveable()
public boolean isParentNodesOnlyMoveable()
setParentNodesOnlyMoveable(boolean)
public void setParentNodesMoveable(boolean moveable)
moveable
- Set to true if parents are allowed to be moved. False if parents cannot be moved.isParentNodesMoveable()
public boolean isParentNodesMoveable()
setParentNodesMoveable(boolean)
public void setSourceTargetNode(java.lang.Object sourceTargetNode)
sourceTargetNode
- public javax.swing.tree.TreeModel getModel()
setModel(javax.swing.tree.TreeModel)
public void setModel(javax.swing.tree.TreeModel treeModel)
treeModel
- the TreeModel to set for the source componentgetModel()
public javax.swing.tree.TreeModel getTargetModel()
setTargetModel(javax.swing.tree.TreeModel)
public void setTargetModel(javax.swing.tree.TreeModel treeModel) throws java.lang.IllegalArgumentException
treeModel
- the TreeModel to set for the target component
java.lang.IllegalArgumentException
getTargetModel()
public boolean isDefaultModelAttached()
isDefaultModelAttached
in interface ViewDefaultModel
ViewDefaultModel
public void valueChanged(javax.swing.event.TreeSelectionEvent ie)
valueChanged
in interface javax.swing.event.TreeSelectionListener
ie
- the event to handle
|
Components |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |