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 booleancanPaste()Checks whether the required data type is available from the clipboard.voidcopy(BufferedImage data)Copies the data to the clipboard.ClassgetFlowClass()Returns the supported class.StringglobalInfo()Returns a string describing the object.BufferedImagepaste()Pastes the data from the clipboard.protected BufferedImageunwrap(Token data)Unwraps the actual data from the token.protected Tokenwrap(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:
globalInfoin interfaceGlobalInfoSupporter- Specified by:
globalInfoin classAbstractOptionHandler- Returns:
- a description suitable for displaying in the gui
-
getFlowClass
public Class getFlowClass()
Returns the supported class.- Specified by:
getFlowClassin classAbstractClipboardData<BufferedImage>- Returns:
- the supported class
-
copy
public void copy(BufferedImage data)
Copies the data to the clipboard.- Specified by:
copyin classAbstractClipboardData<BufferedImage>- Parameters:
data- the data to copy
-
unwrap
protected BufferedImage unwrap(Token data)
Unwraps the actual data from the token.- Specified by:
unwrapin 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:
canPastein 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:
wrapin 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:
pastein classAbstractClipboardData<BufferedImage>- Returns:
- the pasted data, null if failed to paste
-
-