JavaTM 2 Platform
Std. Ed. v1.3

javax.swing
クラス JSeparator

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Container
              |
              +--javax.swing.JComponent
                    |
                    +--javax.swing.JSeparator
すべての実装インタフェース:
Accessible, ImageObserver, MenuContainer, Serializable, SwingConstants
直系の既知のサブクラス:
JPopupMenu.Separator, JToolBar.Separator

public class JSeparator
extends JComponent
implements SwingConstants, Accessible

メニュー項目を論理的グループに分割する区切り線となるメニューセパレータの実装です。直接 JSeparator を使用しなくても、JMenu または JPopupMenuaddSeparator メソッドを使用してセパレータを作成したり追加できます。

例および詳細については、「The Java Tutorial」「How to Use Menus」を参照してください。

警告: このクラスの直列化されたオブジェクトは、今後の Swing リリースと互換ではなくなる予定です。現在の直列化のサポートは、短期間の運用や、同じバージョンの Swing を実行するアプリケーション間の RMI に適しています。今後の Swing リリースでは、長期間の持続性をサポートする予定です。

関連項目:
直列化された形式

内部クラスの概要
protected  class JSeparator.AccessibleJSeparator
          このクラスは JSeparator クラス用のユーザ補助機能のサポートを実装しています。
 
クラス javax.swing.JComponent から継承した内部クラス
JComponent.AccessibleJComponent
 
クラス java.awt.Container から継承した内部クラス
Container.AccessibleAWTContainer
 
クラス java.awt.Component から継承した内部クラス
Component.AccessibleAWTComponent
 
クラス javax.swing.JComponent から継承したフィールド
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
 
クラス java.awt.Component から継承したフィールド
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
インタフェース javax.swing.SwingConstants から継承したフィールド
BOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NORTH, NORTH_EAST, NORTH_WEST, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WEST
 
インタフェース java.awt.image.ImageObserver から継承したフィールド
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
コンストラクタの概要
JSeparator()
          水平セパレータを新しく作成します。
JSeparator(int orientation)
          水平または垂直方向を指定してセパレータを新しく作成します。
 
メソッドの概要
 AccessibleContext getAccessibleContext()
          この JSeparator に関連した AccessibleContext を返します。
 int getOrientation()
          このセパレータの方向を返します。
 SeparatorUI getUI()
          このコンポーネントを描画する L&F オブジェクトを返します。
 String getUIClassID()
          このコンポーネントを描画する L&F クラスの名前を返します。
 boolean isFocusTraversable()
          このコンポーネントがフォーカスを受け取れるかどうかを示します。
protected  String paramString()
          この JSeparator の文字列表現を返します。
 void setOrientation(int orientation)
          セパレータの方向を設定します。
 void setUI(SeparatorUI ui)
          このコンポーネントを描画する L&F オブジェクトを設定します。
 void updateUI()
          L&F が変更されたことを示す UIFactory からの通知です。
 
クラス 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, paintBorder, 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, requestFocus, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setDebugGraphicsOptions, setDoubleBuffered, setEnabled, 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, imageUpdate, 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
 
クラス java.lang.Object から継承したメソッド
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

コンストラクタの詳細

JSeparator

public JSeparator()
水平セパレータを新しく作成します。

JSeparator

public JSeparator(int orientation)
水平または垂直方向を指定してセパレータを新しく作成します。
パラメータ:
orientation - SwingConstants.HORIZONTAL または SwingConstants.VERTICAL を指定する int 値
例外:
IllegalArgumentException - orientationSwingConstants.HORIZONTAL または SwingConstants.VERTICAL のいずれでもない場合
メソッドの詳細

getUI

public SeparatorUI getUI()
このコンポーネントを描画する L&F オブジェクトを返します。
戻り値:
このコンポーネントを描画する SeparatorUI オブジェクト

setUI

public void setUI(SeparatorUI ui)
このコンポーネントを描画する L&F オブジェクトを設定します。
パラメータ:
ui - SeparatorUI L&F オブジェクト
関連項目:
UIDefaults.getUI(javax.swing.JComponent)

updateUI

public void updateUI()
L&F が変更されたことを示す UIFactory からの通知です。UI を UIFactory の最新バージョンに置き換えるために呼び出されます。
オーバーライド:
クラス JComponent 内の updateUI
関連項目:
JComponent.updateUI()

getUIClassID

public String getUIClassID()
このコンポーネントを描画する L&F クラスの名前を返します。
オーバーライド:
クラス JComponent 内の getUIClassID
戻り値:
文字列の SeparatorUI
関連項目:
JComponent.getUIClassID(), UIDefaults.getUI(javax.swing.JComponent)

getOrientation

public int getOrientation()
このセパレータの方向を返します。
戻り値:
方向プロパティの値。SwingConstants で定義されている定数 (VERTICAL または HORIZONTAL)
関連項目:
SwingConstants, setOrientation(int)

setOrientation

public void setOrientation(int orientation)
セパレータの方向を設定します。このプロパティのデフォルトの値は HORIZONTAL です。
パラメータ:
orientation - SwingConstants.HORIZONTAL または SwingConstants.VERTICAL
例外:
IllegalArgumentException - orientationSwingConstants.HORIZONTAL または SwingConstants.VERTICAL のいずれでもない場合
関連項目:
SwingConstants, getOrientation()

paramString

protected String paramString()
この JSeparator の文字列表現を返します。このメソッドはデバッグ専用であり、返される文字列の内容および形式は実装によって異なります。返される文字列は空の場合がありますが、null にはなりません。
オーバーライド:
クラス JComponent 内の paramString
戻り値:
この JSeparator の文字列表現

isFocusTraversable

public boolean isFocusTraversable()
このコンポーネントがフォーカスを受け取れるかどうかを示します。JSeparator はフォーカスを受け取れません。
オーバーライド:
クラス JComponent 内の isFocusTraversable
戻り値:
false

getAccessibleContext

public AccessibleContext getAccessibleContext()
この JSeparator に関連した AccessibleContext を返します。セパレータの場合、AccessibleContext は AccessibleJSeparator の形式を取ります。必要に応じて新規の AccessibleJSeparator インスタンスが作成されます。
定義:
インタフェース Accessible 内の getAccessibleContext
オーバーライド:
クラス JComponent 内の getAccessibleContext
戻り値:
この JSeparator の AccessibleContext として機能する AccessibleJSeparator

JavaTM 2 Platform
Std. Ed. v1.3

バグや機能要求の報告
さらに詳しい 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.