|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.sdsc.mbt.viewables.StructureStyles
Stores and retrieves styles associated with viewable objects of a Structure (typically one StructureStyle object is assocated with each Structure by a StructureDocument class).
Note that the StructureStyles class only specifies the STYLES that should be used to draw visible representations of objects. It does NOT specify WHAT should be drawn or HOW it should be drawn (these choices are left up to each Viewer). Also, while the set of style attributes maintained by this and subsidiary classes can provide style information for ALL objects that COULD be displayed by a Viewer, it does NOT mean that a given view MUST display a representation of ALL objects. That is, this infrastructure simply provides viewable attributes in case a Viewer chooses to create a visible representation of certain data.
,
Serialized FormField Summary | |
static int |
ATTRIBUTE_QUALITY
|
static int |
ATTRIBUTE_RIBBON_VISIBILITY
|
static int |
ATTRIBUTE_SELECTION
|
static int |
ATTRIBUTE_STYLE
|
static int |
ATTRIBUTE_VISIBILITY
|
static int |
FLAG_ALL
|
static int |
FLAG_NONE
|
static int |
FLAG_SOME
|
static int |
PROPERTY_COLOR
|
static int |
PROPERTY_RADIUS
|
static int |
PROPERTY_RENDERING
|
static int |
PROPERTY_RIBBON_COLOR
|
static int |
PROPERTY_RIBBON_VISIBILITY
|
float |
ribbonDiameter
|
java.util.Vector |
selectedAtoms
|
java.util.Vector |
selectedResidues
|
Constructor Summary | |
StructureStyles(StructureMap structureMap)
Primary constructor. |
Method Summary | |
void |
addStructureComponent(StructureComponent structureComponent,
short inputStyle,
short inputQuality,
boolean batch)
|
void |
addStructureComponentEventListener(StructureComponentEventListener structureComponentEventListener)
|
void |
addStructureStylesEventListener(StructureStylesEventListener structureStylesEventListener)
Please complete the missing tags for main |
void |
addStyles(StructureStyles s)
This method imports styles from a different StructureStyles object |
void |
clearRibbon(Chain chain)
|
void |
deleteStructureComponent(StructureComponent structureComponent,
boolean fire,
boolean batch)
TODO temporarily use StructureStyles as a handler of component events. |
void |
fireGeometryChangeEvent(Residue r)
|
AtomColor |
getAtomColor(StructureComponent structureComponent)
|
java.util.HashMap |
getAtomColorStyleReference()
|
java.util.HashMap |
getAtomColorStyles()
|
AtomRadius |
getAtomRadius(StructureComponent structureComponent)
Set the style for the given structure component and then fire an event to all listeners. |
java.util.HashMap |
getAtomRadiusStyleReference()
|
java.util.HashMap |
getAtomRadiusStyles()
|
BondColor |
getBondColor(StructureComponent structureComponent)
|
java.util.HashMap |
getBondColorStyleReference()
|
java.util.HashMap |
getBondColorStyles()
|
BondRadius |
getBondRadius(StructureComponent structureComponent)
|
java.util.HashMap |
getBondRadiusStyleReference()
|
java.util.HashMap |
getBondRadiusStyles()
|
ResidueColor |
getResidueColor(StructureComponent structureComponent)
|
java.util.HashMap |
getResidueColorStyleReference()
|
java.util.HashMap |
getResidueColorStyles()
|
void |
getRibbonColor(Residue residue,
float[] color)
|
RibbonColor |
getRibbonColor(StructureComponent structureComponent)
|
java.util.HashMap |
getRibbonColorStyleReference()
|
java.util.HashMap |
getRibbonColorStyles()
|
float |
getRibbonDiameter(Chain chain)
|
float |
getRibbonQuality(Chain chain)
|
int |
getRibbonType(Chain chain)
|
java.util.Hashtable |
getSelection()
|
int |
getSelectionFlag()
|
StructureMap |
getStructureMap()
Return a reference to our StructureMap object. |
java.util.HashMap |
getStyleReference()
|
void |
hideAll(boolean batch)
Set the visibility state for the entire structure to false and then fire an event to all listeners. |
void |
invertSelection()
|
boolean |
isRibbonVisible(Chain chain)
|
boolean |
isSelected(StructureComponent structureComponent)
Get the selection state for the given structure component. |
void |
processStructureComponentEvent(StructureComponentEvent sce)
Please complete the missing tags for main |
void |
processStructureStylesEvent(StructureStylesEvent structureStylesEvent)
Informs all registered listeners that a style has changed. |
void |
registerStructureComponentRemoval(StructureComponent structureComponent)
|
void |
removeRibbonDiameter(Chain chain)
|
void |
removeRibbonQuality(Chain chain)
|
void |
removeRibbonType(Chain chain)
|
void |
removeStructureComponentEventListener(StructureComponentEventListener structureComponentEventListener)
|
void |
removeStructureStylesEventListener(StructureStylesEventListener structureStylesEventListener)
Please complete the missing tags for main |
void |
replaceStructureComponent(StructureComponent structureComponent,
java.lang.String replacement)
|
void |
selectAll()
Set the selection state for the entire structure to true and then fire an event to all listeners. |
void |
selectNone(boolean batch,
boolean aux)
Set the selection state for the entire structure to false and then fire an event to all listeners. |
void |
setAtomColor(StructureComponent structureComponent,
AtomColor atomColor,
boolean fire,
boolean batch)
|
void |
setAtomRadius(StructureComponent structureComponent,
AtomRadius atomRadius)
|
void |
setBondColor(StructureComponent structureComponent,
BondColor bondColor)
|
void |
setBondRadius(StructureComponent structureComponent,
BondRadius bondRadius)
|
void |
setRenderingStyle(java.util.Enumeration atoms,
short style,
short quality,
boolean batch,
boolean forceVisibility)
|
void |
setRenderingStyle(short style,
short quality)
Applies the requested rendering style to the entire structure |
void |
setRenderingStyle(StructureComponent structureComponent,
short style,
short quality,
boolean batch)
Set the style for the given structure component and then fire an event to all listeners. |
void |
setResidueColor(StructureComponent structureComponent,
ResidueColor residueColor,
boolean fire,
boolean batch)
Flag "batch" indicates that the event being fired from this method should contain this flag: the viewers will then refrain from repainting after every residue until further update notice |
void |
setRibbonColor(StructureComponent structureComponent,
ResidueColor residueColor,
boolean fire,
boolean batch)
|
void |
setRibbonColor(StructureComponent structureComponent,
RibbonColor ribbonColor,
boolean fire,
boolean batch)
|
void |
setRibbonDiameter(Chain chain,
float diameter)
|
void |
setRibbonQuality(Chain chain,
float q)
|
void |
setRibbonType(Chain chain,
int type)
|
void |
setRibbonVisible(Chain chain,
boolean visible,
boolean fire,
boolean batch)
|
void |
setSelected(StructureComponent structureComponent,
boolean newState,
boolean fire,
boolean batch)
Set the selection state for the given structure component and then fire an event to all listeners. |
void |
setSelectedChains(java.util.Vector chains)
|
void |
setStructureColor(ResidueColor residueColor,
AtomColor atomColor)
This method sets all bookkeeping values for colors for atoms and residues in the given structure and fires one structure-wide event to the viewers. |
void |
setVisible(StructureComponent structureComponent,
boolean newState,
boolean fire,
boolean batch)
Set the visibility state for the given structure component and then fire an event to all listeners. |
void |
showAll(boolean batch)
Set the visibility state for the entire structure to true and then fire an event to all listeners. |
void |
updateChain(Chain chain,
boolean fire)
This method determines whether the chain has any ribbon and whether its residues are selected. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int ATTRIBUTE_STYLE
public static final int ATTRIBUTE_VISIBILITY
public static final int ATTRIBUTE_RIBBON_VISIBILITY
public static final int ATTRIBUTE_SELECTION
public static final int ATTRIBUTE_QUALITY
public static final int PROPERTY_COLOR
public static final int PROPERTY_RADIUS
public static final int PROPERTY_RENDERING
public static final int PROPERTY_RIBBON_COLOR
public static final int PROPERTY_RIBBON_VISIBILITY
public static final int FLAG_NONE
public static final int FLAG_SOME
public static final int FLAG_ALL
public float ribbonDiameter
public java.util.Vector selectedAtoms
public java.util.Vector selectedResidues
Constructor Detail |
public StructureStyles(StructureMap structureMap)
Method Detail |
public StructureMap getStructureMap()
public void setRenderingStyle(StructureComponent structureComponent, short style, short quality, boolean batch)
public void setRenderingStyle(short style, short quality)
style
- public void setRenderingStyle(java.util.Enumeration atoms, short style, short quality, boolean batch, boolean forceVisibility)
public AtomRadius getAtomRadius(StructureComponent structureComponent)
public void setAtomRadius(StructureComponent structureComponent, AtomRadius atomRadius)
public BondRadius getBondRadius(StructureComponent structureComponent)
public void setBondRadius(StructureComponent structureComponent, BondRadius bondRadius)
public AtomColor getAtomColor(StructureComponent structureComponent)
public void setAtomColor(StructureComponent structureComponent, AtomColor atomColor, boolean fire, boolean batch)
public void setStructureColor(ResidueColor residueColor, AtomColor atomColor)
residueColor
- atomColor
- public BondColor getBondColor(StructureComponent structureComponent)
public void setBondColor(StructureComponent structureComponent, BondColor bondColor)
public ResidueColor getResidueColor(StructureComponent structureComponent)
public void setResidueColor(StructureComponent structureComponent, ResidueColor residueColor, boolean fire, boolean batch)
structureComponent
- residueColor
- fire
- public RibbonColor getRibbonColor(StructureComponent structureComponent)
public void setRibbonColor(StructureComponent structureComponent, RibbonColor ribbonColor, boolean fire, boolean batch)
public void setRibbonColor(StructureComponent structureComponent, ResidueColor residueColor, boolean fire, boolean batch)
public void getRibbonColor(Residue residue, float[] color) throws java.lang.IllegalArgumentException
java.lang.IllegalArgumentException
public void updateChain(Chain chain, boolean fire)
chain
- public void setVisible(StructureComponent structureComponent, boolean newState, boolean fire, boolean batch)
public void setRibbonVisible(Chain chain, boolean visible, boolean fire, boolean batch)
public boolean isRibbonVisible(Chain chain)
public int getRibbonType(Chain chain)
public void setRibbonType(Chain chain, int type)
public void removeRibbonType(Chain chain)
public float getRibbonDiameter(Chain chain)
public void setRibbonDiameter(Chain chain, float diameter)
public void removeRibbonDiameter(Chain chain)
public void clearRibbon(Chain chain)
public float getRibbonQuality(Chain chain)
public void setRibbonQuality(Chain chain, float q)
public void removeRibbonQuality(Chain chain)
public void showAll(boolean batch)
public void hideAll(boolean batch)
public void setSelected(StructureComponent structureComponent, boolean newState, boolean fire, boolean batch)
newState
- The new selection state for the object.
java.lang.NullPointerException
- if StructureComponent is null.public boolean isSelected(StructureComponent structureComponent)
public void selectAll()
public void selectNone(boolean batch, boolean aux)
public int getSelectionFlag()
public void processStructureStylesEvent(StructureStylesEvent structureStylesEvent)
public void addStructureStylesEventListener(StructureStylesEventListener structureStylesEventListener)
public void addStructureComponentEventListener(StructureComponentEventListener structureComponentEventListener)
public void removeStructureStylesEventListener(StructureStylesEventListener structureStylesEventListener)
public void removeStructureComponentEventListener(StructureComponentEventListener structureComponentEventListener)
public void registerStructureComponentRemoval(StructureComponent structureComponent)
public void deleteStructureComponent(StructureComponent structureComponent, boolean fire, boolean batch)
public void fireGeometryChangeEvent(Residue r)
public void replaceStructureComponent(StructureComponent structureComponent, java.lang.String replacement)
public void addStructureComponent(StructureComponent structureComponent, short inputStyle, short inputQuality, boolean batch)
public void processStructureComponentEvent(StructureComponentEvent sce)
processStructureComponentEvent
in interface StructureComponentEventListener
public void invertSelection()
public void addStyles(StructureStyles s)
public final java.util.HashMap getAtomColorStyleReference()
public final java.util.HashMap getAtomColorStyles()
public final java.util.HashMap getAtomRadiusStyleReference()
public final java.util.HashMap getAtomRadiusStyles()
public final java.util.HashMap getBondColorStyleReference()
public final java.util.HashMap getBondColorStyles()
public final java.util.HashMap getBondRadiusStyleReference()
public final java.util.HashMap getBondRadiusStyles()
public final java.util.HashMap getResidueColorStyleReference()
public final java.util.HashMap getResidueColorStyles()
public final java.util.HashMap getRibbonColorStyleReference()
public final java.util.HashMap getRibbonColorStyles()
public final java.util.Hashtable getSelection()
public final java.util.HashMap getStyleReference()
public void setSelectedChains(java.util.Vector chains)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |