Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

ro.nolimits.gui.tree
Class TreeBrowser  view TreeBrowser download TreeBrowser.java

java.lang.Object
  extended byjava.awt.Component
      extended byjava.awt.Canvas
          extended byro.nolimits.gui.tree.DrawTree
              extended byro.nolimits.gui.tree.TreeBrowser
All Implemented Interfaces:
javax.accessibility.Accessible, java.awt.event.AdjustmentListener, java.util.EventListener, java.awt.image.ImageObserver, java.awt.MenuContainer, NodeId, java.io.Serializable

public class TreeBrowser
extends DrawTree
implements NodeId

The TreeBrowser class.


Nested Class Summary
(package private)  class TreeBrowser.Expander
           
 
Nested classes inherited from class ro.nolimits.gui.tree.DrawTree
 
Nested classes inherited from class java.awt.Canvas
java.awt.Canvas.AccessibleAWTCanvas
 
Nested classes inherited from class java.awt.Component
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
 
Field Summary
private  java.util.Vector BrowserListeners
           
(package private)  TreeNode lastn
           
 
Fields inherited from class ro.nolimits.gui.tree.DrawTree
DXLEVEL, fontHeight, HGAP, HMARGIN, items, MULTIPLE, SCROLLBARS_ALWAYS, SCROLLBARS_ASNEEDED, selection, selectionStatus, SINGLE, topItem, visibleItemCount, VMARGIN
 
Fields inherited from class java.awt.Canvas
 
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
TreeBrowser(java.lang.Object root, java.lang.String label, int isNode)
          Builds a new TreeBrowser instance.
TreeBrowser(java.lang.String label, java.awt.Image open, java.awt.Image close, int isNode)
           
 
Method Summary
 void addBrowserListener(BrowserListener l)
          Add BrowserListener to the Browser.
private  void fireActivate(TreeNode node)
          This function is private, its not be accessed an other class.
private  void fireDeactivate(TreeNode node)
          This function is private, its not be accessed an other class.
private  void fireDeselect(TreeNode node)
          This function is private, its not be accessed an other class.
private  void fireSelect(TreeNode node)
          This function is private, its not be accessed an other class.
 java.lang.Object insertNode(java.lang.Object father, java.lang.String label, java.awt.Image icon_open, java.awt.Image icon_close, int isNode, java.lang.Object item)
          Insert a new node to Tree.
 java.lang.Object insertNode(java.lang.Object father, java.lang.String label, int isNode, java.lang.Object item)
          Insert a new node to Tree.
 java.lang.Object insertNode(java.lang.Object father, java.lang.String label, java.lang.String icon_open, java.lang.String icon_close, int isNode)
          Insert a new node to Tree.
 void notifyCollapse(DrawTree browser, TreeNode node)
          Handles Collapse notification.
 void notifyExecute(DrawTree browser, TreeNode node)
          Handles Execute notification.
 void notifyExpand(DrawTree browser, TreeNode node)
          Notifies that a node has to be expanded.
 void notifyExpander(DrawTree browser, TreeNode node)
          Handles Expand notification.
 void notifySelect(DrawTree browser, TreeNode node)
          Handles Select notifications.
 void removeBrowserListener(BrowserListener l)
          Remove BrowserListener from this browser.
 
Methods inherited from class ro.nolimits.gui.tree.DrawTree
adjustmentValueChanged, changeSize, collapse, getIndex, getNode, getObjectNode, getParent, getPreferredSize, getSelectionStatus, initialize, initialize, initialize, insert, insert, insert, itemAt, paint, remove, removeBranch, select, selection, setHorizontalScrollbar, setScrollbarDisplayStatus, setSelectionBackgroundColor, setSelectionFontColor, setSelectionStatus, setVerticalScrollbar, unselect, unselectAll, update, Visibil
 
Methods inherited from class java.awt.Canvas
addNotify, createBufferStrategy, createBufferStrategy, getAccessibleContext, getBufferStrategy
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, deliverEvent, disable, disableEvents, dispatchEvent, doLayout, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getAlignmentX, getAlignmentY, getBackground, getBounds, getBounds, getColorModel, getComponentAt, getComponentAt, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeys, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getListeners, getLocale, getLocation, getLocation, getLocationOnScreen, getMaximumSize, getMinimumSize, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, invalidate, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusCycleRoot, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isOpaque, isShowing, isValid, isVisible, keyDown, keyUp, layout, list, list, list, list, list, locate, location, lostFocus, minimumSize, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, paramString, postEvent, preferredSize, prepareImage, prepareImage, print, printAll, processComponentEvent, processEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, reshape, resize, resize, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeys, setFocusTraversalKeysEnabled, setFont, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, setVisible, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle, validate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

BrowserListeners

private java.util.Vector BrowserListeners

lastn

TreeNode lastn
Constructor Detail

TreeBrowser

public TreeBrowser(java.lang.Object root,
                   java.lang.String label,
                   int isNode)
Builds a new TreeBrowser instance.


TreeBrowser

public TreeBrowser(java.lang.String label,
                   java.awt.Image open,
                   java.awt.Image close,
                   int isNode)
Method Detail

fireSelect

private void fireSelect(TreeNode node)
This function is private, its not be accessed an other class.


fireDeselect

private void fireDeselect(TreeNode node)
This function is private, its not be accessed an other class.


fireActivate

private void fireActivate(TreeNode node)
This function is private, its not be accessed an other class.


fireDeactivate

private void fireDeactivate(TreeNode node)
This function is private, its not be accessed an other class.


addBrowserListener

public void addBrowserListener(BrowserListener l)
Add BrowserListener to the Browser.


removeBrowserListener

public void removeBrowserListener(BrowserListener l)
Remove BrowserListener from this browser.


insertNode

public java.lang.Object insertNode(java.lang.Object father,
                                   java.lang.String label,
                                   int isNode,
                                   java.lang.Object item)
Insert a new node to Tree.


insertNode

public java.lang.Object insertNode(java.lang.Object father,
                                   java.lang.String label,
                                   java.lang.String icon_open,
                                   java.lang.String icon_close,
                                   int isNode)
Insert a new node to Tree.


insertNode

public java.lang.Object insertNode(java.lang.Object father,
                                   java.lang.String label,
                                   java.awt.Image icon_open,
                                   java.awt.Image icon_close,
                                   int isNode,
                                   java.lang.Object item)
Insert a new node to Tree.


notifySelect

public void notifySelect(DrawTree browser,
                         TreeNode node)
Handles Select notifications. we simply select the given node and repaint the browser

Specified by:
notifySelect in interface NodeId

notifyExpand

public void notifyExpand(DrawTree browser,
                         TreeNode node)
Description copied from interface: NodeId
Notifies that a node has to be expanded.

Specified by:
notifyExpand in interface NodeId

notifyCollapse

public void notifyCollapse(DrawTree browser,
                           TreeNode node)
Handles Collapse notification. we simple collapse the given node and repaint teh browser

Specified by:
notifyCollapse in interface NodeId

notifyExecute

public void notifyExecute(DrawTree browser,
                          TreeNode node)
Handles Execute notification. if node is activated, sets node to deactive and otherway

Specified by:
notifyExecute in interface NodeId

notifyExpander

public void notifyExpander(DrawTree browser,
                           TreeNode node)
Handles Expand notification. if the node is a directory, sets the invisible childrens(if found) to visible childrens and repaint the browser