PamView
Class PamObjectViewer
java.lang.Object
PamView.PamObjectViewer
- All Implemented Interfaces:
- java.awt.event.ComponentListener, java.util.EventListener, PamSettings, PamViewInterface
public class PamObjectViewer
- extends java.lang.Object
- implements PamViewInterface, java.awt.event.ComponentListener, PamSettings
Make a diagram of the overall PAM process layout. A bit like UML !
Contains menus to add modules, remove them, rename them, etc.
- Author:
- Doug Gillespie
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
singleInstance
static PamObjectViewer singleInstance
objectFrame
PamObjectViewer.ObjectFrame objectFrame
layoutPanel
PamObjectViewer.LayoutPanel layoutPanel
processList
java.util.ArrayList<PamObjectViewer.PamProcessView> processList
controllerList
java.util.ArrayList<PamObjectViewer.PamControllerView> controllerList
closeButton
javax.swing.JButton closeButton
popupListener
PamObjectViewer.PopupListener popupListener
printMenuItem
javax.swing.JMenuItem printMenuItem
layoutMenuItem
javax.swing.JMenuItem layoutMenuItem
doneLayout
boolean doneLayout
scrollPanel
javax.swing.JScrollPane scrollPanel
mainPanel
javax.swing.JPanel mainPanel
pamObjectViewerSettings
PamObjectViewerSettings pamObjectViewerSettings
viewByController
javax.swing.JCheckBoxMenuItem viewByController
viewByProcess
javax.swing.JCheckBoxMenuItem viewByProcess
showProcesslessModules
javax.swing.JCheckBoxMenuItem showProcesslessModules
showProcesslessObservers
javax.swing.JCheckBoxMenuItem showProcesslessObservers
columnGap
final int columnGap
- See Also:
- Constant Field Values
yStart
final int yStart
- See Also:
- Constant Field Values
xStart
final int xStart
- See Also:
- Constant Field Values
yGap
final int yGap
- See Also:
- Constant Field Values
PamObjectViewer
private PamObjectViewer()
getObjectViewer
public static PamObjectViewer getObjectViewer()
Show
public static void Show()
MakeDiagram
void MakeDiagram()
makeControllerDiagram
private void makeControllerDiagram()
layoutControllerDiagram
private void layoutControllerDiagram()
makeProcessDiagram
private void makeProcessDiagram()
checkProcessDiagram
private void checkProcessDiagram()
layoutProcessDiagram
private void layoutProcessDiagram()
- Automaticaly arranges the Model view on the page
checkLayoutSize
void checkLayoutSize()
clearDiagram
void clearDiagram()
setTitle
public void setTitle(java.lang.String title)
- Specified by:
setTitle in interface PamViewInterface
layoutDiagram
private void layoutDiagram()
findComponentRightPos
java.awt.Point findComponentRightPos(java.lang.Object dataSource)
findComponentLeftPos
java.awt.Point findComponentLeftPos(java.lang.Object dataSource)
getViewGroupLeftPos
java.awt.Point getViewGroupLeftPos(PamObjectViewer.ViewGroupInfo vgi)
getViewGroupRightPos
java.awt.Point getViewGroupRightPos(PamObjectViewer.ViewGroupInfo vgi)
findViewGroupInfo
PamObjectViewer.ViewGroupInfo findViewGroupInfo(java.lang.Object dataSource)
findControllerView
PamObjectViewer.PamControllerView findControllerView(PamControlledUnit pamControlledUnit)
CheckProcessesViews
void CheckProcessesViews()
getProcessColour
java.awt.Color getProcessColour(PamProcess pamProcess)
getDataBlockColour
java.awt.Color getDataBlockColour(PamProcess pamProcess,
PamDataBlock pamDataBlock)
addComponent
void addComponent(javax.swing.JPanel panel,
java.awt.Component p,
java.awt.GridBagConstraints constraints)
componentHidden
public void componentHidden(java.awt.event.ComponentEvent e)
- Specified by:
componentHidden in interface java.awt.event.ComponentListener
componentMoved
public void componentMoved(java.awt.event.ComponentEvent e)
- Specified by:
componentMoved in interface java.awt.event.ComponentListener
componentResized
public void componentResized(java.awt.event.ComponentEvent e)
- Specified by:
componentResized in interface java.awt.event.ComponentListener
componentShown
public void componentShown(java.awt.event.ComponentEvent e)
- Specified by:
componentShown in interface java.awt.event.ComponentListener
getObjectViewerMenu
javax.swing.JPopupMenu getObjectViewerMenu()
modelChanged
public void modelChanged(int changeType)
- Specified by:
modelChanged in interface PamViewInterface
pamEnded
public void pamEnded()
- Specified by:
pamEnded in interface PamViewInterface
pamStarted
public void pamStarted()
- Specified by:
pamStarted in interface PamViewInterface
getSettingsReference
public java.io.Serializable getSettingsReference()
- Specified by:
getSettingsReference in interface PamSettings
- Returns:
- The serialisable object that will be stored
getSettingsVersion
public long getSettingsVersion()
- Specified by:
getSettingsVersion in interface PamSettings
- Returns:
- An integer version number for the settings
getUnitName
public java.lang.String getUnitName()
- Specified by:
getUnitName in interface PamSettings
- Returns:
- A Name specific to this instance of the particular class, e.g.
Sperm whale detector, Beaked whale detector, etc.
getUnitType
public java.lang.String getUnitType()
- Specified by:
getUnitType in interface PamSettings
- Returns:
- A Name specific to the type, e.g. Glick detector
restoreSettings
public boolean restoreSettings(PamControlledUnitSettings pamControlledUnitSettings)
- Specified by:
restoreSettings in interface PamSettings
- Returns:
- true if successful The object performs final checks (if needed)
and then casts the settings data
pamcontrolledunitSettings.settings into the correct type and uses
as required
addControlledUnit
public void addControlledUnit(PamControlledUnit unit)
- Specified by:
addControlledUnit in interface PamViewInterface
removeControlledUnit
public void removeControlledUnit(PamControlledUnit unit)
- Specified by:
removeControlledUnit in interface PamViewInterface
showControlledUnit
public void showControlledUnit(PamControlledUnit unit)
- Specified by:
showControlledUnit in interface PamViewInterface
getFrameNumber
public int getFrameNumber()
- Specified by:
getFrameNumber in interface PamViewInterface
- Returns:
- Frame number used by the multiple GUI frames. All other objects,
such as the model view should return < 0.
getGuiFrame
public javax.swing.JFrame getGuiFrame()
- Specified by:
getGuiFrame in interface PamViewInterface
enableGUIControl
public void enableGUIControl(boolean enable)
- Specified by:
enableGUIControl in interface PamViewInterface