public class RotationalDiagramControl extends java.lang.Object implements ModelListener, ISpectrumComputation
| Constructor and Description |
|---|
RotationalDiagramControl(RotationalDiagramModel aModel,
RotationalDiagramPanel aView)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addDisplayListener(RotationalDiagramDisplayListener listener)
|
void |
computeRotationalDiagram()
Compute the rotational diagram.
|
void |
dataChanged(ModelChangedEvent event) |
void |
display() |
void |
fireDisplayEvent(RotationalDiagramResult res)
Fire a display event.
|
RotationalDiagramModel |
getModel()
Return the model.
|
RotationalDiagramResult |
getResult()
Return the result.
|
RotationalDiagramPanel |
getView()
Return the view.
|
void |
invokeSpectrumComputation() |
void |
loadConfig()
Open a
JFileChooser to select a config file to open then open it. |
void |
loadConfig(java.io.File selectedFile)
Load a config file.
|
void |
loadLastConfig()
Open last config file if there is one.
|
void |
removeDisplayListener(RotationalDiagramDisplayListener listener)
Remove a
RotationalDiagramDisplayListener. |
void |
saveConfig()
Open a
JFileChooser to select a file for saving a config then
save it. |
void |
setModel(RotationalDiagramModel newRotationalDiagramModel)
Set a model.
|
public RotationalDiagramControl(RotationalDiagramModel aModel, RotationalDiagramPanel aView)
aModel - The model.aView - The view.public RotationalDiagramPanel getView()
public RotationalDiagramModel getModel()
public void loadConfig()
JFileChooser to select a config file to open then open it.public void loadLastConfig()
public void saveConfig()
JFileChooser to select a file for saving a config then
save it.public void loadConfig(java.io.File selectedFile)
selectedFile - The config File to open.public void setModel(RotationalDiagramModel newRotationalDiagramModel)
newRotationalDiagramModel - The new model to set.public void dataChanged(ModelChangedEvent event)
dataChanged in interface ModelListenerpublic void invokeSpectrumComputation()
invokeSpectrumComputation in interface ISpectrumComputationpublic void display()
display in interface ISpectrumComputationpublic void computeRotationalDiagram()
public void addDisplayListener(RotationalDiagramDisplayListener listener)
listener - The listener to add.public void removeDisplayListener(RotationalDiagramDisplayListener listener)
RotationalDiagramDisplayListener.listener - The listener to remove.public void fireDisplayEvent(RotationalDiagramResult res)
res - The result to display.public RotationalDiagramResult getResult()