|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
The VObject interface defines the representation of an AS/400 resource for use in various models and panes in this package.
An object has any number of properties. These are attributes of the object itself and are identified by property identifiers. Every object has at least name and desctiption properties, and most will define more.
Many of these methods are not called directly by programs. Instead, they are called by the AS/400 panes to respond to the user interface as needed.
Most errors are reported as ErrorEvents rather than throwing exceptions. Users should listen for ErrorEvents in order to diagnose and recover from error conditions.
VObject objects generate the following events:
An implementation of this interface should pass on all events fired by its actions and properties pane to its listeners.
Field Summary | |
static java.lang.Object |
DESCRIPTION_PROPERTY
Property identifier for the description. |
static java.lang.Object |
NAME_PROPERTY
Property identifier for the name. |
Method Summary | |
void |
addErrorListener(ErrorListener listener)
Adds a listener to be notified when an error occurs. |
void |
addVObjectListener(VObjectListener listener)
Adds a listener to be notified when a VObject is changed, created, or deleted. |
void |
addWorkingListener(WorkingListener listener)
Adds a listener to be notified when work starts and stops on potentially long-running operations. |
VAction[] |
getActions()
Returns the list of actions that can be performed. |
VAction |
getDefaultAction()
Returns the default action. |
javax.swing.Icon |
getIcon(int size,
boolean open)
Returns the icon. |
VPropertiesPane |
getPropertiesPane()
Returns the properties pane. |
java.lang.Object |
getPropertyValue(java.lang.Object propertyIdentifier)
Returns a property value. |
java.lang.String |
getText()
Returns the descriptive text associated with this object. |
void |
load()
Loads information about the object from the AS/400. |
void |
removeErrorListener(ErrorListener listener)
Removes an error listener. |
void |
removeVObjectListener(VObjectListener listener)
Removes a VObjectListener. |
void |
removeWorkingListener(WorkingListener listener)
Removes a working listener. |
Field Detail |
public static final java.lang.Object NAME_PROPERTY
public static final java.lang.Object DESCRIPTION_PROPERTY
Method Detail |
public void addErrorListener(ErrorListener listener)
listener
- The listener.public void addVObjectListener(VObjectListener listener)
listener
- The listener.public void addWorkingListener(WorkingListener listener)
listener
- The listener.public VAction[] getActions()
public VAction getDefaultAction()
public javax.swing.Icon getIcon(int size, boolean open)
size
- The icon size, either 16 or 32. If any other
value is given, then return a default.open
- true for the open icon; false for the closed
icon. If there is only one icon, then this
parameter has no effect.public VPropertiesPane getPropertiesPane()
public java.lang.Object getPropertyValue(java.lang.Object propertyIdentifier)
An implementation of this interface should describe the properties that it supports. At minimum, it should support the following property identifiers:
Property | Return value |
---|---|
NAME_PROPERTY | Returns the VObject itself ("this"). This will be rendered using an icon and a name. |
DESCRIPTION_PROPERTY | Returns a text description of the VObject. |
propertyIdentifier
- The property identifier.public java.lang.String getText()
public void load()
public void removeErrorListener(ErrorListener listener)
listener
- The listener.public void removeVObjectListener(VObjectListener listener)
listener
- The listener.public void removeWorkingListener(WorkingListener listener)
listener
- The listener.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |