All Packages Class Hierarchy This Package Previous Next Index
Class com.ibm.as400.vaccess.VPrinters
java.lang.Object
|
+----com.ibm.as400.vaccess.VPrinters
- public class VPrinters
- extends Object
- implements VNode, Serializable
The VPrinters class represents
a list of AS/400 printers for use in various models
and panes in this package.
Both the children and details children of a VPrinters
object are the printers (VPrinter objects) in this list.
Most errors are reported as ErrorEvents rather than
throwing exceptions. Users should listen for ErrorEvents
in order to diagnose and recover from error conditions.
VPrinters objects generate the following events:
- ErrorEvent
- PropertyChangeEvent
- VObjectEvent
- WorkingEvent
-
VPrinters()
- Constructs a VPrinters object.
-
VPrinters(AS400)
- Constructs a VPrinters object.
-
VPrinters(VNode, AS400)
- Constructs a VPrinters object.
-
addErrorListener(ErrorListener)
- Adds a listener to be notified when an error occurs.
-
addPropertyChangeListener(PropertyChangeListener)
- Adds a listener to be notified when the value of any
bound property changes.
-
addVetoableChangeListener(VetoableChangeListener)
- Adds a listener to be notified when the value of any
constrained property changes.
-
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.
-
children()
- Returns the children of the node.
-
getActions()
- Returns the list of actions that can be performed.
-
getAllowsChildren()
- Indiciates if the node allows children.
-
getChildAt(int)
- Returns the child node at the specified index.
-
getChildCount()
- Returns the number of children.
-
getDefaultAction()
- Returns the default action.
-
getDetailsChildAt(int)
- Returns the child for the details at the specified index.
-
getDetailsChildCount()
- Returns the number of children for the details.
-
getDetailsColumnModel()
- Returns the table column model to use in the details
when representing the children.
-
getDetailsIndex(VObject)
- Returns the index of the specified child for the details.
-
getIcon(int, boolean)
- Returns the icon.
-
getIndex(TreeNode)
- Returns the index of the specified child.
-
getParent()
- Returns the parent node.
-
getPrinterFilter()
- Returns the printer list filter.
-
getPropertiesPane()
- Returns the properties pane.
-
getPropertyValue(Object)
- Returns a property value.
-
getSystem()
- Returns the AS/400 from which the list will be retrieved.
-
getText()
- Returns the text.
-
isLeaf()
- Indicates if the node is a leaf.
-
isSortable()
- Indicates if the details children are sortable.
-
load()
- Loads information about the object from the AS/400.
-
removeErrorListener(ErrorListener)
- Removes an error listener.
-
removePropertyChangeListener(PropertyChangeListener)
- Removes a property change listener.
-
removeVetoableChangeListener(VetoableChangeListener)
- Removes a vetoable change listener.
-
removeVObjectListener(VObjectListener)
- Removes a VObjectListener.
-
removeWorkingListener(WorkingListener)
- Removes a working listener.
-
setPrinterFilter(String)
- Sets printer list filter.
-
setSystem(AS400)
- Sets the AS/400 from which the list will be retrieved.
-
sortDetailsChildren(Object[], boolean[])
- Sorts the children for the details.
-
toString()
- Returns the string representation.
VPrinters
public VPrinters()
- Constructs a VPrinters object.
VPrinters
public VPrinters(AS400 system)
- Constructs a VPrinters object.
- Parameters:
- system - The AS/400 from which the list will be retrieved.
VPrinters
public VPrinters(VNode parent,
AS400 system)
- Constructs a VPrinters object.
- Parameters:
- parent - The parent.
- system - The AS/400 from which the list will be retrieved.
addErrorListener
public void addErrorListener(ErrorListener listener)
- Adds a listener to be notified when an error occurs.
- Parameters:
- listener - The listener.
addPropertyChangeListener
public void addPropertyChangeListener(PropertyChangeListener listener)
- Adds a listener to be notified when the value of any
bound property changes.
- Parameters:
- listener - The listener.
addVetoableChangeListener
public void addVetoableChangeListener(VetoableChangeListener listener)
- Adds a listener to be notified when the value of any
constrained property changes.
- Parameters:
- listener - The listener.
addVObjectListener
public void addVObjectListener(VObjectListener listener)
- Adds a listener to be notified when a VObject is changed,
created, or deleted.
- Parameters:
- listener - The listener.
addWorkingListener
public void addWorkingListener(WorkingListener listener)
- Adds a listener to be notified when work starts and stops
on potentially long-running operations.
- Parameters:
- listener - The listener.
children
public Enumeration children()
- Returns the children of the node.
The children are the printers.
- Returns:
- The children.
getActions
public VAction[] getActions()
- Returns the list of actions that can be performed.
- Returns:
- Always null. There are no actions.
getAllowsChildren
public boolean getAllowsChildren()
- Indiciates if the node allows children.
- Returns:
- Always true.
getChildAt
public synchronized TreeNode getChildAt(int index)
- Returns the child node at the specified index.
- Parameters:
- index - The index.
- Returns:
- The child node, or null if the
index is not valid.
getChildCount
public synchronized int getChildCount()
- Returns the number of children.
This is the number of printers.
- Returns:
- The number of children.
getDefaultAction
public VAction getDefaultAction()
- Returns the default action.
- Returns:
- Always null. There is no default action.
getDetailsChildAt
public synchronized VObject getDetailsChildAt(int index)
- Returns the child for the details at the specified index.
- Parameters:
- index - The index.
- Returns:
- The child, or null if the index is not
valid.
getDetailsChildCount
public int getDetailsChildCount()
- Returns the number of children for the details.
- Returns:
- The number of children for the details.
getDetailsColumnModel
public TableColumnModel getDetailsColumnModel()
- Returns the table column model to use in the details
when representing the children. This column model
describes the details values for the children.
- Returns:
- The details column model.
getDetailsIndex
public synchronized int getDetailsIndex(VObject detailsChild)
- Returns the index of the specified child for the details.
- Parameters:
- detailsChild - The details child.
- Returns:
- The index, or -1 if the child is not found
in the details.
getIcon
public 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 the default of 16.
- open - This parameter has no effect.
- Returns:
- The icon.
getIndex
public synchronized int getIndex(TreeNode child)
- Returns the index of the specified child.
- Parameters:
- child - The child.
- Returns:
- The index, or -1 if the child is not found.
getParent
public TreeNode getParent()
- Returns the parent node.
- Returns:
- The parent node, or null if there is no parent.
getPrinterFilter
public String getPrinterFilter()
- Returns the printer list filter.
- Returns:
- The printer filter.
getPropertiesPane
public VPropertiesPane getPropertiesPane()
- Returns the properties pane.
- Returns:
- The properties pane.
getPropertyValue
public synchronized Object getPropertyValue(Object propertyIdentifier)
- Returns a property value.
- Parameters:
- propertyIdentifier - The property identifier. The choices are
- NAME_PROPERTY
- DESCRIPTION_PROPERTY
- Returns:
- The property value, or null if the
property identifier is not recognized.
getSystem
public AS400 getSystem()
- Returns the AS/400 from which the list will be retrieved.
- Returns:
- The AS/400 from which the list will be retrieved.
getText
public String getText()
- Returns the text. This is a constant string which
identifies this object as a list of printers.
- Returns:
- The text.
isLeaf
public boolean isLeaf()
- Indicates if the node is a leaf.
- Returns:
- true if the node if a leaf; false otherwise.
isSortable
public boolean isSortable()
- Indicates if the details children are sortable.
- Returns:
- Always false.
load
public void load()
- Loads information about the object from the AS/400.
removeErrorListener
public void removeErrorListener(ErrorListener listener)
- Removes an error listener.
- Parameters:
- listener - The listener.
removePropertyChangeListener
public void removePropertyChangeListener(PropertyChangeListener listener)
- Removes a property change listener.
- Parameters:
- listener - The listener.
removeVetoableChangeListener
public void removeVetoableChangeListener(VetoableChangeListener listener)
- Removes a vetoable change listener.
- Parameters:
- listener - The listener.
removeVObjectListener
public void removeVObjectListener(VObjectListener listener)
- Removes a VObjectListener.
- Parameters:
- listener - The listener.
removeWorkingListener
public void removeWorkingListener(WorkingListener listener)
- Removes a working listener.
- Parameters:
- listener - The listener.
setPrinterFilter
public void setPrinterFilter(String printerFilter) throws PropertyVetoException
- Sets printer list filter. A call to load() must be done
after calling this funtion inorder to update the details
and tree children.
- Parameters:
- printerFilter - The name of the printers to list.
It cannot be greater than 10 characters in length.
It can be a specific name, a generic name, or the special
value *ALL. The default for the printerFilter is *ALL.
- Throws: PropertyVetoException
- If the change is vetoed.
setSystem
public void setSystem(AS400 system) throws PropertyVetoException
- Sets the AS/400 from which the list will be retrieved. A call
to load() must be done after calling this funtion inorder to
update the details and tree children.
- Parameters:
- system - The AS/400 from which the list will be retrieved.
- Throws: PropertyVetoException
- If the change is vetoed.
sortDetailsChildren
public void sortDetailsChildren(Object propertyIdentifiers[],
boolean orders[])
- Sorts the children for the details. Since sorting is not supported,
this method does nothing.
- Parameters:
- propertyIdentifiers - The property identifiers.
- orders - The sort orders for each property
identifier; true for ascending order,
false for descending order.
toString
public String toString()
- Returns the string representation. This is a constant string which
identifies this object as a list of printers.
- Returns:
- The string representation.
- Overrides:
- toString in class Object
All Packages Class Hierarchy This Package Previous Next Index