Package adams.gui.clipboard
Class String
-
- All Implemented Interfaces:
Destroyable
,GlobalInfoSupporter
,LoggingLevelHandler
,LoggingSupporter
,OptionHandler
,SizeOfHandler
,Serializable
public class String extends AbstractClipboardData<String>
Copies/pastes strings.- 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 String()
-
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(String data)
Copies the data to the clipboard.Class
getFlowClass()
Returns the supported class.String
globalInfo()
Returns a string describing the object.String
paste()
Pastes the data from the clipboard.protected String
unwrap(Token data)
Unwraps the actual data from the token.protected Token
wrap(String 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<String>
- Returns:
- the supported class
-
unwrap
protected String unwrap(Token data)
Unwraps the actual data from the token.- Specified by:
unwrap
in classAbstractClipboardData<String>
- Parameters:
data
- the token to unwrap- Returns:
- the actual data, null if can't handle
-
copy
public void copy(String data)
Copies the data to the clipboard.- Specified by:
copy
in classAbstractClipboardData<String>
- Parameters:
data
- the data to copy
-
canPaste
public boolean canPaste()
Checks whether the required data type is available from the clipboard.- Specified by:
canPaste
in classAbstractClipboardData<String>
- Returns:
- true if data is available
-
paste
public String paste()
Pastes the data from the clipboard.- Specified by:
paste
in classAbstractClipboardData<String>
- Returns:
- the pasted data, null if failed to paste
-
wrap
protected Token wrap(String data)
Wraps the data from the clipboard in a flow token.- Specified by:
wrap
in classAbstractClipboardData<String>
- Returns:
- the pasted data, null if failed to paste
-
-