|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JPanel
wt.clients.widgets.BaseSelector
wt.clients.widgets.DefaultTreeNodeSelector
------------------------------------------------------------
Nested Class Summary | |
(package private) class |
DefaultTreeNodeSelector.IBATreeSelectionListener
Class for selection listener. |
(package private) class |
DefaultTreeNodeSelector.IBATreeWillExpandListener
The listener that's notified when a tree expands or collapses a node |
Nested classes inherited from class wt.clients.widgets.BaseSelector |
BaseSelector.SelectCancelPanel |
Nested classes inherited from class javax.swing.JPanel |
JPanel.AccessibleJPanel |
Nested classes inherited from class javax.swing.JComponent |
JComponent.AccessibleJComponent |
Nested classes inherited from class java.awt.Container |
Container.AccessibleAWTContainer |
Nested classes inherited from class java.awt.Component |
Component.AccessibleAWTComponent, Component.BltBufferStrategy, Component.FlipBufferStrategy |
Field Summary | |
protected DefaultLiteTreeNode |
cache
|
protected StatusMessage |
copyMessage
|
protected boolean |
cut
|
protected StatusMessage |
cutMessage
|
protected StatusMessage |
pasteCopyMessage
|
protected StatusMessage |
pasteCutMessage
|
static int |
PRE_FETCH_LEVEL
|
protected TreeSelectionListener |
selectionListener
|
protected JIBATree |
tree
|
protected TreeWillExpandListener |
treeWillExpandListener
|
Fields inherited from class wt.clients.widgets.BaseSelector |
BASE_RESOURCE, baseSelectorTitle, canceled, editorDialog, errorDialogTitle, id, modelDialogFlag, multiSelection, resource, selected, selectorListenerManager, statusBarHost, warningDialogTitle |
Fields inherited from class javax.swing.JPanel |
|
Fields inherited from class javax.swing.JComponent |
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW |
Fields inherited from class java.awt.Container |
|
Fields inherited from class java.awt.Component |
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
Fields inherited from interface java.awt.image.ImageObserver |
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
DefaultTreeNodeSelector()
|
Method Summary | |
void |
addValue(Object obj)
Method to create(add) an object to the tree |
private boolean |
checkAllNodes(AbstractLiteObject obj)
|
private DefaultLiteTreeNode |
checkAllNodesForParent(AbstractLiteObject obj)
This method will check all the nodes stored inside the hashtable and see if we can find the parent of this object. |
private void |
checkChildrenIfExist(DefaultLiteTreeNode parent,
AbstractLiteObject object)
This method will check whether the object exists under the parent node. |
protected abstract boolean |
checkObjectIsParentOf(AbstractLiteObject parent,
AbstractLiteObject node)
|
protected abstract boolean |
checkObjectIsRoot(AbstractLiteObject object)
|
void |
clearAllStatusMessages()
|
void |
copy()
Method for copy |
protected abstract DefaultLiteTreeNode |
createRootNode()
|
protected abstract DefaultTreeCellRenderer |
createTreeCellRenderer()
|
protected abstract DefaultLiteTreeNode |
createTreeNode(AbstractLiteObject obj,
boolean hasDummyChildren)
|
protected TreeSelectionListener |
createTreeSelectionListener()
|
void |
cut()
Method for cut |
void |
expandNodeAndChildren(DefaultLiteTreeNode node)
|
Object |
getFirstSelected()
Get the first selected value of the only selected value |
protected void |
getNodeChildren(DefaultLiteTreeNode parent,
int level)
Get the children of this parent node, and get # levels down from this parent. |
protected abstract String |
getParentObjectID(AbstractLiteObject node)
|
protected abstract AbstractLiteObject[] |
getRootNodes()
|
TreePath[] |
getSelectedPaths()
Get selected paths in a array format. |
Vector |
getSelectedValues()
Get selected value in a vector format. |
protected abstract AbstractLiteObject[] |
getThisNodeChildren(DefaultLiteTreeNode parent)
|
boolean |
isEquivalent(Object obj1,
Object obj2)
Comparing two user object if they are equivalent. |
boolean |
isMultiSelect()
Get the selection mode of the tree |
abstract void |
paste()
|
protected void |
populateRoots()
Method to populate the roots of the tree |
protected abstract void |
populateSelectedValue(Object obj)
|
protected void |
pushMessage(String name)
|
protected void |
pushPasteMessage(String name)
|
void |
removeValue(Object obj)
Method to delete an object from the tree. |
void |
setMultiSelect(boolean multi)
Set the selection mode of the tree |
void |
setSelectedValue(Object obj)
Set selected value by passing an object |
void |
setSelectedValues(Vector obj)
Set selected value by passing a vector of objects |
private void |
updateCache()
Method for update the cache for cut and copy. |
Methods inherited from class wt.clients.widgets.BaseSelector |
addSelectorListener, fireSelectionChangedEvent, getContext, initResource, isModalDialog, removeSelectorListener, setBusy, setStatusBarHost, showAsModalSelectorDialog, showAsModalSelectorDialog, showAsModalSelectorDialog |
Methods inherited from class javax.swing.JPanel |
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final int PRE_FETCH_LEVEL
protected JIBATree tree
protected TreeSelectionListener selectionListener
protected TreeWillExpandListener treeWillExpandListener
protected DefaultLiteTreeNode cache
protected StatusMessage copyMessage
protected StatusMessage cutMessage
protected StatusMessage pasteCopyMessage
protected StatusMessage pasteCutMessage
protected boolean cut
Constructor Detail |
public DefaultTreeNodeSelector()
Method Detail |
protected abstract DefaultTreeCellRenderer createTreeCellRenderer()
protected abstract DefaultLiteTreeNode createTreeNode(AbstractLiteObject obj, boolean hasDummyChildren)
protected abstract DefaultLiteTreeNode createRootNode()
protected abstract AbstractLiteObject[] getRootNodes()
protected abstract AbstractLiteObject[] getThisNodeChildren(DefaultLiteTreeNode parent)
protected abstract void populateSelectedValue(Object obj)
protected abstract boolean checkObjectIsRoot(AbstractLiteObject object)
protected abstract boolean checkObjectIsParentOf(AbstractLiteObject parent, AbstractLiteObject node)
protected abstract String getParentObjectID(AbstractLiteObject node)
public abstract void paste()
protected TreeSelectionListener createTreeSelectionListener()
public void setMultiSelect(boolean multi)
setMultiSelect
in interface SelectorInterface
setMultiSelect
in class BaseSelector
multi
- Set the selection modepublic boolean isMultiSelect()
isMultiSelect
in interface SelectorInterface
isMultiSelect
in class BaseSelector
public boolean isEquivalent(Object obj1, Object obj2)
public void setSelectedValue(Object obj)
setSelectedValue
in interface SelectorInterface
setSelectedValue
in class BaseSelector
obj
- Object that the node will be contained.public void setSelectedValues(Vector obj)
setSelectedValues
in interface SelectorInterface
setSelectedValues
in class BaseSelector
obj
- Vector of objects that the nodes will be contained.public Vector getSelectedValues()
getSelectedValues
in interface SelectorInterface
getSelectedValues
in class BaseSelector
public TreePath[] getSelectedPaths()
public Object getFirstSelected()
getFirstSelected
in interface SelectorInterface
getFirstSelected
in class BaseSelector
protected void populateRoots()
protected void getNodeChildren(DefaultLiteTreeNode parent, int level)
level
- # of levels for the children to getpublic void addValue(Object obj)
addValue
in interface SelectorInterface
addValue
in class BaseSelector
private void checkChildrenIfExist(DefaultLiteTreeNode parent, AbstractLiteObject object)
parent
- Parent node which will be checkedobject
- object to be checked whether it's already under the parent node.private boolean checkAllNodes(AbstractLiteObject obj)
private DefaultLiteTreeNode checkAllNodesForParent(AbstractLiteObject obj)
obj
- The object which we want to find whether the parent exists.
public void expandNodeAndChildren(DefaultLiteTreeNode node)
public void removeValue(Object obj)
removeValue
in interface SelectorInterface
removeValue
in class BaseSelector
public void copy()
public void cut()
private void updateCache()
public void clearAllStatusMessages()
clearAllStatusMessages
in class BaseSelector
protected void pushMessage(String name)
protected void pushPasteMessage(String name)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |