|
JavaTM Platform Standard Ed. 6 |
|||||||||
| 앞의 클래스 다음의 클래스 | 프레임 있어 프레임 없음 | |||||||||
| 개요 : 상자 | 필드 | 생성자 | 메소드 | 상세: 필드 | 생성자 | 메소드 | |||||||||
java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JMenuBar
public class JMenuBar
도구모음의 구현입니다. 메뉴를 구축하려면 , 도구모음에 JMenu 객체를 추가합니다. 사용자가 JMenu 객체를 선택하면(자), 대응하는 JPopupMenu 가 표시되어 사용자는 JMenuItem 의 어느쪽이든을 선택할 수가 있습니다.
도구모음의 사용 방법의 상세와 예에 대해서는, 「The Java Tutorial」의「How to Use Menus」를 참조해 주세요.
경고: Swing 는 thread에 대해서 안전하지는 않습니다. 자세한 것은,「Swing's Threading Policy」를 참조해 주세요.
경고: 이 클래스의 직렬화 된 객체는, 향후의 Swing 릴리스와 호환은 아니게 될 예정입니다. 현재의 직렬화의 지원는, 단기간의 운용이나, 같은 버젼의 Swing 를 실행하는 어플리케이션간의 RMI 에 적절하고 있습니다. JDK Version 1.4 이후, 모든 JavaBeans™ 의 장기간의 운용 지원는,java.beans 패키지에 추가되고 있습니다. 자세한 것은,XMLEncoder 를 참조해 주세요.
JMenu ,
JPopupMenu ,
JMenuItem | 상자의 클래스의 개요 | |
|---|---|
protected class |
JMenuBar.AccessibleJMenuBar
이 클래스는 JMenuBar 클래스용의 접근성? 지원를 구현하고 있습니다. |
| 클래스 javax.swing. JComponent 로부터 상속된 상자의 클래스/인터페이스 |
|---|
JComponent.AccessibleJComponent |
| 클래스 java.awt. Container 로부터 상속된 상자의 클래스/인터페이스 |
|---|
Container.AccessibleAWTContainer |
| 클래스 java.awt. Component 로부터 상속된 상자의 클래스/인터페이스 |
|---|
Component.AccessibleAWTComponent , Component.BaselineResizeBehavior , Component.BltBufferStrategy , Component.FlipBufferStrategy |
| 필드의 개요 |
|---|
| 클래스 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 |
| 인터페이스 java.awt.image. ImageObserver 로부터 상속된 필드 |
|---|
ABORT , ALLBITS , ERROR , FRAMEBITS , HEIGHT , PROPERTIES , SOMEBITS , WIDTH |
| 생성자 의 개요 | |
|---|---|
JMenuBar ()
새로운 도구모음을 작성합니다. |
|
| 메소드의 개요 | |
|---|---|
JMenu |
add (JMenu c)
도구모음의 마지막으로, 지정된 메뉴를 추가합니다. |
void |
addNotify ()
이 도구모음을 현재의 키보드 매니저에게 등록하기 위해서, JComponent.addNotify 를 오버라이드(override) 합니다. |
AccessibleContext |
getAccessibleContext ()
이 JMenuBar 에 관련한 AccessibleContext 를 돌려줍니다. |
Component |
getComponent ()
MenuElement 로서 구현됩니다. |
Component |
getComponentAtIndex (int i)
추천 되고 있지 않습니다. getComponent(int i) 로 옮겨졌습니다. |
int |
getComponentIndex (Component c)
지정된 컴퍼넌트의 인덱스를 돌려줍니다. |
JMenu |
getHelpMenu ()
도구모음의 헬프 메뉴를 가져옵니다. |
Insets |
getMargin ()
도구모음의 경계와 그 메뉴의 사이의 마진을 돌려줍니다. |
JMenu |
getMenu (int index)
도구모음의 지정된 위치의 메뉴를 돌려줍니다. |
int |
getMenuCount ()
도구모음의 항목수를 돌려줍니다. |
SingleSelectionModel |
getSelectionModel ()
단일의 선택을 취급하는 모델 객체를 돌려줍니다. |
MenuElement [] |
getSubElements ()
MenuElement 로서 구현되어 이 도구모음의 메뉴를 돌려줍니다. |
MenuBarUI |
getUI ()
도구모음의 현재의 UI 를 돌려줍니다. |
String |
getUIClassID ()
이 컴퍼넌트를 draw 하는 L&F 클래스의 이름을 돌려줍니다. |
boolean |
isBorderPainted ()
도구모음의 경계를 페인트 할 필요가 있는 경우에 true 를 돌려줍니다. |
boolean |
isSelected ()
도구모음의 컴퍼넌트가 현재 선택되고 있는 경우에 true 를 돌려줍니다. |
void |
menuSelectionChanged (boolean isIncluded)
MenuElement 로서 구현됩니다만, 처리는 실시하지 않습니다. |
protected void |
paintBorder (Graphics g)
BorderPainted 프로퍼티이 true 의 경우, 도구모음의 경계를 그립니다. |
protected String |
paramString ()
이 JMenuBar 의 캐릭터 라인 표현을 돌려줍니다. |
protected boolean |
processKeyBinding (KeyStroke ks,
KeyEvent e,
int condition,
boolean pressed)
모든 아이 메뉴를 확인하기 위해서 서브 클래스화 됩니다. |
void |
processKeyEvent (KeyEvent e,
MenuElement [] path,
MenuSelectionManager manager)
MenuElement 로서 구현됩니다만, 처리는 실시하지 않습니다. |
void |
processMouseEvent (MouseEvent event,
MenuElement [] path,
MenuSelectionManager manager)
MenuElement 로서 구현됩니다만, 처리는 실시하지 않습니다. |
void |
removeNotify ()
이 도구모음을 현재의 키보드 매니저로부터 등록 해제하기 위해서, JComponent.addNotify 를 오버라이드(override) 합니다. |
void |
setBorderPainted (boolean b)
경계를 페인트 할지 어떨지를 설정합니다. |
void |
setHelpMenu (JMenu menu)
사용자가 도구모음으로 「헬프 (help)」옵션을 선택한다고 표시되는 헬프 메뉴를 설정합니다. |
void |
setMargin (Insets m)
도구모음의 경계와 그 메뉴의 사이의 마진을 설정합니다. |
void |
setSelected (Component sel)
현재 선택되고 있는 컴퍼넌트를 설정합니다. |
void |
setSelectionModel (SingleSelectionModel model)
단일의 선택을 취급하는 모델 객체를 설정합니다. |
void |
setUI (MenuBarUI ui)
이 컴퍼넌트를 draw 하는 L&F 객체를 설정합니다. |
void |
updateUI ()
현재의 Look & Feel 로부터의 값을 가지는 UI 프로퍼티을 리셋 합니다. |
| 클래스 java.lang. Object 로부터 상속된 메소드 |
|---|
clone , equals , finalize , getClass , hashCode , notify , notifyAll , wait , wait , wait |
| 생성자 의 상세 |
|---|
public JMenuBar()
| 메소드의 상세 |
|---|
public MenuBarUI getUI()
setUI(javax.swing.plaf.MenuBarUI) public void setUI(MenuBarUI ui)
ui - 새로운 MenuBarUI L&F 객체UIDefaults.getUI(javax.swing.JComponent) public void updateUI()
JComponent 내의 updateUI JComponent.updateUI() public String getUIClassID()
JComponent 내의 getUIClassID JComponent.getUIClassID() ,
UIDefaults.getUI(javax.swing.JComponent) public SingleSelectionModel getSelectionModel()
SingleSelectionModel 프로퍼티SingleSelectionModel public void setSelectionModel(SingleSelectionModel model)
model - 사용하는 SingleSelectionModelSingleSelectionModel public JMenu add(JMenu c)
c - 추가하는 JMenu 컴퍼넌트
public JMenu getMenu(int index)
index - 도구모음의 위치를 나타내는 정수. 0 은 선두 위치
JMenu. 그 위치에 JMenu 가 없는 경우, 예를 들어 그것이 JMenuItem 의 경우는 nullpublic int getMenuCount()
public void setHelpMenu(JMenu menu)
menu - 사용자에게 헬프를 제시하는 JMenupublic JMenu getHelpMenu()
JMenu@Deprecated public Component getComponentAtIndex(int i)
getComponent(int i) 로 옮겨졌습니다.
i - 위치를 나타내는 정수. 0 은 선두
Component.
인덱스가 무효의 경우는 nullpublic int getComponentIndex(Component c)
c - 검색 대상의 Component
public void setSelected(Component sel)
sel - 선택하는 Componentpublic boolean isSelected()
public boolean isBorderPainted()
public void setBorderPainted(boolean b)
b - 이 파라미터가 true 로, 경계의 프로퍼티이 null 가 아닌 경우, 경계를 페인트 하는isBorderPainted() protected void paintBorder(Graphics g)
BorderPainted 프로퍼티이 true 의 경우, 도구모음의 경계를 그립니다.
JComponent 내의 paintBorder g - 페인트에 사용하는 Graphics 문맥JComponent.paint(java.awt.Graphics) ,
JComponent.setBorder(javax.swing.border.Border) public void setMargin(Insets m)
null 로 설정하면(자), 도구모음의 마진에는 디폴트가 사용됩니다.
m - 마진수를 보관 유지하는 Insets 객체Insets public Insets getMargin()
Insets 객체Insets
public void processMouseEvent(MouseEvent event,
MenuElement [] path,
MenuSelectionManager manager)
MenuElement 로서 구현됩니다만, 처리는 실시하지 않습니다.
MenuElement 내의 processMouseEvent getSubElements()
public void processKeyEvent(KeyEvent e,
MenuElement [] path,
MenuSelectionManager manager)
MenuElement 로서 구현됩니다만, 처리는 실시하지 않습니다.
MenuElement 내의 processKeyEvent getSubElements() public void menuSelectionChanged(boolean isIncluded)
MenuElement 로서 구현됩니다만, 처리는 실시하지 않습니다.
MenuElement 내의 menuSelectionChanged getSubElements() public MenuElement [] getSubElements()
MenuElement 로서 구현되어 이 도구모음의 메뉴를 돌려줍니다. 도구모음을 다른 메뉴 요소와 같이 취급할 수 있도록(듯이) 하기 위해서,MenuElement 인터페이스를 구현합니다.
MenuElement 내의 getSubElements public Component getComponent()
MenuElement 로서 구현됩니다. 이 객체를 돌려줍니다.
MenuElement 내의 getComponent Component (this 객체)getSubElements() protected String paramString()
JMenuBar 의 캐릭터 라인 표현을 돌려줍니다. 이 메소드는 디버그 전용이며, 반환되는 캐릭터 라인의 내용 및 형식은 구현에 따라서 다릅니다. 반환되는 캐릭터 라인은 빈 상태(empty)의 경우가 있습니다만,null 로는 되지 않습니다.
JComponent 내의 paramString JMenuBar 의 캐릭터 라인 표현public AccessibleContext getAccessibleContext()
Accessible 내의 getAccessibleContext JComponent 내의 getAccessibleContext
protected boolean processKeyBinding(KeyStroke ks,
KeyEvent e,
int condition,
boolean pressed)
JComponent 내의 processKeyBinding ks - 조회하는 KeyStrokee - KeyEventcondition - 다음의 값의 언젠가.
pressed - 키가 밀리고 있는 경우는 true
public void addNotify()
JComponent.addNotify 를 오버라이드(override) 합니다.
JComponent 내의 addNotify JComponent.registerKeyboardAction(java.awt.event.ActionListener, java.lang.String, javax.swing.KeyStroke, int) public void removeNotify()
JComponent.addNotify 를 오버라이드(override) 합니다.
JComponent 내의 removeNotify JComponent.registerKeyboardAction(java.awt.event.ActionListener, java.lang.String, javax.swing.KeyStroke, int)
|
JavaTM Platform Standard Ed. 6 |
|||||||||
| 앞의 클래스 다음의 클래스 | 프레임 있어 프레임 없음 | |||||||||
| 개요 : 상자 | 필드 | 생성자 | 메소드 | 상세: 필드 | 생성자 | 메소드 | |||||||||
Copyright 2006 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms . Documentation Redistribution Policy 도 참조해 주세요.