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.
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.
- Returns:
- The actions, or null if there are no actions.
getDefaultAction
public abstract VAction getDefaultAction()
- Returns the default action.
- Returns:
- The default action, or null if there is no default
action.
getIcon
public abstract Icon getIcon(int size,
boolean open)
- Returns the icon.
- 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.
- Returns:
- The properties pane, or null if there is none.
getPropertyValue
public abstract Object getPropertyValue(Object propertyIdentifier)
- Returns a property value.
An implementation of this interface should describe the
properties that it supports. At minimum, it should support
NAME_PROPERTY and DESCRIPTION_PROPERTY.
- 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.
- 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