org.jmol.shape
public abstract class Shape extends Object
Modifier and Type | Field and Description |
---|---|
Graphics3D |
g3d |
boolean |
isBioShape |
ModelSet |
modelSet |
int |
myVisibilityFlag |
static float |
RADIUS_MAX |
int |
shapeID |
protected boolean |
translucentAllowed |
protected float |
translucentLevel |
Viewer |
viewer |
protected List<Object> |
xmlProperties |
Constructor and Description |
---|
Shape() |
Modifier and Type | Method and Description |
---|---|
static void |
appendCmd(StringBuffer s,
String cmd) |
void |
checkBoundsMinMax(Point3f pointMin,
Point3f pointMax) |
Map<String,Object> |
checkObjectClicked(int x,
int y,
int modifiers,
BitSet bsVisible) |
boolean |
checkObjectDragged(int prevX,
int prevY,
int x,
int y,
int modifiers,
BitSet bsVisible) |
boolean |
checkObjectHovered(int x,
int y,
BitSet bsVisible) |
protected int |
coordinateInRange(int x,
int y,
Point3f vertex,
int dmin2,
Point3i ptXY) |
protected static String |
encodeColor(short colix) |
private static String |
encodeTransColor(byte pid,
short colix,
boolean translucentAllowed) |
void |
findNearestAtomIndex(int xMouse,
int yMouse,
Atom[] closest,
BitSet bsNot) |
static short |
getColix(short[] colixes,
int i,
Atom atom) |
String |
getColorCommand(String type,
byte pid,
short colix) |
String |
getColorCommand(String type,
short colix) |
static String |
getFontCommand(String type,
Font3D font) |
int |
getIndexFromName(String thisID) |
Object |
getProperty(String property,
int index) |
boolean |
getProperty(String property,
Object[] data) |
static String |
getShapeCommands(Map<String,BitSet> htDefine,
Map<String,BitSet> htMore) |
static String |
getShapeCommands(Map<String,BitSet> htDefine,
Map<String,BitSet> htMore,
String selectCmd) |
List<Map<String,Object>> |
getShapeDetail() |
String |
getShapeState() |
int |
getSize(Group group) |
int |
getSize(int atomIndex) |
protected static String |
getTranslucentLabel(short colix) |
Viewer |
getViewer() |
void |
initializeShape(Viewer viewer,
Graphics3D g3d,
ModelSet modelSet,
int shapeID) |
protected void |
initModelSet() |
void |
initShape() |
void |
merge(Shape shape) |
protected short |
setColix(short colix,
byte paletteID,
Atom atom) |
short |
setColix(short colix,
byte paletteID,
int atomIndex) |
protected short |
setColix(short colix,
int pid,
Bond bond) |
void |
setModelClickability() |
void |
setModelSet(ModelSet modelSet) |
void |
setProperty(String propertyName,
Object value,
BitSet bsSelected)
may come from any source -- executed AFTER a shape's own setProperty method
|
void |
setShapeProperty(String propertyName,
Object value,
BitSet bsSelected)
specifically from modelSet.setShapeProperty, mostly from ScriptEvaluation,
but not always -- definitely not from "super.setProperty"
|
void |
setShapeSize(int size,
RadiusData rd,
BitSet bsSelected) |
protected void |
setSize(int size,
BitSet bsSelected) |
protected void |
setSize(RadiusData rd,
BitSet bsSelected) |
static void |
setStateInfo(Map<String,BitSet> ht,
int i1,
int i2,
String key) |
static void |
setStateInfo(Map<String,BitSet> ht,
int i,
String key) |
void |
setVisibilityFlags(BitSet bs) |
private boolean |
setXmlProperty(String propertyName,
Object value,
BitSet bs)
may NOT be over-ridden by shape; executed BEFORE shape's setProperty
|
boolean |
wasClicked(int x,
int y) |
public static final float RADIUS_MAX
public Viewer viewer
public ModelSet modelSet
public Graphics3D g3d
public int shapeID
public int myVisibilityFlag
protected float translucentLevel
protected boolean translucentAllowed
public boolean isBioShape
public Viewer getViewer()
public final void initializeShape(Viewer viewer, Graphics3D g3d, ModelSet modelSet, int shapeID)
public void setModelSet(ModelSet modelSet)
protected void initModelSet()
public void initShape()
public void merge(Shape shape)
shape
- public void setShapeSize(int size, RadiusData rd, BitSet bsSelected)
protected void setSize(int size, BitSet bsSelected)
size
- bsSelected
- protected void setSize(RadiusData rd, BitSet bsSelected)
rd
- bsSelected
- public void setShapeProperty(String propertyName, Object value, BitSet bsSelected)
propertyName
- value
- bsSelected
- private boolean setXmlProperty(String propertyName, Object value, BitSet bs)
propertyName
- value
- bs
- public void setProperty(String propertyName, Object value, BitSet bsSelected)
propertyName
- value
- bsSelected
- public boolean getProperty(String property, Object[] data)
property
- data
- public Object getProperty(String property, int index)
property
- index
- public int getIndexFromName(String thisID)
thisID
- public boolean wasClicked(int x, int y)
x
- y
- public void findNearestAtomIndex(int xMouse, int yMouse, Atom[] closest, BitSet bsNot)
xMouse
- yMouse
- closest
- bsNot
- public void checkBoundsMinMax(Point3f pointMin, Point3f pointMax)
pointMin
- pointMax
- public void setModelClickability()
public Map<String,Object> checkObjectClicked(int x, int y, int modifiers, BitSet bsVisible)
x
- y
- modifiers
- bsVisible
- public boolean checkObjectHovered(int x, int y, BitSet bsVisible)
x
- y
- bsVisible
- public boolean checkObjectDragged(int prevX, int prevY, int x, int y, int modifiers, BitSet bsVisible)
prevX
- prevY
- x
- y
- modifiers
- bsVisible
- protected int coordinateInRange(int x, int y, Point3f vertex, int dmin2, Point3i ptXY)
public short setColix(short colix, byte paletteID, int atomIndex)
protected short setColix(short colix, byte paletteID, Atom atom)
protected short setColix(short colix, int pid, Bond bond)
public String getShapeState()
public void setVisibilityFlags(BitSet bs)
bs
- public static String getShapeCommands(Map<String,BitSet> htDefine, Map<String,BitSet> htMore)
public static String getShapeCommands(Map<String,BitSet> htDefine, Map<String,BitSet> htMore, String selectCmd)
public static void appendCmd(StringBuffer s, String cmd)
private static String encodeTransColor(byte pid, short colix, boolean translucentAllowed)
protected static String encodeColor(short colix)
protected static String getTranslucentLabel(short colix)
public static short getColix(short[] colixes, int i, Atom atom)
public int getSize(int atomIndex)
atomIndex
- public int getSize(Group group)
group
-