Class MoleculeViewSkin
- java.lang.Object
-
- com.actelion.research.jfx.gui.chem.MoleculeViewSkin
-
- All Implemented Interfaces:
IMoleculeView,javafx.scene.control.Skin<MoleculeView>
public class MoleculeViewSkin extends java.lang.Object implements javafx.scene.control.Skin<MoleculeView>, IMoleculeView
Project: User: rufenec Date: 10/12/11 Time: 4:10 PM
-
-
Field Summary
Fields Modifier and Type Field Description static javafx.scene.paint.ColorDEFAULT_BGstatic intDEFAULT_IMAGE_HEIGHTstatic intDEFAULT_IMAGE_WIDTH
-
Constructor Summary
Constructors Constructor Description MoleculeViewSkin(MoleculeView control)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddispose()voiddraw()javafx.scene.paint.ColorgetBackgroundColor()javafx.scene.paint.ColorgetBorderColor()javafx.scene.NodegetNode()MoleculeViewgetSkinnable()StereoMoleculegetValue()javafx.beans.property.StringPropertyidcodeProperty()protected voidregisterDragEvent()voidsetBackgroundColor(javafx.scene.paint.Color backgroundColor)voidsetBorderColor(javafx.scene.paint.Color borderColor)voidsetColors(javafx.scene.paint.Color foregroundColor, javafx.scene.paint.Color backgroundColor)Colors to be passed to Depictor.voidsetMolecule(StereoMolecule mol)voidsetOverruleColors(javafx.scene.paint.Color overruleForeground, javafx.scene.paint.Color overruleBackground)Colors to be passed to Depictor.voidsetValue(StereoMolecule value)javafx.beans.property.ObjectProperty<StereoMolecule>valueProperty()
-
-
-
Field Detail
-
DEFAULT_IMAGE_WIDTH
public static final int DEFAULT_IMAGE_WIDTH
- See Also:
- Constant Field Values
-
DEFAULT_IMAGE_HEIGHT
public static final int DEFAULT_IMAGE_HEIGHT
- See Also:
- Constant Field Values
-
DEFAULT_BG
public static final javafx.scene.paint.Color DEFAULT_BG
-
-
Constructor Detail
-
MoleculeViewSkin
public MoleculeViewSkin(MoleculeView control)
-
-
Method Detail
-
getSkinnable
public MoleculeView getSkinnable()
- Specified by:
getSkinnablein interfacejavafx.scene.control.Skin<MoleculeView>
-
getNode
public javafx.scene.Node getNode()
- Specified by:
getNodein interfacejavafx.scene.control.Skin<MoleculeView>
-
dispose
public void dispose()
- Specified by:
disposein interfacejavafx.scene.control.Skin<MoleculeView>
-
draw
public void draw()
-
setMolecule
public void setMolecule(StereoMolecule mol)
- Specified by:
setMoleculein interfaceIMoleculeView
-
getBorderColor
public javafx.scene.paint.Color getBorderColor()
-
setBorderColor
public void setBorderColor(javafx.scene.paint.Color borderColor)
-
valueProperty
public javafx.beans.property.ObjectProperty<StereoMolecule> valueProperty()
-
setValue
public final void setValue(StereoMolecule value)
-
getValue
public final StereoMolecule getValue()
-
registerDragEvent
protected void registerDragEvent()
-
idcodeProperty
public javafx.beans.property.StringProperty idcodeProperty()
-
getBackgroundColor
public javafx.scene.paint.Color getBackgroundColor()
-
setBackgroundColor
public void setBackgroundColor(javafx.scene.paint.Color backgroundColor)
-
setColors
public void setColors(javafx.scene.paint.Color foregroundColor, javafx.scene.paint.Color backgroundColor)Colors to be passed to Depictor. If the foreground is set, then all bonds and C- and H-atoms are drawn in the foreground color. All other atoms are drawn in the atomicNo specific color, which is adapted to have a minimum contrast on the given background.- Parameters:
foregroundColor- null to use black or white, whatever contrasts better with backgroundbackgroundColor-
-
setOverruleColors
public void setOverruleColors(javafx.scene.paint.Color overruleForeground, javafx.scene.paint.Color overruleBackground)Colors to be passed to Depictor. If the overrule foreground is set, then the entire molecule is drawn in this color. The overrule background color is used to construct a proper bond hilite color, if bond hiliting is used.- Parameters:
overruleForeground- null to use foreground defined by setColors() or automatic foregroundoverruleBackground-
-
-