|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Mediator
This interface specifies the methods for the single central mediator object that allows communication between objects of the gui, the data structure, and the renderer.
Method Summary | |
---|---|
void |
add(ControlPanel controlPanel)
Adds the address of the ControlPanel to the Mediator. |
void |
add(MainMenuBar mainMenuBar)
Adds the address of the MainMenuBar to the Mediator. |
void |
add(Renderer renderer)
Adds the address of the Renderer to the Mediator. |
void |
add(SpringLoadedJFrame controlFrame)
Adds the address of the control panel frame to the Mediator. |
void |
blendObjectEdges(boolean b)
Turns on or off the ability of the halftoning shaders to soften aliasing (jagged edges) by rendering translucent black silhouettes of tube and ribbon segments (and using jitter) before calling on the halftoning shaders. |
void |
cacheGeometricObject(GeometricListInfo info)
Caches a new geomtric object (sphere or cylinder) in the form of an OpenGL display list and redraws the canvas. |
void |
clickStartAnimation()
Calls on the startAnimation() method of the MotionPanel (equivalent to clicking the Start button on the MotionPanel). |
void |
clickStopAnimation()
Calls on the stopAnimation() method of the MotionPanel (equivalent to clicking the Stop button on the MotionPanel). |
void |
closeControlFrame()
Closes the spring-loaded frame holding the control panel. |
void |
displayErrorAndExit(String title,
String message)
Display an error message in a JOptionPane before exiting. |
void |
displayWarning(String title,
String message)
Display a warning message in a JOptionPane. |
Vector<Texture> |
getBendTextures()
Returns the list of Textures intended for highlighting segment bend regions when halftoning is being used. |
Atom[] |
getCurrentAtoms()
Returns the current Atoms. |
Chain |
getCurrentChain()
Returns the current Chain. |
Model |
getCurrentModel()
Returns the current Model. |
Residue[] |
getCurrentResidues()
Returns the current Residues. |
CylinderListInfo |
getCylinderInfo(StyleEnum style)
Returns the CylinderListInfo object that holds the information on an OpenGL display list for a cylinder that is currently used for drawing Bonds. |
Frame |
getFrame()
Returns the frame that should be used as a parent frame for Dialogs. |
String |
getGraphicsCardInfo()
Returns information on the graphics card that was gathered when the init() method of the Renderer was called. |
Vector<Texture> |
getHalftoningTextures()
Returns the list of Texture objects intended for halftoning. |
Vector<Texture> |
getPatternsTextures()
Returns the list of Texture objects intended for placing patterns on colored surfaces (rather than textures for halftoning). |
SphereListInfo |
getSphereInfo(StyleEnum style)
Returns the SphereListInfo object that holds the information on an OpenGL display list for a sphere that is currently used for drawing Atoms. |
Structure |
getStructure()
Returns the current Structure to display. |
StyleEnum |
getStyle()
Returns the current style (TUBES, RIBBONS, RIBBONS_AND_TUBES, FRENET_FRAMES, SPACE_FILLING, BALLS_AND_STICKS, or STICKS). |
void |
jitterScene(JitterEnum jitter)
Draws the scene multiple times to an accumulation buffer while jittering the xy-coordinates a fraction of a pixel. |
void |
openControlFrame()
Opens the spring-loaded frame holding the control panel. |
void |
readStructure(File file)
Reads in a new Structure to display. |
void |
redrawCanvas()
Redraws the canvas. |
void |
setAutoTiling(boolean autoTiling)
If automatic tiling is set to true, then the level of detail (tiling number) for a sphere or cylinder will be calculated based on the camera distance for each Atom or Bond, respectively. |
void |
setBackgroundColor(float red,
float green,
float blue)
Sets the background color for the canvas. |
void |
setCurrentAtoms(Atom[] atoms)
Sets the current Atoms. |
void |
setCurrentChain(Chain chain)
Sets the current Chain. |
void |
setCurrentModel(Model model)
Sets the current Model. |
void |
setCurrentResidues(Residue[] residues)
Sets the current Residues. |
void |
setExtraLines(boolean b)
Controls whether extra lines (at the beginning and end of each segment of a tube or ribbon) will be shown when the display is in cartoon mode. |
void |
setImageOrientation(OrientationEnum orientation)
Sets the image to the requested orientation (Front, Back, Left, etc.). |
void |
setImageScale(double scale)
Sets the scale factor for the image. |
void |
setRadioPanelSelectedMenu(String item)
Sets the "Selected:" menu in the RadioPanel (for both atom and cartoon modifier panels) of the ModiferPanel. |
void |
setStyle(StyleEnum style)
Sets the current style (TUBES, RIBBONS, RIBBONS_AND_TUBES, FRENET_FRAMES, SPACE_FILLING, BALLS_AND_STICKS, or STICKS). |
void |
showAminoAcids(boolean b)
Controls whether the Renderer will display AminoAcids. |
void |
showHeterogens(boolean b)
Controls whether the Renderer will display Heterogens. |
void |
showWaters(boolean b)
Controls whether the Renderer will display Waters. |
void |
startAnimation(double xAxisSpeed,
double yAxisSpeed)
Starts an animation that rotates the image about its x-axis and/or y-axis based on the speeds given as argument. |
void |
stopAnimation()
Stops the rotation that was started with the startAnimation() method. |
void |
takeScreenShot(ImageFormatEnum format,
File file)
Causes the Render to take a screen shot of the current canvas image and save it as a JPEG, PNG or GIF file. |
void |
updateFPSDisplay(double fps)
During a rotation animation the Renderer will call this method to update whatever GUI components display the current frames per second the animation is operating at. |
void |
updateRenderer()
Updates the arrays of visible objects (opaque and translucent Drawables) held by the Renderer and then has the canvas call display(). |
Method Detail |
---|
void add(SpringLoadedJFrame controlFrame)
void add(ControlPanel controlPanel)
void add(MainMenuBar mainMenuBar)
void add(Renderer renderer)
Structure getStructure()
void readStructure(File file)
file
- a PDB formatted file.void redrawCanvas()
Model getCurrentModel()
Chain getCurrentChain()
Residue[] getCurrentResidues()
Atom[] getCurrentAtoms()
StyleEnum getStyle()
Frame getFrame()
void cacheGeometricObject(GeometricListInfo info)
info
- describes the geometric object to cache.SphereListInfo getSphereInfo(StyleEnum style)
CylinderListInfo getCylinderInfo(StyleEnum style)
Vector<Texture> getPatternsTextures()
Vector<Texture> getHalftoningTextures()
Vector<Texture> getBendTextures()
void setCurrentModel(Model model)
model
- the current Model.void setCurrentChain(Chain chain)
chain
- the current Chain.void setCurrentResidues(Residue[] residues)
residues
- the current Residues.void setCurrentAtoms(Atom[] atoms)
atoms
- the current Atoms.void setStyle(StyleEnum style)
style
- the current style.void setImageOrientation(OrientationEnum orientation)
orientation
- the orientation to set the image to.void setAutoTiling(boolean autoTiling)
autoTiling
- boolean value for automatic tiling.void showAminoAcids(boolean b)
b
- a boolean value indicating if AminoAcids should be displayed.void showHeterogens(boolean b)
b
- a boolean value indicating if Heterogens should be displayed.void showWaters(boolean b)
b
- a boolean value indicating if Waters should be displayed.void setExtraLines(boolean b)
b
- a boolean value indicating if extra lines should be used.void openControlFrame()
void closeControlFrame()
void displayErrorAndExit(String title, String message)
title
- the title to place on the JOptionPane.message
- the error message to display.void displayWarning(String title, String message)
title
- the title to place on the JOptionPane.message
- the warning message to display.void updateRenderer()
void startAnimation(double xAxisSpeed, double yAxisSpeed)
xAxisSpeed
- the x-axis speed in degrees per second.yAxisSpeed
- the y-axis speed in degrees per second.void stopAnimation()
void clickStartAnimation()
void clickStopAnimation()
void updateFPSDisplay(double fps)
fps
- the frames per second for the animation.void setImageScale(double scale)
scale
- the scale factor as a double.void setBackgroundColor(float red, float green, float blue)
red
- the red component of the background color.green
- the green component of the background color.blue
- the blue component of the background color.void takeScreenShot(ImageFormatEnum format, File file)
format
- the screen shot image format.file
- the file to save the screen shot to.void setRadioPanelSelectedMenu(String item)
item
- the name of a menu choice.void blendObjectEdges(boolean b)
b
- boolean value to determine if object edges should be smoothed.void jitterScene(JitterEnum jitter)
jitter
- the JitterEnum object contains a list of xy-coordinate pairs.String getGraphicsCardInfo()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |