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:

An implementation of this interface should pass on all events fired by its actions and properties pane to its listeners.


Variable Index

 o DESCRIPTION_PROPERTY
Property identifier for the description.
 o NAME_PROPERTY
Property identifier for the name.

Method Index

 o addErrorListener(ErrorListener)
Adds a listener to be notified when an error occurs.
 o addVObjectListener(VObjectListener)
Adds a listener to be notified when a VObject is changed, created, or deleted.
 o addWorkingListener(WorkingListener)
Adds a listener to be notified when work starts and stops on potentially long-running operations.
 o getActions()
Returns the list of actions that can be performed.
 o getDefaultAction()
Returns the default action.
 o getIcon(int, boolean)
Returns the icon.
 o getPropertiesPane()
Returns the properties pane.
 o getPropertyValue(Object)
Returns a property value.
 o getText()
Returns the descriptive text associated with this object.
 o load()
Loads information about the object from the AS/400.
 o removeErrorListener(ErrorListener)
Removes an error listener.
 o removeVObjectListener(VObjectListener)
Removes a VObjectListener.
 o removeWorkingListener(WorkingListener)
Removes a working listener.

Variables

 o NAME_PROPERTY
 public static final Object NAME_PROPERTY
Property identifier for the name.

 o DESCRIPTION_PROPERTY
 public static final Object DESCRIPTION_PROPERTY
Property identifier for the description.

Methods

 o addErrorListener
 public abstract void addErrorListener(ErrorListener listener)
Adds a listener to be notified when an error occurs.

Parameters:
listener - The listener.
 o 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.
 o 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.
 o getActions
 public abstract VAction[] getActions()
Returns the list of actions that can be performed.

Returns:
The actions, or null if there are no actions.
 o getDefaultAction
 public abstract VAction getDefaultAction()
Returns the default action.

Returns:
The default action, or null if there is no default action.
 o 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.
 o getPropertiesPane
 public abstract VPropertiesPane getPropertiesPane()
Returns the properties pane.

Returns:
The properties pane, or null if there is none.
 o 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.
 o getText
 public abstract String getText()
Returns the descriptive text associated with this object.

Returns:
The descriptive text associated with this object.
 o load
 public abstract void load()
Loads information about the object from the AS/400.

 o removeErrorListener
 public abstract void removeErrorListener(ErrorListener listener)
Removes an error listener.

Parameters:
listener - The listener.
 o removeVObjectListener
 public abstract void removeVObjectListener(VObjectListener listener)
Removes a VObjectListener.

Parameters:
listener - The listener.
 o removeWorkingListener
 public abstract void removeWorkingListener(WorkingListener listener)
Removes a working listener.

Parameters:
listener - The listener.

All Packages  Class Hierarchy  This Package  Previous  Next  Index