Main Page | Packages | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

ikayaki.gui.MainViewPanel Class Reference

Inheritance diagram for ikayaki.gui.MainViewPanel:

Inheritance graph
[legend]
Collaboration diagram for ikayaki.gui.MainViewPanel:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 MainViewPanel (Project project)
Squid getSquid ()
void setSquid (Squid squid)
Override Project getProject ()
Override void setProject (Project project)
Override void projectUpdated (ProjectEvent event)
void exitProgram ()
void loadProject (File file)
void createProject (File file, Project.Type type)
void exportProject (Project project, String type, File output)
MainMenuBar getMenuBar ()
MainStatusBar getStatusBar ()
MeasurementGraphsPanel getMeasurementGraphsPanel ()
MeasurementDetailsPanel getMeasurementDetailsPanel ()
MeasurementControlsPanel getMeasurementControlsPanel ()
MeasurementSequencePanel getMeasurementSequencePanel ()
ProjectInformationPanel getProjectInformationPanel ()
CalibrationPanel getCalibrationPanel ()
ProjectExplorerPanel getProjectExplorerPanel ()
Action getNewProjectAction ()
Action getOpenProjectAction ()
Action getExportProjectToDATAction ()
Action getExportProjectToTDTAction ()
Action getExportProjectToSRMAction ()
Action getPrintAction ()
Action getPrintPreviewAction ()
Action getExitAction ()
Action getProgramSettingsAction ()
Action getDeviceSettingsAction ()
Action getHelpAction ()
Action getAboutAction ()

Private Attributes

Squid squid
Project project = null
Project latestMeasuringProject = null
MainMenuBar menuBar
MainStatusBar statusBar
JSplitPane splitPane
ProjectExplorerPanel projectExplorerPanel
CalibrationPanel calibrationPanel
ProjectInformationPanel projectInformationPanel
MeasurementSequencePanel measurementSequencePanel
MeasurementControlsPanel measurementControlsPanel
MeasurementDetailsPanel measurementDetailsPanel
MeasurementGraphsPanel measurementGraphsPanel
Action newProjectAction
Action openProjectAction
Action exportProjectToDATAction
Action exportProjectToDTDAction
Action exportProjectToSRMAction
Action printAction
Action printPreviewAction
Action exitAction
Action programSettingsAction
Action deviceSettingsAction
Action helpAction
Action aboutAction

Static Private Attributes

static final int DIVIDER_DEFAULT_LOCATION = 300
static final int DIVIDER_SIZE = 5

Classes

class  NewProjectFileChooser

Detailed Description

Creates the main view panels (split panels) and Squid and Project components. It also tells everybody if the current project is changed.

Author:
Esko Luontola

Definition at line 47 of file MainViewPanel.java.


Constructor & Destructor Documentation

ikayaki.gui.MainViewPanel.MainViewPanel Project  project  ) 
 

Loads default view and creates all components and panels. Splitpanel between Calibration, Explorer, Information and rest.

Parameters:
project the project to be opened, or null to open the last known project.

Definition at line 101 of file MainViewPanel.java.

References ikayaki.gui.MainViewPanel.DIVIDER_DEFAULT_LOCATION, ikayaki.gui.MainViewPanel.DIVIDER_SIZE, ikayaki.gui.MainViewPanel.getCalibrationPanel(), ikayaki.gui.MainViewPanel.getMeasurementControlsPanel(), ikayaki.gui.MainViewPanel.getMeasurementDetailsPanel(), ikayaki.gui.MainViewPanel.getMeasurementGraphsPanel(), ikayaki.gui.MainViewPanel.getMeasurementSequencePanel(), ikayaki.gui.ProjectComponent.getParentFrame(), ikayaki.gui.MainViewPanel.getProjectExplorerPanel(), ikayaki.gui.MainViewPanel.getProjectInformationPanel(), ikayaki.squid.Squid.instance, ikayaki.squid.Squid.isOK(), ikayaki.Project.loadProject(), ikayaki.gui.null, ikayaki.gui.project, ikayaki.gui.MainViewPanel.setSquid(), ikayaki.gui.MainViewPanel.splitPane, and ikayaki.gui.MainViewPanel.squid.

Here is the call graph for this function:


Member Function Documentation

void ikayaki.gui.MainViewPanel.createProject File  file,
Project.Type  type
 

Creates a project file and tries to set it as the active project. Will show an error dialog if operation failed.

Parameters:
file the project file to be created.
type the type of the project.
Exceptions:
NullPointerException if file or type is null.

Definition at line 465 of file MainViewPanel.java.

References ikayaki.Project.createProject(), ikayaki.gui.null, and ikayaki.gui.project.

Here is the call graph for this function:

void ikayaki.gui.MainViewPanel.exitProgram  ) 
 

Tries to exit the program. Will do nothing if a measurement is running. Saves all settings and project files before exiting.

Definition at line 388 of file MainViewPanel.java.

References ikayaki.Project.getCachedProjects(), and ikayaki.gui.null.

Here is the call graph for this function:

void ikayaki.gui.MainViewPanel.exportProject Project  project,
String  type,
File  output
 

Opens a file chooser and exports the project to a different file format.

Parameters:
project the project to be exported.
type the type of file to export from the current project.
output the file to write to, or null to open a file chooser.
Exceptions:
NullPointerException if type or the current project is null.
IllegalArgumentException if type is not "dat", "tdt" or "srm".

Definition at line 488 of file MainViewPanel.java.

References ikayaki.Project.exportToDAT(), ikayaki.Project.exportToSRM(), ikayaki.Project.exportToTDT(), ikayaki.gui.null, and ikayaki.gui.project.

Here is the call graph for this function:

Action ikayaki.gui.MainViewPanel.getAboutAction  ) 
 

Definition at line 818 of file MainViewPanel.java.

References ikayaki.gui.null.

CalibrationPanel ikayaki.gui.MainViewPanel.getCalibrationPanel  ) 
 

Definition at line 603 of file MainViewPanel.java.

References ikayaki.gui.null.

Referenced by ikayaki.gui.MainViewPanel.MainViewPanel().

Action ikayaki.gui.MainViewPanel.getDeviceSettingsAction  ) 
 

Definition at line 768 of file MainViewPanel.java.

References ikayaki.gui.null.

Action ikayaki.gui.MainViewPanel.getExitAction  ) 
 

Definition at line 740 of file MainViewPanel.java.

References ikayaki.gui.null.

Referenced by ikayaki.gui.MainMenuBar.initialize().

Action ikayaki.gui.MainViewPanel.getExportProjectToDATAction  ) 
 

Definition at line 669 of file MainViewPanel.java.

References ikayaki.gui.null.

Referenced by ikayaki.gui.MainMenuBar.initialize().

Action ikayaki.gui.MainViewPanel.getExportProjectToSRMAction  ) 
 

Definition at line 695 of file MainViewPanel.java.

References ikayaki.gui.null.

Referenced by ikayaki.gui.MainMenuBar.initialize().

Action ikayaki.gui.MainViewPanel.getExportProjectToTDTAction  ) 
 

Definition at line 682 of file MainViewPanel.java.

References ikayaki.gui.null.

Referenced by ikayaki.gui.MainMenuBar.initialize().

Action ikayaki.gui.MainViewPanel.getHelpAction  ) 
 

Definition at line 782 of file MainViewPanel.java.

References ikayaki.gui.null.

MeasurementControlsPanel ikayaki.gui.MainViewPanel.getMeasurementControlsPanel  ) 
 

Definition at line 579 of file MainViewPanel.java.

References ikayaki.gui.null.

Referenced by ikayaki.gui.MainMenuBar.initialize(), and ikayaki.gui.MainViewPanel.MainViewPanel().

MeasurementDetailsPanel ikayaki.gui.MainViewPanel.getMeasurementDetailsPanel  ) 
 

Definition at line 571 of file MainViewPanel.java.

References ikayaki.gui.null.

Referenced by ikayaki.gui.MainViewPanel.MainViewPanel().

MeasurementGraphsPanel ikayaki.gui.MainViewPanel.getMeasurementGraphsPanel  ) 
 

Definition at line 563 of file MainViewPanel.java.

References ikayaki.gui.null.

Referenced by ikayaki.gui.MainViewPanel.MainViewPanel().

MeasurementSequencePanel ikayaki.gui.MainViewPanel.getMeasurementSequencePanel  ) 
 

Definition at line 587 of file MainViewPanel.java.

References ikayaki.gui.null.

Referenced by ikayaki.gui.MainViewPanel.MainViewPanel().

MainMenuBar ikayaki.gui.MainViewPanel.getMenuBar  ) 
 

Definition at line 549 of file MainViewPanel.java.

References ikayaki.gui.null.

Referenced by ikayaki.Ikayaki.Ikayaki().

Action ikayaki.gui.MainViewPanel.getNewProjectAction  ) 
 

Definition at line 621 of file MainViewPanel.java.

References ikayaki.gui.MainViewPanel.NewProjectFileChooser.getProjectType(), and ikayaki.gui.null.

Referenced by ikayaki.gui.MainMenuBar.initialize().

Here is the call graph for this function:

Action ikayaki.gui.MainViewPanel.getOpenProjectAction  ) 
 

Definition at line 648 of file MainViewPanel.java.

References ikayaki.gui.null.

Referenced by ikayaki.gui.MainMenuBar.initialize().

Action ikayaki.gui.MainViewPanel.getPrintAction  ) 
 

Definition at line 709 of file MainViewPanel.java.

References ikayaki.gui.null.

Referenced by ikayaki.gui.MainMenuBar.initialize().

Action ikayaki.gui.MainViewPanel.getPrintPreviewAction  ) 
 

Definition at line 726 of file MainViewPanel.java.

References ikayaki.gui.null.

Referenced by ikayaki.gui.MainMenuBar.initialize().

Action ikayaki.gui.MainViewPanel.getProgramSettingsAction  ) 
 

Definition at line 754 of file MainViewPanel.java.

References ikayaki.gui.null.

Override Project ikayaki.gui.MainViewPanel.getProject  ) 
 

Returns the active project, or null if no project is active.

Reimplemented from ikayaki.gui.ProjectComponent.

Definition at line 282 of file MainViewPanel.java.

References ikayaki.gui.project.

ProjectExplorerPanel ikayaki.gui.MainViewPanel.getProjectExplorerPanel  ) 
 

Definition at line 611 of file MainViewPanel.java.

References ikayaki.gui.null, and ikayaki.gui.project.

Referenced by ikayaki.gui.MainViewPanel.MainViewPanel().

ProjectInformationPanel ikayaki.gui.MainViewPanel.getProjectInformationPanel  ) 
 

Definition at line 595 of file MainViewPanel.java.

References ikayaki.gui.null.

Referenced by ikayaki.gui.MainViewPanel.MainViewPanel().

Squid ikayaki.gui.MainViewPanel.getSquid  ) 
 

Returns the Squid instance used for communicating with the hardware, or null if the connection has not yet been fully initialized.

Definition at line 256 of file MainViewPanel.java.

MainStatusBar ikayaki.gui.MainViewPanel.getStatusBar  ) 
 

Definition at line 556 of file MainViewPanel.java.

References ikayaki.gui.null.

void ikayaki.gui.MainViewPanel.loadProject File  file  ) 
 

Loads a project file and tries to set it as the active project. Will show an error dialog if operation failed.

Parameters:
file the project file to be loaded.
Exceptions:
NullPointerException if file is null.

Definition at line 444 of file MainViewPanel.java.

References ikayaki.Project.loadProject(), ikayaki.gui.null, and ikayaki.gui.project.

Here is the call graph for this function:

Override void ikayaki.gui.MainViewPanel.projectUpdated ProjectEvent  event  ) 
 

Keeps track of which project has a measurement running.

Reimplemented from ikayaki.gui.ProjectComponent.

Definition at line 362 of file MainViewPanel.java.

References ikayaki.ProjectEvent.getProject(), ikayaki.Project.getState(), ikayaki.ProjectEvent.getType(), ikayaki.Project.IDLE, ikayaki.gui.null, ikayaki.gui.project, and ikayaki.ProjectEvent.STATE_CHANGED.

Here is the call graph for this function:

Override void ikayaki.gui.MainViewPanel.setProject Project  project  ) 
 

Loads a new project to all GUI components. This method will be called by the Project Explorer and Calibration panels. It is possible to reopen the same project, in which case all GUI components will as well be updated.

Parameters:
project the project to be opened, or null to close the previous one.

Reimplemented from ikayaki.gui.ProjectComponent.

Definition at line 292 of file MainViewPanel.java.

References ikayaki.Project.addProjectListener(), ikayaki.Project.getFile(), ikayaki.Project.getName(), ikayaki.Project.getType(), ikayaki.gui.null, ikayaki.gui.project, and ikayaki.Project.setSquid().

Here is the call graph for this function:

void ikayaki.gui.MainViewPanel.setSquid Squid  squid  ) 
 

Sets the fully initialized Squid interface for the use of the program. Sets the active project the owner of the squid by re-setting the active project.

Parameters:
squid an instance of the Squid.
Exceptions:
NullPointerException if squid is null.
IllegalStateException if the squid has already been set.

Definition at line 268 of file MainViewPanel.java.

References ikayaki.gui.null.

Referenced by ikayaki.gui.MainViewPanel.MainViewPanel().


Member Data Documentation

Action ikayaki.gui.MainViewPanel.aboutAction [private]
 

Definition at line 93 of file MainViewPanel.java.

CalibrationPanel ikayaki.gui.MainViewPanel.calibrationPanel [private]
 

Definition at line 73 of file MainViewPanel.java.

Action ikayaki.gui.MainViewPanel.deviceSettingsAction [private]
 

Definition at line 91 of file MainViewPanel.java.

final int ikayaki.gui.MainViewPanel.DIVIDER_DEFAULT_LOCATION = 300 [static, private]
 

Definition at line 49 of file MainViewPanel.java.

Referenced by ikayaki.gui.MainViewPanel.MainViewPanel().

final int ikayaki.gui.MainViewPanel.DIVIDER_SIZE = 5 [static, private]
 

Definition at line 50 of file MainViewPanel.java.

Referenced by ikayaki.gui.MainViewPanel.MainViewPanel().

Action ikayaki.gui.MainViewPanel.exitAction [private]
 

Definition at line 89 of file MainViewPanel.java.

Action ikayaki.gui.MainViewPanel.exportProjectToDATAction [private]
 

Definition at line 84 of file MainViewPanel.java.

Action ikayaki.gui.MainViewPanel.exportProjectToDTDAction [private]
 

Definition at line 85 of file MainViewPanel.java.

Action ikayaki.gui.MainViewPanel.exportProjectToSRMAction [private]
 

Definition at line 86 of file MainViewPanel.java.

Action ikayaki.gui.MainViewPanel.helpAction [private]
 

Definition at line 92 of file MainViewPanel.java.

Project ikayaki.gui.MainViewPanel.latestMeasuringProject = null [private]
 

Project which has had the latest measurement, or null if no measurements have been made..

Definition at line 65 of file MainViewPanel.java.

MeasurementControlsPanel ikayaki.gui.MainViewPanel.measurementControlsPanel [private]
 

Definition at line 77 of file MainViewPanel.java.

MeasurementDetailsPanel ikayaki.gui.MainViewPanel.measurementDetailsPanel [private]
 

Definition at line 78 of file MainViewPanel.java.

MeasurementGraphsPanel ikayaki.gui.MainViewPanel.measurementGraphsPanel [private]
 

Definition at line 79 of file MainViewPanel.java.

MeasurementSequencePanel ikayaki.gui.MainViewPanel.measurementSequencePanel [private]
 

Definition at line 76 of file MainViewPanel.java.

MainMenuBar ikayaki.gui.MainViewPanel.menuBar [private]
 

Definition at line 68 of file MainViewPanel.java.

Action ikayaki.gui.MainViewPanel.newProjectAction [private]
 

Definition at line 82 of file MainViewPanel.java.

Action ikayaki.gui.MainViewPanel.openProjectAction [private]
 

Definition at line 83 of file MainViewPanel.java.

Action ikayaki.gui.MainViewPanel.printAction [private]
 

Definition at line 87 of file MainViewPanel.java.

Action ikayaki.gui.MainViewPanel.printPreviewAction [private]
 

Definition at line 88 of file MainViewPanel.java.

Action ikayaki.gui.MainViewPanel.programSettingsAction [private]
 

Definition at line 90 of file MainViewPanel.java.

Project ikayaki.gui.MainViewPanel.project = null [private]
 

Currently opened project, or null of no project is open.

Reimplemented from ikayaki.gui.ProjectComponent.

Definition at line 60 of file MainViewPanel.java.

ProjectExplorerPanel ikayaki.gui.MainViewPanel.projectExplorerPanel [private]
 

Definition at line 72 of file MainViewPanel.java.

ProjectInformationPanel ikayaki.gui.MainViewPanel.projectInformationPanel [private]
 

Definition at line 75 of file MainViewPanel.java.

JSplitPane ikayaki.gui.MainViewPanel.splitPane [private]
 

Definition at line 71 of file MainViewPanel.java.

Referenced by ikayaki.gui.MainViewPanel.MainViewPanel().

Squid ikayaki.gui.MainViewPanel.squid [private]
 

Front-end for controlling the SQUID. Only one project at a time may have access to the SQUID.

Definition at line 55 of file MainViewPanel.java.

Referenced by ikayaki.gui.MainViewPanel.MainViewPanel().

MainStatusBar ikayaki.gui.MainViewPanel.statusBar [private]
 

Definition at line 69 of file MainViewPanel.java.


The documentation for this class was generated from the following file:
Generated on Fri May 6 16:00:58 2005 for Squid by  doxygen 1.4.1