Package com.caplin.view
Interface View
public interface View
Interface that must be implemented by Views shown in the Console, Views must also be derived from Swing JPanels.
-
Method Summary
Modifier and TypeMethodDescriptionGets the list of Swing Actions that the view exposes for use as menu and toolbar items (these actions are added to menus/toolbar via their command names as configured in the view xml)Gets the console object passed into the init() method, this is a helper method to allow access to the console from other classes without having to pass the console object around.Called by the console to retrieve the views configuration properties that the console will save in the configuration XML and pass back to the view the next time it is initialized in the init() methodvoidinit(Console console, Properties properties) Called by the connsole when view is first loaded to initialise the view and pass console and view propertiesvoidprocessMessage(String messageId, Map messageData) Processes a message from another view, used for inter-view communicationvoidsave()Called by the Console if the view has marked itself as dirty, to allow the view to save its updated state to persistent storage
-
Method Details
-
init
Called by the connsole when view is first loaded to initialise the view and pass console and view properties- Parameters:
console- the parent consoleproperties- a properties object to configure the view
-
save
void save()Called by the Console if the view has marked itself as dirty, to allow the view to save its updated state to persistent storage -
getProperties
Properties getProperties()Called by the console to retrieve the views configuration properties that the console will save in the configuration XML and pass back to the view the next time it is initialized in the init() method- Returns:
- the views properties object
-
getActions
List getActions()Gets the list of Swing Actions that the view exposes for use as menu and toolbar items (these actions are added to menus/toolbar via their command names as configured in the view xml)- Returns:
- the list of available actions
-
getConsole
Console getConsole()Gets the console object passed into the init() method, this is a helper method to allow access to the console from other classes without having to pass the console object around.- Returns:
- the parent console object
-
processMessage
Processes a message from another view, used for inter-view communication- Parameters:
messageId- a String identifying the messagemessageData- a Map of name, value pairs representing messages data
-