JavaTM Platform
Standard Ed. 6

javax.swing
클래스 JRootPane

java.lang.Object 
  상위를 확장 java.awt.Component 
      상위를 확장 java.awt.Container 
          상위를 확장 javax.swing.JComponent 
              상위를 확장 javax.swing.JRootPane
모든 구현된 인터페이스:
ImageObserver , MenuContainer , Serializable , Accessible


public class JRootPane
extends JComponent
implements Accessible

JFrame,JDialog,JWindow,JApplet, 및 JInternalFrame 가 내부에서 사용하는 경량 컨테이너입니다. 루트 구획이 제공하는 태스크 지향의 정보에 대해서는, 「The Java Tutorial」의「How to Use Root Panes」를 참조해 주세요.

다음의 이미지는 루트 구획을 사용하는 클래스간의 관계를 나타냅니다.

다음의 문장은, 이 그림에 대해 설명하고 있습니다.

「중량」컴퍼넌트 (피어 또는 호스트 시스템상의 네이티브 컴퍼넌트에 위양 하는 컴퍼넌트)는 진하고 무거운 것 같은 박스로 나타나고 있습니다. 4 개의 중량 JFC/Swing 컨테이너 (JFrame,JDialog,JWindow, 및 JApplet)는, 그것들이 확장하는 AWT 클래스와의 관련으로 나타나고 있습니다. Swing 라이브러리내의 중량 컨테이너는 이것들 4 개의 컴퍼넌트만입니다. 또, 경량 컨테이너의 JInternalFrame 도 나타나고 있습니다. 이것들 5 개의 JFC/Swing 컨테이너는 모두 RootPaneContainer 인터페이스를 구현해, 처리를 JRootPane (상부에 작은 「핸들」이 붙어 있다)에 위양 합니다.
주:JComponent 의 메소드 getRootPane 를 사용하면(자), 지정된 컴퍼넌트를 포함하고 있는 JRootPane 를 취득할 수 있습니다.
다음의 문장은, 이 그림에 대해 설명하고 있습니다.
우측의 그림은 JRootPane 의 구조를 나타내고 있습니다. JRootPane 는,glassPane, 옵션의 menuBar, 및 contentPane 로부터 완성됩니다. JLayeredPanemenuBarcontentPane 를 관리합니다. glassPane 는 모든 컴퍼넌트의 맨 위에 놓여져 마우스의 동작을 포착합니다. glassPane 는 (contentPane 와 같게), 임의 컴퍼넌트로 할 수 있으므로, draw를 위해서(때문에) glassPane 를 셋업 할 수도 있습니다. glassPane 상의선과 이미지는, 경계에 제한되는 일 없이, 아래의 프레임 전체를 가릴 수가 있습니다.  

menuBar 컴퍼넌트는 없어도 괜찮습니다가,layeredPane,contentPane, 및 glassPane 는 반드시 필요합니다. 이것들을 null 로 설정하려고 하면(자), 예외가 생성됩니다.  

JRootPane 에 컴퍼넌트를 추가하려면 (옵션의 도구모음과 달리), 다음과 같이 JRootPanecontentPane 에 객체를 추가합니다.

rootPane.getContentPane(). add(child);
 
같은 원칙이, 레이아웃 매니저의 설정, 컴퍼넌트의 삭제, 및 아이의 리스트 표시등으로도 적용됩니다. 이러한 메소드는 모두 JRootPane 는 아니고,contentPane 로 불려 갑니다.
주:contentPane 의 디폴트의 레이아웃 매니저는 BorderLayout 매니저입니다. 다만,JRootPane 는 커스텀 LayoutManager 를 사용합니다. 따라서,JRootPane 에 추가한 컴퍼넌트의 레이아웃 매니저를 변경할 때는, 반드시 다음과 같은 코드를 사용해 주세요.
rootPane.getContentPane(). setLayout(new BoxLayout());
 
JMenuBar 컴퍼넌트가 JRootPane 로 설정되었을 경우는, 프레임의 상단을 따라 배치됩니다. contentPane 의 위치와 사이즈는, 나머지의 영역에 수습되도록(듯이) 조정됩니다. JMenuBarcontentPane 은,JLayeredPane.FRAME_CONTENT_LAYER 층의 layeredPane 컴퍼넌트에 추가됩니다.  

layeredPaneJRootPane 의 모든 아이의 부모 (메뉴의 직접적인 부모, 및 contentPane 에 추가된 모든 컴퍼넌트의 부모의 양쪽 모두)입니다. layeredPane 는, 복수의 층으로 컴퍼넌트를 추가하는 기능을 제공하는 JLayeredPane 의 인스턴스입니다. 이 기능은, 메뉴 pop-up나 다이알로그 박스에서의 작업 및 드래그 등, 컴퍼넌트를 구획내외의 모든 컴퍼넌트의 맨 위에 배치할 필요가 있는 경우에 매우 편리합니다.  

glassPaneJRootPane 외의 모든 컴퍼넌트의 맨 위에 놓여집니다. 이것에 의해, 다른 모든 컴퍼넌트 위에 draw 하는데 적당한 장소가 제공되어 드래그나 draw 때에 편리한 마우스 이벤트의 포착이 가능하게 됩니다. glassPanesetVisible 를 사용하면(자), 언제 glassPane 가 다른 아이 위에 표시되는지를 제어할 수 있습니다. 디폴트에서는,glassPane 는 가시가 아닙니다.  

JRootPane 에 의해 사용되는 커스텀 LayoutManager 는 다음 일을 보증합니다.

  1. glassPaneJRootPane (경계 - 인 세트)의 표시 가능 영역 전체를 묻는다
  2. layeredPaneJRootPane (경계 - 인 세트)의 표시 가능 영역 전체를 묻는다
  3. menuBarlayeredPane 의 상단에 배치된다
  4. contentPane 는,menuBar 를 제외한 (존재하는 경우) 표시 가능 영역 전체를 묻는다
JRootPane 의 뷰 계층외의 뷰는 모두 무시됩니다.  

JRootPaneLayoutManager 를 치환하는 경우는, 이러한 뷰 모든 것을 관리할 필요가 있습니다. 따라서, 일반적으로은 JRootPane 는 아니고 contentPane 의 레이아웃 매니저를 변경하도록 해 주세요.  

Swing 의 페인트 아키텍쳐(architecture)에서는, 불투명한 JComponent 가 다른 모든 컴퍼넌트 위에 있는 포함 관계의 계층에 포함되어 있을 필요가 있습니다. 일반적으로, 이것은 컨텐츠 구획에 의해 제공됩니다. 컨텐츠 구획을 옮겨놓는 경우는,setOpaque(true) 에 의해 컨텐츠 구획을 불투명하게 하는 것을 추천합니다. 또, 컨텐츠 구획에 의해 paintComponent 가 오버라이드(override) 되는 경우는, 백그라운드를 paintComponent 의 불투명한 색으로 완전하게 전부 칠할 필요가 있습니다.  

경고: Swing 는 thread에 대해서 안전하지는 않습니다. 자세한 것은,「Swing's Threading Policy」를 참조해 주세요.  

경고: 이 클래스의 직렬화 된 객체는, 향후의 Swing 릴리스와 호환은 아니게 될 예정입니다. 현재의 직렬화의 지원는, 단기간의 운용이나, 같은 버젼의 Swing 를 실행하는 어플리케이션간의 RMI 에 적절하고 있습니다. JDK Version 1.4 이후, 모든 JavaBeans 의 장기간의 운용 지원는,java.beans 패키지에 추가되고 있습니다. 자세한 것은,XMLEncoder 를 참조해 주세요.

관련 항목:
JLayeredPane , JMenuBar , JWindow , JFrame , JDialog , JApplet , JInternalFrame , JComponent , BoxLayout , Mixing Heavy and Light Components

상자의 클래스의 개요
protected  class JRootPane.AccessibleJRootPane
          이 클래스는 JRootPane 클래스용의 접근성? 지원를 구현하고 있습니다.
protected  class JRootPane.RootLayout
          layeredPane, glassPane, 및 menuBar 의 레이아웃을 처리하는 커스텀 레이아웃 매니저입니다.
 
클래스 javax.swing. JComponent 로부터 상속된 상자의 클래스/인터페이스
JComponent.AccessibleJComponent
 
클래스 java.awt. Container 로부터 상속된 상자의 클래스/인터페이스
Container.AccessibleAWTContainer
 
클래스 java.awt. Component 로부터 상속된 상자의 클래스/인터페이스
Component.AccessibleAWTComponent , Component.BaselineResizeBehavior , Component.BltBufferStrategy , Component.FlipBufferStrategy
 
필드의 개요
static int COLOR_CHOOSER_DIALOG
          windowDecorationStyle 프로퍼티에 사용하는 정수입니다.
protected  Container contentPane
          컨텐츠 구획입니다.
protected  JButton defaultButton
          구획이 포커스와Enter 키를 누르는 등의 UI 고유의 액션을 가졌을 때에 액티브하게 되는 버튼입니다.
protected  javax.swing.JRootPane.DefaultAction defaultPressAction
          추천 되고 있지 않습니다.  Java 2 플랫폼 1.3 이후 사용되고 있지 않습니다.
protected  javax.swing.JRootPane.DefaultAction defaultReleaseAction
          추천 되고 있지 않습니다.  Java 2 플랫폼 1.3 이후 사용되고 있지 않습니다.
static int ERROR_DIALOG
          windowDecorationStyle 프로퍼티에 사용하는 정수입니다.
static int FILE_CHOOSER_DIALOG
          windowDecorationStyle 프로퍼티에 사용하는 정수입니다.
static int FRAME
          windowDecorationStyle 프로퍼티에 사용하는 정수입니다.
protected  Component glassPane
          도구모음과 컨텐츠 구획에 오버레이 하는 유리 구획입니다.
static int INFORMATION_DIALOG
          windowDecorationStyle 프로퍼티에 사용하는 정수입니다.
protected  JLayeredPane layeredPane
          도구모음과 컨텐츠 구획을 관리하는 계층화 구획입니다.
protected  JMenuBar menuBar
          도구모음입니다.
static int NONE
          windowDecorationStyle 프로퍼티에 사용하는 정수입니다.
static int PLAIN_DIALOG
          windowDecorationStyle 프로퍼티에 사용하는 정수입니다.
static int QUESTION_DIALOG
          windowDecorationStyle 프로퍼티에 사용하는 정수입니다.
static int WARNING_DIALOG
          windowDecorationStyle 프로퍼티에 사용하는 정수입니다.
 
클래스 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
 
생성자 의 개요
JRootPane ()
          JRootPane 를 작성해,glassPane,layeredPane, 및 contentPane 를 설정합니다.
 
메소드의 개요
protected  void addImpl (Component  comp, Object  constraints, int index)
          유리 컴퍼넌트의 위치가 0 의 아이에 대해서 강제하기 위해서 오버라이드(override) 됩니다.
 void addNotify ()
          자신을 새로운 루트 구획으로서 SystemEventQueueUtils 에 등록합니다.
protected  Container createContentPane ()
          디폴트의 contentPane 를 작성하기 위해서 생성자 의 메소드에 의해 불려 갑니다.
protected  Component createGlassPane ()
          디폴트의 glassPane 를 작성하기 위해서 생성자 의 메소드에 의해 불려 갑니다.
protected  JLayeredPane createLayeredPane ()
          디폴트의 layeredPane 를 작성하기 위해서 생성자 의 메소드에 의해 불려 갑니다.
protected  LayoutManager createRootLayout ()
          생성자 메소드에 의해 불려 가 디폴트의 layoutManager 를 작성합니다.
 AccessibleContext getAccessibleContext ()
          이 JRootPane 에 관련지을 수 있었던 AccessibleContext 를 돌려줍니다.
 Container getContentPane ()
          루트 구획이 부모가 되는 컴퍼넌트를 보관 유지하는 컨테이너인, 컨텐츠 구획을 돌려줍니다.
 JButton getDefaultButton ()
          defaultButton 의 프로퍼티의 값을 돌려줍니다.
 Component getGlassPane ()
          이 JRootPane 의 현재의 유리 구획을 돌려줍니다.
 JMenuBar getJMenuBar ()
          계층화 구획으로부터 도구모음을 돌려줍니다.
 JLayeredPane getLayeredPane ()
          루트 구획이 사용하는 계층화 구획을 돌려줍니다.
 JMenuBar getMenuBar ()
          추천 되고 있지 않습니다.  Swing version 1.0. 3 이후는, getJMenuBar() 로 옮겨졌습니다.
 RootPaneUI getUI ()
          이 컴퍼넌트를 draw 하는 L&F 객체를 돌려줍니다.
 String getUIClassID ()
          이 컴퍼넌트를 draw 하는 L&F 클래스의 이름을 캐릭터 라인으로 돌려줍니다.
 int getWindowDecorationStyle ()
          JRootPane 가 제공하는 Window 장식의 타입을 식별하는 정수를 돌려줍니다.
 boolean isOptimizedDrawingEnabled ()
          glassPanecontentPane 는 같은 경계를 가지기 (위해)때문에,JRootPane 는 그 아이를 타일링 하지 않고, false 를 돌려줍니다.
 boolean isValidateRoot ()
          이 JRootPane 의 하위 객체가 revalidate 를 호출했을 경우, 여기에서 아래로 향해 검증을 실시합니다.
protected  String paramString ()
          이 JRootPane 의 캐릭터 라인 표현을 돌려줍니다.
 void removeNotify ()
          자신을 SystemEventQueueUtils 로부터 등록 해제합니다.
 void setContentPane (Container  content)
          루트 구획이 부모가 되는 컴퍼넌트를 보관 유지하는 컨테이너인, 컨텐츠 구획을 설정합니다.
 void setDefaultButton (JButton  defaultButton)
          defaultButton 프로퍼티을 설정해, 이 JRootPane 의 현재의 디폴트 버튼을 지정합니다.
 void setDoubleBuffered (boolean aFlag)
          이 컴퍼넌트가 버퍼를 사용해 페인트 할지 어떨지를 설정합니다.
 void setGlassPane (Component  glass)
          지정한 Component 가 이 루트 구획의 유리 구획이 되도록(듯이) 설정합니다.
 void setJMenuBar (JMenuBar  menu)
          계층화 구획으로 사용되는 도구모음을 추가 또는 변경합니다.
 void setLayeredPane (JLayeredPane  layered)
          루트 구획에 계층화 구획을 설정합니다.
 void setMenuBar (JMenuBar  menu)
          추천 되고 있지 않습니다.  Swing version 1.0. 3 이후는, setJMenuBar(JMenuBar menu) 로 옮겨졌습니다.
 void setUI (RootPaneUI  ui)
          이 컴퍼넌트를 draw 하는 L&F 객체를 설정합니다.
 void setWindowDecorationStyle (int windowDecorationStyle)
          JRootPane 가 제공하는 장식의 종류 (경계, Window 를 닫기 위한 위젯, 타이틀등)를 설정합니다.
 void updateUI ()
          현재의 Look & Feel 로부터의 값에 UI 프로퍼티을 리셋 합니다.
 
클래스 javax.swing. JComponent 로부터 상속된 메소드
addAncestorListener , addVetoableChangeListener , computeVisibleRect , contains , createToolTip , disable , enable , firePropertyChange , firePropertyChange , firePropertyChange , fireVetoableChange , getActionForKeyStroke , getActionMap , getAlignmentX , getAlignmentY , getAncestorListeners , getAutoscrolls , getBaseline , getBaselineResizeBehavior , getBorder , getBounds , getClientProperty , getComponentGraphics , getComponentPopupMenu , getConditionForKeyStroke , getDebugGraphicsOptions , getDefaultLocale , getFontMetrics , getGraphics , getHeight , getInheritsPopupMenu , getInputMap , getInputMap , getInputVerifier , getInsets , getInsets , getListeners , getLocation , getMaximumSize , getMinimumSize , getNextFocusableComponent , getPopupLocation , getPreferredSize , getRegisteredKeyStrokes , getRootPane , getSize , getToolTipLocation , getToolTipText , getToolTipText , getTopLevelAncestor , getTransferHandler , getVerifyInputWhenFocusTarget , getVetoableChangeListeners , getVisibleRect , getWidth , getX , getY , grabFocus , isDoubleBuffered , isLightweightComponent , isManagingFocus , isOpaque , isPaintingForPrint , isPaintingTile , isRequestFocusEnabled , paint , paintBorder , paintChildren , paintComponent , paintImmediately , paintImmediately , print , printAll , printBorder , printChildren , printComponent , processComponentKeyEvent , processKeyBinding , processKeyEvent , processMouseEvent , processMouseMotionEvent , putClientProperty , registerKeyboardAction , registerKeyboardAction , removeAncestorListener , removeVetoableChangeListener , repaint , repaint , requestDefaultFocus , requestFocus , requestFocus , requestFocusInWindow , requestFocusInWindow , resetKeyboardActions , reshape , revalidate , scrollRectToVisible , setActionMap , setAlignmentX , setAlignmentY , setAutoscrolls , setBackground , setBorder , setComponentPopupMenu , setDebugGraphicsOptions , setDefaultLocale , setEnabled , setFocusTraversalKeys , setFont , setForeground , setInheritsPopupMenu , setInputMap , setInputVerifier , setMaximumSize , setMinimumSize , setNextFocusableComponent , setOpaque , setPreferredSize , setRequestFocusEnabled , setToolTipText , setTransferHandler , setUI , setVerifyInputWhenFocusTarget , setVisible , unregisterKeyboardAction , update
 
클래스 java.awt. Container 로부터 상속된 메소드
add , add , add , add , add , addContainerListener , addPropertyChangeListener , addPropertyChangeListener , applyComponentOrientation , areFocusTraversalKeysSet , countComponents , deliverEvent , doLayout , findComponentAt , findComponentAt , getComponent , getComponentAt , getComponentAt , getComponentCount , getComponents , getComponentZOrder , getContainerListeners , getFocusTraversalKeys , getFocusTraversalPolicy , getLayout , getMousePosition , insets , invalidate , isAncestorOf , isFocusCycleRoot , isFocusCycleRoot , isFocusTraversalPolicyProvider , isFocusTraversalPolicySet , layout , list , list , locate , minimumSize , paintComponents , preferredSize , printComponents , processContainerEvent , processEvent , remove , remove , removeAll , removeContainerListener , setComponentZOrder , setFocusCycleRoot , setFocusTraversalPolicy , setFocusTraversalPolicyProvider , setLayout , transferFocusBackward , transferFocusDownCycle , validate , validateTree
 
클래스 java.awt. Component 로부터 상속된 메소드
action , add , addComponentListener , addFocusListener , addHierarchyBoundsListener , addHierarchyListener , addInputMethodListener , addKeyListener , addMouseListener , addMouseMotionListener , addMouseWheelListener , bounds , checkImage , checkImage , coalesceEvents , contains , createImage , createImage , createVolatileImage , createVolatileImage , disableEvents , dispatchEvent , enable , enableEvents , enableInputMethods , firePropertyChange , firePropertyChange , firePropertyChange , firePropertyChange , firePropertyChange , firePropertyChange , getBackground , getBounds , getColorModel , getComponentListeners , getComponentOrientation , getCursor , getDropTarget , getFocusCycleRootAncestor , getFocusListeners , getFocusTraversalKeysEnabled , getFont , getForeground , getGraphicsConfiguration , getHierarchyBoundsListeners , getHierarchyListeners , getIgnoreRepaint , getInputContext , getInputMethodListeners , getInputMethodRequests , getKeyListeners , getLocale , getLocation , getLocationOnScreen , getMouseListeners , getMouseMotionListeners , getMousePosition , getMouseWheelListeners , getName , getParent , getPeer , getPropertyChangeListeners , getPropertyChangeListeners , getSize , getToolkit , getTreeLock , gotFocus , handleEvent , hasFocus , hide , imageUpdate , inside , isBackgroundSet , isCursorSet , isDisplayable , isEnabled , isFocusable , isFocusOwner , isFocusTraversable , isFontSet , isForegroundSet , isLightweight , isMaximumSizeSet , isMinimumSizeSet , isPreferredSizeSet , isShowing , isValid , isVisible , keyDown , keyUp , list , list , list , location , lostFocus , mouseDown , mouseDrag , mouseEnter , mouseExit , mouseMove , mouseUp , move , nextFocus , paintAll , postEvent , prepareImage , prepareImage , processComponentEvent , processFocusEvent , processHierarchyBoundsEvent , processHierarchyEvent , processInputMethodEvent , processMouseWheelEvent , remove , removeComponentListener , removeFocusListener , removeHierarchyBoundsListener , removeHierarchyListener , removeInputMethodListener , removeKeyListener , removeMouseListener , removeMouseMotionListener , removeMouseWheelListener , removePropertyChangeListener , removePropertyChangeListener , repaint , repaint , repaint , resize , resize , setBounds , setBounds , setComponentOrientation , setCursor , setDropTarget , setFocusable , setFocusTraversalKeysEnabled , setIgnoreRepaint , setLocale , setLocation , setLocation , setName , setSize , setSize , show , show , size , toString , transferFocus , transferFocusUpCycle
 
클래스 java.lang. Object 로부터 상속된 메소드
clone , equals , finalize , getClass , hashCode , notify , notifyAll , wait , wait , wait
 

필드의 상세

NONE

public static final int NONE
windowDecorationStyle 프로퍼티에 사용하는 정수입니다. JRootPane 가 어떤 Window 장식도 제공하지 않게 지시합니다.

도입된 버젼:
1.4
관련 항목:
정수 필드치

FRAME

public static final int FRAME
windowDecorationStyle 프로퍼티에 사용하는 정수입니다. JRootPane 가 Frame 에 적절한 장식을 제공하도록(듯이) 지시합니다.

도입된 버젼:
1.4
관련 항목:
정수 필드치

PLAIN_DIALOG

public static final int PLAIN_DIALOG
windowDecorationStyle 프로퍼티에 사용하는 정수입니다. JRootPane 가 Dialog 에 적절한 장식을 제공하도록(듯이) 지시합니다.

도입된 버젼:
1.4
관련 항목:
정수 필드치

INFORMATION_DIALOG

public static final int INFORMATION_DIALOG
windowDecorationStyle 프로퍼티에 사용하는 정수입니다. JRootPane 가, 정보 메세지를 표시하기 위한 Dialog 에 적절한 장식을 제공하도록(듯이) 지시합니다.

도입된 버젼:
1.4
관련 항목:
정수 필드치

ERROR_DIALOG

public static final int ERROR_DIALOG
windowDecorationStyle 프로퍼티에 사용하는 정수입니다. JRootPane 가, 에러 메세지를 표시하기 위한 Dialog 에 적절한 장식을 제공하도록(듯이) 지시합니다.

도입된 버젼:
1.4
관련 항목:
정수 필드치

COLOR_CHOOSER_DIALOG

public static final int COLOR_CHOOSER_DIALOG
windowDecorationStyle 프로퍼티에 사용하는 정수입니다. JRootPane 가,JColorChooser 를 표시하기 위한 Dialog 에 적절한 장식을 제공하도록(듯이) 지시합니다.

도입된 버젼:
1.4
관련 항목:
정수 필드치

FILE_CHOOSER_DIALOG

public static final int FILE_CHOOSER_DIALOG
windowDecorationStyle 프로퍼티에 사용하는 정수입니다. JRootPane 가,JFileChooser 를 표시하기 위한 Dialog 에 적절한 장식을 제공하도록(듯이) 지시합니다.

도입된 버젼:
1.4
관련 항목:
정수 필드치

QUESTION_DIALOG

public static final int QUESTION_DIALOG
windowDecorationStyle 프로퍼티에 사용하는 정수입니다. JRootPane 가, 사용자에게 퀘스쳔을 표시하기 위한 Dialog 에 적절한 장식을 제공하도록(듯이) 지시합니다.

도입된 버젼:
1.4
관련 항목:
정수 필드치

WARNING_DIALOG

public static final int WARNING_DIALOG
windowDecorationStyle 프로퍼티에 사용하는 정수입니다. JRootPane 가, 경고 메세지를 표시하기 위한 Dialog 에 적절한 장식을 제공하도록(듯이) 지시합니다.

도입된 버젼:
1.4
관련 항목:
정수 필드치

menuBar

protected JMenuBar  menuBar
도구모음입니다.


contentPane

protected Container  contentPane
컨텐츠 구획입니다.


layeredPane

protected JLayeredPane  layeredPane
도구모음과 컨텐츠 구획을 관리하는 계층화 구획입니다.


glassPane

protected Component  glassPane
도구모음과 컨텐츠 구획에 오버레이 하는 유리 구획입니다. 마우스의 동작등을 포착할 수 있습니다.


defaultButton

protected JButton  defaultButton
구획이 포커스와Enter 키를 누르는 등의 UI 고유의 액션을 가졌을 때에 액티브하게 되는 버튼입니다.


defaultPressAction

@Deprecated 
protected javax.swing.JRootPane.DefaultAction defaultPressAction
추천 되고 있지 않습니다.  Java 2 플랫폼 1.3 이후 사용되고 있지 않습니다.
Java 2 플랫폼 1.3 이후, 이 사용 불가 필드는 사용되고 있지 않습니다. 디폴트의 버튼을 오버라이드(override) 하려면 ,JRootPaneActionMapAction 를 옮겨놓습니다. 자세한 것은, 키 바인딩 스펙을 참조해 주세요.

관련 항목:
defaultButton

defaultReleaseAction

@Deprecated 
protected javax.swing.JRootPane.DefaultAction defaultReleaseAction
추천 되고 있지 않습니다.  Java 2 플랫폼 1.3 이후 사용되고 있지 않습니다.
Java 2 플랫폼 1.3 이후, 이 사용 불가 필드는 사용되고 있지 않습니다. 디폴트의 버튼을 오버라이드(override) 하려면 ,JRootPaneActionMapAction 를 옮겨놓습니다. 자세한 것은, 키 바인딩 스펙을 참조해 주세요.

관련 항목:
defaultButton
생성자 의 상세

JRootPane

public JRootPane()
JRootPane 를 작성해,glassPane,layeredPane, 및 contentPane 를 설정합니다.

메소드의 상세

setDoubleBuffered

public void setDoubleBuffered(boolean aFlag)
이 컴퍼넌트가 버퍼를 사용해 페인트 할지 어떨지를 설정합니다. true 로 설정되어 있는 경우, 이 컴퍼넌트로부터의 모든 draw는 오프 스크린 draw 버퍼로 행해집니다. 그리고 오프 스크린 draw 버퍼가 화면에 카피됩니다. Component 가 버퍼링 되고 있어 게다가 위객체도 버퍼링 되고 있는 경우, 상위 객체의 버퍼가 사용됩니다.

오버라이드(override):
클래스 JComponent 내의 setDoubleBuffered
파라미터:
aFlag - true 의 경우, 이 컴퍼넌트로 더블 버퍼를 사용하도록(듯이) 설정
도입된 버젼:
1.6

getWindowDecorationStyle

public int getWindowDecorationStyle()
JRootPane 가 제공하는 Window 장식의 타입을 식별하는 정수를 돌려줍니다.

반환값:
NONE,FRAME, PLAIN_DIALOG,INFORMATION_DIALOG, ERROR_DIALOG,COLOR_CHOOSER_DIALOG, FILE_CHOOSER_DIALOG,QUESTION_DIALOG, 또는 WARNING_DIALOG 의 어떤 것이나
도입된 버젼:
1.4
관련 항목:
setWindowDecorationStyle(int)

setWindowDecorationStyle

public void setWindowDecorationStyle(int windowDecorationStyle)
JRootPane 가 제공하는 장식의 종류 (경계, Window 를 닫기 위한 위젯, 타이틀등)를 설정합니다. 디폴트의 설정은 Window 장식 없음 (NONE)입니다.  

이것은 힌트에 지나지 않고, 일부의 Look & Feel 는 이것을 지원하고 있습니다. 이것은 바운드 프로퍼티입니다.

파라미터:
windowDecorationStyle - 제공하는 윈도우의 장식을 식별하는 정수
예외:
IllegalArgumentException - styleNONE,FRAME, PLAIN_DIALOG,INFORMATION_DIALOG, ERROR_DIALOG,COLOR_CHOOSER_DIALOG, FILE_CHOOSER_DIALOG,QUESTION_DIALOG, 또는 WARNING_DIALOG 의 머지않아도 아닌 경우
도입된 버젼:
1.4
관련 항목:
JDialog.setDefaultLookAndFeelDecorated(boolean) , JFrame.setDefaultLookAndFeelDecorated(boolean) , LookAndFeel.getSupportsWindowDecorations()

getUI

public RootPaneUI  getUI()
이 컴퍼넌트를 draw 하는 L&F 객체를 돌려줍니다.

반환값:
LabelUI 객체
도입된 버젼:
1.3

setUI

public void setUI(RootPaneUI  ui)
이 컴퍼넌트를 draw 하는 L&F 객체를 설정합니다.

파라미터:
ui - LabelUI L&F 객체
도입된 버젼:
1.3
관련 항목:
UIDefaults.getUI(javax.swing.JComponent)

updateUI

public void updateUI()
현재의 Look & Feel 로부터의 값에 UI 프로퍼티을 리셋 합니다.

오버라이드(override):
클래스 JComponent 내의 updateUI
관련 항목:
JComponent.updateUI()

getUIClassID

public String  getUIClassID()
이 컴퍼넌트를 draw 하는 L&F 클래스의 이름을 캐릭터 라인으로 돌려줍니다.

오버라이드(override):
클래스 JComponent 내의 getUIClassID
반환값:
캐릭터 라인 「RootPaneUI」
관련 항목:
JComponent.getUIClassID() , UIDefaults.getUI(javax.swing.JComponent)

createLayeredPane

protected JLayeredPane  createLayeredPane()
디폴트의 layeredPane 를 작성하기 위해서 생성자 의 메소드에 의해 불려 갑니다. 디폴트에서는, 새로운 JLayeredPane 를 작성합니다.

반환값:
디폴트의 layeredPane

createContentPane

protected Container  createContentPane()
디폴트의 contentPane 를 작성하기 위해서 생성자 의 메소드에 의해 불려 갑니다. 디폴트에서는, 이 메소드는 새로운 JComponent 를 작성해,LayoutManager 로서 BorderLayout 를 설정합니다.

반환값:
디폴트의 contentPane

createGlassPane

protected Component  createGlassPane()
디폴트의 glassPane 를 작성하기 위해서 생성자 의 메소드에 의해 불려 갑니다. 디폴트에서는, 이 메소드는 가시성을 false 로 설정해 새로운 JComponent 를 작성합니다.

반환값:
디폴트의 glassPane

createRootLayout

protected LayoutManager  createRootLayout()
생성자 메소드에 의해 불려 가 디폴트의 layoutManager 를 작성합니다.

반환값:
디폴트의 LayoutManager

setJMenuBar

public void setJMenuBar(JMenuBar  menu)
계층화 구획으로 사용되는 도구모음을 추가 또는 변경합니다.

파라미터:
menu - 추가하는 JMenuBar

setMenuBar

@Deprecated 
public void setMenuBar(JMenuBar  menu)
추천 되고 있지 않습니다.  Swing version 1.0. 3 이후는, setJMenuBar(JMenuBar menu) 로 옮겨졌습니다.

도구모음의 값을 지정합니다.

파라미터:
menu - 추가하는 JMenuBar

getJMenuBar

public JMenuBar  getJMenuBar()
계층화 구획으로부터 도구모음을 돌려줍니다.

반환값:
구획으로 사용되는 JMenuBar

getMenuBar

@Deprecated 
public JMenuBar  getMenuBar()
추천 되고 있지 않습니다.  Swing version 1.0. 3 이후는, getJMenuBar() 로 옮겨졌습니다.

도구모음의 값을 돌려줍니다.

반환값:
구획으로 사용되는 JMenuBar

setContentPane

public void setContentPane(Container  content)
루트 구획이 부모가 되는 컴퍼넌트를 보관 유지하는 컨테이너인, 컨텐츠 구획을 설정합니다.  

Swing 의 페인트 아키텍쳐(architecture)에서는, 포함 관계의 계층에 불투명한 JComponent 가 포함되어 있을 필요가 있습니다. 일반적으로, 이것은 컨텐츠 구획이야는 제공됩니다. 컨텐츠 구획을 옮겨놓는 경우는, 불투명한 JComponent 와 옮겨놓는 것을 추천합니다.

파라미터:
content - 컴퍼넌트 컨텐츠에 사용하는 Container
예외:
IllegalComponentStateException - 계층화 구획 파라미터가 null 의 경우 (실행시 예외)

getContentPane

public Container  getContentPane()
루트 구획이 부모가 되는 컴퍼넌트를 보관 유지하는 컨테이너인, 컨텐츠 구획을 돌려줍니다.

반환값:
컴퍼넌트 컨텐츠를 보관 유지하는 Container

setLayeredPane

public void setLayeredPane(JLayeredPane  layered)
루트 구획에 계층화 구획을 설정합니다. 일반적으로, 계층화 구획은 컨텐츠 구획과 옵션의 JMenuBar 를 보관 유지합니다.

파라미터:
layered - 사용하는 JLayeredPane
예외:
IllegalComponentStateException - 계층화 구획 파라미터가 null 의 경우 (실행시 예외)

getLayeredPane

public JLayeredPane  getLayeredPane()
루트 구획이 사용하는 계층화 구획을 돌려줍니다. 일반적으로, 계층화 구획은 컨텐츠 구획과 옵션의 JMenuBar 를 보관 유지합니다.

반환값:
현재 사용하고 있는 JLayeredPane

setGlassPane

public void setGlassPane(Component  glass)
지정한 Component 가 이 루트 구획의 유리 구획이 되도록(듯이) 설정합니다. 루트 구획이 입력 이벤트를 포착할 필요가 있을 때는 반드시 가시로 되므로, 일반적으로, 유리 구획은 경량의 투명한 컴퍼넌트일 필요가 있습니다.  

새로운 유리 구획의 가시 설정은, 현재의 유리 구획의 가시 설정에 일치하도록(듯이) 변경됩니다. 이 때문에, 유리 구획을 옮겨놓아 가시로 할 때는, 주의가 필요합니다. 다음의 몇개의 방법을 사용합니다.

root.setGlassPane(newGlassPane);
newGlassPane.setVisible(true);
 
또는
root.getGlassPane(). setVisible(true);
root.setGlassPane(newGlassPane);
 

파라미터:
glass - 이 JRootPane 의 유리 구획으로서 사용하는 Component
예외:
NullPointerException - glass 파라미터가 null 의 경우

getGlassPane

public Component  getGlassPane()
JRootPane 의 현재의 유리 구획을 돌려줍니다.

반환값:
현재의 유리 구획
관련 항목:
setGlassPane(java.awt.Component)

isValidateRoot

public boolean isValidateRoot()
JRootPane 의 하위 객체가 revalidate 를 호출했을 경우, 여기에서 아래로 향해 검증을 실시합니다.

컴퍼넌트 및 그 자손의 재배치가 연기된 요구입니다. 예를 들어,revalidate 의 호출은,JRootPane 또는 JScrollPane 의 어딘가에 전송 됩니다. 이것은 어느 쪽의 클래스도 isValidateRoot 를 오버라이드(override) 해 true 를 돌려주기 (위해)때문에입니다.

오버라이드(override):
클래스 JComponent 내의 isValidateRoot
반환값:
true
관련 항목:
JComponent.isValidateRoot()

isOptimizedDrawingEnabled

public boolean isOptimizedDrawingEnabled()
glassPanecontentPane 는 같은 경계를 가지기 (위해)때문에,JRootPane 는 그 아이를 타일링 하지 않고, false 를 돌려줍니다. 한편, 일반적으로 glassPane 는 불가시이므로,glassPane 가 가시가 아닌 경우, true 를 돌려줍니다. 즉, 이 메소드의 반환값은 glassPane 의 가시성에 따라서 다릅니다.

오버라이드(override):
클래스 JComponent 내의 isOptimizedDrawingEnabled
반환값:
이 컴퍼넌트의 아이가 오버랩 하지 않는 경우는 true

addNotify

public void addNotify()
자신을 새로운 루트 구획으로서 SystemEventQueueUtils 에 등록합니다.

오버라이드(override):
클래스 JComponent 내의 addNotify
관련 항목:
JComponent.registerKeyboardAction(java.awt.event.ActionListener, java.lang.String, javax.swing.KeyStroke, int)

removeNotify

public void removeNotify()
자신을 SystemEventQueueUtils 로부터 등록 해제합니다.

오버라이드(override):
클래스 JComponent 내의 removeNotify
관련 항목:
addNotify()

setDefaultButton

public void setDefaultButton(JButton  defaultButton)
defaultButton 프로퍼티을 설정해, 이 JRootPane 의 현재의 디폴트 버튼을 지정합니다. 디폴트 버튼은, 버튼에 키보드 포커스가 있을지 어떨지에 관계없이, 루트 구획으로 UI 정의의 기동 이벤트 (일반적으로은 Enter 키)가 발생했을 때에 기동되는 버튼입니다 (루트 구획내에 JTextPane 등의 기동 이벤트를 소비하는 다른 컴퍼넌트가 있는 경우를 제외하다). 디폴트의 기동이 기능하려면 , 버튼은 기동이 발생한 시점에서 루트 구획의 사용 가능한 자손일 필요가 있습니다. 이 루트 구획으로부터 디폴트 버튼을 삭제하려면 , 이 프로퍼티을 null 로 설정합니다.

파라미터:
defaultButton - 디폴트 버튼이 되는 JButton
관련 항목:
JButton.isDefaultButton()

getDefaultButton

public JButton  getDefaultButton()
defaultButton 의 프로퍼티의 값을 돌려줍니다.

반환값:
현재 디폴트 버튼인 JButton
관련 항목:
setDefaultButton(javax.swing.JButton)

addImpl

protected void addImpl(Component  comp,
                       Object  constraints,
                       int index)
유리 컴퍼넌트의 위치가 0 의 아이에 대해서 강제하기 위해서 오버라이드(override) 됩니다.

오버라이드(override):
클래스 Container 내의 addImpl
파라미터:
comp - 확장되는 컴퍼넌트
constraints - 준수되어야 할 제약
index - 인덱스
관련 항목:
Container.add(Component) , Container.add(Component, int) , Container.add(Component, java.lang.Object) , LayoutManager , LayoutManager2

paramString

protected String  paramString()
JRootPane 의 캐릭터 라인 표현을 돌려줍니다. 이 메소드는 디버그 전용이며, 반환되는 캐릭터 라인의 내용 및 형식은 구현에 따라서 다릅니다. 반환되는 캐릭터 라인은 빈 상태(empty)의 경우가 있습니다만,null 로는 되지 않습니다.

오버라이드(override):
클래스 JComponent 내의 paramString
반환값:
JRootPane 의 캐릭터 라인 표현

getAccessibleContext

public AccessibleContext  getAccessibleContext()
JRootPane 에 관련지을 수 있었던 AccessibleContext 를 돌려줍니다. 루트 구획의 경우,AccessibleContextAccessibleJRootPane 의 형식을 취합니다. 필요한 경우는, 새로운 AccessibleJRootPane 인스턴스가 작성됩니다.

정의:
인터페이스 Accessible 내의 getAccessibleContext
오버라이드(override):
클래스 JComponent 내의 getAccessibleContext
반환값:
JRootPaneAccessibleContext 로서 기능하는 AccessibleJRootPane

JavaTM Platform
Standard Ed. 6

버그의 보고와 기능의 요청
한층 더 자세한 API 레퍼런스 및 개발자 문서에 대해서는,Java SE 개발자용 문서를 참조해 주세요. 개발자전용의 상세한 해설, 개념의 개요, 용어의 정의, 버그의 회피책, 및 코드 실례가 포함되어 있습니다.

Copyright 2006 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms . Documentation Redistribution Policy 도 참조해 주세요.