Class JDPTreePicker
java.lang.Object
|
+----java.awt.Component
|
+----java.awt.Container
|
+----java.awt.Panel
|
+----JDPTreePicker
- public class JDPTreePicker
- extends Panel
Class JDPTreePicker represents a tree structure.
-
ARROW
-
-
autoScrollOn
-
-
BLANK1
-
-
BLANK2
-
-
BLANK3
-
-
BUTTON
-
-
CALENDAR
-
-
CHART
-
-
CHECKBOX
-
-
CHISELFRAME
-
-
CHOICE
-
-
COLUMN_RESIZED
- Column resized event.
-
COLUMN_SELECTED
- Column resized event.
-
COMPUTER
-
-
CUSTOM
-
-
DATABASE
-
-
DIALOG
-
-
DOCUMENT
-
-
DRIVE
-
-
EMAIL
-
-
FOLDER
-
-
GRID
-
-
HOTKEY
-
-
ITEM_MOVED
- List item moved event.
-
LABEL
-
-
LIST
-
-
MULTIPLE_DATABASE
-
-
MULTIPLE_TABLE
-
-
PAGER
-
-
PANEL
-
-
PERSON
-
-
PICTURE
-
-
PRINTER
-
-
PROGRESS
-
-
RADIO
-
-
REPORT
-
-
RMI
-
-
SCROLLEAST
-
-
SCROLLSOUTH
-
-
SEARCH
-
-
SLIDER
-
-
SPINNER
-
-
TAB
-
-
TABLE
-
-
TEXTFIELD
-
-
TREE
-
-
TREE_WIDTH_RESIZED
- Tree width resized event.
-
JDPTreePicker()
- Creates a Tree Structure.
-
JDPTreePicker(JDPUser)
- Creates a Tree Structure.
-
JDPTreePicker(JDPUser, Panel)
- Creates a Tree Structure.
-
JDPTreePicker(JDPUser, Panel, JDPDragItem)
- Creates a Tree Structure.
-
addBranch(JDPTreeBranch, String, int)
- Add a leaf to this branch and count it as an indexed branch
-
addBranch(JDPTreeBranch, String, int, boolean, Object, String, boolean)
- Add a leaf to this branch and count it as an indexed branch
-
addBranch(JDPTreeBranch, String, int, Object, String)
- Add a leaf to this branch and count it as an indexed branch
-
addEntry(String[])
- Create a new branch using the specified path of names.
-
addEntry(String[], boolean)
- Create a new branch using the specified path of names.
-
addEntry(String[], boolean, boolean)
- Create a new branch using the specified path of names.
-
addEntry(String[], int[], Object, String, String, String[], String[][], Vector)
- Create a new branch using the specified path of names.
-
addEntry(String[], int[], String)
- Create a new branch using the specified path of names.
-
addEntry(String[], int[], String, boolean)
- Create a new branch using the specified path of names.
-
addItem(JDPTreeBranch, String, int, boolean, Object, String, boolean)
- Add a leaf to this branch.
-
addNewBranch(JDPTreeBranch, String, int)
- Add a leaf to this branch and count it as an indexed branch
-
addNewBranch(JDPTreeBranch, String, int, boolean, Object, String, boolean)
- Add a leaf to this branch and count it as an indexed branch
-
addNewBranch(JDPTreeBranch, String, int, Object, String, String)
- Add a leaf to this branch and count it as an indexed branch
-
clear()
- Remove all the entries from the Tree.
-
getAlwaysHasFocus()
- Get whether this component always appears to have focus.
-
getBranch(Object)
- Get the branch for the object.
-
getColumnHeader(int)
- Get the header of a column
-
getColumns()
- Set the number of columns
-
getColumnWidth(int)
- Get the width of a column
-
getCurrentBranch()
- Get the selected branch.
-
getDragPanel()
- Get the drag panel for dragging.
-
getIconValue(String)
- Get the icon number for this icon text.
-
getLastAddedBranch()
- Get the last added branch.
-
getMinHeight()
- Get the minimum height of the tree panel.
-
getMinWidth()
- Get the minimum width of the tree panel.
-
getMultipleSelections()
- Get the multiple selections flag.
-
getParentBranch()
- Get the parent branch of the selected branch.
-
getRightJustify(int)
- Get the right justification flag of a column
-
getScrollEastDisabled()
- Get whether the east scrollbar has been removed
-
getScrollSouthDisabled()
- Get whether the south scrollbar has been removed
-
getSelectedBranch()
- Get the branch names of the currently selected branch.
-
getSelectedBranchIcons()
- Get the icons of the selected branch.
-
getSelectedIcon()
- Get the icon of the currently selected branch.
-
getSelectedIndex()
- Get the index of the selected branch.
-
getSelectedIndexes()
- (List only) Get the selected indexes in the List.
-
getSelectedItem()
- Get the name of the currently selected branch.
-
getSelectedItems()
- (List only) Get the selected items in the List.
-
getSelectedLvl()
- Get the level of the selected branch.
-
getSelectionsCheckboxes()
- Get whether selections are displayed as checkboxes.
-
getTitle()
- Get the root name of the tree.
-
getTreeBranch(Object)
- Get the branches for the object.
-
getTreeBranchIgnoreCase(String[])
- Get the branches for the branch names.
-
getTreeBranchNames(Object)
- Get the branch names for the object.
-
getTreeIconList()
- Get a list of all the tree icon names.
-
getVisibleIndex()
- Get the index of the visible branch.
-
handleEvent(Event)
-
-
layout()
-
-
makeVisible(int)
- Make the requested index visible.
-
minimumSize()
-
-
paint(Graphics)
-
-
preferredSize()
-
-
reDraw()
- Redraw the tree.
-
removeBranch(JDPTreeBranch)
- Remove the lower leaves from the requested branch.
-
removeBranch(String[])
- Remove the selected branch and it's lower leaves.
-
removeTreeBranch(JDPTreeBranch)
- Remove the selected branch and it's lower leaves.
-
resetSelections()
- Reset the selections.
-
resetSelections(JDPTreeBranch)
- Reset the selections in the requested branch.
-
select(int)
- Select the requested item based on the index.
-
select(JDPTreeBranch)
- Select a specific branch of the tree.
-
select(String[])
- Select a specific branch of the tree.
-
selectLastAddedBranch()
- Select a the last added branch of the tree.
-
selectRoot()
- Select the root branch of the tree.
-
setAlwaysHasFocus(boolean)
- Set whether this component always appears to have focus.
-
setColumnHeader(int, String)
- Set the header of a column
-
setColumns(int)
- Set the number of columns
-
setColumnWidth(int, int)
- Set the width of a column
-
setCompType(String)
- Set the compType value for any branches added from here on.
-
setDragAndDrop(boolean[])
- Set the dragAndDrop flags for any branches added from here on.
-
setDragPanel(JDPDragItem)
- Set the drag panel for dragging.
-
setDropKeys(Object[])
- Set the dropKey values for any branches added from here on.
-
setDropMessages(String[])
- Set the dropMessage values for any branches added from here on.
-
setExpanded(boolean[])
- Set the expanded flags for any branches added from here on.
-
setIconImagePath(String)
- Set the path for the image that conatins the button icons.
-
setIcons(int[])
- Set the icons for any branches added from here on.
-
setMinHeight(int)
- Set the minimum height of the tree panel.
-
setMinWidth(int)
- Set the minimum width of the tree panel.
-
setMultipleSelections(boolean)
- Set the tree to allow multiple selections.
-
setObject(Object)
- Set the thisObject value for any branches added from here on.
-
setPosition(String)
- Set the compPosition value for any branches added from here on.
-
setProperties(String[][])
- Set the properties value for any branches added from here on.
-
setResizingAllowed()
- Get whether dragging the with of the tree will resized it.
-
setResizingAllowed(boolean)
- Set whether dragging the with of the tree will resized it.
-
setRightJustify(int, boolean)
- Set the right justification flag of a column
-
setRoot(String, boolean)
- Remove all the entries from the Tree and set the root name.
-
setRoot(String, boolean, int)
- Remove all the entries from the Tree and set the root name.
-
setScrollEastDisabled(boolean)
- Set whether the east scrollbar should be disabled
-
setScrollSouthDisabled(boolean)
- Set whether the south scrollbar should be disabled
-
setSelectionsCheckboxes(boolean)
- Set selections to display as checkboxes.
-
setTargetPanel(Panel)
- Set the target panel for dragging.
-
setText(String[])
- Set the text value for any branches added from here on.
-
setTitle(String)
- Set the root name of the tree.
-
setTreeVector(Vector)
- Set the treeVector value for any branches added from here on.
-
sortTree()
- Sort the tree in ascending order.
-
sortTree(JDPTreeBranch)
- Sort this branch and its lower branches in ascending order.
-
sortTree(JDPTreeBranch, boolean)
- Sort this branch and its lower branches in ascending order.
-
sortTree(JDPTreeBranch, boolean, boolean[])
- Sort this branch and its lower branches in ascending order.
-
sortTree(JDPTreeBranch, boolean[])
- Sort this branch and its lower branches in ascending order.
-
update(Graphics)
-
FOLDER
public static final int FOLDER
TABLE
public static final int TABLE
MULTIPLE_TABLE
public static final int MULTIPLE_TABLE
DATABASE
public static final int DATABASE
COMPUTER
public static final int COMPUTER
PERSON
public static final int PERSON
MULTIPLE_DATABASE
public static final int MULTIPLE_DATABASE
SEARCH
public static final int SEARCH
DOCUMENT
public static final int DOCUMENT
DRIVE
public static final int DRIVE
PRINTER
public static final int PRINTER
BLANK1
public static final int BLANK1
BLANK2
public static final int BLANK2
BLANK3
public static final int BLANK3
ARROW
public static final int ARROW
PICTURE
public static final int PICTURE
LABEL
public static final int LABEL
TEXTFIELD
public static final int TEXTFIELD
CHISELFRAME
public static final int CHISELFRAME
BUTTON
public static final int BUTTON
CHECKBOX
public static final int CHECKBOX
RADIO
public static final int RADIO
CHOICE
public static final int CHOICE
LIST
public static final int LIST
SCROLLSOUTH
public static final int SCROLLSOUTH
SCROLLEAST
public static final int SCROLLEAST
PANEL
public static final int PANEL
TAB
public static final int TAB
TREE
public static final int TREE
GRID
public static final int GRID
HOTKEY
public static final int HOTKEY
SLIDER
public static final int SLIDER
PROGRESS
public static final int PROGRESS
SPINNER
public static final int SPINNER
CUSTOM
public static final int CUSTOM
CHART
public static final int CHART
REPORT
public static final int REPORT
EMAIL
public static final int EMAIL
PAGER
public static final int PAGER
CALENDAR
public static final int CALENDAR
DIALOG
public static final int DIALOG
RMI
public static final int RMI
TREE_WIDTH_RESIZED
public static final int TREE_WIDTH_RESIZED
- Tree width resized event.
autoScrollOn
public boolean autoScrollOn
ITEM_MOVED
public static final int ITEM_MOVED
- List item moved event.
COLUMN_RESIZED
public static final int COLUMN_RESIZED
- Column resized event.
COLUMN_SELECTED
public static final int COLUMN_SELECTED
- Column resized event.
JDPTreePicker
public JDPTreePicker()
- Creates a Tree Structure.
JDPTreePicker
public JDPTreePicker(JDPUser user)
- Creates a Tree Structure.
- Parameters:
- JDPUser - the global user parameter used to pass handles in JDP.
JDPTreePicker
public JDPTreePicker(JDPUser user,
Panel targetPanel)
- Creates a Tree Structure.
- Parameters:
- JDPUser - the global user parameter used to pass handles in JDP.
- targetPanel - the parent panel that this one will be added to.
JDPTreePicker
public JDPTreePicker(JDPUser user,
Panel targetPanel,
JDPDragItem dragPanel)
- Creates a Tree Structure.
- Parameters:
- JDPUser - the global user parameter used to pass handles in JDP.
- targetPanel - the parent panel that this one will be added to.
- dragPanel - the panel that handle the drag and drop functions.
clear
public void clear()
- Remove all the entries from the Tree.
setRoot
public JDPTreeBranch setRoot(String name,
boolean expanded)
- Remove all the entries from the Tree and set the root name.
- Parameters:
- rootName - the text for the tree root.
- expanded - show branches (should be set to true initially).
- Returns:
- handle to the root node of the tree.
setRoot
public JDPTreeBranch setRoot(String name,
boolean expanded,
int rootIcon)
- Remove all the entries from the Tree and set the root name.
- Parameters:
- rootName - the text for the tree root.
- expanded - show branches (should be set to true initially).
- rootIcon - the icon of the root node of the tree.
- Returns:
- handle to the root node of the tree.
getTitle
public String getTitle()
- Get the root name of the tree.
- Returns:
- the text for the tree root.
setTitle
public void setTitle(String title)
- Set the root name of the tree.
- Parameters:
- rootName - the text for the tree root.
addItem
public JDPTreeBranch addItem(JDPTreeBranch branch,
String name,
int icon,
boolean dragAndDrop,
Object dropKey,
String dropMessage,
boolean expanded)
- Add a leaf to this branch.
- Parameters:
- branch - the branch to add this leaf to.
- name - the name of this new leaf.
- icon - the icon for this new leaf.
- dragAndDrop - the leaf allows both dragging and dropping.
- dropKey - the drop key for drag and drop.
- dropMessage - the status message to display if this is a dropable leaf.
- expanded - show this leaf expanded by default.
- Returns:
- a handle to the newly created branch.
addEntry
public JDPTreeBranch addEntry(String name[],
int icons[],
Object thisObject,
String compType,
String compPosition,
String text[],
String properties[][],
Vector treeVector)
- Create a new branch using the specified path of names.
- Parameters:
- name - the names of the branches that make the levels to this new leaf.
- icon - the icons of the branches that make the levels to this new leaf.
- thisObject - the new Object value for this leaf.
- compType - the component type of this new leaf.
- compPosition - the component position of this new leaf.
- text - the text of this new leaf.
- properties - the properties of this new leaf.
- treeVector - the treeVector of this new leaf.
- Returns:
- a handle to the newly created branch.
addEntry
public boolean addEntry(String name[],
int icons[],
String compType)
- Create a new branch using the specified path of names.
- Parameters:
- name - the names of the branches that make the levels to this new leaf.
- icon - the icons of the branches that make the levels to this new leaf.
- compType - the component type of this new leaf.
- Returns:
- true is branch already exists.
addEntry
public boolean addEntry(String name[],
int icons[],
String compType,
boolean ignoreCase)
- Create a new branch using the specified path of names.
- Parameters:
- name - the names of the branches that make the levels to this new leaf.
- icon - the icons of the branches that make the levels to this new leaf.
- compType - the component type of this new leaf.
- ignoreCase - ignore the case of the branch names allowing uniqueness without case.
- Returns:
- true is branch already exists.
addEntry
public boolean addEntry(String name[])
- Create a new branch using the specified path of names.
- Parameters:
- name - the names of the branches that make the levels to this new leaf.
- Returns:
- true is branch already exists.
addEntry
public boolean addEntry(String name[],
boolean ignoreCase)
- Create a new branch using the specified path of names.
- Parameters:
- name - the names of the branches that make the levels to this new leaf.
- ignoreCase - ignore the case of the branch names allowing uniqueness without case.
- Returns:
- true is branch already exists.
addEntry
public boolean addEntry(String name[],
boolean ignoreCase,
boolean addIfExists)
- Create a new branch using the specified path of names.
- Parameters:
- name - the names of the branches that make the levels to this new leaf.
- ignoreCase - ignore the case of the branch names allowing uniqueness without case.
- addIfExists - if this branch exists just add it anyway.
- Returns:
- true is branch already exists.
addBranch
public void addBranch(JDPTreeBranch existingBranch,
String name,
int icon,
boolean dragAndDrop,
Object dropKey,
String dropMessage,
boolean expanded)
- Add a leaf to this branch and count it as an indexed branch
- Parameters:
- branch - the branch to add this leaf to.
- name - the name of this new leaf.
- icon - the icon for this new leaf.
- dragAndDrop - the leaf allows both dragging and dropping.
- dropKey - the drop key for drag and drop.
- dropMessage - the status message to display if this is a dropable leaf.
- expanded - show this leaf expanded by default.
addNewBranch
public JDPTreeBranch addNewBranch(JDPTreeBranch existingBranch,
String name,
int icon,
boolean dragAndDrop,
Object dropKey,
String dropMessage,
boolean expanded)
- Add a leaf to this branch and count it as an indexed branch
- Parameters:
- branch - the branch to add this leaf to.
- name - the name of this new leaf.
- icon - the icon for this new leaf.
- dragAndDrop - the leaf allows both dragging and dropping.
- dropKey - the drop key for drag and drop.
- dropMessage - the status message to display if this is a dropable leaf.
- expanded - show this leaf expanded by default.
- Returns:
- a handle to the branch that was just created.
addBranch
public void addBranch(JDPTreeBranch existingBranch,
String name,
int icon)
- Add a leaf to this branch and count it as an indexed branch
- Parameters:
- branch - the branch to add this leaf to.
- name - the name of this new leaf.
- icon - the icon for this new leaf.
- Returns:
- a handle to the branch that was just created.
addNewBranch
public JDPTreeBranch addNewBranch(JDPTreeBranch existingBranch,
String name,
int icon)
- Add a leaf to this branch and count it as an indexed branch
- Parameters:
- branch - the branch to add this leaf to.
- name - the name of this new leaf.
- icon - the icon for this new leaf.
- Returns:
- a handle to the branch that was just created.
addBranch
public void addBranch(JDPTreeBranch existingBranch,
String name,
int icon,
Object dropKey,
String dropMessage)
- Add a leaf to this branch and count it as an indexed branch
- Parameters:
- branch - the branch to add this leaf to.
- name - the name of this new leaf.
- icon - the icon for this new leaf.
- dropKey - the key to use when activating drag and drop.
- Returns:
- a handle to the branch that was just created.
addNewBranch
public JDPTreeBranch addNewBranch(JDPTreeBranch existingBranch,
String name,
int icon,
Object dropKey,
String dropMessage,
String compType)
- Add a leaf to this branch and count it as an indexed branch
- Parameters:
- branch - the branch to add this leaf to.
- name - the name of this new leaf.
- icon - the icon for this new leaf.
- dropKey - the key to use when activating drag and drop.
- compType - the type of component this branch represents.
- Returns:
- a handle to the branch that was just created.
setIcons
public void setIcons(int icons[])
- Set the icons for any branches added from here on.
- Parameters:
- icons - the icons array for the branch levels.
setExpanded
public void setExpanded(boolean expanded[])
- Set the expanded flags for any branches added from here on.
- Parameters:
- expanded - the expanded flags array for the branch levels.
setSelectionsCheckboxes
public void setSelectionsCheckboxes(boolean selections)
- Set selections to display as checkboxes.
- Parameters:
- selections - to display as checkboxes.
getSelectionsCheckboxes
public boolean getSelectionsCheckboxes()
- Get whether selections are displayed as checkboxes.
- Returns:
- whether selections are displayed as checkboxes.
setTargetPanel
public void setTargetPanel(Panel target)
- Set the target panel for dragging.
- Parameters:
- the - target panel for drag and drop handling.
setDragPanel
public void setDragPanel(JDPDragItem drag)
- Set the drag panel for dragging.
- Parameters:
- the - drag panel for drag and drop handling.
getDragPanel
public JDPDragItem getDragPanel()
- Get the drag panel for dragging.
- Returns:
- the drag panel for drag and drop handling.
setDragAndDrop
public void setDragAndDrop(boolean dragAndDrops[])
- Set the dragAndDrop flags for any branches added from here on.
- Parameters:
- dragAndDrops - the dragAndDrop flags array for the branch levels.
setDropKeys
public void setDropKeys(Object dropKeys[])
- Set the dropKey values for any branches added from here on.
- Parameters:
- dropKeys - the dropKey values array for the branch levels.
setDropMessages
public void setDropMessages(String dropMessages[])
- Set the dropMessage values for any branches added from here on.
- Parameters:
- dropMessages - the dropMessage values array for the branch levels.
setObject
public void setObject(Object thisObject)
- Set the thisObject value for any branches added from here on.
- Parameters:
- thisObject - the thisObject value for the branch levels.
setCompType
public void setCompType(String compType)
- Set the compType value for any branches added from here on.
- Parameters:
- compType - the compType value for the branch levels.
setPosition
public void setPosition(String compPosition)
- Set the compPosition value for any branches added from here on.
- Parameters:
- compPosition - the compPosition value for the branch levels.
setText
public void setText(String text[])
- Set the text value for any branches added from here on.
- Parameters:
- text - the text value for the branch levels.
setProperties
public void setProperties(String properties[][])
- Set the properties value for any branches added from here on.
- Parameters:
- properties - the properties value for the branch levels.
setTreeVector
public void setTreeVector(Vector treeVector)
- Set the treeVector value for any branches added from here on.
- Parameters:
- treeVector - the treeVector value for the branch levels.
setMultipleSelections
public void setMultipleSelections(boolean multiple)
- Set the tree to allow multiple selections. This feature is presently not implemented.
- Parameters:
- multiple - allow multiple selections.
getMultipleSelections
public boolean getMultipleSelections()
- Get the multiple selections flag. This feature is presently not implemented.
- Returns:
- allow multiple selections.
setAlwaysHasFocus
public void setAlwaysHasFocus(boolean focus)
- Set whether this component always appears to have focus. This will result in
a selection always being filled solid with background color instead of just
a box.
- Parameters:
- focus - whether this component always appears to have focus.
getAlwaysHasFocus
public boolean getAlwaysHasFocus()
- Get whether this component always appears to have focus. This will result in
a selection always being filled solid with background color instead of just
a box.
- Returns:
- whether this component always appears to have focus.
setIconImagePath
public void setIconImagePath(String thisImageLoc)
- Set the path for the image that conatins the button icons.
This class has a default image call JDPBUTNS.gif that may be overidden. To create
your own icon image use the JDPBUTNS.gif as a template.
- Parameters:
- thisImageLoc - the full or partial path to the new image.
getTreeIconList
public static String[] getTreeIconList()
- Get a list of all the tree icon names.
- Returns:
- the list of all the tree icon names.
getIconValue
public static int getIconValue(String icon)
- Get the icon number for this icon text. Use getTreeIconList() to get a list
of icon names and then user this method to get the corresponding icon number.
- Returns:
- the icon number.
setColumns
public void setColumns(int columns)
- Set the number of columns
- Parameters:
- columns - the number of columns.
getColumns
public int getColumns()
- Set the number of columns
- Parameters:
- columns - the number of columns.
setColumnHeader
public void setColumnHeader(int col,
String header)
- Set the header of a column
- Parameters:
- col - the column.
- header - the header.
getColumnHeader
public String getColumnHeader(int col)
- Get the header of a column
- Parameters:
- col - the column.
- Returns:
- the column header.
setColumnWidth
public void setColumnWidth(int col,
int width)
- Set the width of a column
- Parameters:
- col - the column.
- the - width in pixels.
getColumnWidth
public int getColumnWidth(int col)
- Get the width of a column
- Parameters:
- col - the column.
- Returns:
- the width in pixels.
setRightJustify
public void setRightJustify(int col,
boolean justify)
- Set the right justification flag of a column
- Parameters:
- the - column.
- the - justification flag.
getRightJustify
public boolean getRightJustify(int col)
- Get the right justification flag of a column
- Parameters:
- the - column.
- Returns:
- the justification flag.
setResizingAllowed
public void setResizingAllowed(boolean allowed)
- Set whether dragging the with of the tree will resized it.
- Parameters:
- allowed - whether resizing is allowed.
setResizingAllowed
public boolean setResizingAllowed()
- Get whether dragging the with of the tree will resized it.
- Returns:
- whether dragging the with of the tree will resized it.
sortTree
public void sortTree()
- Sort the tree in ascending order.
sortTree
public void sortTree(JDPTreeBranch branch)
- Sort this branch and its lower branches in ascending order.
- Parameters:
- branch - the branch to sort.
sortTree
public void sortTree(JDPTreeBranch branch,
boolean ignoreCase)
- Sort this branch and its lower branches in ascending order.
- Parameters:
- branch - the branch to sort.
- ignoreCase - true to treat differenet cases as the same
sortTree
public void sortTree(JDPTreeBranch branch,
boolean leaveUnsorted[])
- Sort this branch and its lower branches in ascending order.
- Parameters:
- branch - the branch to sort.
- leaveUnsorted - levels of the branch to leave unsorted.
sortTree
public void sortTree(JDPTreeBranch branch,
boolean ignoreCase,
boolean leaveUnsorted[])
- Sort this branch and its lower branches in ascending order.
- Parameters:
- branch - the branch to sort.
- ignoreCase - true to treat differenet cases as the same
- leaveUnsorted - levels of the branch to leave unsorted.
removeBranch
public boolean removeBranch(String name[])
- Remove the selected branch and it's lower leaves.
- Parameters:
- name - the branch name heirarchy to remove.
- Returns:
- true if the branch was removed.
reDraw
public void reDraw()
- Redraw the tree.
removeBranch
public boolean removeBranch(JDPTreeBranch branch)
- Remove the lower leaves from the requested branch.
- Parameters:
- branch - the branch to remove.
- Returns:
- true if the branch was removed.
removeTreeBranch
public boolean removeTreeBranch(JDPTreeBranch branch)
- Remove the selected branch and it's lower leaves.
- Parameters:
- branch - the branch to remove.
- Returns:
- true if the branch was removed.
getMinWidth
public int getMinWidth()
- Get the minimum width of the tree panel.
- Returns:
- the minimum width of the tree panel.
setMinWidth
public void setMinWidth(int width)
- Set the minimum width of the tree panel.
- Parameters:
- minimumWidth - the new minimum width of the tree panel.
getMinHeight
public int getMinHeight()
- Get the minimum height of the tree panel.
- Returns:
- the minimum height of the tree panel.
setMinHeight
public void setMinHeight(int height)
- Set the minimum height of the tree panel.
- Parameters:
- minimumHeight - the new minimum height of the tree panel.
setScrollEastDisabled
public void setScrollEastDisabled(boolean disabled)
- Set whether the east scrollbar should be disabled
- Parameters:
- disabled - flag.
getScrollEastDisabled
public boolean getScrollEastDisabled()
- Get whether the east scrollbar has been removed
- Returns:
- whether disabled or not.
setScrollSouthDisabled
public void setScrollSouthDisabled(boolean disabled)
- Set whether the south scrollbar should be disabled
- Parameters:
- disabled - flag.
getScrollSouthDisabled
public boolean getScrollSouthDisabled()
- Get whether the south scrollbar has been removed
- Returns:
- whether disabled or not.
layout
public void layout()
- Overrides:
- layout in class Container
paint
public void paint(Graphics g)
- Overrides:
- paint in class Container
update
public void update(Graphics g)
- Overrides:
- update in class Component
getTreeBranchNames
public String[] getTreeBranchNames(Object thisObject)
- Get the branch names for the object.
- Parameters:
- thisObject - the object to look for (String, Rectangle, Component, JDPTreeBranch, Integer(branchIndex)).
- Returns:
- the branch names.
getBranch
public JDPTreeBranch getBranch(Object thisObject)
- Get the branch for the object.
- Parameters:
- thisObject - the object to look for (String, Rectangle, Component, JDPTreeBranch, Integer(branchIndex)).
- Returns:
- the branch of the tree.
getTreeBranch
public JDPTreeBranch[] getTreeBranch(Object thisObject)
- Get the branches for the object.
- Parameters:
- thisObject - the object to look for (String, Rectangle, Component, JDPTreeBranch, Integer(branchIndex)).
- Returns:
- the branches of the tree.
getTreeBranchIgnoreCase
public JDPTreeBranch[] getTreeBranchIgnoreCase(String names[])
- Get the branches for the branch names.
- Parameters:
- names - the names look for.
- Returns:
- the branches of the tree.
selectRoot
public void selectRoot()
- Select the root branch of the tree.
select
public void select(JDPTreeBranch thisBranch)
- Select a specific branch of the tree.
- Parameters:
- branch - the branch to select.
select
public void select(String thisBranch[])
- Select a specific branch of the tree.
- Parameters:
- names - the names of the branches in the heirarchy to select.
selectLastAddedBranch
public void selectLastAddedBranch()
- Select a the last added branch of the tree.
getSelectedItem
public String getSelectedItem()
- Get the name of the currently selected branch.
- Returns:
- the name of the currently selected branch.
getSelectedIcon
public int getSelectedIcon()
- Get the icon of the currently selected branch.
- Returns:
- the icon of the currently selected branch.
getSelectedBranch
public String[] getSelectedBranch()
- Get the branch names of the currently selected branch.
- Returns:
- the branch names of the currently selected branch.
getSelectedItems
public String[] getSelectedItems()
- (List only) Get the selected items in the List.
- Returns:
- the list items that are selected.
select
public void select(int index)
- Select the requested item based on the index.
- Parameters:
- index - the index of the item to select.
makeVisible
public void makeVisible(int index)
- Make the requested index visible.
- Parameters:
- index - the index of the item to make visible.
getSelectedIndexes
public int[] getSelectedIndexes()
- (List only) Get the selected indexes in the List. Presently multiple selections are not
supported so this function only returns one item.
- Returns:
- the list indexes that are selected.
getSelectedBranchIcons
public int[] getSelectedBranchIcons()
- Get the icons of the selected branch.
- Returns:
- the icons of the branch that is selected.
getCurrentBranch
public JDPTreeBranch getCurrentBranch()
- Get the selected branch.
- Returns:
- the branch that is selected.
getParentBranch
public JDPTreeBranch getParentBranch()
- Get the parent branch of the selected branch.
- Returns:
- the parent branch of the branch that is selected.
getLastAddedBranch
public JDPTreeBranch getLastAddedBranch()
- Get the last added branch.
- Returns:
- the branch that was added last.
getSelectedIndex
public int getSelectedIndex()
- Get the index of the selected branch.
- Returns:
- the index of the selected branch.
getVisibleIndex
public int getVisibleIndex()
- Get the index of the visible branch.
- Returns:
- the index of the visible branch.
getSelectedLvl
public int getSelectedLvl()
- Get the level of the selected branch.
- Returns:
- the level of the selected branch.
handleEvent
public boolean handleEvent(Event evt)
- Overrides:
- handleEvent in class Component
resetSelections
public void resetSelections()
- Reset the selections.
resetSelections
public void resetSelections(JDPTreeBranch branch)
- Reset the selections in the requested branch.
- Parameters:
- branch - the branch to start from to reset the selections.
preferredSize
public Dimension preferredSize()
- Overrides:
- preferredSize in class Container
minimumSize
public Dimension minimumSize()
- Overrides:
- minimumSize in class Container