JCheckBoxMenuItem (tag) |
From JAXXWiki
The <JCheckBoxMenuItem> tag creates an instance of javax.swing.JCheckBoxMenuItem. As with all Swing tags, the package name is assumed only because javax.swing is imported by default. The fully qualified form of this tag is <javax.swing.JCheckBoxMenuItem>.
This information is based on the Java Development Kit version 5.0. Other versions of Java may have more or fewer features.
Contents |
Attributes
These attributes may appear on the <JCheckBoxMenuItem> tag. As XML is a text file format, all attribute values must be represented as strings — either strings which can be converted into the destination type (e.g. height="1234" for the int-typed attribute height) or strings of Java code in curly braces (e.g. border="{BorderFactory.createEtchedBorder()}" for the Border-typed attribute border). See Data types for more information.
Attributes specific to JCheckBoxMenuItem
These attributes are defined by JCheckBoxMenuItem (or its TagHandler).
| Attribute | Type | Description |
|---|---|---|
| state | boolean | Equivalent to setState() Exists for AWT compatibility only; use selected instead |
Attributes inherited from JMenuItem
These attributes are common to all classes that descend from javax.swing.JMenuItem.
| Attribute | Type | Description |
|---|---|---|
| accelerator | javax.swing.KeyStroke | Equivalent to setAccelerator() |
Attributes inherited from AbstractButton
These attributes are common to all classes that descend from javax.swing.AbstractButton.
| Attribute | Type | Description |
|---|---|---|
| action | javax.swing.Action | Equivalent to setAction() |
| actionCommand | java.lang.String | Equivalent to setActionCommand() |
| borderPainted | boolean | Equivalent to setBorderPainted() |
| contentAreaFilled | boolean | Equivalent to setContentAreaFilled() |
| disabledIcon | javax.swing.Icon | Equivalent to setDisabledIcon() |
| disabledSelectedIcon | javax.swing.Icon | Equivalent to setDisabledSelectedIcon() |
| displayedMnemonicIndex | int | Equivalent to setDisplayedMnemonicIndex() |
| focusPainted | boolean | Equivalent to setFocusPainted() |
| horizontalAlignment | int | Equivalent to setHorizontalAlignment() Value must be one of: right, left, center, leading, or trailing |
| horizontalTextPosition | int | Equivalent to setHorizontalTextPosition() Value must be one of: right, left, center, leading, or trailing |
| icon | javax.swing.Icon | Equivalent to setIcon() |
| iconTextGap | int | Equivalent to setIconTextGap() |
| label | javax.swing.Label | Equivalent to setLabel() |
| margin | java.awt.Insets | Equivalent to setMargin() |
| mnemonic | int | Equivalent to setMnemonic() chars may also be specified. |
| model | javax.swing.ButtonModel | Equivalent to setModel() |
| multiClickThreshold | int | Equivalent to setMultiClickThreshold() |
| pressedIcon | javax.swing.Icon | Equivalent to setPressedIcon() |
| rolloverEnabled | boolean | Equivalent to setRolloverEnabled() |
| rolloverIcon | javax.swing.Icon | Equivalent to setRolloverIcon() |
| rolloverSelectedIcon | javax.swing.Icon | Equivalent to setRolloverSelectedIcon() |
| selected | boolean | Equivalent to setSelected() |
| selectedIcon | javax.swing.Icon | Equivalent to setSelectedIcon() |
| text | java.lang.String | Equivalent to setText() |
| verticalAlignment | int | Equivalent to setVerticalAlignment() Value must be one of: center, top, or bottom |
| verticalTextPosition | int | Equivalent to setVerticalTextPosition() Value must be one of: center, top, or bottom |
Attributes inherited from JComponent
These attributes are common to all classes that descend from javax.swing.JComponent.
| Attribute | Type | Description |
|---|---|---|
| actionMap | javax.swing.ActionMap | Equivalent to setActionMap() |
| alignmentX | float | Equivalent to setAlignmentX() |
| alignmentY | float | Equivalent to setAlignmentY() |
| autoscrolls | boolean | Equivalent to setAutoscrolls() |
| background | java.awt.Color | Equivalent to setBackground() |
| border | javax.swing.border.Border | Equivalent to setBorder() |
| componentPopupMenu | javax.swing.JPopupMenu | Equivalent to setComponentPopupMenu() |
| debugGraphicsOptions | int | Equivalent to setDebugGraphicsOptions() |
| defaultLocale | java.util.Locale | Equivalent to setDefaultLocale() |
| doubleBuffered | boolean | Equivalent to setDoubleBuffered() |
| enabled | boolean | Equivalent to setEnabled() |
| font | java.awt.Font | Equivalent to setFont() |
| foreground | java.awt.Color | Equivalent to setForeground() |
| inheritsPopupMenu | boolean | Equivalent to setInheritsPopupMenu() |
| inputVerifier | javax.swing.InputVerifier | Equivalent to setInputVerifier() |
| enabled | boolean | Equivalent to setEnabled() |
| maximumSize | java.awt.Dimension | Equivalent to setMaximumSize() |
| minimumSize | java.awt.Dimension | Equivalent to setMinimumSize() |
| nextFocusableComponent | java.awt.Component | Equivalent to setNextFocusableComponent() |
| opaque | boolean | Equivalent to setOpaque() |
| preferredSize | java.awt.Dimension | Equivalent to setPreferredSize() |
| requestFocusEnabled | boolean | Equivalent to setRequestFocusEnabled() |
| toolTipText | java.lang.String | Equivalent to setToolTipText() |
| transferHandler | javax.swing.TransferHandler | Equivalent to setTransferHandler() |
| verifyInputWhenFocusTarget | boolean | Equivalent to setVerifyInputWhenFocusTarget() |
| visible | boolean | Equivalent to setVisible() |
Attributes inherited from Container
These attributes are common to all classes that descend from java.awt.Container.
| Attribute | Type | Description |
|---|---|---|
| focusCycleRoot | boolean | Equivalent to setFocusCycleRoot() |
| focusTraversalPolicy | java.awt.FocusTraversalPolicy | Equivalent to setFocusTraversalPolicy() |
| focusTraversalPolicyProvider | boolean | Equivalent to setFocusTraversalPolicyProvider() |
| layout | java.awt.LayoutManager | Equivalent to setLayout() |
Attributes inherited from Component
These attributes are common to all classes that descend from java.awt.Component.
| Attribute | Type | Description |
|---|---|---|
| bounds | java.awt.Rectangle | Equivalent to setBounds() |
| componentOrientation | java.awt.ComponentOrientation | Equivalent to setComponentOrientation() |
| cursor | java.awt.Cursor | Equivalent to setCursor() |
| dropTarget | java.awt.dnd.DropTarget | Equivalent to setDropTarget() |
| focusable | boolean | Equivalent to setFocusable() |
| focusTraversalKeysEnabled | boolean | Equivalent to setFocusTraversalKeysEnabled() |
| font-face | java.lang.String | Sets the component's font face, e.g. "Times New Roman" |
| font-size | int | Sets the component's font size |
| font-style | java.lang.String | Sets the component's font style Must be either normal or italic |
| font-weight | java.lang.String | Sets the component's font weight Must be either normal or bold |
| height | int | Sets the component's height (more information) |
| ignoreRepaint | boolean | Equivalent to setIgnoreRepaint() |
| location | java.awt.Point | Equivalent to setLocation() |
| name | java.lang.String | Equivalent to setName() |
| size | java.awt.Dimension | Equivalent to setSize() |
| width | int | Sets the component's width (more information) |
JAXX attributes
These attributes are common to all JAXX class tags.
| Attribute | Type | Description |
|---|---|---|
| constraints | java.lang.Object | Layout constraints to be used when adding to parent (full documentation) |
| constructorParams | comma-separated Java expressions | Parameters to be passed to object's constructor (full documentation) |
| id | java.lang.String | Name used to refer to object elsewhere in file (full documentation) |
| styleClass | java.lang.String | CSS style class (full documentation) |
Events
You can listen to events by assigning Java code to an event handler, such as onActionPerformed='dispose()'. The Java code will be invoked when the event is fired. See event handlers for more details.
Events inherited from JComponent
These events are common to all classes that descend from javax.swing.JComponent.
| Event | Listener class | Description |
|---|---|---|
| onMenuKeyPressed | MenuKeyListener | Invoked when a key has been pressed. |
| onMenuKeyReleased | MenuKeyListener | Invoked when a key has been released. |
| onMenuKeyTyped | MenuKeyListener | Invoked when a key has been typed. |
| onMenuMouseDragged | MenuDragMouseListener | Invoked when the mouse is being dragged in a menu component's display area. |
| onMenuMouseEntered | MenuDragMouseListener | Invoked when the dragged mouse has entered a menu component's display area. |
| onMenuMouseExited | MenuDragMouseListener | Invoked when the dragged mouse has left a menu component's display area. |
| onMenuMouseReleased | MenuDragMouseListener | Invoked when a dragged mouse is released in a menu component's display area. |
Events inherited from AbstractButton
These events are common to all classes that descend from javax.swing.AbstractButton.
| Event | Listener class | Description |
|---|---|---|
| onActionPerformed | ActionListener | Invoked when an action occurs. |
| onStateChanged | ChangeListener | Invoked when the target of the listener has changed its state. |
| onItemStateChanged | ItemListener | Invoked when an item has been selected or deselected by the user. |
Events inherited from JComponent
These events are common to all classes that descend from javax.swing.JComponent.
| Event | Listener class | Description |
|---|---|---|
| onAncestorAdded | AncestorListener | Called when the source or one of its ancestors is made visible either by setVisible(true) being called or by its being added to the component hierarchy. |
| onAncestorMoved | AncestorListener | Called when either the source or one of its ancestors is moved. |
| onAncestorRemoved | AncestorListener | Called when the source or one of its ancestors is made invisible either by setVisible(false) being called or by its being remove from the component hierarchy. |
| onVetoableChange | VetoableChangeListener | Called when a constrained property is changed. |
Events inherited from Container
These events are common to all classes that descend from java.awt.Container.
| Event | Listener class | Description |
|---|---|---|
| onComponentAdded | ContainerListener | Invoked when a component has been added to the container. |
| onComponentRemoved | ContainerListener | Invoked when a component has been removed from the container. |
| onPropertyChange | PropertyChangeListener | Called when a bound property is changed. |
Events inherited from Component
These events are common to all classes that descend from java.awt.Component.
| Event | Listener class | Description |
|---|---|---|
| onAncestorResized | HeirarchyBoundsListener | Called when an ancestor of the source is resized. |
| onCaretPositionChanged | InputMethodListener | Invoked when the caret within composed text has changed. |
| onComponentHidden | ComponentListener | Invoked when the component has been made invisible. |
| onComponentMoved | ComponentListener | Invoked when the component's position changes. |
| onComponentResized | ComponentListener | Invoked when the component's size changes. |
| onComponentShown | ComponentListener | Invoked when the component has been made visible. |
| onFocusGained | FocusListener | Invoked when a component gains the keyboard focus. |
| onFocusLost | FocusListener | Invoked when a component loses the keyboard focus. |
| onHeirarchyChanged | HeirarchyListener | Called when the hierarchy has been changed. |
| onInputMethodTextChanged | InputMethodListener | Invoked when the text entered through an input method has changed. |
| onKeyPressed | KeyListener | Invoked when a key has been pressed. |
| onKeyReleased | KeyListener | Invoked when a key has been released. |
| onKeyTyped | KeyListener | Invoked when a key has been typed. |
| onMouseClicked | MouseListener | Invoked when the mouse button has been clicked (pressed and released) on a component. |
| onMouseDragged | MouseMotionListener | Invoked when a mouse button is pressed on a component and then dragged. |
| onMouseEntered | MouseListener | Invoked when the mouse enters a component. |
| onMouseExited | MouseListener | Invoked when the mouse exits a component. |
| onMouseMoved | MouseMotionListener | Invoked when the mouse cursor has been moved onto a component but no buttons have been pushed. |
| onMousePressed | MouseListener | Invoked when a mouse button has been pressed on a component. |
| onMouseReleased | MouseListener | Invoked when a mouse button has been released on a component. |
| onMouseWheelMoved | MouseWheelListener | Invoked when the mouse wheel is rotated. |
Bound methods
A bound method is a method whose value can be tracked by listening to events. For instance, changes to the return value of Component.getWidth() are always accompanied by componentResized events.
Bound methods are significant because they allow the data binding system to detect when they have changed. If you call a bound method within a data binding expression, JAXX will add an event listener in order to detect changes to the method's value. Methods which are not listed below cannot be tracked by JAXX's data binding.
nolieltde trchivare delricdom
Bound methods specific to JCheckBoxMenuItem
These bound methods are specific to JCheckBoxMenuItem:
- getState()
delbocnae coracdronpas dronelch cbocboac oroloo
Bound methods inherited from AbstractButton
These methods are bound in all components that descend from javax.swing.AbstractButton.
- getAction()
- getDisabledSelectedIcon()
- getDisplayedIcon()
- getDisplayedMnemonicIndex()
- getHorizontalAlignment()
- getHorizontalTextPosition()
- getIcon()
- getIconTextGap()
- getLabel()
- getMargin()
- getModel()
- getMnemonic()
- getPressedIcon()
- getRolloverIcon()
- getRolloverSelectedIcon()
- getSelectedIcon()
- getText()
- getVerticalAlignment()
- getVerticalTextPosition()
- isBorderPainted()
- isContentAreaFilled()
- isFocusPainted()
- isRolloverEnabled()
delbocnae coracdronpas dronelch cbocboac oroloo
Bound methods inherited from JComponent
These methods are bound in all components that descend from javax.swing.JComponent.
- isEnabled()
delbocnae coracdronpas dronelch cbocboac oroloo
Bound methods inherited from Container
These methods are bound in all components that descend from java.awt.Container.
- getChildCount()
delbocnae coracdronpas dronelch cbocboac oroloo
Bound methods inherited from Component
These methods are bound in all components that descend from java.awt.Component.
- hasFocus()
- getBackground()
- getBounds()
- getHeight()
- getFont()
- getForeground()
- getLocation()
- getLocationOnScreen()
- getSize()
- getWidth()
- getX()
- getY()
- isFocusable()
- isVisible()tasitoloc

