All Packages Class Hierarchy This Package Previous Next Index
Class com.ibm.as400.vaccess.VPrinter
java.lang.Object
|
+----com.ibm.as400.vaccess.VPrinter
- public class VPrinter
- extends Object
- implements VNode, Serializable
The VPrinter class defines the representation of an
AS/400 printer for use in various models and panes
in this package.
A VPrinter object has no children. Its details
children are the spooled files (VOutput objects)
on the printer.
Most errors are reported as ErrorEvents rather than
throwing exceptions. Users should listen for ErrorEvents
in order to diagnose and recover from error conditions.
VPrinter objects generate the following events:
- ErrorEvent
- PropertyChangeEvent
- VObjectEvent
- WorkingEvent
- See Also:
- Printer
-
OUTPUTQUEUE_PROPERTY
- Property identifier for the output queue.
-
PRINTER_PROPERTY
- Property identifier for the printer name.
-
STATUS_PROPERTY
- Property identifier for the status.
-
VPrinter()
- Constructs a VPrinter object.
-
VPrinter(Printer)
- Constructs a VPrinter object.
-
VPrinter(VNode, Printer)
- Constructs a VPrinter 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.
-
getPrinter()
- Returns the printer associated with this object.
-
getPropertiesPane()
- Returns the properties pane.
-
getPropertyValue(Object)
- Returns a property value.
-
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.
-
setPrinter(Printer)
- Sets the printer.
-
sortDetailsChildren(Object[], boolean[])
- Sorts the children for the details.
-
toString()
- Returns the string representation.
OUTPUTQUEUE_PROPERTY
public static final Object OUTPUTQUEUE_PROPERTY
- Property identifier for the output queue.
PRINTER_PROPERTY
public static final Object PRINTER_PROPERTY
- Property identifier for the printer name.
STATUS_PROPERTY
public static final Object STATUS_PROPERTY
- Property identifier for the status.
VPrinter
public VPrinter()
- Constructs a VPrinter object.
VPrinter
public VPrinter(Printer printer)
- Constructs a VPrinter object.
- Parameters:
- printer - The printer.
VPrinter
public VPrinter(VNode parent,
Printer printer)
- Constructs a VPrinter object.
- Parameters:
- parent - The parent.
- printer - The printer.
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.
- Returns:
- An empty enumeration.
getActions
public VAction[] getActions()
- Returns the list of actions that can be performed.
- hold
- release
- start
- stop
- make available
- make unavailable
- Returns:
- The actions.
getAllowsChildren
public boolean getAllowsChildren()
- Indiciates if the node allows children.
- Returns:
- Always false.
getChildAt
public TreeNode getChildAt(int index)
- Returns the child node at the specified index.
- Parameters:
- index - The index.
- Returns:
- Always null.
getChildCount
public int getChildCount()
- Returns the number of children.
- Returns:
- Always 0.
getDefaultAction
public VAction getDefaultAction()
- Returns the default action.
- Returns:
- Always null. There is no default action.
getDetailsChildAt
public VObject getDetailsChildAt(int index)
- Returns the child for the details at the specified index.
The details children are the spooled files (VOutput objects)
on the printer.
- 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.
The details children are the spooled files (VOutput objects)
on the printer.
- 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.
The details children are the spooled files (VOutput objects)
on the printer.
- Returns:
- The details column model.
getDetailsIndex
public int getDetailsIndex(VObject child)
- Returns the index of the specified child for the details.
The details children are the spooled files (VOutput objects)
on the printer.
- 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 int getIndex(TreeNode child)
- Returns the index of the specified child.
- Parameters:
- child - The child.
- Returns:
- Always -1.
getParent
public TreeNode getParent()
- Returns the parent node.
- Returns:
- The parent node, or null if there is no parent.
getPrinter
public Printer getPrinter()
- Returns the printer associated with this object.
- Returns:
- The Printer class that is associated with this object.
getPropertiesPane
public VPropertiesPane getPropertiesPane()
- Returns the properties pane.
- Returns:
- The properties pane.
getPropertyValue
public Object getPropertyValue(Object propertyIdentifier)
- Returns a property value.
- Parameters:
- propertyIdentifier - The property identifier. The choices are
- PRINTER_PROPERTY
- STATUS_PROPERTY
- DESCRIPTION_PROPERTY
- OUTPUTQUEUE_PROPERTY
- Returns:
- The property value, or null if the
property identifier is not recognized.
getText
public String getText()
- Returns the text. This is the name of the printer.
- Returns:
- The text.
isLeaf
public boolean isLeaf()
- Indicates if the node is a leaf.
- Returns:
- Always true.
isSortable
public boolean isSortable()
- Indicates if the details children are sortable.
- Returns:
- Always true.
load
public void load()
- Loads information about the object from the AS/400. A printer must be
specified either on construction or from a call to setPrinter() inorder
to get 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.
setPrinter
public void setPrinter(Printer printer) throws PropertyVetoException
- Sets the printer. A call to load() must be done after calling this
funtion inorder to update the details children.
- Parameters:
- printer - The printer.
- Throws: PropertyVetoException
- If the change is vetoed.
sortDetailsChildren
public void sortDetailsChildren(Object propertyIdentifiers[],
boolean orders[])
- Sorts the children for the details.
- 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 the name of the printer.
- Returns:
- The string representation.
- Overrides:
- toString in class Object
All Packages Class Hierarchy This Package Previous Next Index