C
- menu component typepublic abstract class AbstractMenuGenerator<C extends JComponent> extends Object
WebMenuBar
- MenuBarGenerator
WebMenu
- MenuGenerator
WebPopupMenu
- PopupMenuGenerator
MenuBarGenerator
,
MenuGenerator
,
PopupMenuGenerator
Modifier and Type | Field and Description |
---|---|
protected static ActionListener |
defaultAction |
protected static boolean |
defaultEnabled |
protected static HotkeyData |
defaultHotkey |
protected static Object |
defaultIcon |
protected static StyleId |
defaultStyleId
Default constants used within generator methods.
|
protected String |
extension
Menu icons format.
|
protected UnselectableButtonGroup |
group
Buttons grouping.
|
protected String |
languagePrefix
Menu language key prefix.
|
protected C |
menu
Menu
JComponent . |
protected Class |
nearClass
Class near which menu icons are placed.
|
protected String |
path
Path to menu icons folder.
|
Constructor and Description |
---|
AbstractMenuGenerator(C menu)
Constructs new menu generator with the specified menu component.
|
Modifier and Type | Method and Description |
---|---|
WebCheckBoxMenuItem |
addCheckItem(Object icon,
String text,
boolean selected,
ActionListener actionListener)
Adds
WebCheckBoxMenuItem into menu. |
WebCheckBoxMenuItem |
addCheckItem(Object icon,
String text,
boolean enabled,
boolean selected,
ActionListener actionListener)
Adds
WebCheckBoxMenuItem into menu. |
WebCheckBoxMenuItem |
addCheckItem(Object icon,
String text,
HotkeyData hotkey,
boolean selected,
ActionListener actionListener)
Adds
WebCheckBoxMenuItem into menu. |
WebCheckBoxMenuItem |
addCheckItem(Object icon,
String text,
HotkeyData hotkey,
boolean enabled,
boolean selected,
ActionListener actionListener)
Adds
WebCheckBoxMenuItem into menu. |
WebCheckBoxMenuItem |
addCheckItem(String text,
boolean selected,
ActionListener actionListener)
Adds
WebCheckBoxMenuItem into menu. |
WebCheckBoxMenuItem |
addCheckItem(String text,
boolean enabled,
boolean selected,
ActionListener actionListener)
Adds
WebCheckBoxMenuItem into menu. |
WebCheckBoxMenuItem |
addCheckItem(String text,
HotkeyData hotkey,
boolean selected,
ActionListener actionListener)
Adds
WebCheckBoxMenuItem into menu. |
WebCheckBoxMenuItem |
addCheckItem(String text,
HotkeyData hotkey,
boolean enabled,
boolean selected,
ActionListener actionListener)
Adds
WebCheckBoxMenuItem into menu. |
WebCheckBoxMenuItem |
addCheckItem(StyleId id,
Object icon,
String text,
boolean selected,
ActionListener actionListener)
Adds
WebCheckBoxMenuItem into menu. |
WebCheckBoxMenuItem |
addCheckItem(StyleId id,
Object icon,
String text,
boolean enabled,
boolean selected,
ActionListener actionListener)
Adds
WebCheckBoxMenuItem into menu. |
WebCheckBoxMenuItem |
addCheckItem(StyleId id,
Object icon,
String text,
HotkeyData hotkey,
boolean selected,
ActionListener actionListener)
Adds
WebCheckBoxMenuItem into menu. |
WebCheckBoxMenuItem |
addCheckItem(StyleId id,
Object icon,
String text,
HotkeyData hotkey,
boolean enabled,
boolean selected,
ActionListener actionListener)
Adds
WebCheckBoxMenuItem into menu. |
WebCheckBoxMenuItem |
addCheckItem(StyleId id,
String text,
boolean selected,
ActionListener actionListener)
Adds
WebCheckBoxMenuItem into menu. |
WebCheckBoxMenuItem |
addCheckItem(StyleId id,
String text,
boolean enabled,
boolean selected,
ActionListener actionListener)
Adds
WebCheckBoxMenuItem into menu. |
WebCheckBoxMenuItem |
addCheckItem(StyleId id,
String text,
HotkeyData hotkey,
boolean selected,
ActionListener actionListener)
Adds
WebCheckBoxMenuItem into menu. |
WebCheckBoxMenuItem |
addCheckItem(StyleId id,
String text,
HotkeyData hotkey,
boolean enabled,
boolean selected,
ActionListener actionListener)
Adds
WebCheckBoxMenuItem into menu. |
WebMenuItem |
addItem(Object icon,
String text,
ActionListener actionListener)
Adds
WebMenuItem into menu. |
WebMenuItem |
addItem(Object icon,
String text,
boolean enabled,
ActionListener actionListener)
Adds
WebMenuItem into menu. |
WebMenuItem |
addItem(Object icon,
String text,
HotkeyData hotkey,
ActionListener actionListener)
Adds
WebMenuItem into menu. |
WebMenuItem |
addItem(Object icon,
String text,
HotkeyData hotkey,
boolean enabled,
ActionListener actionListener)
Adds
WebMenuItem into menu. |
WebMenuItem |
addItem(String text,
ActionListener actionListener)
Adds
WebMenuItem into menu. |
WebMenuItem |
addItem(String text,
boolean enabled,
ActionListener actionListener)
Adds
WebMenuItem into menu. |
WebMenuItem |
addItem(String text,
HotkeyData hotkey,
ActionListener actionListener)
Adds
WebMenuItem into menu. |
WebMenuItem |
addItem(String text,
HotkeyData hotkey,
boolean enabled,
ActionListener actionListener)
Adds
WebMenuItem into menu. |
WebMenuItem |
addItem(StyleId id,
Object icon,
String text,
ActionListener actionListener)
Adds
WebMenuItem into menu. |
WebMenuItem |
addItem(StyleId id,
Object icon,
String text,
boolean enabled,
ActionListener actionListener)
Adds
WebMenuItem into menu. |
WebMenuItem |
addItem(StyleId id,
Object icon,
String text,
HotkeyData hotkey,
ActionListener actionListener)
Adds
WebMenuItem into menu. |
WebMenuItem |
addItem(StyleId id,
Object icon,
String text,
HotkeyData hotkey,
boolean enabled,
ActionListener actionListener)
Adds
WebMenuItem into menu. |
WebMenuItem |
addItem(StyleId id,
String text,
ActionListener actionListener)
Adds
WebMenuItem into menu. |
WebMenuItem |
addItem(StyleId id,
String text,
boolean enabled,
ActionListener actionListener)
Adds
WebMenuItem into menu. |
WebMenuItem |
addItem(StyleId id,
String text,
HotkeyData hotkey,
ActionListener actionListener)
Adds
WebMenuItem into menu. |
WebMenuItem |
addItem(StyleId id,
String text,
HotkeyData hotkey,
boolean enabled,
ActionListener actionListener)
Adds
WebMenuItem into menu. |
WebRadioButtonMenuItem |
addRadioItem(Object icon,
String text,
boolean selected,
ActionListener actionListener)
Adds
WebRadioButtonMenuItem into menu. |
WebRadioButtonMenuItem |
addRadioItem(Object icon,
String text,
boolean enabled,
boolean selected,
ActionListener actionListener)
Adds
WebRadioButtonMenuItem into menu. |
WebRadioButtonMenuItem |
addRadioItem(Object icon,
String text,
HotkeyData hotkey,
boolean selected,
ActionListener actionListener)
Adds
WebRadioButtonMenuItem into menu. |
WebRadioButtonMenuItem |
addRadioItem(Object icon,
String text,
HotkeyData hotkey,
boolean enabled,
boolean selected,
ActionListener actionListener)
Adds
WebRadioButtonMenuItem into menu. |
WebRadioButtonMenuItem |
addRadioItem(String text,
boolean selected,
ActionListener actionListener)
Adds
WebRadioButtonMenuItem into menu. |
WebRadioButtonMenuItem |
addRadioItem(String text,
boolean enabled,
boolean selected,
ActionListener actionListener)
Adds
WebRadioButtonMenuItem into menu. |
WebRadioButtonMenuItem |
addRadioItem(String text,
HotkeyData hotkey,
boolean selected,
ActionListener actionListener)
Adds
WebRadioButtonMenuItem into menu. |
WebRadioButtonMenuItem |
addRadioItem(String text,
HotkeyData hotkey,
boolean enabled,
boolean selected,
ActionListener actionListener)
Adds
WebRadioButtonMenuItem into menu. |
WebRadioButtonMenuItem |
addRadioItem(StyleId id,
Object icon,
String text,
boolean selected,
ActionListener actionListener)
Adds
WebRadioButtonMenuItem into menu. |
WebRadioButtonMenuItem |
addRadioItem(StyleId id,
Object icon,
String text,
boolean enabled,
boolean selected,
ActionListener actionListener)
Adds
WebRadioButtonMenuItem into menu. |
WebRadioButtonMenuItem |
addRadioItem(StyleId id,
Object icon,
String text,
HotkeyData hotkey,
boolean selected,
ActionListener actionListener)
Adds
WebRadioButtonMenuItem into menu. |
WebRadioButtonMenuItem |
addRadioItem(StyleId id,
Object icon,
String text,
HotkeyData hotkey,
boolean enabled,
boolean selected,
ActionListener actionListener)
Adds
WebRadioButtonMenuItem into menu. |
WebRadioButtonMenuItem |
addRadioItem(StyleId id,
String text,
boolean selected,
ActionListener actionListener)
Adds
WebRadioButtonMenuItem into menu. |
WebRadioButtonMenuItem |
addRadioItem(StyleId id,
String text,
boolean enabled,
boolean selected,
ActionListener actionListener)
Adds
WebRadioButtonMenuItem into menu. |
WebRadioButtonMenuItem |
addRadioItem(StyleId id,
String text,
HotkeyData hotkey,
boolean selected,
ActionListener actionListener)
Adds
WebRadioButtonMenuItem into menu. |
WebRadioButtonMenuItem |
addRadioItem(StyleId id,
String text,
HotkeyData hotkey,
boolean enabled,
boolean selected,
ActionListener actionListener)
Adds
WebRadioButtonMenuItem into menu. |
void |
addSeparator()
Adds separator into this
AbstractMenuGenerator . |
MenuGenerator |
addSubMenu(Object icon,
String text)
Adds
WebMenu into this AbstractMenuGenerator . |
MenuGenerator |
addSubMenu(Object icon,
String text,
ActionListener actionListener)
Adds
WebMenu into this AbstractMenuGenerator . |
MenuGenerator |
addSubMenu(Object icon,
String text,
boolean enabled)
Adds
WebMenu into this AbstractMenuGenerator . |
MenuGenerator |
addSubMenu(Object icon,
String text,
boolean enabled,
ActionListener actionListener)
Adds
WebMenu into this AbstractMenuGenerator . |
MenuGenerator |
addSubMenu(String text)
Adds
WebMenu into this AbstractMenuGenerator . |
MenuGenerator |
addSubMenu(String text,
ActionListener actionListener)
Adds
WebMenu into this AbstractMenuGenerator . |
MenuGenerator |
addSubMenu(String text,
boolean enabled)
Adds
WebMenu into this AbstractMenuGenerator . |
MenuGenerator |
addSubMenu(String text,
boolean enabled,
ActionListener actionListener)
Adds
WebMenu into this AbstractMenuGenerator . |
MenuGenerator |
addSubMenu(StyleId id,
Object icon,
String text)
Adds
WebMenu into this AbstractMenuGenerator . |
MenuGenerator |
addSubMenu(StyleId id,
Object icon,
String text,
ActionListener actionListener)
Adds
WebMenu into this AbstractMenuGenerator . |
MenuGenerator |
addSubMenu(StyleId id,
Object icon,
String text,
boolean enabled)
Adds
WebMenu into this AbstractMenuGenerator . |
MenuGenerator |
addSubMenu(StyleId id,
Object icon,
String text,
boolean enabled,
ActionListener actionListener)
Adds
WebMenu into this AbstractMenuGenerator . |
MenuGenerator |
addSubMenu(StyleId id,
String text)
Adds
WebMenu into this AbstractMenuGenerator . |
MenuGenerator |
addSubMenu(StyleId id,
String text,
ActionListener actionListener)
Adds
WebMenu into this AbstractMenuGenerator . |
MenuGenerator |
addSubMenu(StyleId id,
String text,
boolean enabled)
Adds
WebMenu into this AbstractMenuGenerator . |
MenuGenerator |
addSubMenu(StyleId id,
String text,
boolean enabled,
ActionListener actionListener)
Adds
WebMenu into this AbstractMenuGenerator . |
UnselectableButtonGroup |
closeGroup()
Finishes grouping menu items.
|
protected WebCheckBoxMenuItem |
createCheckItem(StyleId id,
Object icon,
String text,
HotkeyData hotkey,
boolean enabled,
boolean selected,
ActionListener actionListener)
Returns newly created
WebCheckBoxMenuItem . |
protected WebMenuItem |
createItem(StyleId id,
Object icon,
String text,
HotkeyData hotkey,
boolean enabled,
ActionListener actionListener)
Returns newly created
WebMenuItem . |
protected WebRadioButtonMenuItem |
createRadioItem(StyleId id,
Object icon,
String text,
HotkeyData hotkey,
boolean enabled,
boolean selected,
ActionListener actionListener)
Returns newly created
WebRadioButtonMenuItem . |
protected WebMenu |
createSubMenu(StyleId id,
Object icon,
String text,
boolean enabled,
ActionListener actionListener)
Returns newly created
WebMenu . |
String |
getExtension()
Returns menu icons format.
|
protected Icon |
getIcon(Object icon)
|
String |
getLanguageKey(String text)
Returns menu item language key for the specified name.
|
String |
getLanguagePrefix()
Returns menu language key prefix.
|
C |
getMenu()
Returns menu
JComponent . |
Class |
getNearClass()
Returns class near which menu icons are placed.
|
String |
getPath()
Returns path to menu icons folder relative to class.
|
UnselectableButtonGroup |
group(AbstractButton button)
Adds specified
AbstractButton into currently used UnselectableButtonGroup . |
boolean |
isEmpty()
Returns whether menu is empty or not.
|
boolean |
isGroupOpen()
Returns whether or not
UnselectableButtonGroup is currently used for grouping. |
UnselectableButtonGroup |
openGroup()
Starts grouping menu items.
|
UnselectableButtonGroup |
openGroup(boolean unselectable)
Starts grouping menu items.
|
void |
setExtension(String extension)
Sets menu icons format.
|
void |
setIconSettings(Class nearClass,
String path,
String extension)
Sets menu icons location and format.
|
void |
setIconSettings(String path,
String extension)
Sets menu icons location and format.
|
void |
setLanguagePrefix(String prefix)
Sets menu language key prefix.
|
void |
setNearClass(Class nearClass)
Sets class near which menu icons are placed.
|
void |
setPath(String path)
Sets path to menu icons folder relative to class.
|
protected static final StyleId defaultStyleId
protected static final Object defaultIcon
protected static final HotkeyData defaultHotkey
protected static final boolean defaultEnabled
protected static final ActionListener defaultAction
@Nullable protected Class nearClass
@Nullable protected String path
@Nullable protected UnselectableButtonGroup group
@NotNull protected final C extends JComponent menu
JComponent
.@Nullable public Class getNearClass()
public void setNearClass(@Nullable Class nearClass)
nearClass
- class near which menu icons are placed@Nullable public String getPath()
public void setPath(@Nullable String path)
path
- path to menu icons folder relative to class@Nullable public String getExtension()
public void setExtension(@Nullable String extension)
extension
- menu icons formatpublic void setIconSettings(@Nullable String path, @Nullable String extension)
path
- path to menu icons folder in file systemextension
- menu icons formatpublic void setIconSettings(@Nullable Class nearClass, @Nullable String path, @Nullable String extension)
nearClass
- class near which menu icons are placedpath
- path to menu icons folder relative to classextension
- menu icons format@Nullable public String getLanguagePrefix()
public void setLanguagePrefix(@Nullable String prefix)
prefix
- menu language key prefix@Nullable public String getLanguageKey(@Nullable String text)
text
- menu item name or text@NotNull public WebMenuItem addItem(@Nullable String text, @Nullable ActionListener actionListener)
WebMenuItem
into menu.text
- WebMenuItem
textactionListener
- WebMenuItem
ActionListener
WebMenuItem
@NotNull public WebMenuItem addItem(@Nullable String text, @Nullable HotkeyData hotkey, @Nullable ActionListener actionListener)
WebMenuItem
into menu.text
- WebMenuItem
texthotkey
- WebMenuItem
acceleratoractionListener
- WebMenuItem
ActionListener
WebMenuItem
@NotNull public WebMenuItem addItem(@Nullable String text, boolean enabled, @Nullable ActionListener actionListener)
WebMenuItem
into menu.text
- WebMenuItem
textenabled
- whether WebMenuItem
is enabled or notactionListener
- WebMenuItem
ActionListener
WebMenuItem
@NotNull public WebMenuItem addItem(@Nullable String text, @Nullable HotkeyData hotkey, boolean enabled, @Nullable ActionListener actionListener)
WebMenuItem
into menu.text
- WebMenuItem
texthotkey
- WebMenuItem
acceleratorenabled
- whether WebMenuItem
is enabled or notactionListener
- WebMenuItem
ActionListener
WebMenuItem
@NotNull public WebMenuItem addItem(@Nullable Object icon, @Nullable String text, @Nullable ActionListener actionListener)
WebMenuItem
into menu.icon
- either Icon
, Image
, Resource
, path, File
or URL
text
- WebMenuItem
textactionListener
- WebMenuItem
ActionListener
WebMenuItem
@NotNull public WebMenuItem addItem(@Nullable Object icon, @Nullable String text, @Nullable HotkeyData hotkey, @Nullable ActionListener actionListener)
WebMenuItem
into menu.icon
- either Icon
, Image
, Resource
, path, File
or URL
text
- WebMenuItem
texthotkey
- WebMenuItem
acceleratoractionListener
- WebMenuItem
ActionListener
WebMenuItem
@NotNull public WebMenuItem addItem(@Nullable Object icon, @Nullable String text, boolean enabled, @Nullable ActionListener actionListener)
WebMenuItem
into menu.icon
- either Icon
, Image
, Resource
, path, File
or URL
text
- WebMenuItem
textenabled
- whether WebMenuItem
is enabled or notactionListener
- WebMenuItem
ActionListener
WebMenuItem
@NotNull public WebMenuItem addItem(@Nullable Object icon, @Nullable String text, @Nullable HotkeyData hotkey, boolean enabled, @Nullable ActionListener actionListener)
WebMenuItem
into menu.icon
- either Icon
, Image
, Resource
, path, File
or URL
text
- WebMenuItem
texthotkey
- WebMenuItem
acceleratorenabled
- whether WebMenuItem
is enabled or notactionListener
- WebMenuItem
ActionListener
WebMenuItem
@NotNull public WebMenuItem addItem(@NotNull StyleId id, @Nullable String text, @Nullable ActionListener actionListener)
WebMenuItem
into menu.id
- WebMenuItem
StyleId
text
- WebMenuItem
textactionListener
- WebMenuItem
ActionListener
WebMenuItem
@NotNull public WebMenuItem addItem(@NotNull StyleId id, @Nullable String text, @Nullable HotkeyData hotkey, @Nullable ActionListener actionListener)
WebMenuItem
into menu.id
- WebMenuItem
StyleId
text
- WebMenuItem
texthotkey
- WebMenuItem
acceleratoractionListener
- WebMenuItem
ActionListener
WebMenuItem
@NotNull public WebMenuItem addItem(@NotNull StyleId id, @Nullable String text, boolean enabled, @Nullable ActionListener actionListener)
WebMenuItem
into menu.id
- WebMenuItem
StyleId
text
- WebMenuItem
textenabled
- whether WebMenuItem
is enabled or notactionListener
- WebMenuItem
ActionListener
WebMenuItem
@NotNull public WebMenuItem addItem(@NotNull StyleId id, @Nullable String text, @Nullable HotkeyData hotkey, boolean enabled, @Nullable ActionListener actionListener)
WebMenuItem
into menu.id
- WebMenuItem
StyleId
text
- WebMenuItem
texthotkey
- WebMenuItem
acceleratorenabled
- whether WebMenuItem
is enabled or notactionListener
- WebMenuItem
ActionListener
WebMenuItem
@NotNull public WebMenuItem addItem(@NotNull StyleId id, @Nullable Object icon, @Nullable String text, @Nullable ActionListener actionListener)
WebMenuItem
into menu.id
- WebMenuItem
StyleId
icon
- either Icon
, Image
, Resource
, path, File
or URL
text
- WebMenuItem
textactionListener
- WebMenuItem
ActionListener
WebMenuItem
@NotNull public WebMenuItem addItem(@NotNull StyleId id, @Nullable Object icon, @Nullable String text, @Nullable HotkeyData hotkey, @Nullable ActionListener actionListener)
WebMenuItem
into menu.id
- WebMenuItem
StyleId
icon
- either Icon
, Image
, Resource
, path, File
or URL
text
- WebMenuItem
texthotkey
- WebMenuItem
acceleratoractionListener
- WebMenuItem
ActionListener
WebMenuItem
@NotNull public WebMenuItem addItem(@NotNull StyleId id, @Nullable Object icon, @Nullable String text, boolean enabled, @Nullable ActionListener actionListener)
WebMenuItem
into menu.id
- WebMenuItem
StyleId
icon
- either Icon
, Image
, Resource
, path, File
or URL
text
- WebMenuItem
textenabled
- whether WebMenuItem
is enabled or notactionListener
- WebMenuItem
ActionListener
WebMenuItem
@NotNull public WebMenuItem addItem(@NotNull StyleId id, @Nullable Object icon, @Nullable String text, @Nullable HotkeyData hotkey, boolean enabled, @Nullable ActionListener actionListener)
WebMenuItem
into menu.id
- WebMenuItem
StyleId
icon
- either Icon
, Image
, Resource
, path, File
or URL
text
- WebMenuItem
texthotkey
- WebMenuItem
acceleratorenabled
- whether WebMenuItem
is enabled or notactionListener
- WebMenuItem
ActionListener
WebMenuItem
@NotNull protected WebMenuItem createItem(@NotNull StyleId id, @Nullable Object icon, @Nullable String text, @Nullable HotkeyData hotkey, boolean enabled, @Nullable ActionListener actionListener)
WebMenuItem
.id
- WebMenuItem
StyleId
icon
- either Icon
, Image
, Resource
, path, File
or URL
text
- WebMenuItem
texthotkey
- WebMenuItem
acceleratorenabled
- whether WebMenuItem
is enabled or notactionListener
- WebMenuItem
ActionListener
WebMenuItem
@NotNull public WebCheckBoxMenuItem addCheckItem(@Nullable String text, boolean selected, @Nullable ActionListener actionListener)
WebCheckBoxMenuItem
into menu.text
- WebCheckBoxMenuItem
textselected
- whether WebCheckBoxMenuItem
is selected or notactionListener
- WebCheckBoxMenuItem
ActionListener
WebCheckBoxMenuItem
@NotNull public WebCheckBoxMenuItem addCheckItem(@Nullable String text, @Nullable HotkeyData hotkey, boolean selected, @Nullable ActionListener actionListener)
WebCheckBoxMenuItem
into menu.text
- WebCheckBoxMenuItem
texthotkey
- WebCheckBoxMenuItem
acceleratorselected
- whether WebCheckBoxMenuItem
is selected or notactionListener
- WebCheckBoxMenuItem
ActionListener
WebCheckBoxMenuItem
@NotNull public WebCheckBoxMenuItem addCheckItem(@Nullable String text, boolean enabled, boolean selected, @Nullable ActionListener actionListener)
WebCheckBoxMenuItem
into menu.text
- WebCheckBoxMenuItem
textenabled
- whether WebCheckBoxMenuItem
is enabled or notselected
- whether WebCheckBoxMenuItem
is selected or notactionListener
- WebCheckBoxMenuItem
ActionListener
WebCheckBoxMenuItem
@NotNull public WebCheckBoxMenuItem addCheckItem(@Nullable String text, @Nullable HotkeyData hotkey, boolean enabled, boolean selected, @Nullable ActionListener actionListener)
WebCheckBoxMenuItem
into menu.text
- WebCheckBoxMenuItem
texthotkey
- WebCheckBoxMenuItem
acceleratorenabled
- whether WebCheckBoxMenuItem
is enabled or notselected
- whether WebCheckBoxMenuItem
is selected or notactionListener
- WebCheckBoxMenuItem
ActionListener
WebCheckBoxMenuItem
@NotNull public WebCheckBoxMenuItem addCheckItem(@Nullable Object icon, @Nullable String text, boolean selected, @Nullable ActionListener actionListener)
WebCheckBoxMenuItem
into menu.icon
- either Icon
, Image
, Resource
, path, File
or URL
text
- WebCheckBoxMenuItem
textselected
- whether WebCheckBoxMenuItem
is selected or notactionListener
- WebCheckBoxMenuItem
ActionListener
WebCheckBoxMenuItem
@NotNull public WebCheckBoxMenuItem addCheckItem(@Nullable Object icon, @Nullable String text, @Nullable HotkeyData hotkey, boolean selected, @Nullable ActionListener actionListener)
WebCheckBoxMenuItem
into menu.icon
- either Icon
, Image
, Resource
, path, File
or URL
text
- WebCheckBoxMenuItem
texthotkey
- WebCheckBoxMenuItem
acceleratorselected
- whether WebCheckBoxMenuItem
is selected or notactionListener
- WebCheckBoxMenuItem
ActionListener
WebCheckBoxMenuItem
@NotNull public WebCheckBoxMenuItem addCheckItem(@Nullable Object icon, @Nullable String text, boolean enabled, boolean selected, @Nullable ActionListener actionListener)
WebCheckBoxMenuItem
into menu.icon
- either Icon
, Image
, Resource
, path, File
or URL
text
- WebCheckBoxMenuItem
textenabled
- whether WebCheckBoxMenuItem
is enabled or notselected
- whether WebCheckBoxMenuItem
is selected or notactionListener
- WebCheckBoxMenuItem
ActionListener
WebCheckBoxMenuItem
@NotNull public WebCheckBoxMenuItem addCheckItem(@Nullable Object icon, @Nullable String text, @Nullable HotkeyData hotkey, boolean enabled, boolean selected, @Nullable ActionListener actionListener)
WebCheckBoxMenuItem
into menu.icon
- either Icon
, Image
, Resource
, path, File
or URL
text
- WebCheckBoxMenuItem
texthotkey
- WebCheckBoxMenuItem
acceleratorenabled
- whether WebCheckBoxMenuItem
is enabled or notselected
- whether WebCheckBoxMenuItem
is selected or notactionListener
- WebCheckBoxMenuItem
ActionListener
WebCheckBoxMenuItem
@NotNull public WebCheckBoxMenuItem addCheckItem(@NotNull StyleId id, @Nullable String text, boolean selected, @Nullable ActionListener actionListener)
WebCheckBoxMenuItem
into menu.id
- WebCheckBoxMenuItem
StyleId
text
- WebCheckBoxMenuItem
textselected
- whether WebCheckBoxMenuItem
is selected or notactionListener
- WebCheckBoxMenuItem
ActionListener
WebCheckBoxMenuItem
@NotNull public WebCheckBoxMenuItem addCheckItem(@NotNull StyleId id, @Nullable String text, @Nullable HotkeyData hotkey, boolean selected, @Nullable ActionListener actionListener)
WebCheckBoxMenuItem
into menu.id
- WebCheckBoxMenuItem
StyleId
text
- WebCheckBoxMenuItem
texthotkey
- WebCheckBoxMenuItem
acceleratorselected
- whether WebCheckBoxMenuItem
is selected or notactionListener
- WebCheckBoxMenuItem
ActionListener
WebCheckBoxMenuItem
@NotNull public WebCheckBoxMenuItem addCheckItem(@NotNull StyleId id, @Nullable String text, boolean enabled, boolean selected, @Nullable ActionListener actionListener)
WebCheckBoxMenuItem
into menu.id
- WebCheckBoxMenuItem
StyleId
text
- WebCheckBoxMenuItem
textenabled
- whether WebCheckBoxMenuItem
is enabled or notselected
- whether WebCheckBoxMenuItem
is selected or notactionListener
- WebCheckBoxMenuItem
ActionListener
WebCheckBoxMenuItem
@NotNull public WebCheckBoxMenuItem addCheckItem(@NotNull StyleId id, @Nullable String text, @Nullable HotkeyData hotkey, boolean enabled, boolean selected, @Nullable ActionListener actionListener)
WebCheckBoxMenuItem
into menu.id
- WebCheckBoxMenuItem
StyleId
text
- WebCheckBoxMenuItem
texthotkey
- WebCheckBoxMenuItem
acceleratorenabled
- whether WebCheckBoxMenuItem
is enabled or notselected
- whether WebCheckBoxMenuItem
is selected or notactionListener
- WebCheckBoxMenuItem
ActionListener
WebCheckBoxMenuItem
@NotNull public WebCheckBoxMenuItem addCheckItem(@NotNull StyleId id, @Nullable Object icon, @Nullable String text, boolean selected, @Nullable ActionListener actionListener)
WebCheckBoxMenuItem
into menu.id
- WebCheckBoxMenuItem
StyleId
icon
- either Icon
, Image
, Resource
, path, File
or URL
text
- WebCheckBoxMenuItem
textselected
- whether WebCheckBoxMenuItem
is selected or notactionListener
- WebCheckBoxMenuItem
ActionListener
WebCheckBoxMenuItem
@NotNull public WebCheckBoxMenuItem addCheckItem(@NotNull StyleId id, @Nullable Object icon, @Nullable String text, @Nullable HotkeyData hotkey, boolean selected, @Nullable ActionListener actionListener)
WebCheckBoxMenuItem
into menu.id
- WebCheckBoxMenuItem
StyleId
icon
- either Icon
, Image
, Resource
, path, File
or URL
text
- WebCheckBoxMenuItem
texthotkey
- WebCheckBoxMenuItem
acceleratorselected
- whether WebCheckBoxMenuItem
is selected or notactionListener
- WebCheckBoxMenuItem
ActionListener
WebCheckBoxMenuItem
@NotNull public WebCheckBoxMenuItem addCheckItem(@NotNull StyleId id, @Nullable Object icon, @Nullable String text, boolean enabled, boolean selected, @Nullable ActionListener actionListener)
WebCheckBoxMenuItem
into menu.id
- WebCheckBoxMenuItem
StyleId
icon
- either Icon
, Image
, Resource
, path, File
or URL
text
- WebCheckBoxMenuItem
textenabled
- whether WebCheckBoxMenuItem
is enabled or notselected
- whether WebCheckBoxMenuItem
is selected or notactionListener
- WebCheckBoxMenuItem
ActionListener
WebCheckBoxMenuItem
@NotNull public WebCheckBoxMenuItem addCheckItem(@NotNull StyleId id, @Nullable Object icon, @Nullable String text, @Nullable HotkeyData hotkey, boolean enabled, boolean selected, @Nullable ActionListener actionListener)
WebCheckBoxMenuItem
into menu.id
- WebCheckBoxMenuItem
StyleId
icon
- either Icon
, Image
, Resource
, path, File
or URL
text
- WebCheckBoxMenuItem
texthotkey
- WebCheckBoxMenuItem
acceleratorenabled
- whether WebCheckBoxMenuItem
is enabled or notselected
- whether WebCheckBoxMenuItem
is selected or notactionListener
- WebCheckBoxMenuItem
ActionListener
WebCheckBoxMenuItem
@NotNull protected WebCheckBoxMenuItem createCheckItem(@NotNull StyleId id, @Nullable Object icon, @Nullable String text, @Nullable HotkeyData hotkey, boolean enabled, boolean selected, @Nullable ActionListener actionListener)
WebCheckBoxMenuItem
.id
- WebCheckBoxMenuItem
StyleId
icon
- either Icon
, Image
, Resource
, path, File
or URL
text
- WebCheckBoxMenuItem
texthotkey
- WebCheckBoxMenuItem
acceleratorenabled
- whether WebCheckBoxMenuItem
is enabled or notselected
- whether WebCheckBoxMenuItem
is selected or notactionListener
- WebCheckBoxMenuItem
ActionListener
WebCheckBoxMenuItem
@NotNull public WebRadioButtonMenuItem addRadioItem(@Nullable String text, boolean selected, @Nullable ActionListener actionListener)
WebRadioButtonMenuItem
into menu.text
- WebRadioButtonMenuItem
textselected
- whether WebRadioButtonMenuItem
is selected or notactionListener
- WebRadioButtonMenuItem
ActionListener
WebRadioButtonMenuItem
@NotNull public WebRadioButtonMenuItem addRadioItem(@Nullable String text, @Nullable HotkeyData hotkey, boolean selected, @Nullable ActionListener actionListener)
WebRadioButtonMenuItem
into menu.text
- WebRadioButtonMenuItem
texthotkey
- WebRadioButtonMenuItem
acceleratorselected
- whether WebRadioButtonMenuItem
is selected or notactionListener
- WebRadioButtonMenuItem
ActionListener
WebRadioButtonMenuItem
@NotNull public WebRadioButtonMenuItem addRadioItem(@Nullable String text, boolean enabled, boolean selected, @Nullable ActionListener actionListener)
WebRadioButtonMenuItem
into menu.text
- WebRadioButtonMenuItem
textenabled
- whether WebRadioButtonMenuItem
is enabled or notselected
- whether WebRadioButtonMenuItem
is selected or notactionListener
- WebRadioButtonMenuItem
ActionListener
WebRadioButtonMenuItem
@NotNull public WebRadioButtonMenuItem addRadioItem(@Nullable String text, @Nullable HotkeyData hotkey, boolean enabled, boolean selected, @Nullable ActionListener actionListener)
WebRadioButtonMenuItem
into menu.text
- WebRadioButtonMenuItem
texthotkey
- WebRadioButtonMenuItem
acceleratorenabled
- whether WebRadioButtonMenuItem
is enabled or notselected
- whether WebRadioButtonMenuItem
is selected or notactionListener
- WebRadioButtonMenuItem
ActionListener
WebRadioButtonMenuItem
@NotNull public WebRadioButtonMenuItem addRadioItem(@Nullable Object icon, @Nullable String text, boolean selected, @Nullable ActionListener actionListener)
WebRadioButtonMenuItem
into menu.icon
- either Icon
, Image
, Resource
, path, File
or URL
text
- WebRadioButtonMenuItem
textselected
- whether WebRadioButtonMenuItem
is selected or notactionListener
- WebRadioButtonMenuItem
ActionListener
WebRadioButtonMenuItem
@NotNull public WebRadioButtonMenuItem addRadioItem(@Nullable Object icon, @Nullable String text, @Nullable HotkeyData hotkey, boolean selected, @Nullable ActionListener actionListener)
WebRadioButtonMenuItem
into menu.icon
- either Icon
, Image
, Resource
, path, File
or URL
text
- WebRadioButtonMenuItem
texthotkey
- WebRadioButtonMenuItem
acceleratorselected
- whether WebRadioButtonMenuItem
is selected or notactionListener
- WebRadioButtonMenuItem
ActionListener
WebRadioButtonMenuItem
@NotNull public WebRadioButtonMenuItem addRadioItem(@Nullable Object icon, @Nullable String text, boolean enabled, boolean selected, @Nullable ActionListener actionListener)
WebRadioButtonMenuItem
into menu.icon
- either Icon
, Image
, Resource
, path, File
or URL
text
- WebRadioButtonMenuItem
textenabled
- whether WebRadioButtonMenuItem
is enabled or notselected
- whether WebRadioButtonMenuItem
is selected or notactionListener
- WebRadioButtonMenuItem
ActionListener
WebRadioButtonMenuItem
@NotNull public WebRadioButtonMenuItem addRadioItem(@Nullable Object icon, @Nullable String text, @Nullable HotkeyData hotkey, boolean enabled, boolean selected, @Nullable ActionListener actionListener)
WebRadioButtonMenuItem
into menu.icon
- either Icon
, Image
, Resource
, path, File
or URL
text
- WebRadioButtonMenuItem
texthotkey
- WebRadioButtonMenuItem
acceleratorenabled
- whether WebRadioButtonMenuItem
is enabled or notselected
- whether WebRadioButtonMenuItem
is selected or notactionListener
- WebRadioButtonMenuItem
ActionListener
WebRadioButtonMenuItem
@NotNull public WebRadioButtonMenuItem addRadioItem(@NotNull StyleId id, @Nullable String text, boolean selected, @Nullable ActionListener actionListener)
WebRadioButtonMenuItem
into menu.id
- WebRadioButtonMenuItem
StyleId
text
- WebRadioButtonMenuItem
textselected
- whether WebRadioButtonMenuItem
is selected or notactionListener
- WebRadioButtonMenuItem
ActionListener
WebRadioButtonMenuItem
@NotNull public WebRadioButtonMenuItem addRadioItem(@NotNull StyleId id, @Nullable String text, @Nullable HotkeyData hotkey, boolean selected, @Nullable ActionListener actionListener)
WebRadioButtonMenuItem
into menu.id
- WebRadioButtonMenuItem
StyleId
text
- WebRadioButtonMenuItem
texthotkey
- WebRadioButtonMenuItem
acceleratorselected
- whether WebRadioButtonMenuItem
is selected or notactionListener
- WebRadioButtonMenuItem
ActionListener
WebRadioButtonMenuItem
@NotNull public WebRadioButtonMenuItem addRadioItem(@NotNull StyleId id, @Nullable String text, boolean enabled, boolean selected, @Nullable ActionListener actionListener)
WebRadioButtonMenuItem
into menu.id
- WebRadioButtonMenuItem
StyleId
text
- WebRadioButtonMenuItem
textenabled
- whether WebRadioButtonMenuItem
is enabled or notselected
- whether WebRadioButtonMenuItem
is selected or notactionListener
- WebRadioButtonMenuItem
ActionListener
WebRadioButtonMenuItem
@NotNull public WebRadioButtonMenuItem addRadioItem(@NotNull StyleId id, @Nullable String text, @Nullable HotkeyData hotkey, boolean enabled, boolean selected, @Nullable ActionListener actionListener)
WebRadioButtonMenuItem
into menu.id
- WebRadioButtonMenuItem
StyleId
text
- WebRadioButtonMenuItem
texthotkey
- WebRadioButtonMenuItem
acceleratorenabled
- whether WebRadioButtonMenuItem
is enabled or notselected
- whether WebRadioButtonMenuItem
is selected or notactionListener
- WebRadioButtonMenuItem
ActionListener
WebRadioButtonMenuItem
@NotNull public WebRadioButtonMenuItem addRadioItem(@NotNull StyleId id, @Nullable Object icon, @Nullable String text, boolean selected, @Nullable ActionListener actionListener)
WebRadioButtonMenuItem
into menu.id
- WebRadioButtonMenuItem
StyleId
icon
- either Icon
, Image
, Resource
, path, File
or URL
text
- WebRadioButtonMenuItem
textselected
- whether WebRadioButtonMenuItem
is selected or notactionListener
- WebRadioButtonMenuItem
ActionListener
WebRadioButtonMenuItem
@NotNull public WebRadioButtonMenuItem addRadioItem(@NotNull StyleId id, @Nullable Object icon, @Nullable String text, @Nullable HotkeyData hotkey, boolean selected, @Nullable ActionListener actionListener)
WebRadioButtonMenuItem
into menu.id
- WebRadioButtonMenuItem
StyleId
icon
- either Icon
, Image
, Resource
, path, File
or URL
text
- WebRadioButtonMenuItem
texthotkey
- WebRadioButtonMenuItem
acceleratorselected
- whether WebRadioButtonMenuItem
is selected or notactionListener
- WebRadioButtonMenuItem
ActionListener
WebRadioButtonMenuItem
@NotNull public WebRadioButtonMenuItem addRadioItem(@NotNull StyleId id, @Nullable Object icon, @Nullable String text, boolean enabled, boolean selected, @Nullable ActionListener actionListener)
WebRadioButtonMenuItem
into menu.id
- WebRadioButtonMenuItem
StyleId
icon
- either Icon
, Image
, Resource
, path, File
or URL
text
- WebRadioButtonMenuItem
textenabled
- whether WebRadioButtonMenuItem
is enabled or notselected
- whether WebRadioButtonMenuItem
is selected or notactionListener
- WebRadioButtonMenuItem
ActionListener
WebRadioButtonMenuItem
@NotNull public WebRadioButtonMenuItem addRadioItem(@NotNull StyleId id, @Nullable Object icon, @Nullable String text, @Nullable HotkeyData hotkey, boolean enabled, boolean selected, @Nullable ActionListener actionListener)
WebRadioButtonMenuItem
into menu.id
- WebRadioButtonMenuItem
StyleId
icon
- either Icon
, Image
, Resource
, path, File
or URL
text
- WebRadioButtonMenuItem
texthotkey
- WebRadioButtonMenuItem
acceleratorenabled
- whether WebRadioButtonMenuItem
is enabled or notselected
- whether WebRadioButtonMenuItem
is selected or notactionListener
- WebRadioButtonMenuItem
ActionListener
WebRadioButtonMenuItem
@NotNull protected WebRadioButtonMenuItem createRadioItem(@NotNull StyleId id, @Nullable Object icon, @Nullable String text, @Nullable HotkeyData hotkey, boolean enabled, boolean selected, @Nullable ActionListener actionListener)
WebRadioButtonMenuItem
.id
- WebRadioButtonMenuItem
StyleId
icon
- either Icon
, Image
, Resource
, path, File
or URL
text
- WebRadioButtonMenuItem
texthotkey
- WebRadioButtonMenuItem
acceleratorenabled
- whether WebRadioButtonMenuItem
is enabled or notselected
- whether WebRadioButtonMenuItem
is selected or notactionListener
- WebRadioButtonMenuItem
ActionListener
WebRadioButtonMenuItem
@NotNull public MenuGenerator addSubMenu(@Nullable String text)
WebMenu
into this AbstractMenuGenerator
.
Returned MenuGenerator
will have the same settings as current one, but you can modify those later.text
- WebMenu
textMenuGenerator
for newly created WebMenu
@NotNull public MenuGenerator addSubMenu(@Nullable String text, boolean enabled)
WebMenu
into this AbstractMenuGenerator
.
Returned MenuGenerator
will have the same settings as current one, but you can modify those later.text
- WebMenu
textenabled
- whether WebMenu
is enabled or notMenuGenerator
for newly created WebMenu
@NotNull public MenuGenerator addSubMenu(@Nullable String text, @Nullable ActionListener actionListener)
WebMenu
into this AbstractMenuGenerator
.
Returned MenuGenerator
will have the same settings as current one, but you can modify those later.text
- WebMenu
textactionListener
- WebMenu
ActionListener
MenuGenerator
for newly created WebMenu
@NotNull public MenuGenerator addSubMenu(@Nullable String text, boolean enabled, @Nullable ActionListener actionListener)
WebMenu
into this AbstractMenuGenerator
.
Returned MenuGenerator
will have the same settings as current one, but you can modify those later.text
- WebMenu
textenabled
- whether WebMenu
is enabled or notactionListener
- WebMenu
ActionListener
MenuGenerator
for newly created WebMenu
@NotNull public MenuGenerator addSubMenu(@Nullable Object icon, @Nullable String text)
WebMenu
into this AbstractMenuGenerator
.
Returned MenuGenerator
will have the same settings as current one, but you can modify those later.@NotNull public MenuGenerator addSubMenu(@Nullable Object icon, @Nullable String text, boolean enabled)
WebMenu
into this AbstractMenuGenerator
.
Returned MenuGenerator
will have the same settings as current one, but you can modify those later.@NotNull public MenuGenerator addSubMenu(@Nullable Object icon, @Nullable String text, @Nullable ActionListener actionListener)
WebMenu
into this AbstractMenuGenerator
.
Returned MenuGenerator
will have the same settings as current one, but you can modify those later.icon
- either Icon
, Image
, Resource
, path, File
or URL
text
- WebMenu
textactionListener
- WebMenu
ActionListener
MenuGenerator
for newly created WebMenu
@NotNull public MenuGenerator addSubMenu(@Nullable Object icon, @Nullable String text, boolean enabled, @Nullable ActionListener actionListener)
WebMenu
into this AbstractMenuGenerator
.
Returned MenuGenerator
will have the same settings as current one, but you can modify those later.@NotNull public MenuGenerator addSubMenu(@NotNull StyleId id, @Nullable String text)
WebMenu
into this AbstractMenuGenerator
.
Returned MenuGenerator
will have the same settings as current one, but you can modify those later.id
- WebMenu
StyleId
text
- WebMenu
textMenuGenerator
for newly created WebMenu
@NotNull public MenuGenerator addSubMenu(@NotNull StyleId id, @Nullable String text, boolean enabled)
WebMenu
into this AbstractMenuGenerator
.
Returned MenuGenerator
will have the same settings as current one, but you can modify those later.@NotNull public MenuGenerator addSubMenu(@NotNull StyleId id, @Nullable String text, @Nullable ActionListener actionListener)
WebMenu
into this AbstractMenuGenerator
.
Returned MenuGenerator
will have the same settings as current one, but you can modify those later.id
- WebMenu
StyleId
text
- WebMenu
textactionListener
- WebMenu
ActionListener
MenuGenerator
for newly created WebMenu
@NotNull public MenuGenerator addSubMenu(@NotNull StyleId id, @Nullable String text, boolean enabled, @Nullable ActionListener actionListener)
WebMenu
into this AbstractMenuGenerator
.
Returned MenuGenerator
will have the same settings as current one, but you can modify those later.id
- WebMenu
StyleId
text
- WebMenu
textenabled
- whether WebMenu
is enabled or notactionListener
- WebMenu
ActionListener
MenuGenerator
for newly created WebMenu
@NotNull public MenuGenerator addSubMenu(@NotNull StyleId id, @Nullable Object icon, @Nullable String text)
WebMenu
into this AbstractMenuGenerator
.
Returned MenuGenerator
will have the same settings as current one, but you can modify those later.@NotNull public MenuGenerator addSubMenu(@NotNull StyleId id, @Nullable Object icon, @Nullable String text, boolean enabled)
WebMenu
into this AbstractMenuGenerator
.
Returned MenuGenerator
will have the same settings as current one, but you can modify those later.@NotNull public MenuGenerator addSubMenu(@NotNull StyleId id, @Nullable Object icon, @Nullable String text, @Nullable ActionListener actionListener)
WebMenu
into this AbstractMenuGenerator
.
Returned MenuGenerator
will have the same settings as current one, but you can modify those later.@NotNull public MenuGenerator addSubMenu(@NotNull StyleId id, @Nullable Object icon, @Nullable String text, boolean enabled, @Nullable ActionListener actionListener)
WebMenu
into this AbstractMenuGenerator
.
Returned MenuGenerator
will have the same settings as current one, but you can modify those later.@NotNull protected WebMenu createSubMenu(@NotNull StyleId id, @Nullable Object icon, @Nullable String text, boolean enabled, @Nullable ActionListener actionListener)
WebMenu
.public void addSeparator()
AbstractMenuGenerator
.@NotNull public UnselectableButtonGroup openGroup()
closeGroup()
call will get grouped.UnselectableButtonGroup
used for grouping@NotNull public UnselectableButtonGroup openGroup(boolean unselectable)
closeGroup()
call will get grouped.unselectable
- whether items should be unselectable or notUnselectableButtonGroup
used for groupingpublic boolean isGroupOpen()
UnselectableButtonGroup
is currently used for grouping.true
if UnselectableButtonGroup
is currently used for grouping, false
otherwise@NotNull public UnselectableButtonGroup group(@NotNull AbstractButton button)
AbstractButton
into currently used UnselectableButtonGroup
.button
- AbstractButton
to add into UnselectableButtonGroup
UnselectableButtonGroup
used for grouping@NotNull public UnselectableButtonGroup closeGroup()
UnselectableButtonGroup
used for grouping@NotNull public C getMenu()
JComponent
.JComponent
public boolean isEmpty()
Copyright © 2020. All rights reserved.