|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectsnakeprogram3d.SnakeFrame
public class SnakeFrame
Main control panel, is divided into four regions, the Image/3D view region, a tabbed panel with controls, and a status region on the bottom. Image View: This panel 4 viewing modes, the image panel which displays a 2D slice of the image. The host_threed, which contains the ThreeDSnake class, the host_interact which contains the interactive viewer. One mode for each of these views and then a final mode that shows all 3 of them.
Constructor Summary | |
---|---|
SnakeFrame(SnakeModel model)
|
Method Summary | |
---|---|
javax.swing.JButton |
createActionButton(java.lang.String label,
java.lang.String cmd)
creates a button and adds it to the list of buttons |
void |
disableUI()
When an action is running this prevents any input. |
void |
enableImageDirections()
Allows moving the image planes. |
void |
enableUI()
enables ui. |
java.util.HashMap<java.lang.String,java.lang.Double> |
getConstants()
Returns the current constants that are set in the parameters pane. |
javax.swing.JFrame |
getFrame()
|
int |
getModelIndex()
The index of the selected view in the view selection menu. |
void |
imageLoaded(boolean t)
causes values to be updated if the image was loaded correctly. |
void |
initializeProgressBar()
sets the value to zero. |
void |
lightRepaint()
repaints the image panel |
void |
repaint()
repaints the JFrame. |
void |
resetConstants()
Refreshes the constants according to the values in the text fields, which also refreshes the model. |
void |
set3DPanel(java.awt.Component threedview)
The threed view is created afterwards, this set one of the variable panels to be the threed view. |
void |
setAlpha()
Trys to set the 'alpha' value. |
void |
setBeta()
Trys to set the 'beta' value. |
void |
setConstants(java.util.HashMap<java.lang.String,java.lang.Double> values)
loads the default values for a HashMap |
void |
setForegroundIntensity()
Trys to set the 'foreground' value. |
void |
setGamma()
Trys to set the 'gamma' value. |
void |
setGridLayout()
sets the 2x2 layout with all three views. |
void |
setInteractPanel(java.awt.Component threedview)
The interactive view is created afterwards, this set one of the variable panels to be the interactive view. |
void |
setNumberOfSnakesLabel(int x)
Updates the number of snakes label |
void |
setSingleLayout(java.awt.Component a)
places a single component in prominace. |
void |
setStretch()
Trys to set the 'stretch' value. |
void |
setView()
decides the componenet to be displayed then revalidates the main Frame |
void |
setWeight()
Trys to set the 'weight' value. |
void |
switchCards()
Changes the display type by incrementing to the next one |
void |
updateBackgroundText(java.lang.String s)
Sets the background text after it has been automatically determined. |
void |
updateForegroundText(java.lang.String s)
Sets the foreground text after it has been automatically determined. |
void |
updateImageTitle()
updates the title to show the name of the image. |
void |
updateProgressBar(int v)
Sets the value of the progress bar. |
void |
updateStackProgressionLabel(int f,
int frames,
int s,
int slices)
Updates the display of the current slice and frame. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SnakeFrame(SnakeModel model)
Method Detail |
---|
public void disableUI()
public javax.swing.JButton createActionButton(java.lang.String label, java.lang.String cmd)
label
- that shows up on the buttoncmd
- the String name of a SnakeActions enum constant
public void setStretch()
public void setForegroundIntensity()
public void setWeight()
public void setGamma()
public void setBeta()
public void setAlpha()
public void enableUI()
public void repaint()
public void lightRepaint()
public void setNumberOfSnakesLabel(int x)
x
- total number of snakes.public void updateStackProgressionLabel(int f, int frames, int s, int slices)
f
- current frame.frames
- total number of frames.s
- current slice.slices
- total number of slices.public void imageLoaded(boolean t)
t
- response for the SnakeImages whether it loaded successfully or not.public void updateImageTitle()
public javax.swing.JFrame getFrame()
public void updateForegroundText(java.lang.String s)
s
- the valuepublic void updateBackgroundText(java.lang.String s)
s
- the valuepublic void setConstants(java.util.HashMap<java.lang.String,java.lang.Double> values)
values
- string valuepublic void resetConstants()
public void updateProgressBar(int v)
v
- a number from 0 to 100public void initializeProgressBar()
public java.util.HashMap<java.lang.String,java.lang.Double> getConstants()
public void enableImageDirections()
public void set3DPanel(java.awt.Component threedview)
threedview
- component that will be used.public void setInteractPanel(java.awt.Component threedview)
threedview
- component that will be used.public void setGridLayout()
public void setSingleLayout(java.awt.Component a)
a
- the component displayed.public void switchCards()
public void setView()
public int getModelIndex()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |