adams.gui.clipboard
Class BufferedImage

java.lang.Object
  extended by adams.core.ConsoleObject
      extended by adams.core.option.AbstractOptionHandler
          extended by adams.gui.clipboard.AbstractClipboardData<BufferedImage>
              extended by adams.gui.clipboard.BufferedImage
All Implemented Interfaces:
Debuggable, Destroyable, OptionHandler, SizeOfHandler, Serializable

public class BufferedImage
extends AbstractClipboardData<BufferedImage>

Copies/pastes buffered images.

Version:
$Revision: 5128 $
Author:
fracpete (fracpete at waikato dot ac dot nz)
See Also:
Serialized Form

Field Summary
 
Fields inherited from class adams.core.option.AbstractOptionHandler
m_DebugLevel, m_OptionManager
 
Constructor Summary
BufferedImage()
           
 
Method Summary
 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, debug, debug, debugLevelTipText, defineOptions, destroy, finishInit, getDebugLevel, getOptionManager, initialize, isDebugOn, newOptionManager, reset, setDebugLevel, toCommandLine, toString
 
Methods inherited from class adams.core.ConsoleObject
getDebugging, getSystemErr, getSystemOut, sizeOf
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

BufferedImage

public BufferedImage()
Method Detail

globalInfo

public String globalInfo()
Returns a string describing the object.

Specified by:
globalInfo in class AbstractOptionHandler
Returns:
a description suitable for displaying in the gui

getFlowClass

public Class getFlowClass()
Returns the supported class.

Specified by:
getFlowClass in class AbstractClipboardData<BufferedImage>
Returns:
the supported class

copy

public void copy(BufferedImage data)
Copies the data to the clipboard.

Specified by:
copy in class AbstractClipboardData<BufferedImage>
Parameters:
data - the data to copy

unwrap

protected BufferedImage unwrap(Token data)
Unwraps the actual data from the token.

Specified by:
unwrap in class AbstractClipboardData<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 class AbstractClipboardData<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 class AbstractClipboardData<BufferedImage>
Parameters:
-
Returns:
the pasted data, null if failed to paste

paste

public BufferedImage paste()
Pastes the data from the clipboard.

Specified by:
paste in class AbstractClipboardData<BufferedImage>
Returns:
the pasted data, null if failed to paste


Copyright © 2012 University of Waikato, Hamilton, NZ. All Rights Reserved.