Package PamView
Class NullGuiController
java.lang.Object
PamView.NullGuiController
- All Implemented Interfaces:
PAMControllerGUI
,PamViewInterface
Null GUI controller which will get used with the -nogui options.
- Author:
- dg50
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addControlledUnit
(PamControlledUnit controlledUnit) Called whenever a pamcontrolled unit is added ot the model.void
addView
(PamViewInterface newView) Add a PAMView Interface.void
Called to destroy modelvoid
enableGUIControl
(boolean enable) Enable and disable the entire GUI.int
Called on startup to grab pamsettings/database from somewhere.getModuleName
(Object parentFrame, PamModuleInfo moduleInfo) Get the name for a controlled unit from user input.boolean
The GUI may have a callback into the PamController once it has all been set up.void
init()
Called immediately after the creation of the GUI in the PAMController.initPrimaryView
(PamController pamController, PamModel pamModelInterface) Called when the controller is ready for the fire view.void
modelChanged
(int changeType) void
notifyLoadProgress
(PamTaskUpdate progress) Notify the GUI that some loading is taking placevoid
notifyModelChanged
(int changeType) Notification flag that the model has changedvoid
pamEnded()
void
void
removeControlledUnit
(PamControlledUnit controlledUnit) Called whenever a controlled unit is removed.void
void
Show the GUI for a specific controlled unit
-
Constructor Details
-
NullGuiController
-
-
Method Details
-
pamStarted
public void pamStarted()- Specified by:
pamStarted
in interfacePamViewInterface
-
pamEnded
public void pamEnded()- Specified by:
pamEnded
in interfacePamViewInterface
-
modelChanged
public void modelChanged(int changeType) - Specified by:
modelChanged
in interfacePamViewInterface
-
addControlledUnit
Description copied from interface:PamViewInterface
Called whenever a pamcontrolled unit is added ot the model.- Specified by:
addControlledUnit
in interfacePamViewInterface
- Parameters:
controlledUnit
- - the added controlled unit.
-
showControlledUnit
Description copied from interface:PamViewInterface
Show the GUI for a specific controlled unit- Specified by:
showControlledUnit
in interfacePamViewInterface
- Parameters:
unit
- -the controlled unit to show.
-
removeControlledUnit
Description copied from interface:PamViewInterface
Called whenever a controlled unit is removed.- Specified by:
removeControlledUnit
in interfacePamViewInterface
-
setTitle
- Specified by:
setTitle
in interfacePamViewInterface
-
getFrameNumber
public int getFrameNumber()- Specified by:
getFrameNumber
in interfacePamViewInterface
- Returns:
- Frame number used by the multiple GUI frames. All other objects, such as the model view should return invalid input: '<' 0.
-
getGuiFrame
- Specified by:
getGuiFrame
in interfacePamViewInterface
-
enableGUIControl
public void enableGUIControl(boolean enable) Description copied from interface:PamViewInterface
Enable and disable the entire GUI.- Specified by:
enableGUIControl
in interfacePamViewInterface
- Parameters:
enable
- - true to enable the GUI/
-
addView
Description copied from interface:PAMControllerGUI
Add a PAMView Interface. This mirrors many of the functions in PAMControllerGUI- Specified by:
addView
in interfacePAMControllerGUI
-
destroyModel
public void destroyModel()Description copied from interface:PAMControllerGUI
Called to destroy model- Specified by:
destroyModel
in interfacePAMControllerGUI
-
notifyModelChanged
public void notifyModelChanged(int changeType) Description copied from interface:PAMControllerGUI
Notification flag that the model has changed- Specified by:
notifyModelChanged
in interfacePAMControllerGUI
-
notifyLoadProgress
Description copied from interface:PAMControllerGUI
Notify the GUI that some loading is taking place- Specified by:
notifyLoadProgress
in interfacePAMControllerGUI
- Parameters:
progress
- - the progress.
-
getInitialSettings
Description copied from interface:PAMControllerGUI
Called on startup to grab pamsettings/database from somewhere.- Specified by:
getInitialSettings
in interfacePAMControllerGUI
- Returns:
- the pamsettings/database.
-
init
public void init()Description copied from interface:PAMControllerGUI
Called immediately after the creation of the GUI in the PAMController.- Specified by:
init
in interfacePAMControllerGUI
-
initPrimaryView
Description copied from interface:PAMControllerGUI
Called when the controller is ready for the fire view.- Specified by:
initPrimaryView
in interfacePAMControllerGUI
- Returns:
- init and retuirn the first view
-
hasCallBack
public boolean hasCallBack()Description copied from interface:PAMControllerGUI
The GUI may have a callback into the PamController once it has all been set up. If this is the case then on init() PAMController stops and relies on the GUI code to call the relevant setupPAMGuard folder once the GUI thread is happy everything is being set up properly.- Specified by:
hasCallBack
in interfacePAMControllerGUI
- Returns:
-
getModuleName
Description copied from interface:PAMControllerGUI
Get the name for a controlled unit from user input.- Specified by:
getModuleName
in interfacePAMControllerGUI
- Parameters:
parentFrame
- - an object which can be the parent frame for the dialog.moduleInfo
- - the type of controlled unit.- Returns:
- the name of the module.
-