Class ClipboardHandler
- java.lang.Object
-
- com.actelion.research.gui.clipboard.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
-
-
Constructor Summary
Constructors Constructor Description ClipboardHandler()
-
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 clipboardboolean
copyMolecule(StereoMolecule mol)
Copies a molecule to the clipboard in various formats: ENHMETAFILE with an embedded sketch MDLSK Sketch MDLCT MDL molfileboolean
copyMolecule(java.lang.String molfile)
boolean
copyReaction(Reaction r)
Copies a reaction to the clipboard in various formats: MDLSK Sketch MDLCT MDL molfileboolean
copyReaction(java.lang.String ctab)
Copies a reaction to the clipboard in various formats: CTAB with an embedded sketch MDLSK Sketch serializedstatic java.awt.Image
getImage()
Deprecated.Use ImageClipboardHandler.pasteImage for consistency reasonsjava.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 Clipboardstatic void
putImage(java.awt.Image image)
Deprecated.You may use ImageClipboardHandler.copyImage for consistency reasons
-
-
-
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 interfaceIClipboardHandler
- 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 interfaceIClipboardHandler
- Returns:
- Reaction or null if no reaction present
-
copyMolecule
public boolean copyMolecule(java.lang.String molfile)
- Specified by:
copyMolecule
in interfaceIClipboardHandler
-
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 interfaceIClipboardHandler
-
copyReaction
public boolean copyReaction(Reaction r)
Copies a reaction to the clipboard in various formats: MDLSK Sketch MDLCT MDL molfile- Specified by:
copyReaction
in interfaceIClipboardHandler
-
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 interfaceIClipboardHandler
-
copyImage
public boolean copyImage(java.awt.Image img)
Copies an Image to the clipboard- Specified by:
copyImage
in interfaceIClipboardHandler
- Parameters:
img
- Image to be copied- Returns:
- true on success
-
pasteImage
public java.awt.Image pasteImage()
- Specified by:
pasteImage
in interfaceIClipboardHandler
-
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
-
-