org.jmol.shape
Class Object2d

java.lang.Object
  extended by org.jmol.shape.Object2d
Direct Known Subclasses:
Text

public abstract class Object2d
extends java.lang.Object


Field Summary
protected  boolean adjustForWindow
           
protected  int align
           
protected static int ALIGN_CENTER
           
static int ALIGN_LEFT
           
protected static int ALIGN_NONE
           
protected static int ALIGN_RIGHT
           
protected  short bgcolix
           
protected  float boxHeight
           
protected  float boxWidth
           
protected  float boxX
           
protected  float[] boxXY
           
protected  float boxY
           
protected  short colix
           
protected  JmolRendererInterface g3d
           
protected static java.lang.String[] hAlignNames
           
(package private)  boolean hidden
           
protected  boolean isLabelOrHover
           
(package private)  int modelIndex
           
protected  int movableX
           
protected  int movableXPercent
           
protected  int movableY
           
protected  int movableYPercent
           
protected  int movableZ
           
protected  int movableZPercent
           
protected  int offsetX
           
protected  int offsetY
           
protected  int pointer
           
static int POINTER_BACKGROUND
           
static int POINTER_NONE
           
static int POINTER_ON
           
protected  float scalePixelsPerMicron
           
protected  java.lang.String script
           
(package private)  java.lang.String target
           
 int valign
           
protected static int VALIGN_BOTTOM
           
protected static int VALIGN_MIDDLE
           
protected static int VALIGN_TOP
           
static int VALIGN_XY
           
static int VALIGN_XYZ
           
protected static java.lang.String[] vAlignNames
           
protected  Viewer viewer
           
(package private)  boolean visible
           
protected  int windowHeight
           
protected  int windowWidth
           
 javax.vecmath.Point3f xyz
           
protected  int z
           
protected  int zSlab
           
 
Constructor Summary
protected Object2d()
           
protected Object2d(Viewer viewer, Graphics3D g3d, java.lang.String target, short colix, int valign, int align, float scalePixelsPerMicron)
           
 
Method Summary
 boolean checkObjectClicked(int x, int y, java.util.BitSet bsVisible)
           
protected  void drawPointer(JmolRendererInterface g3d)
           
(package private) static java.lang.String getAlignment(int align)
           
static int getOffset(int xOffset, int yOffset)
           
(package private) static java.lang.String getPointer(int pointer)
           
(package private)  float getScalePixelsPerMicron()
           
 java.lang.String getScript()
           
(package private) static int getXOffset(int offset)
           
(package private) static int getYOffset(int offset)
           
protected abstract  void recalc()
           
 void setAdjustForWindow(boolean TF)
           
(package private)  boolean setAlignment(int align)
           
(package private)  boolean setAlignment(java.lang.String align)
           
(package private)  void setBgColix(java.lang.Object value)
           
(package private)  void setBgColix(short colix)
           
protected  void setBoxOffsetsInWindow(float margin, float vMargin, float vTop)
           
(package private)  void setColix(java.lang.Object value)
           
(package private)  void setColix(short colix)
           
(package private)  void setModel(int modelIndex)
           
 void setMovableX(int x)
           
 void setMovableXPercent(int x)
           
 void setMovableY(int y)
           
 void setMovableYPercent(int y)
           
 void setMovableZ(int z)
           
 void setMovableZPercent(int z)
           
(package private)  void setOffset(int offset)
           
(package private)  void setPointer(int pointer)
           
static boolean setProperty(java.lang.String propertyName, java.lang.Object value, Object2d currentObject)
           
 void setScalePixelsPerMicron(float scalePixelsPerMicron)
           
 void setScript(java.lang.String script)
           
(package private)  void setTranslucent(float level, boolean isBackground)
           
 void setVisibility(boolean TF)
           
protected  void setWindow(JmolRendererInterface g3d, float scalePixelsPerMicron)
           
(package private)  void setXY(int x, int y)
           
 void setXYZ(javax.vecmath.Point3f xyz)
           
 void setXYZs(int x, int y, int z, int zSlab)
           
(package private)  void setZs(int z, int zSlab)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

POINTER_NONE

public static final int POINTER_NONE
See Also:
Constant Field Values

POINTER_ON

public static final int POINTER_ON
See Also:
Constant Field Values

POINTER_BACKGROUND

public static final int POINTER_BACKGROUND
See Also:
Constant Field Values

hAlignNames

protected static final java.lang.String[] hAlignNames

ALIGN_NONE

protected static final int ALIGN_NONE
See Also:
Constant Field Values

ALIGN_LEFT

public static final int ALIGN_LEFT
See Also:
Constant Field Values

ALIGN_CENTER

protected static final int ALIGN_CENTER
See Also:
Constant Field Values

ALIGN_RIGHT

protected static final int ALIGN_RIGHT
See Also:
Constant Field Values

vAlignNames

protected static final java.lang.String[] vAlignNames

VALIGN_XY

public static final int VALIGN_XY
See Also:
Constant Field Values

VALIGN_TOP

protected static final int VALIGN_TOP
See Also:
Constant Field Values

VALIGN_BOTTOM

protected static final int VALIGN_BOTTOM
See Also:
Constant Field Values

VALIGN_MIDDLE

protected static final int VALIGN_MIDDLE
See Also:
Constant Field Values

VALIGN_XYZ

public static final int VALIGN_XYZ
See Also:
Constant Field Values

isLabelOrHover

protected boolean isLabelOrHover

viewer

protected Viewer viewer

g3d

protected JmolRendererInterface g3d

xyz

public javax.vecmath.Point3f xyz

target

java.lang.String target

script

protected java.lang.String script

colix

protected short colix

bgcolix

protected short bgcolix

pointer

protected int pointer

align

protected int align

valign

public int valign

movableX

protected int movableX

movableY

protected int movableY

movableZ

protected int movableZ

movableXPercent

protected int movableXPercent

movableYPercent

protected int movableYPercent

movableZPercent

protected int movableZPercent

offsetX

protected int offsetX

offsetY

protected int offsetY

z

protected int z

zSlab

protected int zSlab

windowWidth

protected int windowWidth

windowHeight

protected int windowHeight

adjustForWindow

protected boolean adjustForWindow

boxWidth

protected float boxWidth

boxHeight

protected float boxHeight

boxX

protected float boxX

boxY

protected float boxY

modelIndex

int modelIndex

visible

boolean visible

hidden

boolean hidden

boxXY

protected final float[] boxXY

scalePixelsPerMicron

protected float scalePixelsPerMicron
Constructor Detail

Object2d

protected Object2d()

Object2d

protected Object2d(Viewer viewer,
                   Graphics3D g3d,
                   java.lang.String target,
                   short colix,
                   int valign,
                   int align,
                   float scalePixelsPerMicron)
Method Detail

getScalePixelsPerMicron

float getScalePixelsPerMicron()

setScalePixelsPerMicron

public void setScalePixelsPerMicron(float scalePixelsPerMicron)

recalc

protected abstract void recalc()

setModel

void setModel(int modelIndex)

setVisibility

public void setVisibility(boolean TF)

setXYZ

public void setXYZ(javax.vecmath.Point3f xyz)

setAdjustForWindow

public void setAdjustForWindow(boolean TF)

setColix

void setColix(short colix)

setColix

void setColix(java.lang.Object value)

setTranslucent

void setTranslucent(float level,
                    boolean isBackground)

setBgColix

void setBgColix(short colix)

setBgColix

void setBgColix(java.lang.Object value)

setMovableX

public void setMovableX(int x)

setMovableY

public void setMovableY(int y)

setMovableZ

public void setMovableZ(int z)

setMovableXPercent

public void setMovableXPercent(int x)

setMovableYPercent

public void setMovableYPercent(int y)

setMovableZPercent

public void setMovableZPercent(int z)

setXY

void setXY(int x,
           int y)

setZs

void setZs(int z,
           int zSlab)

setXYZs

public void setXYZs(int x,
                    int y,
                    int z,
                    int zSlab)

setScript

public void setScript(java.lang.String script)

getScript

public java.lang.String getScript()

setOffset

void setOffset(int offset)

getXOffset

static int getXOffset(int offset)

getYOffset

static int getYOffset(int offset)

setAlignment

boolean setAlignment(java.lang.String align)

getAlignment

static java.lang.String getAlignment(int align)

setAlignment

boolean setAlignment(int align)

setPointer

void setPointer(int pointer)

getPointer

static java.lang.String getPointer(int pointer)

drawPointer

protected void drawPointer(JmolRendererInterface g3d)

setBoxOffsetsInWindow

protected void setBoxOffsetsInWindow(float margin,
                                     float vMargin,
                                     float vTop)

setWindow

protected void setWindow(JmolRendererInterface g3d,
                         float scalePixelsPerMicron)

checkObjectClicked

public boolean checkObjectClicked(int x,
                                  int y,
                                  java.util.BitSet bsVisible)

setProperty

public static boolean setProperty(java.lang.String propertyName,
                                  java.lang.Object value,
                                  Object2d currentObject)

getOffset

public static int getOffset(int xOffset,
                            int yOffset)