|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjavax.swing.tree.DefaultTreeModel
jmri.jmrit.catalog.AbstractCatalogTree
public abstract class AbstractCatalogTree
TreeModel used by CatalogPanel to create a tree of resources.
| Field Summary |
|---|
| Fields inherited from class javax.swing.tree.DefaultTreeModel |
|---|
asksAllowsChildren, listenerList, root |
| Fields inherited from interface jmri.CatalogTree |
|---|
FILESYS, IMAGE, NOFILTER, SCRIPT, SOUND, XML |
| Fields inherited from interface jmri.NamedBean |
|---|
INCONSISTENT, UNKNOWN |
| Constructor Summary | |
|---|---|
AbstractCatalogTree(String sysname)
|
|
AbstractCatalogTree(String sysname,
String username)
|
|
| Method Summary | |
|---|---|
void |
addPropertyChangeListener(PropertyChangeListener l)
|
void |
addPropertyChangeListener(PropertyChangeListener l,
String beanRef,
String listenerRef)
Request a call-back when a bound property changes. |
void |
dispose()
Deactivate this object, so that it releases as many resources as possible and no longer effects others. |
protected void |
firePropertyChange(String p,
Object old,
Object n)
|
String |
getComment()
Get associated comment text. |
String |
getDisplayName()
|
String |
getListenerRef(PropertyChangeListener l)
Get the textual reference for the specific listener |
ArrayList<String> |
getListenerRefs()
Returns a list of all the listerners references |
int |
getNumPropertyChangeListeners()
Number of current listeners. |
ArrayList<PropertyChangeListener> |
getPropertyChangeListeners(String name)
Get a list of all the property change listeners that are registered using a specific name |
int |
getState()
Provide generic access to internal state. |
String |
getSystemName()
Get a system-specific name. |
String |
getUserName()
|
void |
insertNodes(String pathToRoot)
Starting point to recursively add nodes to the tree by scanning a file directory |
abstract void |
insertNodes(String pName,
String pPath,
CatalogTreeNode pParent)
Recursively add nodes to the tree |
void |
removePropertyChangeListener(PropertyChangeListener l)
Remove a request for a call-back when a bound property changes. |
void |
setComment(String comment)
Set associated comment text. |
void |
setState(int s)
Provide generic access to internal state. |
void |
setUserName(String s)
|
void |
updateListenerRef(PropertyChangeListener l,
String newName)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface jmri.NamedBean |
|---|
getProperty, getPropertyKeys, setProperty |
| Methods inherited from interface javax.swing.tree.TreeModel |
|---|
addTreeModelListener, getChild, getChildCount, getIndexOfChild, getRoot, isLeaf, removeTreeModelListener, valueForPathChanged |
| Constructor Detail |
|---|
public AbstractCatalogTree(String sysname,
String username)
public AbstractCatalogTree(String sysname)
| Method Detail |
|---|
public abstract void insertNodes(String pName,
String pPath,
CatalogTreeNode pParent)
insertNodes in interface CatalogTreepName - Name of the resource to be scanned; this
is only used for the human-readable treepPath - Path to this resource, including the pName partpParent - Node for the parent of the resource to be scanned, e.g.
where in the tree to insert it.public void insertNodes(String pathToRoot)
insertNodes in interface CatalogTreepathToRoot - Path to Directory to be scannedpublic String getComment()
getComment in interface NamedBeanpublic void setComment(String comment)
Comments can be any valid text.
setComment in interface NamedBeancomment - Null means no comment associated.public String getDisplayName()
getDisplayName in interface NamedBeanpublic void addPropertyChangeListener(PropertyChangeListener l)
addPropertyChangeListener in interface NamedBeanpublic void removePropertyChangeListener(PropertyChangeListener l)
NamedBean
removePropertyChangeListener in interface NamedBeanpublic int getNumPropertyChangeListeners()
getNumPropertyChangeListeners in interface NamedBean
public void addPropertyChangeListener(PropertyChangeListener l,
String beanRef,
String listenerRef)
NamedBean
addPropertyChangeListener in interface NamedBeanl - - ListenerbeanRef - - The name (either system or user) that the listener uses for
this namedBean, this parameter is used to help determine when
which listeners should be moved when the username is moved from
one bean to another.listenerRef - - A textual reference for the listener, that can be
presented to the user when a delete is calledpublic ArrayList<PropertyChangeListener> getPropertyChangeListeners(String name)
NamedBean
getPropertyChangeListeners in interface NamedBeanname - - The name (either system or user) that the listener has registered as
referencing this namedBeanpublic ArrayList<String> getListenerRefs()
NamedBean
getListenerRefs in interface NamedBean
public void updateListenerRef(PropertyChangeListener l,
String newName)
updateListenerRef in interface NamedBeanpublic String getListenerRef(PropertyChangeListener l)
NamedBean
getListenerRef in interface NamedBeanpublic String getSystemName()
NamedBean
getSystemName in interface NamedBeanpublic String getUserName()
getUserName in interface NamedBeanpublic void setUserName(String s)
setUserName in interface NamedBean
protected void firePropertyChange(String p,
Object old,
Object n)
public void dispose()
NamedBeanFor example, if this object has listeners, after a call to this method it should no longer notify those listeners. Any native or system-wide resources it maintains should be released, including threads, files, etc.
It is an error to invoke any other methods on this object once dispose() has been called. Note, however, that there is no guarantee about behavior in that case.
Afterwards, references to this object may still exist elsewhere, preventing its garbage collection. But it's formally dead, and shouldn't be keeping any other objects alive. Therefore, this method should null out any references to other objects that this NamedBean contained.
dispose in interface NamedBeanpublic int getState()
NamedBeanThis generally shouldn't be used by Java code; use the class-specific form instead. (E.g. getCommandedState in Turnout) This provided to make Jython script access easier to read.
getState in interface NamedBean
public void setState(int s)
throws JmriException
NamedBeanThis generally shouldn't be used by Java code; use the class-specific form instead. (E.g. setCommandedState in Turnout) This provided to make Jython script access easier to read.
setState in interface NamedBeanJmriException - general error when cant do the needed operation
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||