Class PasteFromClipboard

  • All Implemented Interfaces:
    AdditionalInformationHandler, CleanUpHandler, Destroyable, GlobalInfoSupporter, LoggingLevelHandler, LoggingSupporter, OptionHandler, QuickInfoSupporter, ShallowCopySupporter<Actor>, SizeOfHandler, Stoppable, StoppableWithFeedback, VariablesInspectionHandler, VariableChangeListener, Actor, ErrorHandler, InteractiveActor, InteractiveActorWithCustomParentComponent, OutputProducer, StopModeSupporter, Serializable, Comparable

    public class PasteFromClipboard
    extends AbstractInteractiveSource
    Pops up a dialog, prompting the user to accept content from clipboard.

    Input/output:
    - generates:
       adams.gui.clipboard.String


    Valid options are:

    -D <int> (property: debugLevel)
        The greater the number the more additional info the scheme may output to 
        the console (0 = off).
        default: 0
        minimum: 0
     
    -name <java.lang.String> (property: name)
        The name of the actor.
        default: PasteFromClipboard
     
    -annotation <adams.core.base.BaseText> (property: annotations)
        The annotations to attach to this actor.
        default: 
     
    -skip (property: skip)
        If set to true, transformation is skipped and the input token is just forwarded 
        as it is.
     
    -stop-flow-on-error (property: stopFlowOnError)
        If set to true, the flow gets stopped in case this actor encounters an error;
         useful for critical actors.
     
    -stop-if-canceled (property: stopFlowIfCanceled)
        If enabled, the flow gets stopped in case the user cancels the dialog.
     
    -custom-stop-message <java.lang.String> (property: customStopMessage)
        The custom stop message to use in case a user cancelation stops the flow 
        (default is the full name of the actor)
        default: 
     
    -message <java.lang.String> (property: message)
        The message to prompt the user with.
        default: Click \'OK\' to obtain text from clipboard
     
    -clipboard-data <adams.gui.clipboard.AbstractClipboardData> (property: clipboardData)
        The class for pasting a specific type of data from the clipboard.
        default: adams.gui.clipboard.String
     
    Author:
    fracpete (fracpete at waikato dot ac dot nz)
    See Also:
    Serialized Form
    • Field Detail

      • m_Message

        protected String m_Message
        the message for the user.
      • m_OutputToken

        protected Token m_OutputToken
        the output token to broadcast.
    • Constructor Detail

      • PasteFromClipboard

        public PasteFromClipboard()
    • Method Detail

      • setMessage

        public void setMessage​(String value)
        Sets the message to prompt the user with.
        Parameters:
        value - the message
      • getMessage

        public String getMessage()
        Returns the message the user is prompted with.
        Returns:
        the message
      • messageTipText

        public String messageTipText()
        Returns the tip text for this property.
        Returns:
        tip text for this property suitable for displaying in the GUI or for listing the options.
      • setClipboardData

        public void setClipboardData​(AbstractClipboardData value)
        Sets the type of data to paste.
        Parameters:
        value - the data type
      • getClipboardData

        public AbstractClipboardData getClipboardData()
        Returns the type of data to paste.
        Returns:
        the data type
      • clipboardDataTipText

        public String clipboardDataTipText()
        Returns the tip text for this property.
        Returns:
        tip text for this property suitable for displaying in the GUI or for listing the options.
      • generates

        public Class[] generates()
        Returns the class of objects that it generates.
        Returns:
        adams.gui.clipboard.String.class
      • output

        public Token output()
        Returns the generated token.
        Returns:
        the generated token
      • hasPendingOutput

        public boolean hasPendingOutput()
        Checks whether there is pending output to be collected after executing the flow item.
        Returns:
        true if there is pending output