yu.ac.bg.etf.javaqx.qswing
Class JQMenu

java.lang.Object
  extended byyu.ac.bg.etf.javaqx.core.AbstractDisposable
      extended byyu.ac.bg.etf.javaqx.qswing.JQComponent
          extended byyu.ac.bg.etf.javaqx.qswing.JQContainer
              extended byyu.ac.bg.etf.javaqx.qswing.JQMenu
All Implemented Interfaces:
Disposable, JQComponentProperties, JQContainerProperties, JQMenuProperties, JQTextProperty
Direct Known Subclasses:
JQStyleMenu, JQThemeMenu

public class JQMenu
extends JQContainer
implements JQMenuProperties

Menu Component.

Version:
0.2.0
Author:
Slobodan Vrkacevic (slobodan.vrkacevic@gmail.com)

Field Summary
 
Fields inherited from class yu.ac.bg.etf.javaqx.qswing.JQComponent
listenerList
 
Fields inherited from interface yu.ac.bg.etf.javaqx.qswing.properties.JQMenuProperties
PROPERTY_ICON
 
Fields inherited from interface yu.ac.bg.etf.javaqx.qswing.properties.JQTextProperty
PROPERTY_MNEMONIC, PROPERTY_TEXT
 
Fields inherited from interface yu.ac.bg.etf.javaqx.qswing.properties.JQContainerProperties
PROPERTY_LAYOUT_MANAGER
 
Fields inherited from interface yu.ac.bg.etf.javaqx.qswing.properties.JQComponentProperties
PROPERTY_BACKGROUND, PROPERTY_COMPONENT_ORIENTATION, PROPERTY_CONTEXT_MENU, PROPERTY_ENABLED, PROPERTY_FIXED_SIZE, PROPERTY_FOCUSABLE, PROPERTY_FONT, PROPERTY_FOREGROUND, PROPERTY_INSETS, PROPERTY_LOCALE, PROPERTY_MAXIMUM_SIZE, PROPERTY_MINIMUM_SIZE, PROPERTY_NAME, PROPERTY_OPAQUE, PROPERTY_PREFERRED_SIZE, PROPERTY_RESOURCE_BUNDLE_NAME, PROPERTY_STATUS_TIP_TEXT, PROPERTY_STYLE_SHEET, PROPERTY_TOOL_TIP_TEXT, PROPERTY_VISIBLE, PROPERTY_WHATS_THIS_TEXT
 
Constructor Summary
JQMenu()
          Constructs new JQMenu object.
JQMenu(java.lang.String text)
          Constructs new JQMenu object.
JQMenu(java.lang.String text, boolean autoExclusive)
          Constructs new JQMenu object.
 
Method Summary
 JQCheckBoxMenuItem add(JQCheckBoxMenuItem menuItem)
          Adds check box menu item.
 JQCheckBoxMenuItem add(JQCheckBoxMenuItem menuItem, int index)
          Adds check box menu item.
 JQMenu add(JQMenu menu)
          Adds menu.
 JQMenu add(JQMenu menu, int index)
          Adds menu.
 JQMenuItem add(JQMenuItem menuItem)
          Adds menu item.
 JQMenuItem add(JQMenuItem menuItem, int index)
          Adds menu item.
 JQRadioButtonMenuItem add(JQRadioButtonMenuItem menuItem)
          Adds radio button menu item.
 JQRadioButtonMenuItem add(JQRadioButtonMenuItem menuItem, int index)
          Adds radio button menu item.
 JQSeparator addSeparator()
          Adds separator.
 JQSeparator addSeparator(int index)
          Adds separator.
 JQSeparator addSeparator(java.lang.String text)
          Adds separator.
 JQSeparator addSeparator(java.lang.String text, int index)
          Adds separator.
 int getMnemonic()
          Returns the keyboard mnemonic.
 java.lang.String getText()
          Returns text.
 void invalidate()
          Invalidates the component.
 boolean isMnemonicSet()
          Returns true if the keyboard mnemonic has been explicitly set.
protected  java.lang.String paramString()
          Returns parameters string.
 void revalidate()
          Revalidates the component.
 void setLayout(LayoutManager layoutManager)
          Sets the layout manager for this container.
 void setMnemonic(int mnemonic)
          Sets the keyboard mnemonic.
 void setText(java.lang.String text)
          Sets text.
 void show(int x, int y)
          Displays popup menu at specified location.
 void updateLocalization()
          Updates localization.
 void validate()
          Validates the component.
 
Methods inherited from class yu.ac.bg.etf.javaqx.qswing.JQContainer
add, add, add, add, addImpl, doLayout, getComponent, getComponentCount, getComponentIndex, getComponents, getLayout, getMaximumSize, getMinimumSize, getOwnedComponents, getPreferredSize, pack, remove, remove, removeAll, setBackground, setComponentOrientation, setForeground
 
Methods inherited from class yu.ac.bg.etf.javaqx.qswing.JQComponent
addComponentListener, addFocusListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, addPropertyChangeListener, addPropertyChangeListener, disableEvents, disposeComponent, disposeObject, enableEvents, eventEnabled, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getClientProperty, getComponentListeners, getComponentOrientation, getContextMenu, getCursor, getEventMask, getFocusListener, getFont, getFontMetrics, getForeground, getHeight, getInsets, getKeyListeners, getLocale, getLocation, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getOwner, getParent, getPropertyChangeListeners, getPropertyChangeListeners, getResourceBundleName, getSize, getStatusTipText, getStyleSheet, getToolTipText, getToolTipText, getWhatsThisText, getWidth, getX, getY, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFontSet, isForegroundSet, isLeftToRight, isLocaleSet, isOpaque, isOwnerOf, isPainting, isResizable, isResourceBundleNameSet, isUpdatesEnabled, isValid, isVisible, localizeObject, localizeString, localizeString, localizeStrings, paintComponent, processComponentEvent, processContextMenuEvent, processFocusEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, processStyleChange, putClientProperty, removeComponentListener, removeFocusListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, removeStyleSheet, repaint, repaint, repaint, requestFocus, setBounds, setBounds, setContextMenu, setCursor, setDefaultResourceBundleName, setDisplayable, setEnabled, setFixedSize, setFixedSize, setFocusable, setFont, setInsets, setInsets, setLeftToRightComponentOrientation, setLocale, setLocation, setLocation, setMaximumSize, setMaximumSize, setMinimumSize, setMinimumSize, setName, setOpaque, setPreferredSize, setPreferredSize, setResizable, setResourceBundleName, setRightToLeftComponentOrientation, setSize, setSize, setStatusTipText, setStyleSheet, setStyleSheet, setToolTipText, setUpdatesEnabled, setVisible, setWhatsThisText, toString, unsetComponentOrientation, update, update, update, updateComponentOrientation
 
Methods inherited from class yu.ac.bg.etf.javaqx.core.AbstractDisposable
addDisposeListener, dispose, disposedCheck, disposedErrorString, finalize, isDisposed, removeDisposeListener
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

JQMenu

public JQMenu()
Constructs new JQMenu object.


JQMenu

public JQMenu(java.lang.String text)
Constructs new JQMenu object.

Parameters:
text - the text for the menu label

JQMenu

public JQMenu(java.lang.String text,
              boolean autoExclusive)
Constructs new JQMenu object.

Parameters:
text - the text for the menu label
autoExclusive - true if auto exclusive
Method Detail

getText

public java.lang.String getText()
Returns text.

Returns:
text

setText

public void setText(java.lang.String text)
Sets text. Char '&' is keyboard mnemonic.

Parameters:
text - the text

isMnemonicSet

public boolean isMnemonicSet()
Returns true if the keyboard mnemonic has been explicitly set.

Returns:
true if the keyboard mnemonic has been explicitly set

getMnemonic

public int getMnemonic()
Returns the keyboard mnemonic.

Returns:
the keyboard mnemonic

setMnemonic

public void setMnemonic(int mnemonic)
Sets the keyboard mnemonic.

Parameters:
mnemonic - the keyboard mnemonic

add

public JQMenuItem add(JQMenuItem menuItem)
Adds menu item.

Parameters:
menuItem - the menu item
Returns:
the menu item argument

add

public JQMenuItem add(JQMenuItem menuItem,
                      int index)
Adds menu item.

Parameters:
menuItem - the menu item
index - the menu index
Returns:
the menu item argument

add

public JQCheckBoxMenuItem add(JQCheckBoxMenuItem menuItem)
Adds check box menu item.

Parameters:
menuItem - the check box menu item
Returns:
the check box menu item argument

add

public JQCheckBoxMenuItem add(JQCheckBoxMenuItem menuItem,
                              int index)
Adds check box menu item.

Parameters:
menuItem - the check box menu item
index - the check box menu index
Returns:
the check box menu item argument

add

public JQRadioButtonMenuItem add(JQRadioButtonMenuItem menuItem)
Adds radio button menu item.

Parameters:
menuItem - the radio button menu item
Returns:
the menu radio button item argument

add

public JQRadioButtonMenuItem add(JQRadioButtonMenuItem menuItem,
                                 int index)
Adds radio button menu item.

Parameters:
menuItem - the radio button menu item
index - the radio button menu index
Returns:
the radio button menu item argument

add

public JQMenu add(JQMenu menu)
Adds menu.

Parameters:
menu - the menu
Returns:
the menu argument

add

public JQMenu add(JQMenu menu,
                  int index)
Adds menu.

Parameters:
menu - the menu
index - the menu index
Returns:
the menu argument

addSeparator

public JQSeparator addSeparator()
Adds separator.

Returns:
separator

addSeparator

public JQSeparator addSeparator(int index)
Adds separator.

Parameters:
index - the separator index
Returns:
separator

addSeparator

public JQSeparator addSeparator(java.lang.String text)
Adds separator.

Parameters:
text - the text
Returns:
separator

addSeparator

public JQSeparator addSeparator(java.lang.String text,
                                int index)
Adds separator.

Parameters:
text - the text
index - the separator index
Returns:
separator

show

public void show(int x,
                 int y)
Displays popup menu at specified location.

Parameters:
x - the x coordinate of the location
y - the y coordinate of the location

setLayout

public void setLayout(LayoutManager layoutManager)
Sets the layout manager for this container.

Overrides:
setLayout in class JQContainer
Parameters:
layoutManager - the layout manager

validate

public void validate()
Validates the component.

Overrides:
validate in class JQContainer

invalidate

public void invalidate()
Invalidates the component.

Overrides:
invalidate in class JQContainer

revalidate

public void revalidate()
Revalidates the component.

Overrides:
revalidate in class JQComponent

updateLocalization

public void updateLocalization()
Updates localization.

Overrides:
updateLocalization in class JQContainer

paramString

protected java.lang.String paramString()
Returns parameters string.

Overrides:
paramString in class JQContainer


Copyright © 2007 ETF and contributors. All Rights Reserved.