javax.swing
クラス JRadioButtonMenuItem
java.lang.Object
|
+--java.awt.Component
|
+--java.awt.Container
|
+--javax.swing.JComponent
|
+--javax.swing.AbstractButton
|
+--javax.swing.JMenuItem
|
+--javax.swing.JRadioButtonMenuItem
- すべての実装インタフェース:
- Accessible, ImageObserver, ItemSelectable, MenuContainer, MenuElement, Serializable, SwingConstants
- public class JRadioButtonMenuItem
- extends JMenuItem
- implements Accessible
ラジオボタンメニュー項目の実装です。JRadioButtonMenuItem
はメニュー項目のグループの一部となるメニュー項目で、グループ内では項目を 1 つだけ選択できます。選択された項目は、選択状態を表示します。また、この結果、選択されていた他の項目は選択解除状態に切り替わります。ラジオボタンメニュー項目のグループの選択状態を制御するには、ButtonGroup
オブジェクトを使用します。
詳細と使用例については、「The Java Tutorial」の「How to Use Menus」を参照してください。標準の Look & Feel (L&F) 表現でこのコンポーネントが使うキーボードのキーについては、JRadioButtonMenuItem のキー割り当てを参照してください。
警告:
このクラスの直列化されたオブジェクトは、今後の Swing リリースと互換ではなくなる予定です。現在の直列化のサポートは、短期間の運用や、同じバージョンの Swing を実行するアプリケーション間の RMI に適しています。今後の Swing リリースでは、長期間の持続性をサポートする予定です。
- 関連項目:
ButtonGroup
, 直列化された形式
クラス javax.swing.AbstractButton から継承したフィールド |
actionListener, BORDER_PAINTED_CHANGED_PROPERTY, changeEvent, changeListener, CONTENT_AREA_FILLED_CHANGED_PROPERTY, DISABLED_ICON_CHANGED_PROPERTY, DISABLED_SELECTED_ICON_CHANGED_PROPERTY, FOCUS_PAINTED_CHANGED_PROPERTY, HORIZONTAL_ALIGNMENT_CHANGED_PROPERTY, HORIZONTAL_TEXT_POSITION_CHANGED_PROPERTY, ICON_CHANGED_PROPERTY, itemListener, MARGIN_CHANGED_PROPERTY, MNEMONIC_CHANGED_PROPERTY, model, MODEL_CHANGED_PROPERTY, PRESSED_ICON_CHANGED_PROPERTY, ROLLOVER_ENABLED_CHANGED_PROPERTY, ROLLOVER_ICON_CHANGED_PROPERTY, ROLLOVER_SELECTED_ICON_CHANGED_PROPERTY, SELECTED_ICON_CHANGED_PROPERTY, TEXT_CHANGED_PROPERTY, VERTICAL_ALIGNMENT_CHANGED_PROPERTY, VERTICAL_TEXT_POSITION_CHANGED_PROPERTY |
インタフェース javax.swing.SwingConstants から継承したフィールド |
BOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NORTH, NORTH_EAST, NORTH_WEST, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WEST |
クラス javax.swing.JMenuItem から継承したメソッド |
addMenuDragMouseListener, addMenuKeyListener, configurePropertiesFromAction, createActionPropertyChangeListener, fireMenuDragMouseDragged, fireMenuDragMouseEntered, fireMenuDragMouseExited, fireMenuDragMouseReleased, fireMenuKeyPressed, fireMenuKeyReleased, fireMenuKeyTyped, getAccelerator, getComponent, getSubElements, init, isArmed, menuSelectionChanged, processKeyEvent, processMenuDragMouseEvent, processMenuKeyEvent, processMouseEvent, removeMenuDragMouseListener, removeMenuKeyListener, setAccelerator, setArmed, setEnabled, setUI, updateUI |
クラス javax.swing.AbstractButton から継承したメソッド |
addActionListener, addChangeListener, addItemListener, checkHorizontalKey, checkVerticalKey, createActionListener, createChangeListener, createItemListener, doClick, doClick, fireActionPerformed, fireItemStateChanged, fireStateChanged, getAction, getActionCommand, getDisabledIcon, getDisabledSelectedIcon, getHorizontalAlignment, getHorizontalTextPosition, getIcon, getLabel, getMargin, getMnemonic, getModel, getPressedIcon, getRolloverIcon, getRolloverSelectedIcon, getSelectedIcon, getSelectedObjects, getText, getUI, getVerticalAlignment, getVerticalTextPosition, imageUpdate, isBorderPainted, isContentAreaFilled, isFocusPainted, isFocusTraversable, isRolloverEnabled, isSelected, paintBorder, removeActionListener, removeChangeListener, removeItemListener, setAction, setActionCommand, setBorderPainted, setContentAreaFilled, setDisabledIcon, setDisabledSelectedIcon, setFocusPainted, setHorizontalAlignment, setHorizontalTextPosition, setIcon, setLabel, setMargin, setMnemonic, setMnemonic, setModel, setPressedIcon, setRolloverEnabled, setRolloverIcon, setRolloverSelectedIcon, setSelected, setSelectedIcon, setText, setUI, setVerticalAlignment, setVerticalTextPosition |
クラス javax.swing.JComponent から継承したメソッド |
addAncestorListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getVerifyInputWhenFocusTarget, getVisibleRect, getWidth, getX, getY, grabFocus, hasFocus, hide, isDoubleBuffered, isFocusCycleRoot, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paint, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processFocusEvent, processKeyBinding, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setDebugGraphicsOptions, setDoubleBuffered, setFont, setForeground, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update |
クラス java.awt.Container から継承したメソッド |
add, add, add, add, add, addContainerListener, addImpl, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getLayout, insets, invalidate, isAncestorOf, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setLayout, validate, validateTree |
クラス java.awt.Component から継承したメソッド |
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, getBackground, getBounds, getColorModel, getComponentOrientation, getCursor, getDropTarget, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getInputContext, getInputMethodRequests, getLocale, getLocation, getLocationOnScreen, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, inside, isDisplayable, isEnabled, isLightweight, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus |
JRadioButtonMenuItem
public JRadioButtonMenuItem()
- テキストおよびアイコンを指定しないで
JRadioButtonMenuItem
を作成します。
JRadioButtonMenuItem
public JRadioButtonMenuItem(Icon icon)
- アイコンを指定して
JRadioButtonMenuItem
を作成します。
- パラメータ:
icon
- JRadioButtonMenuItem
に表示する Icon
JRadioButtonMenuItem
public JRadioButtonMenuItem(String text)
- テキストを指定して
JRadioButtonMenuItem
を作成します。
- パラメータ:
text
- JRadioButtonMenuItem
のテキスト
JRadioButtonMenuItem
public JRadioButtonMenuItem(Action a)
- 指定された
Action
からプロパティを取得するラジオボタンメニュー項目を作成します。
- パラメータ:
a
- ラジオボタンメニュー項目のベースとなる Action
- 導入されたバージョン:
- 1.3
JRadioButtonMenuItem
public JRadioButtonMenuItem(String text,
Icon icon)
- ラジオボタンメニュー項目を、
Icon
とテキストを指定して作成します。
- パラメータ:
text
- JRadioButtonMenuItem
のテキストicon
- JRadioButtonMenuItem
に表示するアイコン
JRadioButtonMenuItem
public JRadioButtonMenuItem(String text,
boolean selected)
- ラジオボタンメニュー項目を、選択状態とテキストを指定して作成します。
- パラメータ:
text
- CheckBoxMenuItem
のテキストselected
- CheckBoxMenuItem
の選択状態
JRadioButtonMenuItem
public JRadioButtonMenuItem(Icon icon,
boolean selected)
- ラジオボタンメニュー項目を、イメージおよび選択状態を指定し、テキストを指定しないで作成します。
- パラメータ:
icon
- ボタンに表示するイメージselected
- true の場合はボタンが初期状態で選択され、そうでない場合はボタンが初期状態で選択解除される
JRadioButtonMenuItem
public JRadioButtonMenuItem(String text,
Icon icon,
boolean selected)
- ラジオボタンメニュー項目を、テキスト、イメージ、および選択状態を指定して作成します。他のすべてのコンストラクタはこのコンストラクタに集約されます。
- パラメータ:
text
- ラジオボタンに表示する文字列icon
- ボタンに表示するイメージ
getUIClassID
public String getUIClassID()
- このコンポーネントを描画する L&F クラスの名前を返します。
- オーバーライド:
- クラス
JMenuItem
内の getUIClassID
- 戻り値:
- 文字列 "RadioButtonMenuItemUI"
- 関連項目:
JComponent.getUIClassID()
,
UIDefaults.getUI(javax.swing.JComponent)
requestFocus
public void requestFocus()
- フォーカスを取得しないように、
Component.requestFocus
をオーバーライドします。
- オーバーライド:
- クラス
JComponent
内の requestFocus
- クラス
java.awt.Component
からコピーされたタグ:
- 関連項目:
FocusEvent
,
Component.addFocusListener(java.awt.event.FocusListener)
,
Component.processFocusEvent(java.awt.event.FocusEvent)
,
Component.isFocusTraversable()
paramString
protected String paramString()
- この
JRadioButtonMenuItem
の文字列表現を返します。このメソッドはデバッグ専用であり、返される文字列の内容および形式は実装によって異なります。返される文字列は空の場合がありますが、null
にはなりません。
- オーバーライド:
- クラス
JMenuItem
内の paramString
- 戻り値:
- この
JRadioButtonMenuItem
の文字列表現
getAccessibleContext
public AccessibleContext getAccessibleContext()
- この JRadioButtonMenuItem に関連した AccessibleContext を返します。JRadioButtonMenuItem の場合、AccessibleContext は AccessibleJRadioButtonMenuItem の形式を取ります。必要に応じて新規の AccessibleJRadioButtonMenuItem インスタンスが作成されます。
- 定義:
- インタフェース
Accessible
内の getAccessibleContext
- オーバーライド:
- クラス
JMenuItem
内の getAccessibleContext
- 戻り値:
- この JRadioButtonMenuItem の AccessibleContext として機能する AccessibleJRadioButtonMenuItem
バグや機能要求の報告
さらに詳しい API リファレンスおよび開発者ドキュメントについては、 Java 2 SDK SE Developer Documentation を参照してください。このドキュメントには、概念、用語の定義、回避策、 実用的なコード例など、開発者を対象にした詳細な解説が掲載されています。 Java、Java 2D、JDBC は、米国およびその他の国における米国 Sun Microsystems, Inc. の商標もしくは登録商標です。
Copyright 1993-2000 Sun Microsystems, Inc. 901 San Antonio Road,
Palo Alto, California, 94303, U.S.A. All Rights Reserved.