org.rosuda.JGR.browser
Class DefaultBrowserNode

java.lang.Object
  extended by org.rosuda.JGR.browser.DefaultBrowserNode
All Implemented Interfaces:
javax.swing.tree.MutableTreeNode, javax.swing.tree.TreeNode, BrowserNode, BrowserNodeFactory
Direct Known Subclasses:
DataFrameNode, EnvironmentNode, FactorNode, FunctionNode, LmNode, MatrixNode, NumericNode

public class DefaultBrowserNode
extends java.lang.Object
implements BrowserNode, BrowserNodeFactory


Field Summary
protected  java.util.ArrayList children
           
protected  java.lang.String cls
           
protected  boolean expanded
           
protected  javax.swing.ImageIcon icon
           
protected  boolean isList
           
protected  BrowserNode parent
           
protected  java.lang.String rName
           
protected  boolean showSep
           
 
Constructor Summary
DefaultBrowserNode()
           
DefaultBrowserNode(BrowserNode par, java.lang.String rObjectName, java.lang.String rClass)
           
 
Method Summary
 void addChild(BrowserNode node)
           
 java.util.Enumeration children()
           
 void editObject()
           
 boolean equals(java.lang.Object obj)
           
protected  javax.swing.ImageIcon findIcon()
           
 BrowserNode generate(BrowserNode parent, java.lang.String rName, java.lang.String rClass)
           
 boolean getAllowsChildren()
           
 javax.swing.tree.TreeNode getChildAt(int i)
           
 int getChildCount()
           
 java.lang.String getChildExecuteableRObjectName(BrowserNode child)
           
 java.lang.String getExecuteableRObjectName()
           
 int getIndex(javax.swing.tree.TreeNode node)
           
 javax.swing.tree.TreeNode getParent()
           
 javax.swing.JPopupMenu getPopupMenu()
           
 javax.swing.tree.TreeCellRenderer getRenderer()
           
 java.lang.String getRName()
           
 void insert(javax.swing.tree.MutableTreeNode child, int index)
           
 boolean isExpanded()
           
 boolean isLeaf()
           
 void plotObject()
           
 void printObject()
           
 void remove(int index)
           
 void remove(javax.swing.tree.MutableTreeNode node)
           
 void removeChildObjectFromR(BrowserNode node)
           
 void removeFromParent()
           
 void setExpanded(boolean expand)
           
 void setParent(javax.swing.tree.MutableTreeNode arg0)
           
 void setShowSep(boolean show)
           
 void setUserObject(java.lang.Object arg0)
           
 void summaryObject()
           
 void update(javax.swing.tree.DefaultTreeModel mod)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

cls

protected java.lang.String cls

rName

protected java.lang.String rName

parent

protected BrowserNode parent

isList

protected boolean isList

children

protected volatile java.util.ArrayList children

expanded

protected boolean expanded

icon

protected javax.swing.ImageIcon icon

showSep

protected boolean showSep
Constructor Detail

DefaultBrowserNode

public DefaultBrowserNode()

DefaultBrowserNode

public DefaultBrowserNode(BrowserNode par,
                          java.lang.String rObjectName,
                          java.lang.String rClass)
Method Detail

findIcon

protected javax.swing.ImageIcon findIcon()

children

public java.util.Enumeration children()
Specified by:
children in interface javax.swing.tree.TreeNode

getAllowsChildren

public boolean getAllowsChildren()
Specified by:
getAllowsChildren in interface javax.swing.tree.TreeNode

getChildAt

public javax.swing.tree.TreeNode getChildAt(int i)
Specified by:
getChildAt in interface javax.swing.tree.TreeNode

getChildCount

public int getChildCount()
Specified by:
getChildCount in interface javax.swing.tree.TreeNode

getIndex

public int getIndex(javax.swing.tree.TreeNode node)
Specified by:
getIndex in interface javax.swing.tree.TreeNode

getParent

public javax.swing.tree.TreeNode getParent()
Specified by:
getParent in interface javax.swing.tree.TreeNode

isLeaf

public boolean isLeaf()
Specified by:
isLeaf in interface javax.swing.tree.TreeNode

getRName

public java.lang.String getRName()
Specified by:
getRName in interface BrowserNode

getExecuteableRObjectName

public java.lang.String getExecuteableRObjectName()
Specified by:
getExecuteableRObjectName in interface BrowserNode

getChildExecuteableRObjectName

public java.lang.String getChildExecuteableRObjectName(BrowserNode child)
Specified by:
getChildExecuteableRObjectName in interface BrowserNode

generate

public BrowserNode generate(BrowserNode parent,
                            java.lang.String rName,
                            java.lang.String rClass)
Specified by:
generate in interface BrowserNodeFactory

getRenderer

public javax.swing.tree.TreeCellRenderer getRenderer()
Specified by:
getRenderer in interface BrowserNode

addChild

public void addChild(BrowserNode node)
Specified by:
addChild in interface BrowserNode

insert

public void insert(javax.swing.tree.MutableTreeNode child,
                   int index)
Specified by:
insert in interface javax.swing.tree.MutableTreeNode

remove

public void remove(int index)
Specified by:
remove in interface javax.swing.tree.MutableTreeNode

remove

public void remove(javax.swing.tree.MutableTreeNode node)
Specified by:
remove in interface javax.swing.tree.MutableTreeNode

removeFromParent

public void removeFromParent()
Specified by:
removeFromParent in interface javax.swing.tree.MutableTreeNode

setParent

public void setParent(javax.swing.tree.MutableTreeNode arg0)
Specified by:
setParent in interface javax.swing.tree.MutableTreeNode

setUserObject

public void setUserObject(java.lang.Object arg0)
Specified by:
setUserObject in interface javax.swing.tree.MutableTreeNode

isExpanded

public boolean isExpanded()
Specified by:
isExpanded in interface BrowserNode

setExpanded

public void setExpanded(boolean expand)
Specified by:
setExpanded in interface BrowserNode

setShowSep

public void setShowSep(boolean show)
Specified by:
setShowSep in interface BrowserNode

update

public void update(javax.swing.tree.DefaultTreeModel mod)
Specified by:
update in interface BrowserNode

equals

public boolean equals(java.lang.Object obj)
Specified by:
equals in interface BrowserNode
Overrides:
equals in class java.lang.Object

getPopupMenu

public javax.swing.JPopupMenu getPopupMenu()
Specified by:
getPopupMenu in interface BrowserNode

editObject

public void editObject()
Specified by:
editObject in interface BrowserNode

printObject

public void printObject()

summaryObject

public void summaryObject()

plotObject

public void plotObject()

removeChildObjectFromR

public void removeChildObjectFromR(BrowserNode node)
Specified by:
removeChildObjectFromR in interface BrowserNode