|
Extension SDK 10.1.2 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectoracle.ide.model.Applications
The Applications class is used to wrap the Workspaces
class in order to provide a different label when displayed in the
application navigator.
It observers the workspaces object and forwards any addition or
removal of items from the workspaces object to observers of this
class.
| Field Summary | |
static java.lang.String |
APPLICATIONS
|
| Fields inherited from interface oracle.ide.addin.Subject |
OBJECT_MODIFIED |
| Constructor Summary | |
Applications(Workspaces workspaces)
Constructor. |
|
| Method Summary | |
boolean |
add(Element child)
Appends a child Element to the end of the
Folder. |
void |
attach(Observer o)
Registers an observer interested in being notified when the internal state of the class implementing the Subject interface
changes. |
boolean |
canAdd(Element element)
Other classes can call this method to determine whether the given Element can be added to the Folder. |
boolean |
canRemove(Element element)
Other classes can call this method to determine whether the specified Element can be removed from this
Folder. |
boolean |
containsChild(Element child)
Returns true if the folder contains the
specified child Element; returns false
otherwise. |
void |
detach(Observer o)
Unregisters an observer that is not interested anymore in being notified when the internal state of the class implementing the Subject
interface changes. |
Attributes |
getAttributes()
This method returns an Attributes object that encodes the
attributes of the Element. |
java.util.Iterator |
getChildren()
This method is part of the Element interface to
provide a convenient way of getting an Iterator over any
contained child Elements without having to test the
object's type with the instanceof operator or having
to downcast to a more specific type. |
java.lang.Object |
getData()
Returns the data element associated with this Data. |
javax.swing.Icon |
getIcon()
Returns an Icon that can be shown in association with this
Displayable. |
java.lang.String |
getLongLabel()
Returns a long label that can be displayed to the user. |
java.lang.String |
getShortLabel()
Returns a short label that can be displayed to the user. |
java.lang.String |
getToolTipText()
Returns the tool tip text to show when the mouse pointer pauses over a UI component that represents this Displayable. |
protected Workspaces |
getWorkspaces()
|
boolean |
mayHaveChildren()
This method is part of the Element interface to
provide a convenient way of determining whether an object may
have children without having to test the object's type with the
instanceof operator or having to downcast to a
more specific type. |
void |
notifyObservers(java.lang.Object o,
UpdateMessage msg)
Notifies all observers that the state of the subject has changed. |
boolean |
remove(Element child)
Removes the specified child Element. |
void |
removeAll()
Removes all children from the folder. |
int |
size()
Returns the current number of children in the folder. |
java.lang.String |
toString()
Returns the Short Label displayed to a user. |
void |
update(java.lang.Object obj,
UpdateMessage msg)
Notification message. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
public static final java.lang.String APPLICATIONS
| Constructor Detail |
public Applications(Workspaces workspaces)
workspaces object.
| Method Detail |
public java.lang.Object getData()
DataData.
The getData() method provides a
standard means for getting the data element whether or not it is
same object as its Element object.
getData in interface DataData
instance.public java.lang.String getShortLabel()
DisplayableString is considered
translatable and should therefore be placed in an appropriate
resource file. When possible, the returned label should be
reasonably short enough to show in the navigator or explorer
windows but long enough to clearly identify and distinguish the
Displayable.
getShortLabel in interface DisplayableDisplayable
that can be shown to the user.public java.lang.String getLongLabel()
DisplayableString is considered translatable
and should therefore be placed in an appropriate resource file.
The long label differs from the short label essentially on length.
Usually the long label will only be shown on-demand and in places
where horizontal space is more available. Examples are the status
bar and tooltips.
getLongLabel in interface DisplayableDisplayable that
can be shown to the user.public javax.swing.Icon getIcon()
DisplayableIcon that can be shown in association with this
Displayable. Typically the icon will be used in a
tree control or list control. Therefore the icon must fit
naturally within the space normally given to items within those
controls. Such icons are usually 16x16 in size or, if there is a
one-pixel transparent padding around the edge, 18x18 in size. It
is strongly recommended that icons returned by this method be
either 16x16 or 18x18 in size. If null is returned,
the control may show a default icon, or it may show no icon,
whichever is appropriate.
getIcon in interface DisplayableIcon to be displayed for the
Displayable.public java.lang.String toString()
DisplayabletoString method in java.lang.Object.
Implementors of the Displayable interface should
override this as appropriate. The default implementation is
the same as getShortLabel
toString in interface Displayablepublic boolean mayHaveChildren()
ElementElement interface to
provide a convenient way of determining whether an object may
have children without having to test the object's type with the
instanceof operator or having to downcast to a
more specific type.
An implementation of Element that represents a leaf
in a tree structure should return false from this
method. An implementation of Element that could
represent a non-leaf in a tree structure should return
true from this method, even if it does not currently
contain any children.
mayHaveChildren in interface Elementtrue if this Element may contain
child Elements.public java.util.Iterator getChildren()
ElementElement interface to
provide a convenient way of getting an Iterator over any
contained child Elements without having to test the
object's type with the instanceof operator or having
to downcast to a more specific type.
An implementation of Element that represents a leaf
in a tree structure should return null from this
method. An implementation of Element that could
represent a non-leaf in a tree structure should return either an
Iterator over the child Elements or
null if there are no children.
getChildren in interface ElementIterator over any child Elements
contained by this Element. If there are no children,
null is returned.public java.lang.String getToolTipText()
DisplayableDisplayable.
In many cases it may be appropriate for this method to return the
same value as Displayable.getLongLabel().
getToolTipText in interface DisplayableDisplayable.public Attributes getAttributes()
ElementAttributes object that encodes the
attributes of the Element. Changing the attribute
settings on the return object changes the element attributes.
Subclasses should use their super class attributes object to
define their own attributes. This allows subclasses to
inherit their super class attributes. If a subclass does not
wish to inherit attributes, they should first call
getAttributes().clear() and define new attributes.
getAttributes in interface Elementpublic boolean canAdd(Element element)
FolderElement can be added to the Folder.
canAdd in interface Folderelement - the Element that is about to be added
to this Folder.
true if the specified Element can be
added to this Folder; false if the
Element cannot be added.public boolean add(Element child)
FolderElement to the end of the
Folder.
add in interface Folderpublic boolean canRemove(Element element)
FolderElement can be removed from this
Folder.
canRemove in interface Folderelement - the Element that is about to be removed
from this Folder.
true if the specified Element can be
removed from this Folder; false if the
Element cannot be removed.public boolean remove(Element child)
FolderElement. If the child object
appears more than once, only the first instance is removed.
remove in interface Folderchild - The child object to remove.public boolean containsChild(Element child)
Foldertrue if the folder contains the
specified child Element; returns false
otherwise.
containsChild in interface Folderpublic int size()
Folder
size in interface Folderpublic void removeAll()
Folder
removeAll in interface Folder
public void update(java.lang.Object obj,
UpdateMessage msg)
Observer
update in interface Observerobj - the subject whose state has changed.msg - what has changed.public void attach(Observer o)
SubjectSubject interface
changes.
Implementors should do nothing when the same observer is added more
than once.
attach in interface Subjecto - the Observer interested in change notification
messages.public void detach(Observer o)
SubjectSubject
interface changes.
Implementors should do nothing when the same observer is removed more
than once.
detach in interface Subjecto - the Observer disinterested in change
notification messages.
public void notifyObservers(java.lang.Object o,
UpdateMessage msg)
Subject
notifyObservers in interface Subjecto - the subject whose state has changed.msg - what changed.protected Workspaces getWorkspaces()
|
Extension SDK | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
Copyright © 1997, 2004, Oracle. All rights reserved.