All Packages Class Hierarchy This Package Previous Next Index
Interface com.ibm.as400.vaccess.VObject
- public interface VObject
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:
- ErrorEvent
- VObjectEvent
- WorkingEvent
An implementation of this interface should pass on all
events fired by its actions and properties pane to its
listeners.
-
DESCRIPTION_PROPERTY
- Property identifier for the description.
-
NAME_PROPERTY
- Property identifier for the name.
-
addErrorListener(ErrorListener)
- Adds a listener to be notified when an error occurs.
-
addVObjectListener(VObjectListener)
- Adds a listener to be notified when a VObject is changed,
created, or deleted.
-
addWorkingListener(WorkingListener)
- Adds a listener to be notified when work starts and stops
on potentially long-running operations.
-
getActions()
- Returns the list of actions that can be performed.
-
getDefaultAction()
- Returns the default action.
-
getIcon(int, boolean)
- Returns the icon.
-
getPropertiesPane()
- Returns the properties pane.
-
getPropertyValue(Object)
- Returns a property value.
-
getText()
- Returns the descriptive text associated with this object.
-
load()
- Loads information about the object from the AS/400.
-
removeErrorListener(ErrorListener)
- Removes an error listener.
-
removeVObjectListener(VObjectListener)
- Removes a VObjectListener.
-
removeWorkingListener(WorkingListener)
- Removes a working listener.
NAME_PROPERTY
public static final Object NAME_PROPERTY
- Property identifier for the name.
DESCRIPTION_PROPERTY
public static final Object DESCRIPTION_PROPERTY
- Property identifier for the description.
addErrorListener
public abstract void addErrorListener(ErrorListener listener)
- Adds a listener to be notified when an error occurs.
- Parameters:
- listener - The listener.
addVObjectListener
public abstract void addVObjectListener(VObjectListener listener)
- Adds a listener to be notified when a VObject is changed,
created, or deleted.
- Parameters:
- listener - The listener.
addWorkingListener
public abstract void addWorkingListener(WorkingListener listener)
- Adds a listener to be notified when work starts and stops
on potentially long-running operations.
- Parameters:
- listener - The listener.
getActions
public abstract VAction[] getActions()
- Returns the list of actions that can be performed. This is called
when the user brings up a popup menu on this VObject. The popup
menu will contain a menu item for each returned VAction.
- Returns:
- The actions, or null if there are no actions.
getDefaultAction
public abstract VAction getDefaultAction()
- Returns the default action. This is called when the user double-clicks
on this VObject. The returned action will then be performed.
- Returns:
- The default action, or null if there is no default
action.
getIcon
public abstract Icon getIcon(int size,
boolean open)
- Returns the icon. This is called to determine which icon to show
with this VObject.
- Parameters:
- 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.
- Returns:
- The icon, or null if there is none.
getPropertiesPane
public abstract VPropertiesPane getPropertiesPane()
- Returns the properties pane. This is called when the user
selects the "Properties" menu item on this VObject's popup
menu. The return VPropertiesPane object will be presented
as a properties dialog.
- Returns:
- The properties pane, or null if there is none.
getPropertyValue
public abstract Object getPropertyValue(Object propertyIdentifier)
- Returns a property value. This is called in order to
fill the contents of cells in an AS400DetailsPane or
AS400DetailsModel object.
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. |
- Parameters:
- propertyIdentifier - The property identifier.
- Returns:
- The property value, or null
if the property identifier
is not recognized.
getText
public abstract String getText()
- Returns the descriptive text associated with this object.
This is called when rendering the VObject in a user interface.
- Returns:
- The descriptive text associated with this object.
load
public abstract void load()
- Loads information about the object from the AS/400.
removeErrorListener
public abstract void removeErrorListener(ErrorListener listener)
- Removes an error listener.
- Parameters:
- listener - The listener.
removeVObjectListener
public abstract void removeVObjectListener(VObjectListener listener)
- Removes a VObjectListener.
- Parameters:
- listener - The listener.
removeWorkingListener
public abstract void removeWorkingListener(WorkingListener listener)
- Removes a working listener.
- Parameters:
- listener - The listener.
All Packages Class Hierarchy This Package Previous Next Index