public static class NavigationMenu.MenuItem extends Object implements ActionListener
| Modifier and Type | Field and Description |
|---|---|
protected boolean |
enabled
Boolean that determines if the Item will be enabled or not.
|
protected ImageIcon |
icon
ImageIcon of the Item.
|
protected String |
manager
Identifier of the Item (String).
|
protected boolean |
visible
Boolean that determines if the Item will be visible or not.
|
| Constructor and Description |
|---|
NavigationMenu.MenuItem(String manager,
ImageIcon icon)
Constructs a new MenuItem specifying the identifier and the ImageIcon
of the MenuItem.
|
NavigationMenu.MenuItem(String manager,
ImageIcon icon,
boolean visible,
boolean enabled)
Constructs a new MenuItem specifying the identifier and the ImageIcon
of the MenuItem.
|
| Modifier and Type | Method and Description |
|---|---|
void |
actionPerformed(ActionEvent e) |
ImageIcon |
getIcon()
This method returns an ImageIcon with the icon of the MenuItem.
|
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)
Deprecated.
|
void |
setEnabled(boolean enabled) |
void |
setIcon(ImageIcon icon)
This method sets the icon of the MenuItem.
|
void |
setManager(String manager)
This method establishes the String identifier of the MenuItem.
|
void |
setVisible(boolean visible)
This method sets the visibility of the MenuItem.
|
protected String manager
protected ImageIcon icon
protected boolean visible
protected boolean enabled
public NavigationMenu.MenuItem(String manager, ImageIcon icon)
manager - String with the identifier of the MenuItem.icon - ImageIcon with the icon of the MenuItem.public NavigationMenu.MenuItem(String manager, ImageIcon icon, boolean visible, boolean enabled)
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.public boolean isVisible()
boolean with the attribute visible.public void setVisible(boolean visible)
visible - boolean that indicates if the MenuItem is visible. If it
is true, the MenuItem will be visible.public boolean isEnabled()
boolean with the attribute enabled.@Deprecated public void setEnable(boolean enabled)
setEnabled(boolean)enabled - boolean that indicates if the MenuItem is enabled. If it
is true, the MenuItem will be enabled.public void setEnabled(boolean enabled)
public String getManager()
String with the MenuItem identifier.public void setManager(String manager)
manager - String with the identifier.public ImageIcon getIcon()
ImageIcon with the MenuItem icon.public void setIcon(ImageIcon icon)
icon - ImageIcon to the icon.public void actionPerformed(ActionEvent e)
actionPerformed in interface ActionListenerCopyright © 2016 Imatia Innovation S.L.. All rights reserved.