|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.proteinshader.structure.visitor.modifiers.DrawableModifier org.proteinshader.structure.visitor.modifiers.AtomModifier
public class AtomModifier
This helper class for the ModifierVisitor knows how to accept an Atom
object and modify its attributes.
Currently, only the ball radius attribute (used for stick-and-ball
models) is specific to Atom: the rest of the modifications are common
to all Drawables.
Constructor Summary | |
---|---|
AtomModifier()
Constructs an AtomModifier. |
Method Summary | |
---|---|
void |
clear()
Clears the memory of what modifications have been requested. |
void |
modify(Atom atom)
Modifies the ball radius if requested, and then calls on modify() of the superclass, DrawableModifier, to apply any other requested modifications such as visibility, color, or radius for space-filling model. |
void |
scaleBallRadius(double ballScaleFactor)
Stores a memory that the ball radius (used in stick-and-ball models) needs to be multiplied by the scale factor given as an argument. |
void |
setBallRadius(double ballRadius)
Stores a memory that the ball radius needs to be set to the value given as an argument. |
void |
setBallRadiusToDefault()
Stores a memory that the ball radius needs to be set to its default. |
void |
setColor(float red,
float green,
float blue)
Stores a memory that the (red, green, blue) components of the RGBA color need to be set to the values given as arguments. |
void |
setRGBToDefault()
Stores a memory that the (red, green, blue) components of the RGBA color need to be set to their default. |
void |
setToAminoAcidColor()
Stores a memory that the Atom should be set to the default color for the AminoAcid that it belongs to. |
Methods inherited from class org.proteinshader.structure.visitor.modifiers.DrawableModifier |
---|
clearColorChangeMemory, modify, scaleRadius, setAlpha, setAlphaToDefault, setColor, setRadius, setRadiusToDefault, setRGBAToDefault, setSpecularExp, setSpecularExpToDefault, setVisibility |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AtomModifier()
Method Detail |
---|
public void setToAminoAcidColor()
public void setColor(float red, float green, float blue) throws ColorOutOfRangeException
setColor
in class DrawableModifier
red
- component of the RGBA color.green
- component of the RGBA color.blue
- component of the RGBA color.
ColorOutOfRangeException
- if a color value is less than
0.0 or greater than 1.0.public void setRGBToDefault()
setRGBToDefault
in class DrawableModifier
public void scaleBallRadius(double ballScaleFactor)
ballScaleFactor
- the ball scale factor to multiply by.public void setBallRadius(double ballRadius)
ballRadius
- the ball radius as a double.public void setBallRadiusToDefault()
public void modify(Atom atom) throws ColorOutOfRangeException
atom
- the Atom to modify.
ColorOutOfRangeException
- if a color value (red, green,
blue, alpha) is less than 0.0
or greater than 1.0.public void clear()
clear
in class DrawableModifier
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |