ElegantJ Trees Java API Specification v1.1

com.elegantj.awt.tree
Class AWTTree

java.lang.Object
  extended byjava.awt.Component
      extended byjava.awt.Container
          extended byjava.awt.Panel
              extended bycom.elegantj.awt.tree.AWTTree
All Implemented Interfaces:
javax.accessibility.Accessible, java.awt.event.AdjustmentListener, java.util.EventListener, java.io.Externalizable, java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable

public class AWTTree
extends java.awt.Panel
implements java.awt.event.AdjustmentListener, java.io.Externalizable

AWTTree provides the tree control in the AWT

See Also:
Serialized Form

Nested Class Summary
 
Nested classes inherited from class java.awt.Panel
java.awt.Panel.AccessibleAWTPanel
 
Nested classes inherited from class java.awt.Container
java.awt.Container.AccessibleAWTContainer
 
Nested classes inherited from class java.awt.Component
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
 
Field Summary
protected  boolean allowCheckboxTree
          Allow checkbox tree
protected  boolean allowChildParentRelationship
          Allow child parent relationship
protected  boolean allowSameNodeAtSameLevel
          Allow same node at same level or not
protected  java.awt.Color backgroundColor
          background for the AWTTree
static int BOTTOM
          The search panel location
 com.elegantj.editors.C1 c1
           
protected  int clickCountToStartEditing
          click count to start editing
static java.lang.String CONTAINS
          Search with
static int DOTTED_LINE
          line style -- dotted line for the AWTTree
protected  boolean editable
          tree is editable or not
static java.lang.String ENDS_WITH
          Search with
static java.lang.String EQUALS
          Search with
protected  java.awt.Color foregroundColor
          foreground for the AWTTree
protected  boolean isDragAndDrop
          Wheather drag and drop allowed or not
protected  java.awt.Color lineColor
          line for the AWTTree
protected  int lineStyle
          line style for the AWTTree
protected  java.awt.Panel lowerPanel
          The lower panel
static int MULTIPLE_SELECTION
          selection style -- multiple selection for the AWTTree
protected  boolean rootVisible
          root visible or not
protected  int rowHeight
          row height for the AWTTree
static java.lang.String SEARCH_FROM_FIRST_NODE
          The value to start search from
static java.lang.String SEARCH_FROM_LAST_NODE
          The value to start search from
static java.lang.String SEARCH_FROM_SELECTED_NODE_TO_DOWN
          The value to start search from
static java.lang.String SEARCH_FROM_SELECTED_NODE_TO_UP
          The value to start search from
protected  SearchPanel searchPanel
          The search panel
protected  boolean selectionAllowed
          selection allowed or not
protected  int selectionStyle
          selection style for the AWTTree
protected  boolean showRootHandles
          show root handles or not
protected  boolean showSearchPanel
          Wheather allow to show header component or not
static int SINGLE_SELECTION
          selection style -- single selection for the AWTTree
static java.lang.String STARTS_WITH
          Search with
static int STRAIGHT_LINE
          straight style -- straight line for the AWTTree
static int TOP
          The search panel location
protected  AWTTreePanel treePanel
          tree panel whole the tree which is drawn over the treePanel
protected  java.util.Vector visibleNodesVector
          Vector contains the currently visible nodes
 
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
AWTTree()
          Default constructor of the AWTTree it makes the root node by default
AWTTree(AWTTreeNode root)
          Constructs the AWTTree
AWTTree(java.lang.Object rootUserObject, AWTTreeNode[] nodes)
          Constructs the AWTTree with specified root node and value
AWTTree(java.lang.Object rootUserObject, java.util.Vector nodes)
          Constructs the AWTTree with specified root node and value
 
Method Summary
 AWTTreeNode addChildToSelectionNode()
          Adds new tree node as last child of the selected node
 boolean addChildToSelectionNode(AWTTreeNode insertNode)
          Adds new tree node as last child of the selected node
 void addFocusListener(java.awt.event.FocusListener l)
          Overriden the addFocusListener
 void addKeyListener(java.awt.event.KeyListener l)
          Overriden the addKeyListener
 void addMouseListener(java.awt.event.MouseListener l)
          Overriden the addMouseListener
 void addMouseMotionListener(java.awt.event.MouseMotionListener l)
          Overriden the addMouseMotionListener
 boolean addNodeInto(AWTTreeNode newChild, AWTTreeNode parent)
          Method adds the new child at the end of the parent node
 void addPropertyChangeListener(java.beans.PropertyChangeListener l)
          Adds the property change listener
 void addTreeCellEditListener(AWTTreeCellEditListener l)
          Adds the AWTTreeCellEditListener
 void addTreeExpansionListener(AWTTreeExpansionListener l)
          Adds the AWTTreeExpansionListener
 void addTreeListener(AWTTreeListener l)
          Adds the AWTTreeListener
 AWTTreeNode addTreeNodeAboveSelection()
          Adds default new tree node above first selected node Returns the AWTTreeNode which added to the
 boolean addTreeNodeAboveSelection(AWTTreeNode insertNode)
          Adds new tree node above first selected node
 void addTreeSelectionListener(AWTTreeSelectionListener l)
          Adds the AWTTreeSelectionListener
 void addTreeWillExpandListener(AWTTreeWillExpandListener l)
          Adds the AWTTreeWillExpandListener
 void adjustmentValueChanged(java.awt.event.AdjustmentEvent e)
          Default implementation of the adjustmentValueChanged
 boolean areSameNodes(AWTTreeNode node1, AWTTreeNode node2)
          Checks for wheather the both nodes are same nodes
 void cancelEditing()
          Cancels the editing of the tree if currently it is editing
 void clearBackgroundNonSelectionColors()
          Clears the all the background non selection colors, if exists This method clears background non selection color for the whole tree and all the level wise background non selection colors after invoking this method, the background non selection color of the nodes, only depends on the cell renderer
 void clearBackgroundSelectionColors()
          Clears the all the background selection colors, if exists This method clears background selection color for the whole tree and all the level wise background selection colors after invoking this method, the background selection color of the nodes, only depends on the cell renderer
 void clearBorderSelectionColors()
          Clears the all the border selection colors, if exists This method clears border selection color for the whole tree and all the level wise border selection colors after invoking this method, the border selection color of the nodes, only depends on the cell renderer
 void clearCollapsedImageIcons()
          Clears the all the collapsed image icons, if exists This method clears collapsed image icons for the whole tree and all the level wise collapsed image icons after invoking this method, the collapsed image icons of the nodes, only depends on the cell renderer
 void clearExpandedImageIcons()
          Clears the all the expanded image icons, if exists This method clears expanded image icons for the whole tree and all the level wise expanded image icons after invoking this method, the expanded image icons of the nodes, only depends on the cell renderer
 void clearLeafImageIcons()
          Clears the all the leaf image icons, if exists This method clears leaf image icons for the whole tree and all the level wise leaf image icons after invoking this method, the leaf image icons of the nodes, only depends on the cell renderer
 void clearLevelWiseCellEditors()
          Clears the level wise cell editors, if exists This method clears all the level wise cell editors which have been set with setCellEditorAt method
 void clearLevelWiseCellRenderers()
          Clears the level wise cell renderers, if exists This method clears all the level wise cell renderers which have been set with setCellRendererAt method
 void clearSelection()
          Clears the selection of the tree
 void clearTextNonSelectionColors()
          Clears the all the text non selection colors, if exists This method clears text non selection color for the whole tree and all the level wise text non selection colors after invoking this method, the text non selection color of the nodes, only depends on the cell renderer
 void clearTextSelectionColors()
          Clears the all the text selection colors, if exists This method clears text selection color for the whole tree and all the level wise text selection colors after invoking this method, the text selection color of the nodes, only depends on the cell renderer
 void collapseAll()
          Collapse all the nodes of the tree
 boolean contains(AWTTreeNode treeNode, java.lang.String sNode)
          Checks whether the node with text sNode is child of the treeNode or not
static java.lang.String[] convertTreeDataToString(AWTTreeNode rootNode)
          Converts a tree data to the string array
 AWTTreePopupMenu createAWTTreePopupMenu(AWTTree tree)
          Creates the AWTTreePopupMenu
 AWTTreeNode createNode(java.lang.Object userObject)
          Method which creates the node from specified userObject
static AWTTreeNode createNode(java.lang.String[] str)
          Creates the AWTTreeNode from the specified string array The array contains the data for the string with TAB for the specify level i.e.
 AWTTreeNode createUniqueChildNode(AWTTreeNode parentNode)
          Returns the unique child node created for the given parent node
 void doLayout()
          Overriden doLayout
 void expandAll()
          Eexpands all the nodes of the tree
protected  void fireAfterCellEdit(AWTTreeNode editingNode, java.lang.Object value)
          Fires the after cell edit event
protected  void fireBeforeCellEdit(AWTTreeNode editingNode, java.lang.Object value)
          Fires the before cell edit event
 void firePropertyChange(java.lang.String property, java.lang.Object oldValue, java.lang.Object newValue)
          Fires the property change
protected  void fireTreeCollapsed(AWTTreeNode[] path)
          Fires the tree collapsed event Notify all listeners that have registered interest for notification on this event type
protected  void fireTreeExpanded(AWTTreeNode[] path)
          Fires the tree expanded event Notify all listeners that have registered interest for notification on this event type
protected  void fireTreeNodesChanged(java.lang.Object source, AWTTreeNode[] path, int[] childIndices, AWTTreeNode[] children)
          Call this method after the node of the tree was changed i.e.
protected  void fireTreeNodesInserted(java.lang.Object source, AWTTreeNode[] path, int[] childIndices, AWTTreeNode[] children)
          Call this method after tree nodes were inserted
protected  void fireTreeNodesRemoved(java.lang.Object source, AWTTreeNode[] path, int[] childIndices, AWTTreeNode[] children)
          Call this method after tree nodes were removed
protected  void fireTreeStructureChanged(java.lang.Object source, AWTTreeNode[] path, int[] childIndices, AWTTreeNode[] children)
          Call this method after tree structure changed
protected  void fireTreeWillCollapse(AWTTreeNode[] path)
          Fires the tree will collapse event Notify all listeners that have registered interest for notification on this event type
protected  void fireTreeWillExpand(AWTTreeNode[] path)
          Fires the tree will expand event Notify all listeners that have registered interest for notification on this event type
protected  void fireValueChanged(java.util.Vector selectedNodes)
          Fires the value changed event
 java.awt.Color getBackgroundNonSelectionColor()
          Returns the background non selection color of the tree
 java.awt.Color getBackgroundNonSelectionColorAt(int level)
          Returns the non selection background at the specified level
 java.awt.Color getBackgroundSelectionColor()
          Returns the background selection color of the tree
 java.awt.Color getBackgroundSelectionColorAt(int level)
          Returns the selection background at the specified level
 AWTBorder getBorder()
          Method which returns the border of the AWTTable
 java.awt.Color getBorderSelectionColor()
          Returns the border selection color of the tree
 java.awt.Color getBorderSelectionColorAt(int level)
          Returns the border selection color at the specified level
 AWTTreeCellEditor getCellEditor()
          Returns the cell editor of the tree
 AWTTreeCellEditor getCellEditorAt(int level)
          Returns the editor at the specified level
 AWTTreeCellRenderer getCellRenderer()
          Returns the cell renderer of the tree
 AWTTreeCellRenderer getCellRendererAt(int level)
          Returns the renderer at the specified level
 AWTTreeCellRenderer getCheckboxCellRenderer()
          Returns the checkbox cell renderer for the awt tree this cell renderer will be effected only if checkbox tree is true
 int getClickCountToStartEditing()
          Returns the no of click count to start editing
 java.awt.Image getCollapsedImageIcon()
          Returns the collapsed image icon of the tree
 java.awt.Image getCollapsedImageIconAt(int level)
          Returns the collapsed image icon at the specified level
 java.awt.Image getExpandedImageIcon()
          Returns the expanded image icon of the tree
 java.awt.Image getExpandedImageIconAt(int level)
          Returns the expanded image icon at the specified level
 AWTTreeNode getFirstChild(AWTTreeNode node)
          Returns node's first child.
 java.awt.Insets getInsets()
          Method whichs returns the insets of the AWTTable
 AWTTreeNode getLastChild(AWTTreeNode node)
          Returns node's last child.
 java.awt.Image getleafImageIcon()
          Returns the leaf image icon of the tree
 java.awt.Image getLeafImageIconAt(int level)
          Returns the leaf image icon at the specified level
 java.util.Vector getLevelWiseIDs()
          Returns the strings vector of the level wise string ids
 java.lang.String getLicenseKey()
          Returns the license key of the bean
 java.awt.Color getLineColor()
          Returns the line color of the tree
 int getLineStyle()
          Returns the line style of the tree
 java.util.Locale getLocale()
          Method which returns the locale of the AWTTree
 java.awt.Dimension getMinimumSize()
          Returns the minimum size of the tree
 AWTTreeNode getNextNode(AWTTreeNode node)
          Returns the node that follows node in a preorder traversal of this node's tree.
 AWTTreeNode getNodeForLocation(int x, int y)
          Returns the node at the specified x, y coordinates
 AWTTreeNode getNodeForLocation(java.awt.Point point)
          Returns the node at the specified point
 AWTTreeNode getNodeForRow(int rowIndex)
          Returns the node for the specified row
 java.awt.Dimension getPreferredSize()
          Returns the preferred size of the tree
 AWTTreeNode getPreviousNode(AWTTreeNode node)
          Returns the node that precedes aNode in a preorder traversal of node's tree.
 AWTTreeNode getRoot()
          Returns the root of the AWTTree
 int getRowForNode(AWTTreeNode node)
          Returns the visible row index of the specified node if the specified node is currently visible then returns the visible row index else return -1
 int getRowHeight()
          Returns the row height of the tree
 java.awt.Color getSearchPanelBackground()
          Returns the background color of the tree's search panel
 java.awt.Font getSearchPanelFont()
          Returns the font of the tree's search panel
 java.awt.Color getSearchPanelForeground()
          Returns the foreground color of the tree's search panel
 int getSearchPanelLocation()
          Returns the search panel location
protected  java.lang.Object getSearchValue(AWTTreeNode node)
          Returns the search value of the specified node
 int[] getSelectionInterval()
          Returns the selection interval
 AWTTreeNode getSelectionNode()
          Returns the selection node
 java.util.Vector getSelectionNodes()
          Returns the selection nodes vector
 int getSelectionStyle()
          Returns the selection style
 java.awt.Color getTextNonSelectionColor()
          Returns the text non selection color of the tree
 java.awt.Color getTextNonSelectionColorAt(int level)
          Returns the text non selection color at the specified level
 java.awt.Color getTextSelectionColor()
          Returns the text selection color of the tree
 java.awt.Color getTextSelectionColorAt(int level)
          Returns the text selection foreground at the specified level
 java.awt.Color getTreeBackground()
          Method which Returns the background color of the tree
 java.util.Vector getTreeNodes()
          Returns the tree nodes which are checked, if tree is checkbox tree
 java.util.Vector getTreeNodes(boolean bChecked)
          Returns the tree nodes which are checked/unchecked, if tree is checkbox tree
 java.util.Vector getTreeNodes(boolean bChecked, AWTTreeNode parentNode)
          Returns the tree nodes which are checked/unchecked of given parent node, if tree is checkbox tree
 java.util.Vector getTreeNodes(boolean bChecked, int nLevel)
          Returns the tree nodes which are checked/unchecked at given level, if tree is checkbox tree
 java.util.Vector getTreeNodes(boolean bChecked, int nLevel, AWTTreeNode parentNode)
          Returns the tree nodes which are checked/unchecked at given level of given parent node, if tree is checkbox tree
 AWTTreePanel getTreePanel()
          Returns the tree panel
 int getVisibleRowCount()
          Returns the count of the rows (currently visible nodes)
 boolean insertNodeInto(AWTTreeNode newChild, AWTTreeNode parent)
          Method inserts the new child at the end of the parent node
 boolean insertNodeInto(AWTTreeNode newChild, AWTTreeNode parent, int index)
          Method inserts the new child at the specified index in the parent node
 boolean isAllowSameNodeAtSameLevel()
          Returns whether same node can exist in the tree at the same level
 boolean isCheckboxTree()
          Returns the this tree is checkbox tree or not
 boolean isChildParentRelationship()
          Returns the wheather child parent relationship or not this property is used when the tree is checkbox and one can want to makes the all the child checked on checked the parent of those child and from all the checked childs if one child is unchecked the parent will also unchecked
 boolean isDeleteNodeOnDeleteKey()
          Method which returns the value of isDeleteNodeOnInsertKey
 boolean isDragAndDrop()
          Returns wheather the drag and drop allowed or not
 boolean isEditable()
          Returns the editability of the tree
 boolean isEditing()
          Returns the is the tree is currently editing
 boolean isInsertNodeOnInsertKey()
          Method which returns the value of isInsertNodeOnInsertKey
 boolean isNodeCurrentlyDisplayed(AWTTreeNode node)
          Returns wheather node currently displayed or not
 boolean isRootVisible()
          Returns the visibility of the root
 boolean isSelectionAllowed()
          Returns the value of the is selection allowed
 boolean isShowPopupMenu()
          Method which returns the value of showPopupMenu
 boolean isShowRootHandles()
          Returns the value of the show root handles
 boolean isShowSearchPanel()
          Returns the wheather allow to show the searchPanel
protected  boolean isValidDrop(AWTTreeNode childNode, AWTTreeNode parentNode)
          Check for the validity of the drop for the specified childNode and parent node
protected  void makeChildParentRelationship(AWTTreeNode node)
          Method which makes the child parent relationship when tree is checkbox tree
 void nodeChanged(AWTTreeNode node)
          Invoke this method after you've changed how node is to be represented in the tree.
 void nodesChanged(AWTTreeNode node, int[] childIndices)
          Invoke this method after you've changed how the children identified by childIndicies are to be represented in the tree.
 void nodeStructureChanged(AWTTreeNode node)
          Invoke this method if you've totally changed the children of node and its childrens children This will post a treeStructureChanged event.
protected  void nodesWereInserted(AWTTreeNode node, int[] childIndices)
          Method which you have to fire after the nodes were inserted
protected  void nodesWereRemoved(AWTTreeNode node, int[] childIndices, AWTTreeNode[] removedChildren)
          Invoke this method after you've removed some TreeNodes from node.
 void paint(java.awt.Graphics g)
          Overriden paint method
 void processTreeFocusEvent(java.awt.event.FocusEvent e)
          Default implementation of the focus even
 void processTreeKeyEvent(java.awt.event.KeyEvent e)
          Default implementation of the keyPressed
 void processTreeMouseEvent(java.awt.event.MouseEvent e)
          Default implementation of the mouse event
 void processTreeMouseMotionEvent(java.awt.event.MouseEvent e)
          Default implementation of the process mouse motion event
 void readExternal(java.io.ObjectInput in)
          Implementation of the Externalizable
 void reload()
          Invoke when you want to reload the tree and notify all of its listeners that the tree has changed
 void reload(AWTTreeNode node)
          Invoke when you want to reload the tree and notify all of its listeners that the tree has changed below the node
 void removeFocusListener(java.awt.event.FocusListener l)
          Overriden the removeFocusListener
 void removeKeyListener(java.awt.event.KeyListener l)
          Overriden the removeKeyListener
 void removeMouseListener(java.awt.event.MouseListener l)
          Overriden the removeMouseListener
 void removeMouseMotionListener(java.awt.event.MouseMotionListener l)
          Overriden the removeMouseMotionListener
 void removeNodeFromParent(AWTTreeNode node)
          Message this to remove node from its parent.
 void removePropertyChangeListener(java.beans.PropertyChangeListener l)
          Removes the property change listener
 void removeSelectedTreeNodes()
          Removes the selected nodex
 void removeTreeCellEditListener(AWTTreeCellEditListener l)
          Removes the AWTTreeCellEditListener
 void removeTreeExpansionListener(AWTTreeExpansionListener l)
          Removes the AWTTreeExpansionListener
 void removeTreeListener(AWTTreeListener l)
          Removes the AWTTreeListener
 void removeTreeSelectionListener(AWTTreeSelectionListener l)
          Removes the AWTTreeSelectionListener
 void removeTreeWillExpandListener(AWTTreeWillExpandListener l)
          Removes the AWTTreeWillExpandListener
 void scrollNodeToVisible(AWTTreeNode node)
          Scrolls the node to the visible
 AWTTreeNode searchTreeNode(java.lang.String searchText, java.lang.String searchFrom, java.lang.String searchWith, int searchOnLevel, boolean isCaseSensitive)
          Searches the tree for the specific text, level and search type
 void setAllowSameNodeAtSameLevel(boolean allowSameNodeAtSameLevel)
          Sets whether same node can exist in the tree at the same level if the value of the property true this method doesn't allow to add/insert two same node at the same level for the particular parent.
 void setBackground(java.awt.Color background)
          Overriden setBackground
 void setBackgroundNonSelectionColor(java.awt.Color color)
          Sets the background non selection color for the whole tree
 void setBackgroundNonSelectionColorAt(int level, java.awt.Color color)
          Sets the non selection background at the specified level for the tree
 void setBackgroundSelectionColor(java.awt.Color color)
          Sets the background selection color for the whole tree
 void setBackgroundSelectionColorAt(int level, java.awt.Color color)
          Sets the selection background at the specified level for the tree
 void setBorder(AWTBorder awtBorder)
          Method which sets the border for the AWTTable
 void setBorderSelectionColor(java.awt.Color color)
          Sets the border selection color for the whole tree
 void setBorderSelectionColorAt(int level, java.awt.Color color)
          Sets the border selection color at the specified level for the tree
 void setBounds(int x, int y, int width, int height)
          Method which sets the bounds of the AWTTree
 void setCellEditor(AWTTreeCellEditor cellEditor)
          Sets the cell editor for the whole tree
 void setCellEditorAt(int level, AWTTreeCellEditor cellEditor)
          Sets the editor at the specified level for the tree
 void setCellRenderer(AWTTreeCellRenderer cellRenderer)
          Sets the cell renderer for the whole tree
 void setCellRendererAt(int level, AWTTreeCellRenderer cellRenderer)
          Sets the renderer at the specified level for the tree
 void setCheckboxCellRenderer(AWTTreeCellRenderer cellRenderer)
          Sets the checkbox cell renderer for the awt tree this cell renderer will be effected only if checkbox tree is true
 void setCheckboxTree(boolean bCheckboxTree)
          Sets the tree to the check box tree
 void setChildParentRelationship(boolean bAllow)
          Sets the child parent relationship to true or false this property is used when the tree is checkbox and one can want to makes the all the child checked on checked the parent of those child and from all the checked childs if one child is unchecked the parent will also unchecked
 void setClickCountToStartEditing(int clickCount)
          Sets the no of click count to start editing
 void setCollapsedImageIcon(java.awt.Image imageIcon)
          Sets the collapsed image icon for the whole tree
 void setCollapsedImageIcon(java.lang.String imagePath)
          Sets the collapsed image icon for the whole tree based on specified imagePath
 void setCollapsedImageIconAt(int level, java.awt.Image imageIcon)
          Sets the collapsed image icon at the specified level for the tree
 void setCollapsedImageIconAt(int level, java.lang.String imagePath)
          Sets the collapsed image icon at the specified level for the tree
 void setCursor(java.awt.Cursor cursor)
          Method which sets the cursor for the AWTTree
 void setDeleteNodeOnDeleteKey(boolean deleteNodeOnDeleteKey)
          Method which sets the value of isDeleteNodeOnDeleteKey
 void setDragAndDrop(boolean bDragAndDrop)
          Sets the drag and drop wheather true or false if true, then node is removed from its parent and added to the target node
 void setEditable(boolean bEditable)
          Sets the editability of the tree
 void setEnabled(boolean bEnabled)
          Method which sets the enability of the AWTTree
 void setExpanded(AWTTreeNode node, boolean bExpanded)
          Expands the particular node
 void setExpandedImageIcon(java.awt.Image imageIcon)
          Sets the expanded image icon for the whole tree
 void setExpandedImageIcon(java.lang.String imagePath)
          Sets the expanded image icon for the whole tree based on specified imagePath
 void setExpandedImageIconAt(int level, java.awt.Image imageIcon)
          Sets the expanded image icon at the specified level for the tree
 void setExpandedImageIconAt(int level, java.lang.String imagePath)
          Sets the expanded image icon at the specified level for the tree
 void setFont(java.awt.Font font)
          Overriden setFont
 void setForeground(java.awt.Color foreground)
          Overriden setForeground
 void setHorizontalScrollbarAttributes()
          Sets the scrollbars horizontal attributes
 void setInsertNodeOnInsertKey(boolean insertNodeOnInsertKey)
          Method which sets the value of isInsertNodeOnInsertKey
 void setInsets(java.awt.Insets insets)
          Method which sets the insets for the AWTTable
 void setLeafImageIcon(java.awt.Image imageIcon)
          Sets the leaf image icon for the whole tree
 void setLeafImageIcon(java.lang.String imagePath)
          Sets the leaf image icon for the whole tree based on specified imagePath
 void setLeafImageIconAt(int level, java.awt.Image imageIcon)
          Sets the leaf image icon at the specified level for the tree
 void setLeafImageIconAt(int level, java.lang.String imagePath)
          Sets the leaf image icon at the specified level for the tree
 void setLevelWiseIDs(java.util.Vector levelWiseIDs)
          Sets the vector containing string data i.e.
 void setLicenseKey(java.lang.String licenseKey)
          Methods which sets the license key
 void setLineColor(java.awt.Color lineColor)
          Sets the line color for the tree
 void setLineStyle(int lineStyle)
          Sets the line style for the tree
 void setLocale(java.util.Locale locale)
          Method which sets the locale for the AWTTree
 void setRoot(AWTTreeNode root)
          Sets the root for the AWTTree
 void setRootVisible(boolean bRootVisible)
          Sets the visibility of the root i.e.
 void setRowHeight(int height)
          Sets the row height for the tree
 void setSearchPanelBackground(java.awt.Color background)
          Method which sets the background color for the tree's search panel
 void setSearchPanelFont(java.awt.Font font)
          Method which sets the font for the tree's search panel
 void setSearchPanelForeground(java.awt.Color foreground)
          Method which sets the foreground color for the tree's search panel
 void setSearchPanelLocation(int searchPanelLocation)
          Sets the search panel location
 void setSelectionAllowed(boolean bSelectionAllowed)
          Sets the value of is selection allowed or not
 void setSelectionInterval(int startRowIndex, int endRowIndex)
          Selects the nodes exists at the specified startRowIndex to endRowIndex inclusive
 void setSelectionNode(AWTTreeNode node)
          Selects the specified node
 void setSelectionRow(int rowIndex)
          Selects the node exists at the specified row index
 void setSelectionStyle(int selectionStyle)
          Sets the selection style
 void setShowPopupMenu(boolean showPopupMenu)
          Method which sets the value of showPopupMenu
 void setShowRootHandles(boolean bShowRootHandles)
          Sets the value of the show root handles
 void setShowSearchPanel(boolean bShowSearchPanel)
          Sets the wheather allow to show the search panel or not
 void setTextNonSelectionColor(java.awt.Color color)
          Sets the text non selection color for the whole tree
 void setTextNonSelectionColorAt(int level, java.awt.Color color)
          Sets the non selection foreground at the specified level for the tree
 void setTextSelectionColor(java.awt.Color color)
          Sets the text selection color for the whole tree
 void setTextSelectionColorAt(int level, java.awt.Color color)
          Sets the text selection color at the specified level for the tree
 void setTreeBackground(java.awt.Color background)
          Method which sets the background color for the AWTTree
 void setUserObject(AWTTreeNode node, java.lang.Object userObject)
          Sets the user object of the specified node to the specified userObject
 void setVerticalScrollbarAttributes()
          Sets the scrollbars vertical attributes
 void setVisible(boolean bVisible)
          Method which sets the visibility for the AWTTree
 void startEditing(AWTTreeNode node)
          Start the editing of the node, programatically
 void stopEditing()
          Stops the editing of the tree if currently it is editing
 void writeExternal(java.io.ObjectOutput out)
          Implementation of the Externalizable
 
Methods inherited from class java.awt.Panel
addNotify, getAccessibleContext
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getListeners, getMaximumSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, paramString, preferredSize, print, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, removeNotify, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setLayout, transferFocusBackward, transferFocusDownCycle, update, validate, validateTree
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, getBackground, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isOpaque, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, remove, removeComponentListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeMouseWheelListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, reshape, resize, resize, setBounds, setComponentOrientation, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

SINGLE_SELECTION

public static final int SINGLE_SELECTION
selection style -- single selection for the AWTTree

See Also:
Constant Field Values

MULTIPLE_SELECTION

public static final int MULTIPLE_SELECTION
selection style -- multiple selection for the AWTTree

See Also:
Constant Field Values

DOTTED_LINE

public static final int DOTTED_LINE
line style -- dotted line for the AWTTree

See Also:
Constant Field Values

STRAIGHT_LINE

public static final int STRAIGHT_LINE
straight style -- straight line for the AWTTree

See Also:
Constant Field Values

STARTS_WITH

public static java.lang.String STARTS_WITH
Search with


ENDS_WITH

public static java.lang.String ENDS_WITH
Search with


CONTAINS

public static java.lang.String CONTAINS
Search with


EQUALS

public static java.lang.String EQUALS
Search with


SEARCH_FROM_FIRST_NODE

public static java.lang.String SEARCH_FROM_FIRST_NODE
The value to start search from


SEARCH_FROM_LAST_NODE

public static java.lang.String SEARCH_FROM_LAST_NODE
The value to start search from


SEARCH_FROM_SELECTED_NODE_TO_UP

public static java.lang.String SEARCH_FROM_SELECTED_NODE_TO_UP
The value to start search from


SEARCH_FROM_SELECTED_NODE_TO_DOWN

public static java.lang.String SEARCH_FROM_SELECTED_NODE_TO_DOWN
The value to start search from


TOP

public static int TOP
The search panel location


BOTTOM

public static int BOTTOM
The search panel location


searchPanel

protected SearchPanel searchPanel
The search panel


lowerPanel

protected java.awt.Panel lowerPanel
The lower panel


treePanel

protected AWTTreePanel treePanel
tree panel whole the tree which is drawn over the treePanel


rowHeight

protected int rowHeight
row height for the AWTTree


clickCountToStartEditing

protected int clickCountToStartEditing
click count to start editing


backgroundColor

protected java.awt.Color backgroundColor
background for the AWTTree


foregroundColor

protected java.awt.Color foregroundColor
foreground for the AWTTree


lineColor

protected java.awt.Color lineColor
line for the AWTTree


lineStyle

protected int lineStyle
line style for the AWTTree


selectionAllowed

protected boolean selectionAllowed
selection allowed or not


selectionStyle

protected int selectionStyle
selection style for the AWTTree


rootVisible

protected boolean rootVisible
root visible or not


showRootHandles

protected boolean showRootHandles
show root handles or not


editable

protected boolean editable
tree is editable or not


showSearchPanel

protected boolean showSearchPanel
Wheather allow to show header component or not


allowCheckboxTree

protected boolean allowCheckboxTree
Allow checkbox tree


allowChildParentRelationship

protected boolean allowChildParentRelationship
Allow child parent relationship


allowSameNodeAtSameLevel

protected boolean allowSameNodeAtSameLevel
Allow same node at same level or not


isDragAndDrop

protected boolean isDragAndDrop
Wheather drag and drop allowed or not


visibleNodesVector

protected java.util.Vector visibleNodesVector
Vector contains the currently visible nodes


c1

public transient com.elegantj.editors.C1 c1
Constructor Detail

AWTTree

public AWTTree()
Default constructor of the AWTTree it makes the root node by default


AWTTree

public AWTTree(AWTTreeNode root)
Constructs the AWTTree

Parameters:
root - The AWTTreeNode takes this node as the root node

AWTTree

public AWTTree(java.lang.Object rootUserObject,
               AWTTreeNode[] nodes)
Constructs the AWTTree with specified root node and value

Parameters:
rootUserObject - The user object for the root from which root node is created
nodes - The array containing the AWTTreeNode(s)

AWTTree

public AWTTree(java.lang.Object rootUserObject,
               java.util.Vector nodes)
Constructs the AWTTree with specified root node and value

Parameters:
rootUserObject - The user object for the root from which root node is created
nodes - The vector containing AWTTreeNode(s)
Method Detail

createAWTTreePopupMenu

public AWTTreePopupMenu createAWTTreePopupMenu(AWTTree tree)
Creates the AWTTreePopupMenu


paint

public void paint(java.awt.Graphics g)
Overriden paint method

Parameters:
g - The graphics

getFirstChild

public AWTTreeNode getFirstChild(AWTTreeNode node)
Returns node's first child. If node has no children, throws NoSuchElementException.

Parameters:
node - the tree node
Returns:
the first child of node

getNextNode

public AWTTreeNode getNextNode(AWTTreeNode node)
Returns the node that follows node in a preorder traversal of this node's tree. Returns null if node is the last node of the traversal. This is an inefficient way to traverse the entire tree; use an enumeration, instead.

Parameters:
node - the tree node
Returns:
the node that follows aNode in a preorder traversal, or null if node is last

getPreviousNode

public AWTTreeNode getPreviousNode(AWTTreeNode node)
Returns the node that precedes aNode in a preorder traversal of node's tree. Returns null if node is the first node of the traveral -- the root of the tree. This is an inefficient way to traverse the entire tree; use an enumeration, instead.

Parameters:
node - the tree node
Returns:
the node that precedes aNode in a preorder traversal, or null if node is the first

getLastChild

public AWTTreeNode getLastChild(AWTTreeNode node)
Returns node's last child. If aNode has no children, throws NoSuchElementException.

Parameters:
node - the tree node
Returns:
the last child of node

addTreeNodeAboveSelection

public AWTTreeNode addTreeNodeAboveSelection()
Adds default new tree node above first selected node Returns the AWTTreeNode which added to the


addTreeNodeAboveSelection

public boolean addTreeNodeAboveSelection(AWTTreeNode insertNode)
Adds new tree node above first selected node

Parameters:
insertNode - the node which is inserted
Returns:
wheather node is inserted or not if is true the node is successfully inserted if the allow same node at same level is false and you are trying to add the node same as allready exist node at the same level of the same parent then this node is not added to the tree and in this case this method return false, also return false if the selection node is null

addChildToSelectionNode

public AWTTreeNode addChildToSelectionNode()
Adds new tree node as last child of the selected node

Returns:
The node which is added

addChildToSelectionNode

public boolean addChildToSelectionNode(AWTTreeNode insertNode)
Adds new tree node as last child of the selected node

Parameters:
insertNode - the node which is inserted
Returns:
wheather node is inserted or not if is true the node is successfully inserted if the allow same node at same level is false and you are trying to add the node same as allready exist node at the same level of the same parent then this node is not added to the tree and in this case this method return false, also return false if the selection node is null

removeSelectedTreeNodes

public void removeSelectedTreeNodes()
Removes the selected nodex


setUserObject

public void setUserObject(AWTTreeNode node,
                          java.lang.Object userObject)
Sets the user object of the specified node to the specified userObject

Parameters:
node - The specified node
userObject - The specified user object

createNode

public AWTTreeNode createNode(java.lang.Object userObject)
Method which creates the node from specified userObject

Parameters:
userObject - The specified user object
Returns:
The AWTTreeNode created from specified userObject

createUniqueChildNode

public AWTTreeNode createUniqueChildNode(AWTTreeNode parentNode)
Returns the unique child node created for the given parent node

Parameters:
parentNode - the parent node of the unique child node to be created
Returns:
the unique child node created for the given parent node

addNodeInto

public boolean addNodeInto(AWTTreeNode newChild,
                           AWTTreeNode parent)
Method adds the new child at the end of the parent node

Parameters:
newChild - The AWTTreeNode to be added
parent - The AWTTreeNode in to which new child is added

insertNodeInto

public boolean insertNodeInto(AWTTreeNode newChild,
                              AWTTreeNode parent)
Method inserts the new child at the end of the parent node

Parameters:
newChild - The AWTTreeNode to be added
parent - The AWTTreeNode in to which new child is added

insertNodeInto

public boolean insertNodeInto(AWTTreeNode newChild,
                              AWTTreeNode parent,
                              int index)
Method inserts the new child at the specified index in the parent node

Parameters:
newChild - The AWTTreeNode to be added
parent - The AWTTreeNode in to which new child is added
index - The index at which the new child is added
Returns:
wheather node is inserted or not if is true the node is successfully inserted if the allow same node at same level is false and you are trying to add the node same as allready exist node at the same level of the same parent then this node is not added to the tree and in this case this method return false

removeNodeFromParent

public void removeNodeFromParent(AWTTreeNode node)
Message this to remove node from its parent. This will message nodesWereRemoved to create the appropriate event. This is the preferred way to remove a node as it handles the event creation for you.


nodesWereInserted

protected void nodesWereInserted(AWTTreeNode node,
                                 int[] childIndices)
Method which you have to fire after the nodes were inserted

Parameters:
node - The AWTTreeNode where the node/nodes were inserted as it's child
childIndices - The int array of the indexs of the child of the node if your are using insertNodeInto method of the tree then no need to call this method, bcoz of it called internally.

nodesWereRemoved

protected void nodesWereRemoved(AWTTreeNode node,
                                int[] childIndices,
                                AWTTreeNode[] removedChildren)
Invoke this method after you've removed some TreeNodes from node. childIndices should be the index of the removed elements and must be sorted in ascending order. And removedChildren should be the array of the children nodes that were removed. if your are using removeNodeFromParent method of the tree then no need to call this method, bcoz of it called internally.


nodeChanged

public void nodeChanged(AWTTreeNode node)
Invoke this method after you've changed how node is to be represented in the tree.


nodesChanged

public void nodesChanged(AWTTreeNode node,
                         int[] childIndices)
Invoke this method after you've changed how the children identified by childIndicies are to be represented in the tree.


nodeStructureChanged

public void nodeStructureChanged(AWTTreeNode node)
Invoke this method if you've totally changed the children of node and its childrens children This will post a treeStructureChanged event.


addTreeListener

public void addTreeListener(AWTTreeListener l)
Adds the AWTTreeListener

Parameters:
l - The AWTTreeListener

removeTreeListener

public void removeTreeListener(AWTTreeListener l)
Removes the AWTTreeListener

Parameters:
l - The AWTTreeListener

addTreeExpansionListener

public void addTreeExpansionListener(AWTTreeExpansionListener l)
Adds the AWTTreeExpansionListener

Parameters:
l - The AWTTreeExpansionListener

removeTreeExpansionListener

public void removeTreeExpansionListener(AWTTreeExpansionListener l)
Removes the AWTTreeExpansionListener

Parameters:
l - The AWTTreeExpansionListener

addTreeWillExpandListener

public void addTreeWillExpandListener(AWTTreeWillExpandListener l)
Adds the AWTTreeWillExpandListener

Parameters:
l - The AWTTreeWillExpandListener

removeTreeWillExpandListener

public void removeTreeWillExpandListener(AWTTreeWillExpandListener l)
Removes the AWTTreeWillExpandListener

Parameters:
l - The AWTTreeWillExpandListener

addTreeSelectionListener

public void addTreeSelectionListener(AWTTreeSelectionListener l)
Adds the AWTTreeSelectionListener

Parameters:
l - The AWTTreeSelectionListener

removeTreeSelectionListener

public void removeTreeSelectionListener(AWTTreeSelectionListener l)
Removes the AWTTreeSelectionListener

Parameters:
l - The AWTTreeSelectionListener

addTreeCellEditListener

public void addTreeCellEditListener(AWTTreeCellEditListener l)
Adds the AWTTreeCellEditListener

Parameters:
l - The AWTTreeCellEditListener

removeTreeCellEditListener

public void removeTreeCellEditListener(AWTTreeCellEditListener l)
Removes the AWTTreeCellEditListener

Parameters:
l - The AWTTreeCellEditListener

fireTreeNodesChanged

protected void fireTreeNodesChanged(java.lang.Object source,
                                    AWTTreeNode[] path,
                                    int[] childIndices,
                                    AWTTreeNode[] children)
Call this method after the node of the tree was changed i.e. after insert, remove, add in the tree node

Parameters:
source - The source object
path - The path of the node
childIndices -

fireTreeNodesInserted

protected void fireTreeNodesInserted(java.lang.Object source,
                                     AWTTreeNode[] path,
                                     int[] childIndices,
                                     AWTTreeNode[] children)
Call this method after tree nodes were inserted

Parameters:
source -
path -
childIndices -
children -

fireTreeNodesRemoved

protected void fireTreeNodesRemoved(java.lang.Object source,
                                    AWTTreeNode[] path,
                                    int[] childIndices,
                                    AWTTreeNode[] children)
Call this method after tree nodes were removed

Parameters:
source -
path -
childIndices - The childIndices must in descending order
children - must in descending order

fireTreeStructureChanged

protected void fireTreeStructureChanged(java.lang.Object source,
                                        AWTTreeNode[] path,
                                        int[] childIndices,
                                        AWTTreeNode[] children)
Call this method after tree structure changed

Parameters:
source -
path -
childIndices -
children -

fireTreeExpanded

protected void fireTreeExpanded(AWTTreeNode[] path)
Fires the tree expanded event Notify all listeners that have registered interest for notification on this event type

Parameters:
path - The array of the AWTTreeNode i.e. the path from the node to the root

fireTreeCollapsed

protected void fireTreeCollapsed(AWTTreeNode[] path)
Fires the tree collapsed event Notify all listeners that have registered interest for notification on this event type

Parameters:
path - The array of the AWTTreeNode i.e. the path from the node to the root

fireTreeWillExpand

protected void fireTreeWillExpand(AWTTreeNode[] path)
Fires the tree will expand event Notify all listeners that have registered interest for notification on this event type

Parameters:
path - The array of the AWTTreeNode i.e. the path from the node to the root

fireTreeWillCollapse

protected void fireTreeWillCollapse(AWTTreeNode[] path)
Fires the tree will collapse event Notify all listeners that have registered interest for notification on this event type

Parameters:
path - The array of the AWTTreeNode i.e. the path from the node to the root

fireValueChanged

protected void fireValueChanged(java.util.Vector selectedNodes)
Fires the value changed event

Parameters:
selectedNodes - the vector containing the selected nodes

fireBeforeCellEdit

protected void fireBeforeCellEdit(AWTTreeNode editingNode,
                                  java.lang.Object value)
Fires the before cell edit event


fireAfterCellEdit

protected void fireAfterCellEdit(AWTTreeNode editingNode,
                                 java.lang.Object value)
Fires the after cell edit event


setRoot

public void setRoot(AWTTreeNode root)
Sets the root for the AWTTree

Parameters:
root - The root for the AWTTree

getRoot

public AWTTreeNode getRoot()
Returns the root of the AWTTree

Returns:
The root of the AWTTree

adjustmentValueChanged

public void adjustmentValueChanged(java.awt.event.AdjustmentEvent e)
Default implementation of the adjustmentValueChanged

Specified by:
adjustmentValueChanged in interface java.awt.event.AdjustmentListener

processTreeFocusEvent

public void processTreeFocusEvent(java.awt.event.FocusEvent e)
Default implementation of the focus even


processTreeMouseEvent

public void processTreeMouseEvent(java.awt.event.MouseEvent e)
Default implementation of the mouse event


processTreeMouseMotionEvent

public void processTreeMouseMotionEvent(java.awt.event.MouseEvent e)
Default implementation of the process mouse motion event


isValidDrop

protected boolean isValidDrop(AWTTreeNode childNode,
                              AWTTreeNode parentNode)
Check for the validity of the drop for the specified childNode and parent node


processTreeKeyEvent

public void processTreeKeyEvent(java.awt.event.KeyEvent e)
Default implementation of the keyPressed


setSelectionInterval

public void setSelectionInterval(int startRowIndex,
                                 int endRowIndex)
Selects the nodes exists at the specified startRowIndex to endRowIndex inclusive

Parameters:
startRowIndex - The start row index
endRowIndex - The end row index if the rowIndex0 or rowIndex1 are out of range i.e. less than or greater than no of visible nodes The closest value of the startRowIndex and endRowIndex is taken

setSelectionRow

public void setSelectionRow(int rowIndex)
Selects the node exists at the specified row index

Parameters:
rowIndex - The specified row index if the rowIndex is out of range first row is selected

getSelectionInterval

public int[] getSelectionInterval()
Returns the selection interval

Returns:
The selection interval

setSelectionNode

public void setSelectionNode(AWTTreeNode node)
Selects the specified node

Parameters:
node - The specified node

getSelectionNodes

public java.util.Vector getSelectionNodes()
Returns the selection nodes vector

Returns:
The selection nodes vector if the selection style is MULTIPLE_SELECTION use this method to get selected nodes see getSelectionNode()

getSelectionNode

public AWTTreeNode getSelectionNode()
Returns the selection node

Returns:
The selection node if the selection style is SINGLE_SELECTION use this method to get selected node see getSelectionNodes()

clearSelection

public void clearSelection()
Clears the selection of the tree


doLayout

public void doLayout()
Overriden doLayout


setHorizontalScrollbarAttributes

public void setHorizontalScrollbarAttributes()
Sets the scrollbars horizontal attributes


setVerticalScrollbarAttributes

public void setVerticalScrollbarAttributes()
Sets the scrollbars vertical attributes


scrollNodeToVisible

public void scrollNodeToVisible(AWTTreeNode node)
Scrolls the node to the visible

Parameters:
node - The AWTTreeNode

isNodeCurrentlyDisplayed

public boolean isNodeCurrentlyDisplayed(AWTTreeNode node)
Returns wheather node currently displayed or not

Parameters:
node - The AWTTreeNode

expandAll

public void expandAll()
Eexpands all the nodes of the tree


collapseAll

public void collapseAll()
Collapse all the nodes of the tree


setExpanded

public void setExpanded(AWTTreeNode node,
                        boolean bExpanded)
Expands the particular node

Parameters:
node - The AWTTreeNode
bExpanded - The boolean value for expand or collapsed

setCellEditor

public void setCellEditor(AWTTreeCellEditor cellEditor)
Sets the cell editor for the whole tree

Parameters:
cellEditor - The AWTTreeCellEditor

getCellEditor

public AWTTreeCellEditor getCellEditor()
Returns the cell editor of the tree

Returns:
The AWTTreeCellEditor of the tree

setCellEditorAt

public void setCellEditorAt(int level,
                            AWTTreeCellEditor cellEditor)
Sets the editor at the specified level for the tree

Parameters:
level - The specified level on to which cell editor to be set
cellEditor - The specified cell editor

getCellEditorAt

public AWTTreeCellEditor getCellEditorAt(int level)
Returns the editor at the specified level

Returns:
The editor at the specified level

clearLevelWiseCellEditors

public void clearLevelWiseCellEditors()
Clears the level wise cell editors, if exists This method clears all the level wise cell editors which have been set with setCellEditorAt method


setCheckboxCellRenderer

public void setCheckboxCellRenderer(AWTTreeCellRenderer cellRenderer)
Sets the checkbox cell renderer for the awt tree this cell renderer will be effected only if checkbox tree is true

Parameters:
cellRenderer - The checkbox cell renderer

getCheckboxCellRenderer

public AWTTreeCellRenderer getCheckboxCellRenderer()
Returns the checkbox cell renderer for the awt tree this cell renderer will be effected only if checkbox tree is true

Returns:
The checkbox cell renderer

setCellRenderer

public void setCellRenderer(AWTTreeCellRenderer cellRenderer)
Sets the cell renderer for the whole tree

Parameters:
cellRenderer - The AWTTreeCellRenderer

getCellRenderer

public AWTTreeCellRenderer getCellRenderer()
Returns the cell renderer of the tree

Returns:
The AWTTreeCellRenderer of the tree

setCellRendererAt

public void setCellRendererAt(int level,
                              AWTTreeCellRenderer cellRenderer)
Sets the renderer at the specified level for the tree

Parameters:
level - The specified level on to which cell renderer to be set
cellRenderer - The specified cell renderer

getCellRendererAt

public AWTTreeCellRenderer getCellRendererAt(int level)
Returns the renderer at the specified level

Returns:
The renderer at the specified level

clearLevelWiseCellRenderers

public void clearLevelWiseCellRenderers()
Clears the level wise cell renderers, if exists This method clears all the level wise cell renderers which have been set with setCellRendererAt method


setBackgroundNonSelectionColor

public void setBackgroundNonSelectionColor(java.awt.Color color)
Sets the background non selection color for the whole tree

Parameters:
color - The background non selection color

getBackgroundNonSelectionColor

public java.awt.Color getBackgroundNonSelectionColor()
Returns the background non selection color of the tree

Returns:
The background non selection color of the tree

setBackgroundNonSelectionColorAt

public void setBackgroundNonSelectionColorAt(int level,
                                             java.awt.Color color)
Sets the non selection background at the specified level for the tree

Parameters:
level - The specified level on to which non selection background to be set
color - The specified non selection background

getBackgroundNonSelectionColorAt

public java.awt.Color getBackgroundNonSelectionColorAt(int level)
Returns the non selection background at the specified level

Returns:
The non selection background at the specified level

clearBackgroundNonSelectionColors

public void clearBackgroundNonSelectionColors()
Clears the all the background non selection colors, if exists This method clears background non selection color for the whole tree and all the level wise background non selection colors after invoking this method, the background non selection color of the nodes, only depends on the cell renderer


setTextNonSelectionColor

public void setTextNonSelectionColor(java.awt.Color color)
Sets the text non selection color for the whole tree

Parameters:
color - The text non selection color for the whole tree

getTextNonSelectionColor

public java.awt.Color getTextNonSelectionColor()
Returns the text non selection color of the tree

Returns:
The text non selection color of the tree

setTextNonSelectionColorAt

public void setTextNonSelectionColorAt(int level,
                                       java.awt.Color color)
Sets the non selection foreground at the specified level for the tree

Parameters:
level - The specified level on to which text non selection color to be set
color - The specified text non selection color

getTextNonSelectionColorAt

public java.awt.Color getTextNonSelectionColorAt(int level)
Returns the text non selection color at the specified level

Returns:
The text non selection color at the specified level

clearTextNonSelectionColors

public void clearTextNonSelectionColors()
Clears the all the text non selection colors, if exists This method clears text non selection color for the whole tree and all the level wise text non selection colors after invoking this method, the text non selection color of the nodes, only depends on the cell renderer


setBackgroundSelectionColor

public void setBackgroundSelectionColor(java.awt.Color color)
Sets the background selection color for the whole tree

Parameters:
color - The background selection color for the whole tree

getBackgroundSelectionColor

public java.awt.Color getBackgroundSelectionColor()
Returns the background selection color of the tree

Returns:
The background selection color of the tree

setBackgroundSelectionColorAt

public void setBackgroundSelectionColorAt(int level,
                                          java.awt.Color color)
Sets the selection background at the specified level for the tree

Parameters:
level - The specified level on to which selection background to be set
color - The specified selection background

getBackgroundSelectionColorAt

public java.awt.Color getBackgroundSelectionColorAt(int level)
Returns the selection background at the specified level

Returns:
The selection background at the specified level

clearBackgroundSelectionColors

public void clearBackgroundSelectionColors()
Clears the all the background selection colors, if exists This method clears background selection color for the whole tree and all the level wise background selection colors after invoking this method, the background selection color of the nodes, only depends on the cell renderer


setTextSelectionColor

public void setTextSelectionColor(java.awt.Color color)
Sets the text selection color for the whole tree

Parameters:
color - The text selection color for the whole tree

getTextSelectionColor

public java.awt.Color getTextSelectionColor()
Returns the text selection color of the tree

Returns:
The text selection color of the tree

setTextSelectionColorAt

public void setTextSelectionColorAt(int level,
                                    java.awt.Color color)
Sets the text selection color at the specified level for the tree

Parameters:
level - The specified level on to which text selection color to be set
color - The specified text selection color

getTextSelectionColorAt

public java.awt.Color getTextSelectionColorAt(int level)
Returns the text selection foreground at the specified level

Returns:
The selection foreground at the specified level

clearTextSelectionColors

public void clearTextSelectionColors()
Clears the all the text selection colors, if exists This method clears text selection color for the whole tree and all the level wise text selection colors after invoking this method, the text selection color of the nodes, only depends on the cell renderer


setBorderSelectionColor

public void setBorderSelectionColor(java.awt.Color color)
Sets the border selection color for the whole tree

Parameters:
color - The border selection color for the whole tree

getBorderSelectionColor

public java.awt.Color getBorderSelectionColor()
Returns the border selection color of the tree

Returns:
The border selection color of the tree

setBorderSelectionColorAt

public void setBorderSelectionColorAt(int level,
                                      java.awt.Color color)
Sets the border selection color at the specified level for the tree

Parameters:
level - The specified level on to which border selection color to be set
color - The specified border selection color

getBorderSelectionColorAt

public java.awt.Color getBorderSelectionColorAt(int level)
Returns the border selection color at the specified level

Returns:
The border selection color at the specified level

clearBorderSelectionColors

public void clearBorderSelectionColors()
Clears the all the border selection colors, if exists This method clears border selection color for the whole tree and all the level wise border selection colors after invoking this method, the border selection color of the nodes, only depends on the cell renderer


setExpandedImageIcon

public void setExpandedImageIcon(java.lang.String imagePath)
Sets the expanded image icon for the whole tree based on specified imagePath

Parameters:
imagePath - The specified image path for the expanded image icon

setExpandedImageIcon

public void setExpandedImageIcon(java.awt.Image imageIcon)
Sets the expanded image icon for the whole tree

Parameters:
imageIcon - The expanded image icon for the whole tree

getExpandedImageIcon

public java.awt.Image getExpandedImageIcon()
Returns the expanded image icon of the tree

Returns:
The expanded image icon of the tree

setExpandedImageIconAt

public void setExpandedImageIconAt(int level,
                                   java.lang.String imagePath)
Sets the expanded image icon at the specified level for the tree

Parameters:
level - The specified level on to which expanded image icon to be set
imagePath - The specified expanded image path for the expanded image icon

setExpandedImageIconAt

public void setExpandedImageIconAt(int level,
                                   java.awt.Image imageIcon)
Sets the expanded image icon at the specified level for the tree

Parameters:
imageIcon - The specified expanded image icon
level - The specified level on to which expanded image icon to be set

getExpandedImageIconAt

public java.awt.Image getExpandedImageIconAt(int level)
Returns the expanded image icon at the specified level

Returns:
The expanded image icon at the specified level

clearExpandedImageIcons

public void clearExpandedImageIcons()
Clears the all the expanded image icons, if exists This method clears expanded image icons for the whole tree and all the level wise expanded image icons after invoking this method, the expanded image icons of the nodes, only depends on the cell renderer


setCollapsedImageIcon

public void setCollapsedImageIcon(java.lang.String imagePath)
Sets the collapsed image icon for the whole tree based on specified imagePath

Parameters:
imagePath - The specified image path for the collapsed image icon

setCollapsedImageIcon

public void setCollapsedImageIcon(java.awt.Image imageIcon)
Sets the collapsed image icon for the whole tree

Parameters:
imageIcon - The collapsed image icon for the whole tree

getCollapsedImageIcon

public java.awt.Image getCollapsedImageIcon()
Returns the collapsed image icon of the tree

Returns:
The collapsed image icon of the tree

setCollapsedImageIconAt

public void setCollapsedImageIconAt(int level,
                                    java.lang.String imagePath)
Sets the collapsed image icon at the specified level for the tree

Parameters:
level - The specified level on to which collapsed image icon to be set
imagePath - The specified collapsed image path

setCollapsedImageIconAt

public void setCollapsedImageIconAt(int level,
                                    java.awt.Image imageIcon)
Sets the collapsed image icon at the specified level for the tree

Parameters:
level - The specified level on to which collapsed image icon to be set
imageIcon - The specified collapsed image icon

getCollapsedImageIconAt

public java.awt.Image getCollapsedImageIconAt(int level)
Returns the collapsed image icon at the specified level

Returns:
The collapsed image icon at the specified level

clearCollapsedImageIcons

public void clearCollapsedImageIcons()
Clears the all the collapsed image icons, if exists This method clears collapsed image icons for the whole tree and all the level wise collapsed image icons after invoking this method, the collapsed image icons of the nodes, only depends on the cell renderer


setLeafImageIcon

public void setLeafImageIcon(java.lang.String imagePath)
Sets the leaf image icon for the whole tree based on specified imagePath

Parameters:
imagePath - The specified image path for the leaf image icon

setLeafImageIcon

public void setLeafImageIcon(java.awt.Image imageIcon)
Sets the leaf image icon for the whole tree

Parameters:
imageIcon - The leaf image icon for the whole tree

getleafImageIcon

public java.awt.Image getleafImageIcon()
Returns the leaf image icon of the tree

Returns:
The leaf image icon of the tree

setLeafImageIconAt

public void setLeafImageIconAt(int level,
                               java.lang.String imagePath)
Sets the leaf image icon at the specified level for the tree

Parameters:
level - The specified level on to which leaf image icon to be set
imagePath - The specified leaf image icon

setLeafImageIconAt

public void setLeafImageIconAt(int level,
                               java.awt.Image imageIcon)
Sets the leaf image icon at the specified level for the tree

Parameters:
level - The specified level on to which leaf image icon to be set
imageIcon - The specified leaf image icon

getLeafImageIconAt

public java.awt.Image getLeafImageIconAt(int level)
Returns the leaf image icon at the specified level

Returns:
The leaf image icon at the specified level

clearLeafImageIcons

public void clearLeafImageIcons()
Clears the all the leaf image icons, if exists This method clears leaf image icons for the whole tree and all the level wise leaf image icons after invoking this method, the leaf image icons of the nodes, only depends on the cell renderer


startEditing

public void startEditing(AWTTreeNode node)
Start the editing of the node, programatically

Parameters:
node - The node on to which editing will satrt

cancelEditing

public void cancelEditing()
Cancels the editing of the tree if currently it is editing


stopEditing

public void stopEditing()
Stops the editing of the tree if currently it is editing


makeChildParentRelationship

protected void makeChildParentRelationship(AWTTreeNode node)
Method which makes the child parent relationship when tree is checkbox tree


isEditing

public boolean isEditing()
Returns the is the tree is currently editing

Returns:
The is the tree is currently editing

reload

public void reload()
Invoke when you want to reload the tree and notify all of its listeners that the tree has changed


reload

public void reload(AWTTreeNode node)
Invoke when you want to reload the tree and notify all of its listeners that the tree has changed below the node


setCheckboxTree

public void setCheckboxTree(boolean bCheckboxTree)
Sets the tree to the check box tree

Parameters:
bCheckboxTree - The wheather checkbox tree or not

isCheckboxTree

public boolean isCheckboxTree()
Returns the this tree is checkbox tree or not

Returns:
The wheather this tree is checkbox tree or not

setChildParentRelationship

public void setChildParentRelationship(boolean bAllow)
Sets the child parent relationship to true or false this property is used when the tree is checkbox and one can want to makes the all the child checked on checked the parent of those child and from all the checked childs if one child is unchecked the parent will also unchecked

Parameters:
bAllow - The boolean value

isChildParentRelationship

public boolean isChildParentRelationship()
Returns the wheather child parent relationship or not this property is used when the tree is checkbox and one can want to makes the all the child checked on checked the parent of those child and from all the checked childs if one child is unchecked the parent will also unchecked

Returns:
The wheather child parent relationship or not

setAllowSameNodeAtSameLevel

public void setAllowSameNodeAtSameLevel(boolean allowSameNodeAtSameLevel)
Sets whether same node can exist in the tree at the same level if the value of the property true this method doesn't allow to add/insert two same node at the same level for the particular parent.

Parameters:
allowSameNodeAtSameLevel - the enability to exist same node at the same level if set its to true then if the duplicate node exist in the tree on the same level of the particular parent, will be removed

isAllowSameNodeAtSameLevel

public boolean isAllowSameNodeAtSameLevel()
Returns whether same node can exist in the tree at the same level

Returns:
the wheather allow same node at the same level

contains

public boolean contains(AWTTreeNode treeNode,
                        java.lang.String sNode)
Checks whether the node with text sNode is child of the treeNode or not

Parameters:
treeNode - the tree node from which the sNode will be searched
sNode - the node text to be searched
Returns:
true, if the node with text sNode is child of the treeNode otherwise false

areSameNodes

public boolean areSameNodes(AWTTreeNode node1,
                            AWTTreeNode node2)
Checks for wheather the both nodes are same nodes

Parameters:
node1 - The AWTTreeNode
node2 - The AWTTreeNode
Returns:
The comparison flag true if same or false if not This comparison is based on the both nodes user object's equals method

getTreeNodes

public java.util.Vector getTreeNodes()
Returns the tree nodes which are checked, if tree is checkbox tree

Returns:
the vector containing the tree nodes which are checked, if tree is checkbox tree

getTreeNodes

public java.util.Vector getTreeNodes(boolean bChecked)
Returns the tree nodes which are checked/unchecked, if tree is checkbox tree

Parameters:
bChecked - the state of the tree node (checked or unchecked)
Returns:
the vector containing the tree nodes which are checked/unchecked, if tree is checkbox tree

getTreeNodes

public java.util.Vector getTreeNodes(boolean bChecked,
                                     int nLevel)
Returns the tree nodes which are checked/unchecked at given level, if tree is checkbox tree

Parameters:
bChecked - the state of the tree node (checked or unchecked)
nLevel - the node level
Returns:
the vector containing the tree nodes which are checked/unchecked, if tree is checkbox tree

getTreeNodes

public java.util.Vector getTreeNodes(boolean bChecked,
                                     AWTTreeNode parentNode)
Returns the tree nodes which are checked/unchecked of given parent node, if tree is checkbox tree

Parameters:
bChecked - the state of the tree node (checked or unchecked)
parentNode - the parent node
Returns:
the vector containing the tree nodes which are checked/unchecked, if tree is checkbox tree

getTreeNodes

public java.util.Vector getTreeNodes(boolean bChecked,
                                     int nLevel,
                                     AWTTreeNode parentNode)
Returns the tree nodes which are checked/unchecked at given level of given parent node, if tree is checkbox tree

Parameters:
bChecked - the state of the tree node (checked or unchecked)
nLevel - the node level
parentNode - the parent node
Returns:
the vector containing the tree nodes which are checked/unchecked, if tree is checkbox tree

setSelectionAllowed

public void setSelectionAllowed(boolean bSelectionAllowed)
Sets the value of is selection allowed or not

Parameters:
bSelectionAllowed - The value of is selection allowed or not

isSelectionAllowed

public boolean isSelectionAllowed()
Returns the value of the is selection allowed

Returns:
The value of the is selection allowed

setSelectionStyle

public void setSelectionStyle(int selectionStyle)
Sets the selection style

Parameters:
selectionStyle - the selectionStyle
See Also:
SINGLE_SELECTION, MULTIPLE_SELECTION

getSelectionStyle

public int getSelectionStyle()
Returns the selection style

Returns:
The selection style
See Also:
SINGLE_SELECTION, MULTIPLE_SELECTION

setLineStyle

public void setLineStyle(int lineStyle)
Sets the line style for the tree

Parameters:
lineStyle - the line style
See Also:
DOTTED_LINE, STRAIGHT_LINE

getLineStyle

public int getLineStyle()
Returns the line style of the tree

Returns:
The line style
See Also:
DOTTED_LINE, STRAIGHT_LINE

setLineColor

public void setLineColor(java.awt.Color lineColor)
Sets the line color for the tree

Parameters:
lineColor - The line color for the tree

getLineColor

public java.awt.Color getLineColor()
Returns the line color of the tree

Returns:
The line color of the tree

setRowHeight

public void setRowHeight(int height)
Sets the row height for the tree


getRowHeight

public int getRowHeight()
Returns the row height of the tree

Returns:
The row height of the tree

setClickCountToStartEditing

public void setClickCountToStartEditing(int clickCount)
Sets the no of click count to start editing

Parameters:
clickCount - The int value for the no of click count to start editing

getClickCountToStartEditing

public int getClickCountToStartEditing()
Returns the no of click count to start editing

Returns:
The no of click count to start editing

setRootVisible

public void setRootVisible(boolean bRootVisible)
Sets the visibility of the root i.e. allow to display the root

Parameters:
bRootVisible - The value for the visibility of the root

isRootVisible

public boolean isRootVisible()
Returns the visibility of the root

Returns:
The visibility of the root

setShowRootHandles

public void setShowRootHandles(boolean bShowRootHandles)
Sets the value of the show root handles

Parameters:
bShowRootHandles - The value of the show root handles

isShowRootHandles

public boolean isShowRootHandles()
Returns the value of the show root handles

Returns:
The value of the show root handles

setEditable

public void setEditable(boolean bEditable)
Sets the editability of the tree

Parameters:
bEditable - The editability of the tree

isEditable

public boolean isEditable()
Returns the editability of the tree

Returns:
The editability of the tree

setShowSearchPanel

public void setShowSearchPanel(boolean bShowSearchPanel)
Sets the wheather allow to show the search panel or not

Parameters:
bShowSearchPanel - The wheather allow to show the search panel or not

isShowSearchPanel

public boolean isShowSearchPanel()
Returns the wheather allow to show the searchPanel

Returns:
The wheather allow to show the searchPanel

setSearchPanelLocation

public void setSearchPanelLocation(int searchPanelLocation)
Sets the search panel location

Parameters:
searchPanelLocation - the search panel location The possible values are TOP, BOTTOM

getSearchPanelLocation

public int getSearchPanelLocation()
Returns the search panel location


getNodeForLocation

public AWTTreeNode getNodeForLocation(int x,
                                      int y)
Returns the node at the specified x, y coordinates

Returns:
The AWTTreeNode at the specified x, y coordinates

getNodeForLocation

public AWTTreeNode getNodeForLocation(java.awt.Point point)
Returns the node at the specified point

Parameters:
point - The specified point
Returns:
The AWTTreeNode at the specified point

getRowForNode

public int getRowForNode(AWTTreeNode node)
Returns the visible row index of the specified node if the specified node is currently visible then returns the visible row index else return -1

Parameters:
node - The specified node

getNodeForRow

public AWTTreeNode getNodeForRow(int rowIndex)
Returns the node for the specified row

Returns:
rowIndex The node for the specified row if the node is visible and exist at the specified row index returns node else return null

getVisibleRowCount

public int getVisibleRowCount()
Returns the count of the rows (currently visible nodes)

Returns:
The count of the rows (currently visible nodes) i.e. total no. of the nodes whose parents are expanded

setLevelWiseIDs

public void setLevelWiseIDs(java.util.Vector levelWiseIDs)
Sets the vector containing string data i.e. for the level wise string ids. example : suppose there is tree of the three levels 1st level contains deparetment_id 2nd level contains employee_id 3rd level contains employee_name then set Vector levelWiseIDs = new Vector(); levelWiseIDs.addElement("department_id"); levelWiseIDs.addElement("employee_id"); levelWiseIDs.addElement("employee_name"); So user can select the string id from this combo box and then make search on that level.


getLevelWiseIDs

public java.util.Vector getLevelWiseIDs()
Returns the strings vector of the level wise string ids

Returns:
The level wise ids vector

searchTreeNode

public AWTTreeNode searchTreeNode(java.lang.String searchText,
                                  java.lang.String searchFrom,
                                  java.lang.String searchWith,
                                  int searchOnLevel,
                                  boolean isCaseSensitive)
Searches the tree for the specific text, level and search type

Parameters:
searchText - The search for the specified text
searchWith - The specific type for the search with The possible values for the search with are STARTS_WITH, ENDS_WITH, CONTAINS, EQUALS
searchOnLevel - specified search level on to which search will be perfomed if the searchOnLevel is 0 (zero) it searches for whole the tree otherwise searches the given level on the tree.
isCaseSensitive - Wheather case sensitive or not
Returns:
Return if node found, if is not visible, not make it visible

getSearchValue

protected java.lang.Object getSearchValue(AWTTreeNode node)
Returns the search value of the specified node

Returns:
The search value of the specified node which is used for the searching the tree

setDragAndDrop

public void setDragAndDrop(boolean bDragAndDrop)
Sets the drag and drop wheather true or false if true, then node is removed from its parent and added to the target node


isDragAndDrop

public boolean isDragAndDrop()
Returns wheather the drag and drop allowed or not

Returns:
the drag and drop allowed or not

setBackground

public final void setBackground(java.awt.Color background)
Overriden setBackground


setForeground

public final void setForeground(java.awt.Color foreground)
Overriden setForeground


setFont

public final void setFont(java.awt.Font font)
Overriden setFont


setSearchPanelBackground

public void setSearchPanelBackground(java.awt.Color background)
Method which sets the background color for the tree's search panel

Parameters:
background - The background color for the tree's search panel

getSearchPanelBackground

public java.awt.Color getSearchPanelBackground()
Returns the background color of the tree's search panel

Returns:
The background color of the tree's search panel

setSearchPanelForeground

public void setSearchPanelForeground(java.awt.Color foreground)
Method which sets the foreground color for the tree's search panel


getSearchPanelForeground

public java.awt.Color getSearchPanelForeground()
Returns the foreground color of the tree's search panel

Returns:
The foreground color of the tree's search panel

setSearchPanelFont

public void setSearchPanelFont(java.awt.Font font)
Method which sets the font for the tree's search panel

Parameters:
font - The font for the tree's search panel

getSearchPanelFont

public java.awt.Font getSearchPanelFont()
Returns the font of the tree's search panel

Returns:
The font of the tree's search panel

setTreeBackground

public void setTreeBackground(java.awt.Color background)
Method which sets the background color for the AWTTree

Parameters:
background - The background color for the AWTTree

getTreeBackground

public java.awt.Color getTreeBackground()
Method which Returns the background color of the tree

Returns:
The background color of the tree

setBorder

public void setBorder(AWTBorder awtBorder)
Method which sets the border for the AWTTable

Parameters:
awtBorder - the border for the AWTTable

getBorder

public AWTBorder getBorder()
Method which returns the border of the AWTTable

Returns:
the border of the AWTTable

setInsets

public final void setInsets(java.awt.Insets insets)
Method which sets the insets for the AWTTable

Parameters:
insets - the insets for the AWTTable

getInsets

public java.awt.Insets getInsets()
Method whichs returns the insets of the AWTTable

Returns:
The insets of the AWTTable

setVisible

public void setVisible(boolean bVisible)
Method which sets the visibility for the AWTTree

Parameters:
bVisible - the visibility for the AWTTree

setEnabled

public void setEnabled(boolean bEnabled)
Method which sets the enability of the AWTTree

Parameters:
bEnabled - the enability of the AWTTree

setLocale

public void setLocale(java.util.Locale locale)
Method which sets the locale for the AWTTree

Parameters:
locale - The locale for the AWTTree

getLocale

public java.util.Locale getLocale()
Method which returns the locale of the AWTTree

Returns:
The locale of the AWTTree

setCursor

public void setCursor(java.awt.Cursor cursor)
Method which sets the cursor for the AWTTree

Parameters:
cursor - The cursor for the AWTTree

setBounds

public void setBounds(int x,
                      int y,
                      int width,
                      int height)
Method which sets the bounds of the AWTTree

Parameters:
x - The x coordinate of the AWTTree
y - The y coordinate of the AWTTree
width - The width of the of the AWTTree
height - The height of the AWTTree

setShowPopupMenu

public void setShowPopupMenu(boolean showPopupMenu)
Method which sets the value of showPopupMenu

Parameters:
showPopupMenu - The value of showPopupMenu if it's value is true one can open the popup menu on sright click of mouse

isShowPopupMenu

public boolean isShowPopupMenu()
Method which returns the value of showPopupMenu

Returns:
showPopupMenu The value of showPopupMenu if it's value is true one can open the popup menu on sright click of mouse

setInsertNodeOnInsertKey

public void setInsertNodeOnInsertKey(boolean insertNodeOnInsertKey)
Method which sets the value of isInsertNodeOnInsertKey

Parameters:
insertNodeOnInsertKey - The value of isInsertNodeOnInsertKey

isInsertNodeOnInsertKey

public boolean isInsertNodeOnInsertKey()
Method which returns the value of isInsertNodeOnInsertKey

Returns:
isInsertNodeOnInsertKey if it's value is true one can insert node on insert key

setDeleteNodeOnDeleteKey

public void setDeleteNodeOnDeleteKey(boolean deleteNodeOnDeleteKey)
Method which sets the value of isDeleteNodeOnDeleteKey

Parameters:
deleteNodeOnDeleteKey - The value of isDeleteNodeOnDeleteKey if it's value is true one can delete node on insert key

isDeleteNodeOnDeleteKey

public boolean isDeleteNodeOnDeleteKey()
Method which returns the value of isDeleteNodeOnInsertKey

Returns:
isDeleteNodeOnInsertKey if it's value is true one can delete node on insert key

setLicenseKey

public void setLicenseKey(java.lang.String licenseKey)
Methods which sets the license key


getLicenseKey

public java.lang.String getLicenseKey()
Returns the license key of the bean

Returns:
The license key of the bean

getPreferredSize

public java.awt.Dimension getPreferredSize()
Returns the preferred size of the tree


getMinimumSize

public java.awt.Dimension getMinimumSize()
Returns the minimum size of the tree


createNode

public static AWTTreeNode createNode(java.lang.String[] str)
Creates the AWTTreeNode from the specified string array The array contains the data for the string with TAB for the specify level i.e. the node for the 1st level then the string value is " 1st level value" where string value followed by single tab for the 2nd level the string value is " 2nd level value" where string value followed by two tab for the 3rd level the string value is " 3rd level value" and so on where string value followed by three tab

Parameters:
str - The string array contains the data for the string with TAB for the specify level

convertTreeDataToString

public static java.lang.String[] convertTreeDataToString(AWTTreeNode rootNode)
Converts a tree data to the string array

Returns:
The string array the tree data

getTreePanel

public AWTTreePanel getTreePanel()
Returns the tree panel

Returns:
The tree panel

addMouseListener

public void addMouseListener(java.awt.event.MouseListener l)
Overriden the addMouseListener


removeMouseListener

public void removeMouseListener(java.awt.event.MouseListener l)
Overriden the removeMouseListener


addMouseMotionListener

public void addMouseMotionListener(java.awt.event.MouseMotionListener l)
Overriden the addMouseMotionListener


removeMouseMotionListener

public void removeMouseMotionListener(java.awt.event.MouseMotionListener l)
Overriden the removeMouseMotionListener


addKeyListener

public void addKeyListener(java.awt.event.KeyListener l)
Overriden the addKeyListener


removeKeyListener

public void removeKeyListener(java.awt.event.KeyListener l)
Overriden the removeKeyListener


addFocusListener

public void addFocusListener(java.awt.event.FocusListener l)
Overriden the addFocusListener


removeFocusListener

public void removeFocusListener(java.awt.event.FocusListener l)
Overriden the removeFocusListener


addPropertyChangeListener

public void addPropertyChangeListener(java.beans.PropertyChangeListener l)
Adds the property change listener

Parameters:
l - The property change listener

removePropertyChangeListener

public void removePropertyChangeListener(java.beans.PropertyChangeListener l)
Removes the property change listener

Parameters:
l - The property change listener

firePropertyChange

public void firePropertyChange(java.lang.String property,
                               java.lang.Object oldValue,
                               java.lang.Object newValue)
Fires the property change

Parameters:
property - The name of the property
oldValue - The old value
newValue - The new value

writeExternal

public void writeExternal(java.io.ObjectOutput out)
                   throws java.io.IOException
Implementation of the Externalizable

Specified by:
writeExternal in interface java.io.Externalizable
Throws:
java.io.IOException

readExternal

public void readExternal(java.io.ObjectInput in)
                  throws java.io.IOException,
                         java.lang.ClassNotFoundException
Implementation of the Externalizable

Specified by:
readExternal in interface java.io.Externalizable
Throws:
java.io.IOException
java.lang.ClassNotFoundException

ElegantJ Trees Java API Specification v1.1

Submit a bug or feature

Copyright(c)
Elegant Microweb Technologies Pvt. Ltd.
www.elegantmicroweb.com
www.elegantjbeans.com
All Rights Reserved.