|
||||||||||
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.SegmentModifier
public class SegmentModifier
This helper class for the ModifierVisitor knows how to accept a
Segment object and modify its attributes.
In addition to the regular methods for setting color on a Drawable
object, a Segment can have its color set based on the type of
AminoAcid it represents or the type of Region it belongs to.
Constructor Summary | |
---|---|
SegmentModifier()
Constructs an SegmentModifier. |
Method Summary | |
---|---|
void |
clear()
Clears the memory of what modifications have been requested. |
void |
modify(Segment segment)
Sets the patterns texture, halftoning texture, Segment color, or decoration type as requested by SegmentModifier methods, and then calls on modify() of the DrawableModifier superclass. |
void |
setBendTexture(int bendTexture)
Stores a memory that the Segment needs to have its OpenGL bend texture (an integer reference) set. |
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 |
setDecoration(DecorationEnum decoration)
Stores a memory that the decoration (PLAIN, WIREFRAME, TEXT_LABEL, or HALFTONING) needs to be set on the Segment. |
void |
setHalftoningTexture(int halftoningTexture)
Stores a memory that the Segment needs to have its OpenGL halftoning texture (an integer reference) set. |
void |
setPatternsTexture(int patternsTexture)
Stores a memory that the Segment needs to have its OpenGL patterns texture (an integer reference) set. |
void |
setRGBToDefault()
Stores a memory that the (red, green, blue) components of the RGBA color need to be set to their default. |
void |
setSideChainStyle(SideChainEnum sideChainStyle,
boolean displayAlphaCarbon)
Stores a memory that the side chain display needs to be set. |
void |
setToAminoAcidColor()
Stores a memory that the Segment should be set to the default color for the AminoAcid that it represents. |
void |
setToRegionColor()
Stores a memory that the Segment should be set to the default color for the Region 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 SegmentModifier()
Method Detail |
---|
public void setPatternsTexture(int patternsTexture)
patternsTexture
- the name (an integer) of an OpenGL texture
object stored on the graphics card.public void setHalftoningTexture(int halftoningTexture)
halftoningTexture
- the name (an integer) of an OpenGL
texture object stored on the graphics
card.public void setBendTexture(int bendTexture)
bendTexture
- the name (an integer) of an OpenGL texture
object stored on the graphics card.public void setToAminoAcidColor()
public void setToRegionColor()
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 setDecoration(DecorationEnum decoration)
decoration
- the decoration type as a DecorationEnum.public void setSideChainStyle(SideChainEnum sideChainStyle, boolean displayAlphaCarbon)
sideChainStyle
- SPACE_FILLING, BALLS_AND_STICKS, STICKS or NONE.displayAlphaCarbon
- determines if the alpha-carbon is shown.public void modify(Segment segment) throws ColorOutOfRangeException
segment
- the Segment 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 |