All Packages Class Hierarchy This Package Previous Next Index
Class com.netobjects.nfx.sitebrowser.SiteBrowser
java.lang.Object
|
+----java.awt.Component
|
+----java.awt.Container
|
+----com.sun.java.swing.JComponent
|
+----com.sun.java.swing.JPanel
|
+----com.netobjects.nfx.sitebrowser.SiteBrowser
- public class SiteBrowser
- extends JPanel
Constructs a sorted browse tree with the site "home" page as its root
and with its immediate children visible. The entire site
hierarchy is available for browsing
but each branch, below the next visible level, is loaded
dynamically as the user expands a node. This approach improves
performance on initialization and allows the user to load
only those portions of the directory hierarchy necessary.
- Version:
- 1.0
- Author:
- Scott Cinnamond
-
dmCodeBase
-
-
dmExceptionHandler
-
-
dmIcon
-
-
dmIconSelected
-
-
dmListeners
-
-
dmScrollPane
-
-
dmSelectedItem
-
-
dmSelectedNode
-
-
dmTree
-
-
SiteBrowser(String, DNode, String, ExceptionHandler)
- Constructor.
-
SiteBrowser(String, String, ExceptionHandler)
- Constructor.
-
addChildren(SiteTreeNode)
- Adds child nodes to the given node based on the
directory hierarchy.
-
addDescendants(SiteTreeNode)
- Traverses the file hierarchy starting at the
given directory, which is encapsulated in the given node,
adding child-nodes to the given node.
-
addFirstChild(SiteTreeNode)
- Adds a child node to the given node based on the
DNode hierarchy.
-
addTreeSelectionListener(TreeSelectionListener)
- Add the given listener to the encapsulated tree.
-
createControls()
-
-
createIcons()
-
-
getIcon()
- Return the site icon.
-
getIconSelected()
- Return the site icon.
-
getSelectedItem()
- Returns the selected item as a string.
-
getSelectedNode()
- Returns the selected item as a DNode.
-
getTree()
- Return the encapsulated tree.
-
setIcon(ImageIcon)
- Set the site icon.
dmExceptionHandler
private ExceptionHandler dmExceptionHandler
dmScrollPane
private JScrollPane dmScrollPane
dmTree
private SiteBrowser. SiteTree dmTree
dmSelectedNode
private DNode dmSelectedNode
dmSelectedItem
private String dmSelectedItem
dmIcon
private ImageIcon dmIcon
dmIconSelected
private ImageIcon dmIconSelected
dmCodeBase
private String dmCodeBase
dmListeners
private Vector dmListeners
SiteBrowser
public SiteBrowser(String title,
String codeBase,
ExceptionHandler handler) throws InternalError
- Constructor.
- Parameters:
- title - the title for the dialog.
- codeBase - the base path where the browser can find it's images.
- handler - its exception handler.
- Throws: InternalError
- if
it decides to throw one.
SiteBrowser
public SiteBrowser(String title,
DNode selected,
String codeBase,
ExceptionHandler handler) throws InternalError
- Constructor.
- Parameters:
- title - the title for the dialog.
- selected - the selected node.
- codeBase - the base path where the browser can find it's images.
- handler - its exception handler.
- Throws: InternalError
- if
it decides to throw one.
createIcons
private void createIcons()
createControls
private void createControls() throws InternalError
getIcon
public ImageIcon getIcon()
- Return the site icon.
getIconSelected
public ImageIcon getIconSelected()
- Return the site icon.
setIcon
public void setIcon(ImageIcon icon)
- Set the site icon.
- Parameters:
- the - icon
getSelectedNode
public DNode getSelectedNode()
- Returns the selected item as a DNode.
- Returns:
- the node.
getSelectedItem
public String getSelectedItem()
- Returns the selected item as a string.
- Returns:
- the item.
getTree
public SiteBrowser. SiteTree getTree()
- Return the encapsulated tree.
- Returns:
- the tree
addTreeSelectionListener
public void addTreeSelectionListener(TreeSelectionListener listener)
- Add the given listener to the encapsulated tree.
- Parameters:
- listener - the TreeSelectionListener.
addDescendants
public void addDescendants(SiteTreeNode node) throws InternalError
- Traverses the file hierarchy starting at the
given directory, which is encapsulated in the given node,
adding child-nodes to the given node. The entire file hierarchy
from the given node/file is traversed.
- Parameters:
- node - the root node.
- Throws: InternalError
- if
the given node does not contain a file which is a directory.
addChildren
public void addChildren(SiteTreeNode node) throws InternalError
- Adds child nodes to the given node based on the
directory hierarchy.
- Parameters:
- node - the root node.
- Throws: InternalError
- if
the given node does not contain a file which is a directory.
addFirstChild
public void addFirstChild(SiteTreeNode node) throws InternalError
- Adds a child node to the given node based on the
DNode hierarchy. The first DNode found
is added.
- Parameters:
- node - the root node.
- Throws: InternalError
- if
the given node does not contain a file which is a directory.
All Packages Class Hierarchy This Package Previous Next Index