|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.awt.Component java.awt.Container javax.swing.JComponent javax.swing.JPanel org.proteinshader.gui.components.controlpanel.RadioPanel
public class RadioPanel
Presents a common set of radio buttons and menus that are used by
other panels (color, visibility, and scale panels).
The RadioPanel can be set to be of Type.CARTOON or Type.ATOM, which
has more menu options. The RadioPanel object will hold on to a
ModifierVisitor so that it can accept DrawableModifier objects
(AtomModifier, BondModifier, and SegmentModifier) from other panels
(color, visibility, and scale panels).
Nested Class Summary | |
---|---|
static class |
RadioPanel.Type
There are two slightly different versions of the RadioPanel. |
Nested classes/interfaces inherited from class javax.swing.JPanel |
---|
JPanel.AccessibleJPanel |
Nested classes/interfaces inherited from class javax.swing.JComponent |
---|
JComponent.AccessibleJComponent |
Nested classes/interfaces inherited from class java.awt.Container |
---|
Container.AccessibleAWTContainer |
Nested classes/interfaces inherited from class java.awt.Component |
---|
Component.AccessibleAWTComponent, Component.BltBufferStrategy, Component.FlipBufferStrategy |
Field Summary |
---|
Fields inherited from class javax.swing.JComponent |
---|
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW |
Fields inherited from class java.awt.Component |
---|
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
Fields inherited from interface java.awt.image.ImageObserver |
---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
---|---|
RadioPanel(Mediator mediator,
Frame dialogOwner,
RadioPanel.Type type)
Constructs a RadioPanel. |
Method Summary | |
---|---|
RadioButtonEnum |
getActiveRadioButton()
Returns the RadioButtonEnum corresponding to the currently active radio button: SELECTED, HELICES, STRANDS, LOOPS, or GLOBAL. |
void |
modifyGlobal(AtomModifier atomModifier,
BondModifier bondModifier,
SegmentModifier segmentModifier)
Applies the DrawableModifiers to whatever item or items are currently selected in the "Global:" menu. |
void |
modifyHelices(AtomModifier atomModifier,
BondModifier bondModifier,
SegmentModifier segmentModifier)
Applies the DrawableModifiers to the Helix or Helices currently selected in the "Helices:" menu. |
void |
modifyLoops(AtomModifier atomModifier,
BondModifier bondModifier,
SegmentModifier segmentModifier)
Applies the DrawableModifiers to the Loop or Loops currently selected in the "Loops:" menu. |
void |
modifySelected(AtomModifier atomModifier,
BondModifier bondModifier,
SegmentModifier segmentModifier)
Applies the DrawableModifiers to whatever item or items are currently selected in the "Selected:" menu. |
void |
modifyStrands(AtomModifier atomModifier,
BondModifier bondModifier,
SegmentModifier segmentModifier)
Applies the DrawableModifiers to the BetaStrand or BetaStrands currently selected in the "Strands:" menu. |
void |
replaceLowerPanel(JPanel lowerPanel)
Replaces the lower panel of the RadioPanel. |
void |
setActiveRadioButton(JComboBox activeMenu)
This method is called by the menu action listener in order to update the active radio button. |
void |
setActiveRadioButton(RadioButtonEnum activeRadioButton)
Sets the RadioButtonEnum corresponding to the currently active radio button: SELECTED, HELICES, STRANDS, LOOPS, or GLOBAL. |
void |
setDefaultRadioButtonAndMenu()
Sets the default radio button and menu, which are currently the radio button labeled "Selected:" and the first menu item, which is "Model". |
void |
setSelectedMenu(String item)
Sets the "Selected:" menu to the item given as an argument. |
void |
updateModelInfo()
Updates the "Helices:", "BetaStrands:", and "Loops:" menus with the Helices and BetaStrands of the current Model. |
Methods inherited from class javax.swing.JPanel |
---|
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public RadioPanel(Mediator mediator, Frame dialogOwner, RadioPanel.Type type)
mediator
- the centralized Mediator that most listeners need
to call on to accomplish their task.dialogOwner
- the owner of any Dialogs opened from the
SelectorPanel (or null if there is no
requested owner).Method Detail |
---|
public void replaceLowerPanel(JPanel lowerPanel)
lowerPanel
- the new lower panel to display.public void modifySelected(AtomModifier atomModifier, BondModifier bondModifier, SegmentModifier segmentModifier)
atomModifier
- an AtomModifier programmed to modify
Atoms (or null for no modifications).bondModifier
- a BondModifier programmed to modify
Bonds (or null for no modifications).segmentModifier
- a SegmentModifier programmed to modify
Segments (or null for no modifications).public void modifyHelices(AtomModifier atomModifier, BondModifier bondModifier, SegmentModifier segmentModifier)
atomModifier
- an AtomModifier programmed to modify
Atoms (or null for no modifications).bondModifier
- a BondModifier programmed to modify
Bonds (or null for no modifications).segmentModifier
- a SegmentModifier programmed to modify
Segments (or null for no modifications).public void modifyStrands(AtomModifier atomModifier, BondModifier bondModifier, SegmentModifier segmentModifier)
atomModifier
- an AtomModifier programmed to modify
Atoms (or null for no modifications).bondModifier
- a BondModifier programmed to modify
Bonds (or null for no modifications).segmentModifier
- a SegmentModifier programmed to modify
Segments (or null for no modifications).public void modifyLoops(AtomModifier atomModifier, BondModifier bondModifier, SegmentModifier segmentModifier)
atomModifier
- an AtomModifier programmed to modify
Atoms (or null for no modifications).bondModifier
- a BondModifier programmed to modify
Bonds (or null for no modifications).segmentModifier
- a SegmentModifier programmed to modify
Segments (or null for no modifications).public void modifyGlobal(AtomModifier atomModifier, BondModifier bondModifier, SegmentModifier segmentModifier)
atomModifier
- an AtomModifier programmed to modify
Atoms (or null for no modifications).bondModifier
- a BondModifier programmed to modify
Bonds (or null for no modifications).segmentModifier
- a SegmentModifier programmed to modify
Segments (or null for no modifications).public RadioButtonEnum getActiveRadioButton()
public void setActiveRadioButton(RadioButtonEnum activeRadioButton)
activeRadioButton
- the active button type.public void setActiveRadioButton(JComboBox activeMenu)
activeMenu
- the active menu.public void setDefaultRadioButtonAndMenu()
public void setSelectedMenu(String item)
item
- the name of a menu choice.public void updateModelInfo()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |