Class ClipBoardAccess

java.lang.Object
net.sf.colossus.util.ClipBoardAccess
All Implemented Interfaces:
ClipboardOwner

public final class ClipBoardAccess extends Object implements ClipboardOwner
Little helper class to copy some text (e.g. an error message or exception ;-) to the system's clipboard. Copied with some modifications from: http://www.javapractices.com/topic/TopicAction.do?Id=82
  • Constructor Details

    • ClipBoardAccess

      public ClipBoardAccess()
  • Method Details

    • main

      public static void main(String... aArguments)
    • lostOwnership

      public void lostOwnership(Clipboard aClipboard, Transferable aContents)
      Empty implementation of the ClipboardOwner interface.
      Specified by:
      lostOwnership in interface ClipboardOwner
    • setClipboardContents

      public void setClipboardContents(String text)
      Place a String on the clipboard, and make this class the owner of the Clipboard's contents.
    • getClipboardContents

      public String getClipboardContents()
      Get the String residing on the clipboard.
      Returns:
      any text found on the Clipboard; if none found, return an empty String.