Package adams.gui.clipboard
Class BufferedImage
-
- All Implemented Interfaces:
Destroyable
,GlobalInfoSupporter
,LoggingLevelHandler
,LoggingSupporter
,OptionHandler
,SizeOfHandler
,Serializable
public class BufferedImage extends AbstractClipboardData<BufferedImage>
Copies/pastes buffered images.- Version:
- $Revision$
- Author:
- fracpete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class adams.core.option.AbstractOptionHandler
m_OptionManager
-
Fields inherited from class adams.core.logging.LoggingObject
m_Logger, m_LoggingIsEnabled, m_LoggingLevel
-
-
Constructor Summary
Constructors Constructor Description BufferedImage()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
canPaste()
Checks whether the required data type is available from the clipboard.void
copy(BufferedImage data)
Copies the data to the clipboard.Class
getFlowClass()
Returns the supported class.String
globalInfo()
Returns a string describing the object.BufferedImage
paste()
Pastes the data from the clipboard.protected BufferedImage
unwrap(Token data)
Unwraps the actual data from the token.protected Token
wrap(BufferedImage data)
Wraps the data from the clipboard in a flow token.-
Methods inherited from class adams.gui.clipboard.AbstractClipboardData
copyFromToken, pasteAsToken
-
Methods inherited from class adams.core.option.AbstractOptionHandler
cleanUpOptions, defineOptions, destroy, finishInit, getDefaultLoggingLevel, getOptionManager, initialize, loggingLevelTipText, newOptionManager, reset, setLoggingLevel, toCommandLine, toString
-
Methods inherited from class adams.core.logging.LoggingObject
configureLogger, getLogger, getLoggingLevel, initializeLogging, isLoggingEnabled, sizeOf
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface adams.core.logging.LoggingLevelHandler
getLoggingLevel
-
-
-
-
Method Detail
-
globalInfo
public String globalInfo()
Returns a string describing the object.- Specified by:
globalInfo
in interfaceGlobalInfoSupporter
- Specified by:
globalInfo
in classAbstractOptionHandler
- Returns:
- a description suitable for displaying in the gui
-
getFlowClass
public Class getFlowClass()
Returns the supported class.- Specified by:
getFlowClass
in classAbstractClipboardData<BufferedImage>
- Returns:
- the supported class
-
copy
public void copy(BufferedImage data)
Copies the data to the clipboard.- Specified by:
copy
in classAbstractClipboardData<BufferedImage>
- Parameters:
data
- the data to copy
-
unwrap
protected BufferedImage unwrap(Token data)
Unwraps the actual data from the token.- Specified by:
unwrap
in classAbstractClipboardData<BufferedImage>
- Parameters:
data
- the token to unwrap- Returns:
- the actual data, null if can't handle
-
canPaste
public boolean canPaste()
Checks whether the required data type is available from the clipboard.- Specified by:
canPaste
in classAbstractClipboardData<BufferedImage>
- Returns:
- true if data is available
-
wrap
protected Token wrap(BufferedImage data)
Wraps the data from the clipboard in a flow token.- Specified by:
wrap
in classAbstractClipboardData<BufferedImage>
- Parameters:
data
- the image to wrap- Returns:
- the pasted data, null if failed to paste
-
paste
public BufferedImage paste()
Pastes the data from the clipboard.- Specified by:
paste
in classAbstractClipboardData<BufferedImage>
- Returns:
- the pasted data, null if failed to paste
-
-