|
| Components |
|
| |||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||||
com.sas.swing.visuals.dualselector.TreeListSelector
public class TreeListSelector
TreeListSelector class is an implementation that has a JTree and a JList component.
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.DefaultMutableTreeNode |
rootNode
a tree node used as the root of the JTree component |
protected javax.swing.JTree |
sourceJTree
the JTree component |
protected javax.swing.JList |
targetJList
the JList component |
| Constructor Summary | |
|---|---|
TreeListSelector()
Constructs a TreeListSelector object. |
|
| Method Summary | |
|---|---|
protected void |
addListeners()
Adds tree and list selection listeners. |
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.ListCellRenderer |
getTargetCellRenderer()
Returns the cell renderer for the target component. |
javax.swing.ListModel |
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 |
isParentsOrChildrenMoveable()
Returns true if the parent nodes are to be moved and false if only the children nodes are to be moved. |
boolean |
isSourceRootVisible()
Returns true if the root node of the source 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 |
setParentOrChildrenMoveable(boolean nodes)
Defines whether to move only parent nodes from the tree of move only children nodes. |
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 |
setTargetCellRenderer(javax.swing.ListCellRenderer newValue)
Sets the cell renderer for the target component. |
void |
setTargetModel(javax.swing.ListModel listModel)
Sets the TreeModel for the target component. |
void |
valueChanged(javax.swing.event.ListSelectionEvent ie)
Event handler for the ListSelectionEvent's received. |
void |
valueChanged(javax.swing.event.TreeSelectionEvent ie)
Event handler for the TreeSelectionEvent's received. |
| Field Detail |
|---|
protected javax.swing.JTree sourceJTree
protected javax.swing.JList targetJList
protected javax.swing.tree.DefaultMutableTreeNode rootNode
| Constructor Detail |
|---|
public TreeListSelector()
| Method Detail |
|---|
protected void addListeners()
addListeners in class BaseDualSelectorpublic 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.ListCellRenderer getTargetCellRenderer()
setTargetCellRenderer(javax.swing.ListCellRenderer)public void setTargetCellRenderer(javax.swing.ListCellRenderer 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 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 setParentOrChildrenMoveable(boolean nodes)
nodes - true if the parent nodes, false if child nodesisParentsOrChildrenMoveable()public boolean isParentsOrChildrenMoveable()
setParentOrChildrenMoveable(boolean)public javax.swing.tree.TreeModel getModel()
setModel(javax.swing.tree.TreeModel)public javax.swing.ListModel getTargetModel()
setTargetModel(javax.swing.ListModel)public void setModel(javax.swing.tree.TreeModel treeModel)
treeModel - the TreeModel to set for the source componentgetModel()
public void setTargetModel(javax.swing.ListModel listModel)
throws java.lang.IllegalArgumentException
treeModel - the TreeModel to set for the target component
java.lang.IllegalArgumentExceptiongetTargetModel()public boolean isDefaultModelAttached()
isDefaultModelAttached in interface ViewDefaultModelViewDefaultModelpublic void valueChanged(javax.swing.event.TreeSelectionEvent ie)
valueChanged in interface javax.swing.event.TreeSelectionListenerie - the event to handlepublic void valueChanged(javax.swing.event.ListSelectionEvent ie)
valueChanged in interface javax.swing.event.ListSelectionListenerie - the event to handle
|
| Components |
|
| |||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||||