Ontimize 5.2072EN

com.ontimize.gui
Class DefaultMenuListener

java.lang.Object
  extended bycom.ontimize.gui.DefaultMenuListener
All Implemented Interfaces:
java.awt.event.ActionListener, java.util.EventListener, LocaleListener, MenuListener
Direct Known Subclasses:
DefaultActionMenuListener

public class DefaultMenuListener
extends java.lang.Object
implements MenuListener, java.awt.event.ActionListener, LocaleListener

This class implements the default menu listener for processing events, overrides actionPerformed(ActionEvent e).

This object is automatically registered to change the application locale.

Author:
Imatia Innovation

Field Summary
protected  Application application
          The application parameter.
static boolean CHECK_SUPPORTED_LOCALES
          The condition to check the supported application locales.
protected  ApplicationMenuBar menu
          The application menu bar parameter.
 
Constructor Summary
DefaultMenuListener()
          The constructor is empty.
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent e)
          This method implementation is empty.
 void addMenuToListenFor(javax.swing.JMenuBar menuBar)
          Indicates the menu whose events will be listened by this object.
protected static void getAvaliableLocales()
          Gets the available locales.
 void localeChange(LocaleEvent e)
          Checks the LocaleEvent and changes the locale.
 void setApplication(Application apl)
          Sets the param application.
 void setInitialState()
          Sets the initial state for application.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

application

protected Application application
The application parameter. By default, null.


menu

protected ApplicationMenuBar menu
The application menu bar parameter. By default, null.


CHECK_SUPPORTED_LOCALES

public static boolean CHECK_SUPPORTED_LOCALES
The condition to check the supported application locales.

Constructor Detail

DefaultMenuListener

public DefaultMenuListener()
The constructor is empty.

Method Detail

setApplication

public void setApplication(Application apl)
Sets the param application.

Specified by:
setApplication in interface MenuListener
Parameters:
apl -

setInitialState

public void setInitialState()
Sets the initial state for application. By default, only application locale is set in this method. For increasing the functionalities, it is recommended to override this method.

Specified by:
setInitialState in interface MenuListener

addMenuToListenFor

public void addMenuToListenFor(javax.swing.JMenuBar menuBar)
Indicates the menu whose events will be listened by this object. It is specially implemented for JMenuBar classes.

Specified by:
addMenuToListenFor in interface MenuListener
Parameters:
menuBar -

getAvaliableLocales

protected static void getAvaliableLocales()
Gets the available locales.

See Also:
Locale

localeChange

public void localeChange(LocaleEvent e)
Checks the LocaleEvent and changes the locale.

Specified by:
localeChange in interface LocaleListener

actionPerformed

public void actionPerformed(java.awt.event.ActionEvent e)
This method implementation is empty.

Specified by:
actionPerformed in interface java.awt.event.ActionListener

Ontimize