|
JavaTM Platform Standard Ed. 6 |
|||||||||
앞의 클래스 다음의 클래스 | 프레임 있어 프레임 없음 | |||||||||
개요 : 상자 | 필드 | 생성자 | 메소드 | 상세 : 필드 | 생성자 | 메소드 |
java.lang.Objectjavax.swing.plaf.ComponentUI
javax.swing.plaf.ButtonUI
javax.swing.plaf.MenuItemUI
javax.swing.plaf.basic.BasicMenuItemUI
public class BasicMenuItemUI
BasicMenuItem 의 구현입니다.
상자의 클래스의 개요 | |
---|---|
protected class |
BasicMenuItemUI.MouseInputHandler
|
필드의 개요 | |
---|---|
protected Font |
acceleratorFont
|
protected Color |
acceleratorForeground
|
protected Color |
acceleratorSelectionForeground
|
protected Icon |
arrowIcon
|
protected Icon |
checkIcon
|
protected int |
defaultTextIconGap
|
protected Color |
disabledForeground
|
protected MenuDragMouseListener |
menuDragMouseListener
|
protected JMenuItem |
menuItem
|
protected MenuKeyListener |
menuKeyListener
|
protected MouseInputListener |
mouseInputListener
|
protected boolean |
oldBorderPainted
|
protected PropertyChangeListener |
propertyChangeListener
createPropertyChangeListener 로부터 반환되는 PropertyChangeListener 입니다. |
protected Color |
selectionBackground
|
protected Color |
selectionForeground
|
생성자 의 개요 | |
---|---|
BasicMenuItemUI ()
|
메소드의 개요 | |
---|---|
protected MenuDragMouseListener |
createMenuDragMouseListener (JComponent c)
|
protected MenuKeyListener |
createMenuKeyListener (JComponent c)
|
protected MouseInputListener |
createMouseInputListener (JComponent c)
|
protected PropertyChangeListener |
createPropertyChangeListener (JComponent c)
메뉴 항목에 추가되는 PropertyChangeListener 를 작성합니다. |
static ComponentUI |
createUI (JComponent c)
|
protected void |
doClick (MenuSelectionManager msm)
메뉴 항목의 기동시에, 이 메소드를 호출합니다. |
Dimension |
getMaximumSize (JComponent c)
Look & Feel 에 적절한, 지정된 컴퍼넌트의 최대 사이즈를 돌려줍니다. |
Dimension |
getMinimumSize (JComponent c)
Look & Feel 에 적절한, 지정된 컴퍼넌트의 최소 사이즈를 돌려줍니다. |
MenuElement [] |
getPath ()
|
protected Dimension |
getPreferredMenuItemSize (JComponent c,
Icon checkIcon,
Icon arrowIcon,
int defaultTextIconGap)
|
Dimension |
getPreferredSize (JComponent c)
Look & Feel 에 적절한, 지정된 컴퍼넌트의 적절한 사이즈를 돌려줍니다. |
protected String |
getPropertyPrefix ()
|
protected void |
installComponents (JMenuItem menuItem)
|
protected void |
installDefaults ()
|
protected void |
installKeyboardActions ()
|
protected void |
installListeners ()
|
void |
installUI (JComponent c)
Look & Feel 에 적절한, 지정된 컴퍼넌트를 구성합니다. |
void |
paint (Graphics g,
JComponent c)
Look &Feel 에 적절한, 지정된 컴퍼넌트를 그립니다. |
protected void |
paintBackground (Graphics g,
JMenuItem menuItem,
Color bgColor)
메뉴 항목의 백그라운드를 draw 합니다. |
protected void |
paintMenuItem (Graphics g,
JComponent c,
Icon checkIcon,
Icon arrowIcon,
Color background,
Color foreground,
int defaultTextIconGap)
|
protected void |
paintText (Graphics g,
JMenuItem menuItem,
Rectangle textRect,
String text)
현재의 메뉴 항목의 텍스트를 draw 합니다. |
protected void |
uninstallComponents (JMenuItem menuItem)
|
protected void |
uninstallDefaults ()
|
protected void |
uninstallKeyboardActions ()
|
protected void |
uninstallListeners ()
|
void |
uninstallUI (JComponent c)
installUI 시에, 지정된 컴퍼넌트로 구성된 내용을 취소합니다. |
void |
update (Graphics g,
JComponent c)
paintMenuItem()로 백그라운드를 draw 하기 위해서, 디폴트로 불투명한 컴퍼넌트의 백그라운드를 전부 칠하는 update 를 오버라이드(override) 해, paint()를 호출하는 만큼 합니다. |
클래스 javax.swing.plaf. ComponentUI 로부터 상속된 메소드 |
---|
contains , getAccessibleChild , getAccessibleChildrenCount , getBaseline , getBaselineResizeBehavior |
클래스 java.lang. Object 로부터 상속된 메소드 |
---|
clone , equals , finalize , getClass , hashCode , notify , notifyAll , toString , wait , wait , wait |
필드의 상세 |
---|
protected JMenuItem menuItem
protected Color selectionBackground
protected Color selectionForeground
protected Color disabledForeground
protected Color acceleratorForeground
protected Color acceleratorSelectionForeground
protected int defaultTextIconGap
protected Font acceleratorFont
protected MouseInputListener mouseInputListener
protected MenuDragMouseListener menuDragMouseListener
protected MenuKeyListener menuKeyListener
protected PropertyChangeListener propertyChangeListener
createPropertyChangeListener
로부터 반환되는 PropertyChangeListener
입니다. 이 필드에 액세스 할 필요는 없습니다. PropertyChangeListener
를 커스터마이즈 하는 경우는,createPropertyChangeListener
를 오버라이드(override) 합니다.
createPropertyChangeListener(javax.swing.JComponent)
protected Icon arrowIcon
protected Icon checkIcon
protected boolean oldBorderPainted
생성자 의 상세 |
---|
public BasicMenuItemUI()
메소드의 상세 |
---|
public static ComponentUI createUI(JComponent c)
public void installUI(JComponent c)
ComponentUI
의 기술:ComponentUI
인스턴스가, 지정된 컴퍼넌트의 UI 위양으로서 인스톨 되고 있을 때 불려 갑니다. 이 메소드는, 이하를 포함한 Look & Feel 용의 컴퍼넌트를 완전하게 구성할 필요가 있습니다.
LayoutManager
를 인스톨 한다
PropertyChangeListener
를 컴퍼넌트에 작성 또는 인스톨 한다
ComponentUI
내의 installUI
c
- UI 위양이 인스톨 되고 있는 컴퍼넌트ComponentUI.uninstallUI(javax.swing.JComponent)
,
JComponent.setUI(javax.swing.plaf.ComponentUI)
,
JComponent.updateUI()
protected void installDefaults()
protected void installComponents(JMenuItem menuItem)
protected String getPropertyPrefix()
protected void installListeners()
protected void installKeyboardActions()
public void uninstallUI(JComponent c)
ComponentUI
의 기술:installUI
시에, 지정된 컴퍼넌트로 구성된 내용을 취소합니다. 이 메소드는, 지정된 컴퍼넌트의 UI 위양으로서의 UIComponent
인스턴스가 삭제되고 있을 때 불려 갑니다. 이 메소드는,installUI
에 의해 실행된 구성을 바탕으로 되돌릴 필요가 있습니다. 이 경우,JComponent
인스턴스를 깨끗한 상태 (여분의 청취자나, Look & Feel 고유의 프로퍼티 객체가 남지 않게)로 하도록(듯이) 충분히 주의해 주세요. 순서에는 다음의 것이 있습니다.
ComponentUI
내의 uninstallUI
c
- 이 UI 위양을 삭제하는 컴퍼넌트.
이 인수는 일반적으로 무시되지만,
UI 객체에 상태가 없고, 복수의 컴퍼넌트에 공유되고 있는 경우는
사용되는 일이 있는ComponentUI.installUI(javax.swing.JComponent)
,
JComponent.updateUI()
protected void uninstallDefaults()
protected void uninstallComponents(JMenuItem menuItem)
protected void uninstallListeners()
protected void uninstallKeyboardActions()
protected MouseInputListener createMouseInputListener(JComponent c)
protected MenuDragMouseListener createMenuDragMouseListener(JComponent c)
protected MenuKeyListener createMenuKeyListener(JComponent c)
protected PropertyChangeListener createPropertyChangeListener(JComponent c)
PropertyChangeListener
를 작성합니다. 이 메소드가 null 를 돌려주는 경우, 이것은 메뉴 항목에 추가되지 않습니다.
PropertyChangeListener
의 인스턴스, 또는 nullpublic Dimension getMinimumSize(JComponent c)
ComponentUI
의 기술:null
가 반환되는 경우, 최소 사이즈는 대신에 컴퍼넌트의 레이아웃 매니저에 의해 계산됩니다 (이것은, 특정의 레이아웃 매니저를 인스톨 되어 있는 컴퍼넌트의 경우에 추천 하는 방법입니다). 이 메소드의 디폴트 구현은 getPreferredSize
를 호출해, 그 값을 돌려줍니다.
ComponentUI
내의 getMinimumSize
c
- 최소 사이즈가 조회되는 컴퍼넌트.
이 인수는 일반적으로 무시되지만,
UI 객체에 상태가 없고, 복수의 컴퍼넌트에 공유되고 있는 경우는
사용되는 일이 있다
Dimension
객체, 또는 null
JComponent.getMinimumSize()
,
LayoutManager.minimumLayoutSize(java.awt.Container)
,
ComponentUI.getPreferredSize(javax.swing.JComponent)
public Dimension getPreferredSize(JComponent c)
ComponentUI
의 기술:null
가 반환되는 경우, 적절한 사이즈는 대신에 컴퍼넌트의 레이아웃 매니저에 의해 계산됩니다 (이것은, 특정의 레이아웃 매니저를 인스톨 되어 있는 컴퍼넌트의 경우에 추천 하는 방법입니다). 이 메소드의 디폴트 구현은 null
를 돌려줍니다.
ComponentUI
내의 getPreferredSize
c
- 적절한 사이즈가 조회되는 컴퍼넌트.
이 인수는 일반적으로 무시되지만,
UI 객체에 상태가 없고, 복수의 컴퍼넌트에 공유되고 있는 경우는
사용되는 일이 있는JComponent.getPreferredSize()
,
LayoutManager.preferredLayoutSize(java.awt.Container)
public Dimension getMaximumSize(JComponent c)
ComponentUI
의 기술:null
가 반환되는 경우, 최대 사이즈는 대신에 컴퍼넌트의 레이아웃 매니저에 의해 계산됩니다 (이것은, 특정의 레이아웃 매니저를 인스톨 되어 있는 컴퍼넌트의 경우에 추천 하는 방법입니다). 이 메소드의 디폴트 구현은 getPreferredSize
를 호출해, 그 값을 돌려줍니다.
ComponentUI
내의 getMaximumSize
c
- 최대 사이즈가 조회되는 컴퍼넌트.
이 인수는 일반적으로 무시되지만,
UI 객체에 상태가 없고, 복수의 컴퍼넌트에 공유되고 있는 경우는
사용되는 일이 있다
Dimension
객체, 또는 null
JComponent.getMaximumSize()
,
LayoutManager2.maximumLayoutSize(java.awt.Container)
protected Dimension getPreferredMenuItemSize(JComponent c, Icon checkIcon, Icon arrowIcon, int defaultTextIconGap)
public void update(Graphics g, JComponent c)
ComponentUI
내의 update
g
- 페인트 대상의 Graphics
문맥c
- 페인트 되는 컴퍼넌트.
이 인수는 일반적으로 무시되지만,
UI 객체에 상태가 없고, 복수의 컴퍼넌트에 공유되고 있는 경우는
사용되는 일이 있는ComponentUI.paint(java.awt.Graphics, javax.swing.JComponent)
,
JComponent.paintComponent(java.awt.Graphics)
public void paint(Graphics g, JComponent c)
ComponentUI
의 기술:ComponentUI.update
메소드로부터, 지정된 컴퍼넌트가 페인트 될 때 불려 갑니다. 서브 클래스는, 이 메소드를 오버라이드(override) 해, 지정된 Graphics
객체를 사용해 컴퍼넌트의 내용을 draw 할 필요가 있습니다.
ComponentUI
내의 paint
g
- 페인트 대상의 Graphics
문맥c
- 페인트 되는 컴퍼넌트.
이 인수는 일반적으로 무시되지만,
UI 객체에 상태가 없고, 복수의 컴퍼넌트에 공유되고 있는 경우는
사용되는 일이 있는ComponentUI.update(java.awt.Graphics, javax.swing.JComponent)
protected void paintMenuItem(Graphics g, JComponent c, Icon checkIcon, Icon arrowIcon, Color background, Color foreground, int defaultTextIconGap)
protected void paintBackground(Graphics g, JMenuItem menuItem, Color bgColor)
g
- 페인트의 그래픽스menuItem
- 페인트 되는 메뉴 항목bgColor
- 선택 백그라운드 칼라protected void paintText(Graphics g, JMenuItem menuItem, Rectangle textRect, String text)
g
- 그래픽스 문맥menuItem
- draw 하는 메뉴 항목textRect
- 텍스트를 draw 하는 경계의 구형text
- draw 하는 캐릭터 라인public MenuElement [] getPath()
protected void doClick(MenuSelectionManager msm)
msm
- MenuSelectionManager. 화상 피드백과 내부 부기 작업은,
이 MenuSelectionManager 에 위양 된다.
인수로서 null
가
건네받았을 경우,
MenuSelectionManager.defaultManager
가
사용되는MenuSelectionManager
,
AbstractButton.doClick(int)
|
JavaTM Platform Standard Ed. 6 |
|||||||||
앞의 클래스 다음의 클래스 | 프레임 있어 프레임 없음 | |||||||||
개요 : 상자 | 필드 | 생성자 | 메소드 | 상세 : 필드 | 생성자 | 메소드 |
Copyright 2006 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms . Documentation Redistribution Policy 도 참조해 주세요.