|
| Components |
|
| |||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||||
com.sas.io.Printer
public class Printer
A class representing Printer attached to a local machine. Based on the Operating System on the local machine creates either a Windows Printer Class or Unix Printer Class(to be added later).
Creating a Printer Component
Usage
Currently, the only functionality this class has is to list the value of the printer's properties. User can query the properties by using getProperties() method.
| Field Summary | |
|---|---|
protected com.sas.io.WindowsPrinterPeer |
peer
|
static java.lang.String |
RB_KEY
|
| Constructor Summary | |
|---|---|
Printer()
Default Constructor |
|
Printer(java.lang.String name)
Creates a Printer object for a given printer and sets its attributes based on the operting system being used on local machine. |
|
| Method Summary | |
|---|---|
java.lang.Object |
clone()
Create a copy of the current model |
protected void |
commonInit(java.lang.String name)
Create the printer peer object based on the OS. |
int |
countNodeChildren(int maximumChildCount)
Counts the children of the current node. countNodeChildren differs from getNodeChildCount when the number of children is not readily known. |
java.lang.String |
getComment()
Gets a brief description of the printer. |
com.sas.visuals.IconInterface |
getDefaultIcon()
Returns the default icon for the current node. |
com.sas.visuals.IconInterface |
getExpandedIcon()
Returns the expanded icon for the current node. |
com.sas.visuals.IconInterface |
getExpandedSelectedIcon()
Sets the expandedSelected icon for the current node. |
static com.sas.beans.ExtendedBeanInfo |
getExtendedBeanInfo()
|
SimpleNodeInterface |
getNodeChild(int index)
Returns the child node at the specified index. |
int |
getNodeChildCount()
Returns the number of children available. |
SimpleNodeInterface[] |
getNodeChildren(int startIndex,
int count)
Returns the children of the current node in the specified range. |
java.lang.String |
getNodeExpandedText()
Returns a the expanded (usually more descriptive) text for the current node. |
java.lang.String |
getNodeText()
Gets the name of this node. |
java.lang.String |
getNodeType()
Gets the type of this node. |
java.lang.String |
getPrinterName()
Gets the name of the printer. |
java.util.Hashtable |
getProperties()
Gets the name value pair of Properties of this printer object based on type of operating system. |
java.lang.Object |
getProperty(java.lang.String name)
Gets the property value based on the name of the property specified. |
java.util.Hashtable |
getPropertyDescription()
Gets the Properties and description of this printer object based on type of operating system. |
com.sas.visuals.IconInterface |
getSelectedIcon()
Returns the selected icon for the current node. |
boolean |
isLeafNode()
Returns true if this node is a leaf and hence will not have any children, otherwise false. this is always true |
java.lang.String |
toString()
|
| Field Detail |
|---|
protected transient com.sas.io.WindowsPrinterPeer peer
public static final java.lang.String RB_KEY
| Constructor Detail |
|---|
public Printer()
public Printer(java.lang.String name)
name - name of the printer.
Security - exception if cannot access the operating system name on the
local machine.| Method Detail |
|---|
public static com.sas.beans.ExtendedBeanInfo getExtendedBeanInfo()
public java.lang.Object clone()
throws java.lang.CloneNotSupportedException
clone in interface com.sas.PublicClonableclone in class Componentjava.lang.CloneNotSupportedException - if the model attached to the component being cloned
will not allow the clone to attach.protected void commonInit(java.lang.String name)
name - The name of the printer. If null, the default peer constructor is used.public java.lang.String getPrinterName()
public java.lang.String getComment()
public java.lang.String getNodeType()
getNodeType in interface NodeInterfacepublic java.lang.String getNodeText()
getNodeText in interface NodeInterfacepublic java.util.Hashtable getProperties()
public java.util.Hashtable getPropertyDescription()
public java.lang.Object getProperty(java.lang.String name)
name - of the propertypublic java.lang.String getNodeExpandedText()
getNodeExpandedText in interface NodeInterfacepublic int countNodeChildren(int maximumChildCount)
countNodeChildren in interface SimpleNodeInterfacemaximumChildCount - the maximum number of children to read, or 0 to read indefinitely
public int getNodeChildCount()
getNodeChildCount in interface SimpleNodeInterfacepublic boolean isLeafNode()
isLeafNode in interface SimpleNodeInterfacetrue if the current node is a leaf, otherwise falsepublic SimpleNodeInterface getNodeChild(int index)
getNodeChild in interface SimpleNodeInterfaceindex - the index of the child node to retrieve
true.
public SimpleNodeInterface[] getNodeChildren(int startIndex,
int count)
getNodeChildren in interface SimpleNodeInterfacestartIndex - index which identifies the start of the rangecount - number of children to return
true.public java.lang.String toString()
toString in class java.lang.Objectpublic com.sas.visuals.IconInterface getDefaultIcon()
public com.sas.visuals.IconInterface getExpandedIcon()
public com.sas.visuals.IconInterface getSelectedIcon()
public com.sas.visuals.IconInterface getExpandedSelectedIcon()
|
| Components |
|
| |||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||||