Class ClipboardHandler

  • All Implemented Interfaces:
    IClipboardHandler

    public class ClipboardHandler
    extends java.lang.Object
    implements IClipboardHandler

    Title: Actelion Library

    Description: Actelion Java Library

    Copyright: Copyright (c) 2002-2003

    Company: Actelion Ltd

    Version:
    1.0
    Author:
    Thomas Sander, Christian Rufener
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods 
      Modifier and Type Method Description
      boolean copyImage​(java.awt.Image img)
      Copies an Image to the clipboard
      boolean copyMolecule​(StereoMolecule mol)
      Copies a molecule to the clipboard in various formats: ENHMETAFILE with an embedded sketch MDLSK Sketch MDLCT MDL molfile
      boolean copyMolecule​(java.lang.String molfile)  
      boolean copyReaction​(Reaction r)
      Copies a reaction to the clipboard in various formats: MDLSK Sketch MDLCT MDL molfile
      boolean copyReaction​(java.lang.String ctab)
      Copies a reaction to the clipboard in various formats: CTAB with an embedded sketch MDLSK Sketch serialized
      static java.awt.Image getImage()
      Deprecated.
      Use ImageClipboardHandler.pasteImage for consistency reasons
      java.awt.Image pasteImage()  
      StereoMolecule pasteMolecule()
      Get a Molecule from the Clipboard.
      StereoMolecule pasteMolecule​(boolean prefer2D)
      Get a Molecule from the Clipboard.
      Reaction pasteReaction()
      Get a Reaction from the Clipboard
      static void putImage​(java.awt.Image image)
      Deprecated.
      You may use ImageClipboardHandler.copyImage for consistency reasons
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ClipboardHandler

        public ClipboardHandler()
    • Method Detail

      • pasteMolecule

        public StereoMolecule pasteMolecule()
        Get a Molecule from the Clipboard. The supported formats are: MDLSK,MDLCT,MDL_MOL,CF_ENHMETAFILE with embedded sketch If the clipboard molecule has 3D coordinates, then new 2D-coords are invented and used instead.
        Specified by:
        pasteMolecule in interface IClipboardHandler
        Returns:
        Molecule found or null if no molecule present on the clipboard
      • pasteMolecule

        public StereoMolecule pasteMolecule​(boolean prefer2D)
        Get a Molecule from the Clipboard. The supported formats are: MDLSK,MDLCT,MDL_MOL,CF_ENHMETAFILE with embedded sketch
        Parameters:
        prefer2D - if true and if the clipboard molecule has 3D coordinates, then new 2D-coords are invented
        Returns:
        Molecule found or null if no molecule present on the clipboard
      • pasteReaction

        public Reaction pasteReaction()
        Get a Reaction from the Clipboard
        Specified by:
        pasteReaction in interface IClipboardHandler
        Returns:
        Reaction or null if no reaction present
      • copyMolecule

        public boolean copyMolecule​(StereoMolecule mol)
        Copies a molecule to the clipboard in various formats: ENHMETAFILE with an embedded sketch MDLSK Sketch MDLCT MDL molfile
        Specified by:
        copyMolecule in interface IClipboardHandler
      • copyReaction

        public boolean copyReaction​(Reaction r)
        Copies a reaction to the clipboard in various formats: MDLSK Sketch MDLCT MDL molfile
        Specified by:
        copyReaction in interface IClipboardHandler
      • copyReaction

        public boolean copyReaction​(java.lang.String ctab)
        Copies a reaction to the clipboard in various formats: CTAB with an embedded sketch MDLSK Sketch serialized
        Specified by:
        copyReaction in interface IClipboardHandler
      • copyImage

        public boolean copyImage​(java.awt.Image img)
        Copies an Image to the clipboard
        Specified by:
        copyImage in interface IClipboardHandler
        Parameters:
        img - Image to be copied
        Returns:
        true on success
      • getImage

        public static java.awt.Image getImage()
        Deprecated.
        Use ImageClipboardHandler.pasteImage for consistency reasons
      • putImage

        public static void putImage​(java.awt.Image image)
        Deprecated.
        You may use ImageClipboardHandler.copyImage for consistency reasons