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

Quick Search    Search Deep

com.flexstor.common.gui.imprt
Class ImportTree  view ImportTree download ImportTree.java

java.lang.Object
  extended byjava.awt.Component
      extended byjava.awt.Container
          extended byjava.awt.Panel
              extended bycom.flexstor.common.awt.tree.Tree
                  extended bycom.flexstor.common.gui.imprt.ImportTree
All Implemented Interfaces:
javax.accessibility.Accessible, java.awt.event.AdjustmentListener, java.util.EventListener, java.awt.image.ImageObserver, java.awt.event.KeyListener, java.awt.MenuContainer, java.awt.event.MouseListener, java.io.Serializable

public class ImportTree
extends com.flexstor.common.awt.tree.Tree

Import Tree for Import Frame.


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
private  com.flexstor.common.awt.tree.DefaultTreeImages defaultImages
           
private  java.awt.Image FILE_IMAGE
           
protected  com.flexstor.common.importprocessor.ImportExclude importExclude
           
static int LEFT
           
private  java.lang.String path
           
static int RIGHT
           
protected  ImportTreeNode root
           
static java.lang.String SEPARATOR
           
private  boolean toClassify
           
private  int treeType
           
 
Fields inherited from class com.flexstor.common.awt.tree.Tree
actionMulticaster, firstVisNode, HITTEST_BUTTON, HITTEST_IMAGE, HITTEST_MARGIN, HITTEST_NONE, HITTEST_TEXT, HITTEST_TEXT_RIGHT, m_iHScroll, m_iIndent, m_iLineHeight, m_iLinesPerPage, m_imMinus, m_imPlus, selection
 
Fields inherited from class java.awt.Panel
 
Fields inherited from class java.awt.Container
 
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
ImportTree(java.lang.String rootPath, int treeType, boolean toClassify)
           
 
Method Summary
private  void addDirectory(com.flexstor.common.io.xfile.FlexXFile file, ImportTreeNode node)
          Adds a dir.
private  void addFile(com.flexstor.common.io.xfile.FlexXFile file, ImportTreeNode node)
          Adds a file.
 void addNewNode(ImportTreeNode newNode, boolean bCreateStructureIfNotFound)
          Adds a new node.
 void clear()
          Clears the tree.
 ImportTreeNode findNode(ImportTreeNode findInNode, java.lang.String withLabel)
          Finds and returns a node specified by the label.
private  java.lang.String fixPath(java.lang.String location)
          Fixes the path for file SEPARATOR.
 java.util.ArrayList getAllFiles()
          Returns all the files.
private  java.lang.String getExcludePath()
          Return the full path for exclude.txt.
 java.lang.String getPath()
          Returns the initial path.
 java.util.ArrayList getRootChildren()
          Returns all the childs of the root.
 int getTreeType()
          Returns the tree type.
 boolean hasElements()
          Checks is there are any other nodes in the tree than the root.
 void init()
          Initializes the tree.
private  boolean isFolder(java.lang.String file)
          Checks if the string path represents a file or dir.
private  boolean isLocalPath(java.lang.String loc)
          Checks if the path is local.
 void removeNode(ImportTreeNode node)
          Removes the specified node..
 void removeNode(java.lang.String structure)
          Removes node specified by the label.
 void setAsRoot(java.lang.String path)
          Sets the string path as root.
 void setPath(java.lang.String newPath)
          Sets the initial path.
 
Methods inherited from class com.flexstor.common.awt.tree.Tree
addActionListener, addRootNode, adjustmentValueChanged, checkFirstVisibleNode, drawSelectedBorder, ensureVisible, getCurrentNode, getFirstVisibleNode, getLines, getPreferredSize, getRedraw, getRootNode, getSelectedCount, getSelectedItems, getTreeId, getTrueRootNode, getVisibleCount, hitTest, invalidate, isFocusTraversable, isNodeVisible, isSelected, keyPressed, keyReleased, keyTyped, mouseClicked, mouseEntered, mouseExited, mousePressed, mouseReleased, paint, removeActionListener, removeNotify, repaint, reset, setBackgroundColor, setCurrentNode, setFirstVisible, setLines, setMinusImage, setMultiSelection, setPlusImage, setRedraw, unselectAllNodes
 
Methods inherited from class java.awt.Panel
addNotify, getAccessibleContext
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getInsets, getLayout, getListeners, getMaximumSize, getMinimumSize, insets, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, paramString, preferredSize, print, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setFont, setLayout, transferFocusDownCycle, update, validate, validateTree
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, 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, getLocale, 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, 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, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, reshape, resize, resize, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, setVisible, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

root

protected ImportTreeNode root

LEFT

public static final int LEFT
See Also:
Constant Field Values

RIGHT

public static final int RIGHT
See Also:
Constant Field Values

SEPARATOR

public static java.lang.String SEPARATOR

treeType

private int treeType

path

private java.lang.String path

toClassify

private boolean toClassify

importExclude

protected com.flexstor.common.importprocessor.ImportExclude importExclude

defaultImages

private com.flexstor.common.awt.tree.DefaultTreeImages defaultImages

FILE_IMAGE

private java.awt.Image FILE_IMAGE
Constructor Detail

ImportTree

public ImportTree(java.lang.String rootPath,
                  int treeType,
                  boolean toClassify)
Method Detail

clear

public void clear()
Clears the tree.


setAsRoot

public void setAsRoot(java.lang.String path)
Sets the string path as root.


getTreeType

public int getTreeType()
Returns the tree type. LEFT or RIGHT.


init

public void init()
Initializes the tree. Browses the directory structure. The initial path is the top level dir.


addNewNode

public void addNewNode(ImportTreeNode newNode,
                       boolean bCreateStructureIfNotFound)
Adds a new node. Creates the dir structure if not found if bCreateStructureIfNotFound is true.


findNode

public ImportTreeNode findNode(ImportTreeNode findInNode,
                               java.lang.String withLabel)
Finds and returns a node specified by the label.


removeNode

public void removeNode(ImportTreeNode node)
Removes the specified node..


removeNode

public void removeNode(java.lang.String structure)
Removes node specified by the label.


getPath

public java.lang.String getPath()
Returns the initial path.


setPath

public void setPath(java.lang.String newPath)
Sets the initial path.


getAllFiles

public java.util.ArrayList getAllFiles()
Returns all the files. All the leaves representing the files (not folders).


hasElements

public boolean hasElements()
Checks is there are any other nodes in the tree than the root.


getRootChildren

public java.util.ArrayList getRootChildren()
Returns all the childs of the root. This function can also be called when you need all the dirs and files listed on the tree.


fixPath

private java.lang.String fixPath(java.lang.String location)
Fixes the path for file SEPARATOR.


addFile

private void addFile(com.flexstor.common.io.xfile.FlexXFile file,
                     ImportTreeNode node)
Adds a file. Also checks for exclude.


addDirectory

private void addDirectory(com.flexstor.common.io.xfile.FlexXFile file,
                          ImportTreeNode node)
Adds a dir. Also checks for exclude.


isLocalPath

private boolean isLocalPath(java.lang.String loc)
Checks if the path is local.


isFolder

private boolean isFolder(java.lang.String file)
Checks if the string path represents a file or dir.


getExcludePath

private java.lang.String getExcludePath()
Return the full path for exclude.txt.