org.jmol.shape
Class Shape
java.lang.Object
org.jmol.shape.Shape
- Direct Known Subclasses:
- AtomShape, BioShapeCollection, Dipoles, FontLineShape, Measures, MeshCollection, Object2dShape, Sticks
public abstract class Shape
- extends java.lang.Object
After code reorganization of 11/2006 (BH) Shape now encompasses:
AtomShape
|
Balls, Dots, Halos, Labels, Polyhedra, Stars, Vectors
|
GeoSurface
Dipoles, Measures
FontLineShape
|
Axes, Bbcage, Frank, Uccage
MeshCollection
| |
Draw MeshFileCollection (adds parser code)
| |
Pmesh IsosurfaceMeshCollection (adds JVXL code)
|
Isosurface
|________ LcaoCartoon, MolecularOrbital
BioShapeCollection
|
Backbone, Cartoon, MeshRibbon, Ribbons, Rockets, Strands, Trace
Sticks
|
Hsticks, Sssticks
TextShape
|
Echo, Hover
Constructor Summary |
Shape()
|
Method Summary |
static void |
appendCmd(java.lang.StringBuffer s,
java.lang.String cmd)
|
void |
checkBoundsMinMax(javax.vecmath.Point3f pointMin,
javax.vecmath.Point3f pointMax)
|
javax.vecmath.Point3f |
checkObjectClicked(int x,
int y,
int modifiers,
java.util.BitSet bsVisible)
|
boolean |
checkObjectDragged(int prevX,
int prevY,
int x,
int y,
int modifiers,
java.util.BitSet bsVisible)
|
boolean |
checkObjectHovered(int x,
int y,
java.util.BitSet bsVisible)
|
(package private) java.lang.String |
encodeColor(short colix)
|
private java.lang.String |
encodeTransColor(byte pid,
short colix,
boolean translucentAllowed)
|
void |
findNearestAtomIndex(int xMouse,
int yMouse,
Atom[] closest)
|
static short |
getColix(short[] colixes,
int i,
Atom atom)
|
java.lang.String |
getColorCommand(java.lang.String type,
byte pid,
short colix)
|
java.lang.String |
getColorCommand(java.lang.String type,
short colix)
|
static java.lang.String |
getFontCommand(java.lang.String type,
Font3D font)
|
int |
getIndexFromName(java.lang.String thisID)
|
java.lang.Object |
getProperty(java.lang.String property,
int index)
|
static java.lang.String |
getShapeCommands(java.util.Hashtable htDefine,
java.util.Hashtable htMore,
int atomCount)
|
static java.lang.String |
getShapeCommands(java.util.Hashtable htDefine,
java.util.Hashtable htMore,
int count,
java.lang.String selectCmd)
|
java.util.Vector |
getShapeDetail()
|
java.lang.String |
getShapeState()
|
private static java.lang.String |
getTranslucentLabel(short colix)
|
Viewer |
getViewer()
|
void |
initializeShape(Viewer viewer,
Graphics3D g3d,
ModelSet modelSet,
int shapeID)
|
protected void |
initModelSet()
|
void |
initShape()
|
protected void |
remapColors()
|
protected short |
setColix(short colix,
byte paletteID,
Atom atom)
|
short |
setColix(short colix,
byte paletteID,
int atomIndex)
|
void |
setModelClickability()
|
void |
setModelSet(ModelSet modelSet)
|
void |
setProperty(java.lang.String propertyName,
java.lang.Object value,
java.util.BitSet bsSelected)
|
void |
setSize(int size,
java.util.BitSet bsSelected)
|
static void |
setStateInfo(java.util.Hashtable ht,
int i1,
int i2,
java.lang.String key)
|
static void |
setStateInfo(java.util.Hashtable ht,
int i,
java.lang.String key)
|
void |
setVisibilityFlags(java.util.BitSet bs)
|
boolean |
wasClicked(int x,
int y)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
viewer
public Viewer viewer
modelSet
public ModelSet modelSet
g3d
public Graphics3D g3d
shapeID
public int shapeID
myVisibilityFlag
public int myVisibilityFlag
translucentLevel
protected float translucentLevel
translucentAllowed
protected boolean translucentAllowed
isBioShape
public boolean isBioShape
Shape
public Shape()
getViewer
public Viewer getViewer()
initializeShape
public final void initializeShape(Viewer viewer,
Graphics3D g3d,
ModelSet modelSet,
int shapeID)
setModelSet
public void setModelSet(ModelSet modelSet)
initModelSet
protected void initModelSet()
initShape
public void initShape()
setSize
public void setSize(int size,
java.util.BitSet bsSelected)
setProperty
public void setProperty(java.lang.String propertyName,
java.lang.Object value,
java.util.BitSet bsSelected)
getProperty
public java.lang.Object getProperty(java.lang.String property,
int index)
getIndexFromName
public int getIndexFromName(java.lang.String thisID)
wasClicked
public boolean wasClicked(int x,
int y)
findNearestAtomIndex
public void findNearestAtomIndex(int xMouse,
int yMouse,
Atom[] closest)
checkBoundsMinMax
public void checkBoundsMinMax(javax.vecmath.Point3f pointMin,
javax.vecmath.Point3f pointMax)
setModelClickability
public void setModelClickability()
checkObjectClicked
public javax.vecmath.Point3f checkObjectClicked(int x,
int y,
int modifiers,
java.util.BitSet bsVisible)
checkObjectHovered
public boolean checkObjectHovered(int x,
int y,
java.util.BitSet bsVisible)
checkObjectDragged
public boolean checkObjectDragged(int prevX,
int prevY,
int x,
int y,
int modifiers,
java.util.BitSet bsVisible)
setColix
public short setColix(short colix,
byte paletteID,
int atomIndex)
setColix
protected short setColix(short colix,
byte paletteID,
Atom atom)
remapColors
protected void remapColors()
getShapeDetail
public java.util.Vector getShapeDetail()
getShapeState
public java.lang.String getShapeState()
setVisibilityFlags
public void setVisibilityFlags(java.util.BitSet bs)
setStateInfo
public static void setStateInfo(java.util.Hashtable ht,
int i,
java.lang.String key)
setStateInfo
public static void setStateInfo(java.util.Hashtable ht,
int i1,
int i2,
java.lang.String key)
getShapeCommands
public static java.lang.String getShapeCommands(java.util.Hashtable htDefine,
java.util.Hashtable htMore,
int atomCount)
getShapeCommands
public static java.lang.String getShapeCommands(java.util.Hashtable htDefine,
java.util.Hashtable htMore,
int count,
java.lang.String selectCmd)
appendCmd
public static void appendCmd(java.lang.StringBuffer s,
java.lang.String cmd)
getFontCommand
public static java.lang.String getFontCommand(java.lang.String type,
Font3D font)
getColorCommand
public java.lang.String getColorCommand(java.lang.String type,
short colix)
getColorCommand
public java.lang.String getColorCommand(java.lang.String type,
byte pid,
short colix)
encodeTransColor
private java.lang.String encodeTransColor(byte pid,
short colix,
boolean translucentAllowed)
encodeColor
java.lang.String encodeColor(short colix)
getTranslucentLabel
private static java.lang.String getTranslucentLabel(short colix)
getColix
public static short getColix(short[] colixes,
int i,
Atom atom)