Class FWClientController
java.lang.Object
net.simplace.ui.FWClientController
Singleton controller of the GUI client: dispatches action commands of menus and toolbars to system actions or
functionalities (pipeline steps of a system) and runs, advances (go/back), cancels and closes them. One running
functionality is kept per system id.
- Author:
- Andreas Enders
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidautostartFunction(String aAutostartFunction) Runs the autostart function of the layout or user.voidback(FWAbstractFunctionality aFunctionality) Stops a functionality and runs its previous function (if it exists).voidHandles an action command without parameters, seecall(int, String, Map).voidHandles an action command:system.xxxruns a system action (exit, copy, settings, ...),simcomponent.classshows the fields of a SimComponent, otherwise the functionality is looked up in the system model (the start function if the command is the system id) and run with the given parameters.voidcallChar(char aKeyCommand) Handles a key command; currently only logged.voidHandles a mouse event; currently only logged.voidcancel(FWAbstractFunctionality aFunctionality) Closes the functionality of the system without closing its view, seecloseFunction(String, boolean).voidcloseFunction(String aId, boolean aShouldCloseView) Stops and removes the running functionality of a system and starts itsfinalizefunction, if defined.getCurrentFunctionality(String aSystemID) static FWClientControllerReturns a Reference to the Identity instance (if there is no one yet it creates one)voidgo(FWAbstractFunctionality aFunctionality) Runs the next function of a functionality.voidgo(FWAbstractFunctionality aFunctionality, String aFunctionToRun) Runs a function of the system of a functionality with a copy of its observable.static voidShows the problem report dialog and saves a ZIP file with screenshot, log file and the current parameters to a file chosen by the user.voidswitchTo(FWAbstractFunctionality aFunctionality, String aFunctionToRun) Runs a function chosen by a switch point (RuleFunctionality) in the direction the switch point was reached (parameterFWAbstractFunctionality.DIRECTION), so that chained switch points keep the direction.
-
Constructor Details
-
FWClientController
public FWClientController()
-
-
Method Details
-
getInstance
Returns a Reference to the Identity instance (if there is no one yet it creates one)- Returns:
- the Instance
-
call
Handles an action command without parameters, seecall(int, String, Map).- Parameters:
aClickCount- number of clicks (only logged)aActionCommand- the action command
-
call
Handles an action command:system.xxxruns a system action (exit, copy, settings, ...),simcomponent.classshows the fields of a SimComponent, otherwise the functionality is looked up in the system model (the start function if the command is the system id) and run with the given parameters.- Parameters:
aClickCount- number of clicks (only logged)aFunction- the action command (function or system id)aParameterMap- parameters for the functionality, may containSYSTEM_ID; may benull
-
getCurrentFunctionality
- Parameters:
aSystemID- the system id- Returns:
- the running functionality of the system, or
null
-
callChar
public void callChar(char aKeyCommand) Handles a key command; currently only logged.- Parameters:
aKeyCommand- the key
-
callMouse
Handles a mouse event; currently only logged.- Parameters:
aClickCount- number of clicksaEventObject- the event source
-
autostartFunction
Runs the autostart function of the layout or user.- Parameters:
aAutostartFunction- the action command
-
go
Runs the next function of a functionality.- Parameters:
aFunctionality- the current functionality
-
go
Runs a function of the system of a functionality with a copy of its observable.- Parameters:
aFunctionality- the current functionalityaFunctionToRun- id of the function to run, or empty for the next function
-
back
Stops a functionality and runs its previous function (if it exists).- Parameters:
aFunctionality- the current functionality
-
switchTo
Runs a function chosen by a switch point (RuleFunctionality) in the direction the switch point was reached (parameterFWAbstractFunctionality.DIRECTION), so that chained switch points keep the direction.- Parameters:
aFunctionality- the switch pointaFunctionToRun- id of the function to run
-
cancel
Closes the functionality of the system without closing its view, seecloseFunction(String, boolean).- Parameters:
aFunctionality- the current functionality
-
closeFunction
Stops and removes the running functionality of a system and starts itsfinalizefunction, if defined.- Parameters:
aId- the system idaShouldCloseView-trueto close the view of the system as well
-
saveProblemReport
public static void saveProblemReport()Shows the problem report dialog and saves a ZIP file with screenshot, log file and the current parameters to a file chosen by the user. Errors are logged.
-