| graphical.TreeView
All known Subclasses: components.TaxonomyTreeView, components.SchemaTreeView,
TreeView | public class TreeView extends View implements Target,TextFieldOwner(Code) | | TreeView.
Using the BinaryTree enumeration as it's spine,
this widget displays information in a file mangerish fashion.
It is important to note that a selected item in
the TreeView does not correspond directly to the
current position in the BinaryTree.
The reason for this is to allow multiple TreeViews
to view the same BinaryTree.
The "look" is configurable by passing appropriate images
to the constructors.
Open Issues
- Null trees not handled. Some code stubbed in, but
basically on the floor.
|
Constructor Summary | |
public | TreeView(BinaryTree binaryTree, boolean editable, int x, int y, int w, int h, int dragSourcePolicy, int dragDestinationPolicy, boolean sizeForWindow, String nameSpace, String nameDocumentSel, String nameDocument, String nameFolderSel, String nameFolder, String nameBranchOpenSel, String nameBranchOpen, String nameBranchClosedSel, String nameBranchClosed) Construct instance of TreeView. | public | TreeView(BinaryTree binaryTree, boolean editable, int x, int y, int w, int h, int dragSourcePolicy, int dragDestinationPolicy, boolean sizeForWindow, int arraySpace, int arrayDocumentSel, int arrayDocument, int arrayFolderSel, int arrayFolder, int arrayBranchOpenSel, int arrayBranchOpen, int arrayBranchClosedSel, int arrayBranchClosed, Dimension imageSize, int pixelCount) Construct instance of TreeView. |
Method Summary | |
public void | buttonEnablement() | public void | cancelBtnPress() | protected void | childReorganize() | protected void | childReorganize(BTListItem listItem) | public void | clearChanged() | public boolean | clickCommand() | public void | completeEditing() | public void | deepSix() | public void | delBtnPress() | public Image | determineImage(BTreeNode btn, BTListItem listItem, boolean selected) | public Image | determineImage(BTreeNode btn, BTListItem listItem, boolean selected, boolean indent) | public Image | determineMacImage(BTreeNode btn, BTListItem listItem, boolean selected, boolean indent) | public Image | determineNSImage(BTreeNode btn, BTListItem listItem, boolean selected, boolean indent) | public void | doReimaging() | public void | doubleClickCommand() | public boolean | dupePeerNamesAllowed() Current status of whether duplicate peer names are allowed. | public boolean | editable() Whether the TreeView instance is an editable one or not. | public boolean | emptyAllowed() Current value of empty allowability. | public void | enableTextEdit(boolean b) Turn off the floating TextField editor. | public BinaryTree | getBinaryTree() The current binary tree. | public BTreeNode | getBinaryTreeRooted() Get the node where the binary tree is rooted for this view. | public boolean | getChanged() | public BTListItem | getCurrentListItem() Get the current ListItem. | public TreeViewGroup | getTreeViewGroup() | public BTListItem | getUnaryParentItem(BTListItem listItem) For the target item, gets the unary parent. | public void | hideEditButtons() Hides the default edit buttons. | public void | newChild(BTreeNode newBtn) | public void | newChildBtnPress() | public void | newPeer(BTreeNode newBtn) | public void | newPeerBtnPress() | public void | newWindow() | public boolean | notifyOfTFEvents(Target target) Notify target of key event processing in the floating
TextField editor. | protected void | openAndClose() If the selected item is open it is closed, if closed it is opened. | protected void | openAndClose(BTListItem listItem) If the passed item is open it is closed, if closed it is opened. | public TextFieldOwner | owner() | public void | performCommand(String command, Object arg) | public void | saveBtnPress() | public void | selectAndDraw() Badly named, determines current images and forces redraw. | public void | selectAndDraw(BTListItem listItem) Badly named, determines current images for target and forces redraw. | public void | setBinaryTree(BinaryTree binaryTree) | public void | setBinaryTree(BTreeNode btRooted) | public void | setBinaryTree(BinaryTree binaryTree, BTreeNode btRooted) Note that if btRooted is not found in the tree, the tree
is silently assumed to be rooted at the top. | public void | setCurrentListItem(BTListItem li) Risky, provided to nullify currentListItem during a delete. | public void | setDragDestinationPolicy(int dragDestinationPolicy) | public void | setDragDestinationTarget(Target dragDestinationTarget) | public void | setDragDroppedNotificationCommand(String cmd) Drag dropped notification command, sent when Category dropped. | public void | setDragDroppedNotificationTarget(Target target) Drag dropped notification target, sent when Category dropped. | public void | setDragSourcePolicy(int dragSourcePolicy) | public void | setDupePeerNamesAllowed(boolean dupePeerNamesAllowed) Controls whether duplicate peer names are allowed. | public void | setEditListItem() | public void | setEditListItem(BTListItem li) | public void | setEditableRoot(boolean editableRoot) Set whether the root is editable or not. | public void | setEmptyAllowed(boolean emptyAllowed) Controls whether a delete of the root leaves you
with an empty list or a "new" root. | public void | setFeel(int feel) | public void | setLauncher(Target target, String command) | public void | setLook(int look) | public void | setOwner(TextFieldOwner object) | public void | setTreeViewGroup(TreeViewGroup treeViewGroup) | public void | textEditingDidBegin(TextField textfield) | public void | textEditingDidEnd(TextField textfield, int endCondition, boolean contentsChanged) | public boolean | textEditingWillEnd(TextField tf, int endCondition, boolean contentsChanged) | public void | textFieldSizer() | public void | textWasModified(TextField textfield) | public View | viewForMouse(int x, int y) |
MACFEEL | final public static int MACFEEL(Code) | | |
MACLOOK | final public static int MACLOOK(Code) | | |
NSFEEL | final public static int NSFEEL(Code) | | |
NSLOOK | final public static int NSLOOK(Code) | | |
cancelBtn | public Button cancelBtn(Code) | | |
delBtn | public Button delBtn(Code) | | |
newChildBtn | public Button newChildBtn(Code) | | |
newPeerBtn | public Button newPeerBtn(Code) | | |
saveBtn | public Button saveBtn(Code) | | |
scrollGroup | public ScrollGroup scrollGroup(Code) | | |
textField | protected TextField textField(Code) | | |
textFieldOwner | protected TextFieldOwner textFieldOwner(Code) | | |
TreeView | public TreeView(BinaryTree binaryTree, boolean editable, int x, int y, int w, int h, int dragSourcePolicy, int dragDestinationPolicy, boolean sizeForWindow, String nameSpace, String nameDocumentSel, String nameDocument, String nameFolderSel, String nameFolder, String nameBranchOpenSel, String nameBranchOpen, String nameBranchClosedSel, String nameBranchClosed)(Code) | | Construct instance of TreeView.
If the passed binary tree is null, a new one is created.
This constructor takes gifs as names and acquires them.
Parameters: binaryTree - passed binary tree Parameters: editable - editable or not Parameters: x - x Parameters: y - y Parameters: w - width Parameters: h - height Parameters: dragSourcePolicy - drag source policy Parameters: dragDestinationPolicy - drag destination policy Parameters: sizeForWindow - size for containment in a window or a view Parameters: nameSpace - url for space image Parameters: nameDocumentSel - url for selected document image Parameters: nameDocument - url for document image Parameters: nameFolderSel - url for selected folder image Parameters: nameFolder - url for folder image Parameters: nameBranchOpenSel - url for selected branch open image Parameters: nameBranchOpen - url for branch open image Parameters: nameBranchClosedSel - url for selected branch closed image Parameters: nameBranchClosed - url for branch closed image |
TreeView | public TreeView(BinaryTree binaryTree, boolean editable, int x, int y, int w, int h, int dragSourcePolicy, int dragDestinationPolicy, boolean sizeForWindow, int arraySpace, int arrayDocumentSel, int arrayDocument, int arrayFolderSel, int arrayFolder, int arrayBranchOpenSel, int arrayBranchOpen, int arrayBranchClosedSel, int arrayBranchClosed, Dimension imageSize, int pixelCount)(Code) | | Construct instance of TreeView.
If the passed binary tree is null, a new one is created.
Parameters: binaryTree - passed binary tree Parameters: editable - editable or not Parameters: x - x Parameters: y - y Parameters: w - width Parameters: h - height Parameters: dragSourcePolicy - drag source policy Parameters: dragDestinationPolicy - drag destination policy Parameters: sizeForWindow - size for containment in a window or a view Parameters: arraySpace - pixel array for space Parameters: arrayDocumentSel - pixel array for selected document Parameters: arrayDocument - pixel array for document Parameters: arrayFolderSel - pixel array for selected folder Parameters: arrayFolder - pixel array for folder Parameters: arrayBranchOpenSel - pixel array for selected branch open Parameters: arrayBranchOpen - pixel array for branch open Parameters: arrayBranchClosedSel - pixel array for selected branch closed Parameters: arrayBranchClosed - pixel array for branch closed Parameters: imageSize - the expected dimension for the tree images Parameters: pixelCount - the expected pixel count for the tree images |
buttonEnablement | public void buttonEnablement()(Code) | | |
cancelBtnPress | public void cancelBtnPress()(Code) | | stub to override
|
childReorganize | protected void childReorganize()(Code) | | |
clearChanged | public void clearChanged()(Code) | | |
clickCommand | public boolean clickCommand()(Code) | | |
completeEditing | public void completeEditing()(Code) | | |
deepSix | public void deepSix()(Code) | | |
delBtnPress | public void delBtnPress()(Code) | | |
doReimaging | public void doReimaging()(Code) | | |
doubleClickCommand | public void doubleClickCommand()(Code) | | |
dupePeerNamesAllowed | public boolean dupePeerNamesAllowed()(Code) | | Current status of whether duplicate peer names are allowed.
|
editable | public boolean editable()(Code) | | Whether the TreeView instance is an editable one or not.
|
emptyAllowed | public boolean emptyAllowed()(Code) | | Current value of empty allowability.
|
enableTextEdit | public void enableTextEdit(boolean b)(Code) | | Turn off the floating TextField editor.
|
getBinaryTreeRooted | public BTreeNode getBinaryTreeRooted()(Code) | | Get the node where the binary tree is rooted for this view.
|
getChanged | public boolean getChanged()(Code) | | |
getCurrentListItem | public BTListItem getCurrentListItem()(Code) | | Get the current ListItem. This isn't quite the same as
the currently selected ListItem because some actions need
to occur during transitions from the previously selected
ListItem and the currently selected ListItem.
|
hideEditButtons | public void hideEditButtons()(Code) | | Hides the default edit buttons.
Typically used by windows supplying their own menus and
calling the button action methods directly.
Expected to be done as part of construction rather than
during display, so no setDirty() and no showEditButtons().
|
newChildBtnPress | public void newChildBtnPress()(Code) | | |
newPeerBtnPress | public void newPeerBtnPress()(Code) | | |
newWindow | public void newWindow()(Code) | | |
notifyOfTFEvents | public boolean notifyOfTFEvents(Target target)(Code) | | Notify target of key event processing in the floating
TextField editor.
Returns false if the TextField is null.
Parameters: target - target |
openAndClose | protected void openAndClose()(Code) | | If the selected item is open it is closed, if closed it is opened.
Done twice (when open), forces the child display to be updated
which is useful when the children are modified.
|
openAndClose | protected void openAndClose(BTListItem listItem)(Code) | | If the passed item is open it is closed, if closed it is opened.
Done twice (when open), forces the child display to be updated
which is useful when the children are modified.
|
owner | public TextFieldOwner owner()(Code) | | |
saveBtnPress | public void saveBtnPress()(Code) | | stub to override
|
selectAndDraw | public void selectAndDraw()(Code) | | Badly named, determines current images and forces redraw.
No selection occurs.
|
selectAndDraw | public void selectAndDraw(BTListItem listItem)(Code) | | Badly named, determines current images for target and forces redraw.
No selection occurs.
Parameters: listItem - target ListItem |
setBinaryTree | public void setBinaryTree(BinaryTree binaryTree, BTreeNode btRooted)(Code) | | Note that if btRooted is not found in the tree, the tree
is silently assumed to be rooted at the top.
Behaviour may be changed later to throw an exception.
If btRooted is null, the top of the tree is also assumed.
|
setCurrentListItem | public void setCurrentListItem(BTListItem li)(Code) | | Risky, provided to nullify currentListItem during a delete.
Shouldn't be used otherwise.
|
setDragDestinationPolicy | public void setDragDestinationPolicy(int dragDestinationPolicy)(Code) | | |
setDragDestinationTarget | public void setDragDestinationTarget(Target dragDestinationTarget)(Code) | | |
setDragDroppedNotificationCommand | public void setDragDroppedNotificationCommand(String cmd)(Code) | | Drag dropped notification command, sent when Category dropped.
|
setDragDroppedNotificationTarget | public void setDragDroppedNotificationTarget(Target target)(Code) | | Drag dropped notification target, sent when Category dropped.
|
setDragSourcePolicy | public void setDragSourcePolicy(int dragSourcePolicy)(Code) | | |
setDupePeerNamesAllowed | public void setDupePeerNamesAllowed(boolean dupePeerNamesAllowed)(Code) | | Controls whether duplicate peer names are allowed.
Does not unduplicate if mistakes have already been made.
Default is true.
|
setEditListItem | public void setEditListItem()(Code) | | |
setEditableRoot | public void setEditableRoot(boolean editableRoot)(Code) | | Set whether the root is editable or not.
|
setEmptyAllowed | public void setEmptyAllowed(boolean emptyAllowed)(Code) | | Controls whether a delete of the root leaves you
with an empty list or a "new" root.
Default is true.
|
setLauncher | public void setLauncher(Target target, String command)(Code) | | |
setOwner | public void setOwner(TextFieldOwner object)(Code) | | |
textEditingDidBegin | public void textEditingDidBegin(TextField textfield)(Code) | | |
textEditingDidEnd | public void textEditingDidEnd(TextField textfield, int endCondition, boolean contentsChanged)(Code) | | |
textEditingWillEnd | public boolean textEditingWillEnd(TextField tf, int endCondition, boolean contentsChanged)(Code) | | |
textFieldSizer | public void textFieldSizer()(Code) | | |
textWasModified | public void textWasModified(TextField textfield)(Code) | | |
viewForMouse | public View viewForMouse(int x, int y)(Code) | | |
|
|