Ontimize 5.2072EN

com.ontimize.gui.field
Class NavigationMenu.MenuItem

java.lang.Object
  extended bycom.ontimize.gui.field.NavigationMenu.MenuItem
All Implemented Interfaces:
java.awt.event.ActionListener, java.util.EventListener
Direct Known Subclasses:
NavigatorMenuGUI.MenuItemGUI
Enclosing class:
NavigationMenu

public static class NavigationMenu.MenuItem
extends java.lang.Object
implements java.awt.event.ActionListener

Class that contains each Item displayed into the MenuGroup of the NavigationMenu.

Author:
Imatia Innovation.

Field Summary
protected  boolean enabled
          Boolean that determines if the Item will be enabled or not.
protected  javax.swing.ImageIcon icon
          ImageIcon of the Item.
protected  java.lang.String manager
          Identifier of the Item (String).
protected  boolean visible
          Boolean that determines if the Item will be visible or not.
 
Constructor Summary
NavigationMenu.MenuItem(java.lang.String manager, javax.swing.ImageIcon icon)
          Constructs a new MenuItem specifying the identifier and the ImageIcon of the MenuItem.
NavigationMenu.MenuItem(java.lang.String manager, javax.swing.ImageIcon icon, boolean visible, boolean enabled)
          Constructs a new MenuItem specifying the identifier and the ImageIcon of the MenuItem.
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent e)
           
 javax.swing.ImageIcon getIcon()
          This method returns an ImageIcon with the icon of the MenuItem.
 java.lang.String getManager()
          This method returns a String with the identifier of the MenuItem.
 boolean isEnabled()
          This method returns if the MenuItem is enabled.
 boolean isVisible()
          This method returns if the MenuItem is visible.
 void setEnable(boolean enabled)
          This method sets the availability of the MenuItem.
 void setIcon(javax.swing.ImageIcon icon)
          This method sets the icon of the MenuItem.
 void setManager(java.lang.String manager)
          This method establishes the String identifier of the MenuItem.
 void setVisible(boolean visible)
          This method sets the visibility of the MenuItem.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

manager

protected java.lang.String manager
Identifier of the Item (String).


icon

protected javax.swing.ImageIcon icon
ImageIcon of the Item.


visible

protected boolean visible
Boolean that determines if the Item will be visible or not. By default it is set to true.


enabled

protected boolean enabled
Boolean that determines if the Item will be enabled or not. By default it is set to true.

Constructor Detail

NavigationMenu.MenuItem

public NavigationMenu.MenuItem(java.lang.String manager,
                               javax.swing.ImageIcon icon)
Constructs a new MenuItem specifying the identifier and the ImageIcon of the MenuItem.

Parameters:
manager - String with the identifier of the MenuItem.
icon - ImageIcon with the icon of the MenuItem.

NavigationMenu.MenuItem

public NavigationMenu.MenuItem(java.lang.String manager,
                               javax.swing.ImageIcon icon,
                               boolean visible,
                               boolean enabled)
Constructs a new MenuItem specifying the identifier and the ImageIcon of the MenuItem.

Parameters:
manager - String with the identifier of the MenuItem.
icon - ImageIcon with the icon of the MenuItem.
visible - Boolean that sets the visibility of the MenuItem.
enabled - Boolean that sets the availability of the MenuItme.
Method Detail

isVisible

public boolean isVisible()
This method returns if the MenuItem is visible.

Returns:
a boolean with the attribute visible.

setVisible

public void setVisible(boolean visible)
This method sets the visibility of the MenuItem.

Parameters:
visible - boolean that indicates if the MenuItem is visible. If it is true, the MenuItem will be visible.

isEnabled

public boolean isEnabled()
This method returns if the MenuItem is enabled.

Returns:
a boolean with the attribute enabled.

setEnable

public void setEnable(boolean enabled)
This method sets the availability of the MenuItem.

Parameters:
enabled - boolean that indicates if the MenuItem is enabled. If it is true, the MenuItem will be enabled.

getManager

public java.lang.String getManager()
This method returns a String with the identifier of the MenuItem.

Returns:
a String with the MenuItem identifier.

setManager

public void setManager(java.lang.String manager)
This method establishes the String identifier of the MenuItem.

Parameters:
manager - String with the identifier.

getIcon

public javax.swing.ImageIcon getIcon()
This method returns an ImageIcon with the icon of the MenuItem.

Returns:
an ImageIcon with the MenuItem icon.

setIcon

public void setIcon(javax.swing.ImageIcon icon)
This method sets the icon of the MenuItem.

Parameters:
icon - ImageIcon to the icon.

actionPerformed

public void actionPerformed(java.awt.event.ActionEvent e)
Specified by:
actionPerformed in interface java.awt.event.ActionListener

Ontimize