Package adams.gui.sendto
Class Printer
- java.lang.Object
-
- adams.core.logging.LoggingObject
-
- adams.gui.sendto.AbstractSendToAction
-
- adams.gui.sendto.Printer
-
- All Implemented Interfaces:
LoggingSupporter
,SizeOfHandler
,Serializable
,Comparable<AbstractSendToAction>
public class Printer extends AbstractSendToAction
Action for sending text to the printer.- Version:
- $Revision$
- Author:
- fracpete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class adams.gui.sendto.AbstractSendToAction
m_Owner
-
Fields inherited from class adams.core.logging.LoggingObject
m_Logger, m_LoggingIsEnabled, m_LoggingLevel
-
-
Constructor Summary
Constructors Constructor Description Printer()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Class[]
accepts()
Returns the classes that the action accepts.String
getAction()
Returns the short description of the sendto action.String
getIconName()
Returns the file name of the icon.String
send(Object o)
Performs the actual sending/forwarding/processing of the data.-
Methods inherited from class adams.gui.sendto.AbstractSendToAction
compareTo, equals, getIcon, getOwner, hashCode, setOwner
-
Methods inherited from class adams.core.logging.LoggingObject
configureLogger, getLogger, getLoggingLevel, initializeLogging, isLoggingEnabled, sizeOf
-
-
-
-
Method Detail
-
getAction
public String getAction()
Returns the short description of the sendto action. Description gets used for menu items.- Specified by:
getAction
in classAbstractSendToAction
- Returns:
- the short description
-
getIconName
public String getIconName()
Returns the file name of the icon.- Overrides:
getIconName
in classAbstractSendToAction
- Returns:
- the filename or null if no icon available
-
accepts
public Class[] accepts()
Returns the classes that the action accepts.- Specified by:
accepts
in classAbstractSendToAction
- Returns:
- the accepted classes
-
send
public String send(Object o)
Performs the actual sending/forwarding/processing of the data.
Code for printing java.awt.Component taken from here.- Specified by:
send
in classAbstractSendToAction
- Parameters:
o
- the object to send- Returns:
- null if everything OK, otherwise error message
-
-