|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.proteinshader.structure.visitor.modifiers.DrawableModifier
public class DrawableModifier
This helper class for the ModifierVisitor knows how to accept a
Drawable object and modify its attributes.
The setter methods defined below store a memory of what modifications
need to be made to the visibility status, RGBA color, and radius of
the Drawable object that will be modified later on when the
ModifierVisitor hands a Drawable object to the modify() method of
this DrawableModifier.
The clear() method erases all memory of what modifications to make.
| Constructor Summary | |
|---|---|
DrawableModifier()
Constructs a DrawableModifier |
|
| Method Summary | |
|---|---|
void |
clear()
Clears the memory of what modifications have been requested. |
void |
clearColorChangeMemory()
Clears any memory of color change that have been requested. |
void |
modify(Drawable d)
Modifies the visibility, RGBA color, and/or radius of the Drawable object given as an argument. |
void |
scaleRadius(double scaleFactor)
Stores a memory that the radius needs to be multiplied by the scale factor given as an argument. |
void |
setAlpha(float alpha)
Stores a memory that the alpha component of the RGBA color needs to be set to the value given as an argument. |
void |
setAlphaToDefault()
Stores a memory that the alpha value of the RGBA color 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 |
setColor(float red,
float green,
float blue,
float alpha)
Stores a memory that the (red, green, blue, alpha) components of the RGBA color all need to be set to the values given as arguments. |
void |
setRadius(double radius)
Stores a memory that the radius needs to be set to the value given as an argument. |
void |
setRadiusToDefault()
Stores a memory that the radius needs to be set to its default. |
void |
setRGBAToDefault()
Stores a memory that the (red, green, blue, alpha) components of the RGBA color all need to be set to their defaults. |
void |
setRGBToDefault()
Stores a memory that the (red, green, blue) components of the RGBA color need to be set to their default. |
void |
setSpecularExp(float specularExp)
Stores a memory that the specular exponent needs to be set to the value given as an argument. |
void |
setSpecularExpToDefault()
Stores a memory that the specular exponent needs to be set to its default. |
void |
setVisibility(VisibilityEnum visibility)
Stores a memory that the visibility status needs to be set to the value given as an argument. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DrawableModifier()
| Method Detail |
|---|
public void clear()
public void clearColorChangeMemory()
public void modify(Drawable d)
throws ColorOutOfRangeException
d - the Drawable to modify.
ColorOutOfRangeException - if a color value (red, green,
blue, alpha) is less than 0.0 or
greater than 1.0.public void setVisibility(VisibilityEnum visibility)
visibility - the visibility as an enum.
public void setColor(float red,
float green,
float blue,
float alpha)
throws ColorOutOfRangeException
red - component of the RGBA color.green - component of the RGBA color.blue - component of the RGBA color.alpha - component of the RGBA color.
ColorOutOfRangeException - if a color value is less than
0.0 or greater than 1.0.
public void setColor(float red,
float green,
float blue)
throws ColorOutOfRangeException
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 setAlpha(float alpha)
throws ColorOutOfRangeException
alpha - component of the RGBA color.
ColorOutOfRangeException - if alpha is less than 0.0 or
greater than 1.0.public void setRGBAToDefault()
public void setRGBToDefault()
public void setAlphaToDefault()
public void scaleRadius(double scaleFactor)
scaleFactor - the scale factor to multiply by.public void setRadius(double radius)
radius - the radius as a double.public void setRadiusToDefault()
public void setSpecularExp(float specularExp)
specularExp - the specular exponent as a float.public void setSpecularExpToDefault()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||