|
| Components |
|
| |||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||||
com.sas.io.FileSystemList
public class FileSystemList
A class that holds a list of RootDirectories (drives) that are available on the system
Creating a FileSystemList Component
| Field Summary | |
|---|---|
protected boolean |
needRefresh
|
protected static java.lang.String |
NODENAME
|
protected OrderedCollection |
oc
|
| Constructor Summary | |
|---|---|
FileSystemList()
a default constructor which looks in local machine and fills the list with available drives. |
|
| Method Summary | |
|---|---|
void |
addContentsChangedListener(com.sas.collection.ContentsChangedListener listener)
Add a listener for the com.sas.collection.ContentsChangedEvent event. |
void |
apply(com.sas.util.ApplyInterface action)
Applies the 'apply' function in the action to every item in the collection. |
java.lang.Object |
clone()
Create a copy of the current model |
boolean |
contains(java.lang.Object element)
Test for the presence of an object in the collection |
int |
count()
Returns the number of items in the collection |
int |
countNodeChildren(int maximumChildCount)
Counts the children of the current node. countNodeChildren differs from getNodeChildCount when the number of children is not readily known. |
boolean |
equals(StaticOrderedCollectionInterface orderedCollection)
Compare the current items with those in another collection and tell whether the collections are identical. |
void |
fireContentsChanged(CollectionChangedInfo event)
Send a ContentsChangedEvent event to all the contentsChangedListener objects in the listener list. |
java.lang.Object |
get(int index)
Fetch an item at a index. |
com.sas.visuals.IconInterface |
getDefaultIcon()
Returns the default icon for the current node. |
com.sas.visuals.IconInterface |
getExpandedIcon()
Returns the expanded icon for the current node. |
com.sas.visuals.IconInterface |
getExpandedSelectedIcon()
Sets the expandedSelected icon for the current node. |
static com.sas.beans.ExtendedBeanInfo |
getExtendedBeanInfo()
|
int |
getIndex(java.lang.Object element,
int startIndex)
Returns the index associated with the item (searches forward) |
java.util.Enumeration |
getItems()
Gets the enumeration of the filesystem names. |
java.util.Enumeration |
getItems(int start,
int end)
Returns an enumeration of a subset of the items from a collection. |
int |
getLastIndex(java.lang.Object element,
int startIndex)
Returns the index associated with the item (searches backward) |
SimpleNodeInterface |
getNodeChild(int index)
Returns the child node at the specified index. |
int |
getNodeChildCount()
Returns the number of children available. |
SimpleNodeInterface[] |
getNodeChildren(int startIndex,
int count)
Returns the specified range of children for the current node. |
java.lang.String |
getNodeExpandedText()
Returns the value of the nodeExpandedText property. |
java.lang.String |
getNodeText()
Returns the value of the nodeText property. |
java.lang.String |
getNodeType()
Returns the value of the nodeType property. |
NodeInterface |
getRoot()
Gets the root for the tree implementation of the list |
com.sas.visuals.IconInterface |
getSelectedIcon()
Returns the selected icon for the current node. |
void |
initialize()
The initialize() method was designed to be a synchronization point after the constructor for the object has completed and a number of methods have been called on the component. |
boolean |
isLeafNode()
Indicates whether the current node is a leaf. |
void |
removeContentsChangedListener(com.sas.collection.ContentsChangedListener listener)
Remove a listener for the com.sas.collection.ContentsChangedEvent event. |
java.lang.String |
toString()
|
| Methods inherited from interface com.sas.beans.PropertyChangeSource |
|---|
addPropertyChangeListener, removePropertyChangeListener |
| Field Detail |
|---|
protected transient OrderedCollection oc
protected transient boolean needRefresh
protected static java.lang.String NODENAME
| Constructor Detail |
|---|
public FileSystemList()
| Method Detail |
|---|
public static com.sas.beans.ExtendedBeanInfo getExtendedBeanInfo()
public java.lang.Object clone()
throws java.lang.CloneNotSupportedException
clone in interface StaticCollectionInterfaceclone in interface StaticOrderedCollectionInterfaceclone in interface com.sas.PublicClonableclone in class Componentjava.lang.CloneNotSupportedException - if the model attached to the component being cloned
will not allow the clone to attach.public void initialize()
ComponentInterfaceinitialize() should be called on a component after is it constructed :
ListBox listBox = new ListBox();
listBox.initialize();
container.add( listBox );
Overriding initialize is now discouraged since it is generally better to override setDefaultValues and readObject to perform initialization.
By default (in the ComponentInterface implementation), initialize() does nothing. However, various components override initialize() to perform operations, and it should be called.
Although use of initialize() is now discouraged, initialize() is also called by the validateObject method after a component is deserialized. This allows components which need processing during creation and deserialization to have a common place to perform operations. Adding event handlers to subcomponents is a typical use of the initialize method.
initialize in interface ComponentInterfaceinitialize in class ComponentComponentInterface.initialize()public void addContentsChangedListener(com.sas.collection.ContentsChangedListener listener)
addContentsChangedListener in interface com.sas.collection.ContentsChangedSourcelistener - an object which handles contentsChangedEvent events
the listener is not added a second time if it already exists
in the list of listeners for this event.ContentsChangedSourcepublic void removeContentsChangedListener(com.sas.collection.ContentsChangedListener listener)
removeContentsChangedListener in interface com.sas.collection.ContentsChangedSourcelistener - an object which handles ContentsChangedEvent eventsContentsChangedSourcepublic void fireContentsChanged(CollectionChangedInfo event)
event - the event to sendpublic java.util.Enumeration getItems()
getItems in interface com.sas.util.Enumerablepublic boolean equals(StaticOrderedCollectionInterface orderedCollection)
equals in interface StaticOrderedCollectionInterfaceorderedCollection - Another ordered collection to be compared to.
public java.lang.Object get(int index)
get in interface IndexedGetInterfaceindex - the position of the item, zero-based indexing.
java.lang.IndexOutOfBoundsException - if index
is not in the range [0, count()-1].
public int getIndex(java.lang.Object element,
int startIndex)
getIndex in interface StaticOrderedCollectionInterfaceelement - item to search forstartIndex - the position where the search should start
java.lang.IndexOutOfBoundsException - if the index is
not in the range [0..count()-1].
com.sas.util.InvalidElementTypeException - In some implementations,
the objects that are stored may be restricted to a particular
type (such as String). (a RuntimeException)
public java.util.Enumeration getItems(int start,
int end)
getItems in interface StaticOrderedCollectionInterfacestart - the index of the first item, zero based.end - one past the index of the last item to include in the enumeration, zero based.
Note that the range of elements returned in the Enumeration does not
include the endthe item; this is consistent with substring(start, end)
in java.lang.String, for example.
java.lang.IndexOutOfBoundsException - if start
is not in the range [0, count()-1], or start>last
or end is not in the range [0, count()]
public int getLastIndex(java.lang.Object element,
int startIndex)
getLastIndex in interface StaticOrderedCollectionInterfaceelement - the item to search forstartIndex - the position where the search should start
java.lang.IndexOutOfBoundsException - if the index is
not in the range [0..count()-1]
com.sas.util.InvalidElementTypeException - In some implementations,
the objects that are stored may be restricted to a particular
type (such as String). (a RuntimeException)public boolean contains(java.lang.Object element)
contains in interface StaticCollectionInterfaceelement - The item to search for
com.sas.util.InvalidElementTypeException - In some implementations,
the objects that are stored may be restricted to a particular
type (such as String). (a RuntimeException)public int count()
count in interface com.sas.util.Countablepublic void apply(com.sas.util.ApplyInterface action)
apply in interface StaticCollectionInterfaceaction - An object that provides a function which takes an
object as an argument and then does something to it.
The application of the action continues until all items in the
the collection have been operated on, of until a call to the
action.apply(Object item) method returns ApplyInterface.ABORTpublic NodeInterface getRoot()
getRoot in interface TreeInterfacepublic java.lang.String getNodeExpandedText()
getNodeExpandedText in interface NodeInterfacepublic java.lang.String getNodeText()
getNodeText in interface NodeInterfacepublic java.lang.String getNodeType()
getNodeType in interface NodeInterfacepublic int countNodeChildren(int maximumChildCount)
countNodeChildren in interface SimpleNodeInterfacemaximumChildCount - the maximum number of children to read, or 0 to read indefinitely
public int getNodeChildCount()
getNodeChildCount in interface SimpleNodeInterfacepublic boolean isLeafNode()
isLeafNode in interface SimpleNodeInterfacepublic SimpleNodeInterface getNodeChild(int index)
getNodeChild in interface SimpleNodeInterfaceindex - the 0-based index of the child node to retrieve
true.
public SimpleNodeInterface[] getNodeChildren(int startIndex,
int count)
getNodeChildren in interface SimpleNodeInterfacestartIndex - 0-based index which identifies the start of the rangecount - the amount of children to get
true.public java.lang.String toString()
toString in class java.lang.Objectpublic com.sas.visuals.IconInterface getDefaultIcon()
getDefaultIcon in interface NodeIconInterfacepublic com.sas.visuals.IconInterface getExpandedIcon()
getExpandedIcon in interface NodeIconInterfacepublic com.sas.visuals.IconInterface getSelectedIcon()
getSelectedIcon in interface NodeIconInterfacepublic com.sas.visuals.IconInterface getExpandedSelectedIcon()
getExpandedSelectedIcon in interface NodeIconInterface
|
| Components |
|
| |||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||||