Ontimize 5.2071EN

com.ontimize.gui
Interface Application

All Superinterfaces:
Internationalization
All Known Implementing Classes:
MainApplication

public interface Application
extends Internationalization

Defines the methods that an application must implement. Those methods allows to interchange references among the application elements as well to perform the main operations the application must perform.


Field Summary
 
Fields inherited from interface com.ontimize.gui.i18n.Internationalization
DEBUG_LANGUAGE
 
Method Summary
 void endSession()
          Ends the user session.
 void exit()
          Closes the application.
 FormManager getFormManager(java.lang.String formManagerName)
          Provides a reference to a FormManager.
 java.awt.Frame getFrame()
          Returns the frame in which the application is placed.
 java.util.Locale getLocale()
          Returns the current application locale.
 javax.swing.JMenuBar getMenu()
          Provides a reference to the application menu bar.
 MenuListener getMenuListener()
          Provides a reference to the class that listens the menu events.
 java.lang.String getName()
          Returns the application name.
 ApplicationPreferences getPreferences()
          Returns the application preferences.
 EntityReferenceLocator getReferenceLocator()
          Provides a reference to the ReferenceLocator configured to this application.
 java.util.ResourceBundle getResourceBundle()
          Returns the current application resource bundle.
 javax.swing.JToolBar getToolBar()
          Provides a reference to the application tool bar.
 ToolBarListener getToolBarListener()
          Returns the application tool bar listener
 void lock()
          Deprecated.  
 boolean login()
          Performs the login operation
 void registerFormManager(java.lang.String formManagerName, FormManager formManager)
          Adds a FormManager to the application.
 void registerStatusComponent(StatusComponent statusComponent)
          Register a StatusComponent to be managed by this application.
 void setMenu(javax.swing.JMenuBar menuBar)
          Sets a menu bar to the application.
 void setMenuListener(MenuListener menuListener)
          Sets the application menu listener
 void setReferencesLocator(EntityReferenceLocator locator)
          Sets the EntityReferenceLocator for this application.
 void setStatusBarText(java.lang.String text)
          Sets a text in the application bar.
 void setToolBar(javax.swing.JToolBar toolBar)
          Sets a tool bar to the application.
 void setToolBarListener(ToolBarListener toolbarListener)
          Sets a toolbarListener
 void show()
          Shows the application.
 void showFormManagerContainer(java.lang.String formManagerName)
          Shows a form manager.
 void unregisterStatusComponent(StatusComponent statusComponent)
          Unregister a StatusComponent from the list of the be application managed components.
 
Methods inherited from interface com.ontimize.gui.i18n.Internationalization
getTextsToTranslate, setComponentLocale, setResourceBundle
 

Method Detail

setMenu

public void setMenu(javax.swing.JMenuBar menuBar)
Sets a menu bar to the application.

Parameters:
menuBar - the menu bar
See Also:
ApplicationMenuBar

setToolBar

public void setToolBar(javax.swing.JToolBar toolBar)
Sets a tool bar to the application.

Parameters:
toolBar - the tool bar
See Also:
ApplicationToolBar

getReferenceLocator

public EntityReferenceLocator getReferenceLocator()
Provides a reference to the ReferenceLocator configured to this application. The locator is set by the application constructor, and is mandatory to perform the login process.

Returns:
a reference to the ReferencesLocator, null in case no locator set yet

setReferencesLocator

public void setReferencesLocator(EntityReferenceLocator locator)
Sets the EntityReferenceLocator for this application. The references locator is necessary to provide references to the Entity objects. The locator set will be unique for the whole application.

Parameters:
locator -

showFormManagerContainer

public void showFormManagerContainer(java.lang.String formManagerName)
Shows a form manager.

Parameters:
formManagerName - the name of the FormManager to show.

getFormManager

public FormManager getFormManager(java.lang.String formManagerName)
Provides a reference to a FormManager.

Parameters:
formManagerName - the name of the FormManager
Returns:
the FormManager or null in case that FormManager does not exist.

registerFormManager

public void registerFormManager(java.lang.String formManagerName,
                                FormManager formManager)
Adds a FormManager to the application.

Parameters:
formManagerName - the FormManager class
formManager - the name that will be use to register and reference the FormManager

show

public void show()
Shows the application. This is the last method that is called before showing the application to the user. If some operations must be done before the application is loaded, this is the method that must be overwritten/implemented. For example, if the application must be sent to the tool bar just before to be showed, this is the method in which do that.


getFrame

public java.awt.Frame getFrame()
Returns the frame in which the application is placed.


login

public boolean login()
Performs the login operation


exit

public void exit()
Closes the application.


lock

public void lock()
Deprecated.  

Locks the application without closing it.


endSession

public void endSession()
Ends the user session.


getLocale

public java.util.Locale getLocale()
Returns the current application locale.

Returns:
the current application locale

getResourceBundle

public java.util.ResourceBundle getResourceBundle()
Returns the current application resource bundle.

Returns:
the current application resource bundle

getMenu

public javax.swing.JMenuBar getMenu()
Provides a reference to the application menu bar.

Returns:
the application menu bar

getMenuListener

public MenuListener getMenuListener()
Provides a reference to the class that listens the menu events.

Returns:
the application menu listener

setMenuListener

public void setMenuListener(MenuListener menuListener)
Sets the application menu listener

Parameters:
menuListener - the application menu listener

getToolBar

public javax.swing.JToolBar getToolBar()
Provides a reference to the application tool bar.

Returns:
the application tool bar

getToolBarListener

public ToolBarListener getToolBarListener()
Returns the application tool bar listener

Returns:
the application tool bar listener

setToolBarListener

public void setToolBarListener(ToolBarListener toolbarListener)
Sets a toolbarListener

Parameters:
toolbarListener - the new ToolBarListener

getPreferences

public ApplicationPreferences getPreferences()
Returns the application preferences.

Returns:
the preferences for the application

setStatusBarText

public void setStatusBarText(java.lang.String text)
Sets a text in the application bar.

Parameters:
text -

registerStatusComponent

public void registerStatusComponent(StatusComponent statusComponent)
Register a StatusComponent to be managed by this application.

Parameters:
statusComponent - the StatusComponent

unregisterStatusComponent

public void unregisterStatusComponent(StatusComponent statusComponent)
Unregister a StatusComponent from the list of the be application managed components.

Parameters:
statusComponent - the StatusComponent

getName

public java.lang.String getName()
Returns the application name.

Returns:
the application name.

Ontimize