|
JavaTM Platform Standard Ed. 6 |
|||||||||
앞의 클래스 다음의 클래스 | 프레임 있어 프레임 없음 | |||||||||
개요: 상자 | 필드 | 생성자 | 메소드 | 상세 : 필드 | 생성자 | 메소드 |
java.lang.Objectjavax.swing.plaf.ComponentUI
javax.swing.plaf.ButtonUI
javax.swing.plaf.basic.BasicButtonUI
public class BasicButtonUI
BasicButton 의 구현입니다.
필드의 개요 | |
---|---|
protected int |
defaultTextIconGap
|
protected int |
defaultTextShiftOffset
|
생성자 의 개요 | |
---|---|
BasicButtonUI ()
|
메소드의 개요 | |
---|---|
protected void |
clearTextShiftOffset ()
|
protected BasicButtonListener |
createButtonListener (AbstractButton b)
|
static ComponentUI |
createUI (JComponent c)
|
int |
getBaseline (JComponent c,
int width,
int height)
baseline를 돌려줍니다. |
Component.BaselineResizeBehavior |
getBaselineResizeBehavior (JComponent c)
사이즈의 변화에 맞추어 컴퍼넌트의 baseline가 어떻게 변화하는지를 나타내는 열거를 돌려줍니다. |
int |
getDefaultTextIconGap (AbstractButton b)
|
Dimension |
getMaximumSize (JComponent c)
Look & Feel 에 적절한, 지정된 컴퍼넌트의 최대 사이즈를 돌려줍니다. |
Dimension |
getMinimumSize (JComponent c)
Look & Feel 에 적절한, 지정된 컴퍼넌트의 최소 사이즈를 돌려줍니다. |
Dimension |
getPreferredSize (JComponent c)
Look & Feel 에 적절한, 지정된 컴퍼넌트의 적절한 사이즈를 돌려줍니다. |
protected String |
getPropertyPrefix ()
|
protected int |
getTextShiftOffset ()
|
protected void |
installDefaults (AbstractButton b)
|
protected void |
installKeyboardActions (AbstractButton b)
|
protected void |
installListeners (AbstractButton b)
|
void |
installUI (JComponent c)
Look & Feel 에 적절한, 지정된 컴퍼넌트를 구성합니다. |
void |
paint (Graphics g,
JComponent c)
Look &Feel 에 적절한, 지정된 컴퍼넌트를 그립니다. |
protected void |
paintButtonPressed (Graphics g,
AbstractButton b)
|
protected void |
paintFocus (Graphics g,
AbstractButton b,
Rectangle viewRect,
Rectangle textRect,
Rectangle iconRect)
|
protected void |
paintIcon (Graphics g,
JComponent c,
Rectangle iconRect)
|
protected void |
paintText (Graphics g,
AbstractButton b,
Rectangle textRect,
String text)
현재의 버튼의 텍스트를 draw 하는 메소드입니다. |
protected void |
paintText (Graphics g,
JComponent c,
Rectangle textRect,
String text)
Java 2 플랫폼 1.4 이후에서는, 이 메소드를 사용하거나 오버라이드(override) 하거나 하지 말아 주세요. |
protected void |
setTextShiftOffset ()
|
protected void |
uninstallDefaults (AbstractButton b)
|
protected void |
uninstallKeyboardActions (AbstractButton b)
|
protected void |
uninstallListeners (AbstractButton b)
|
void |
uninstallUI (JComponent c)
installUI 시에, 지정된 컴퍼넌트로 구성된 내용을 취소합니다. |
클래스 javax.swing.plaf. ComponentUI 로부터 상속된 메소드 |
---|
contains , getAccessibleChild , getAccessibleChildrenCount , update |
클래스 java.lang. Object 로부터 상속된 메소드 |
---|
clone , equals , finalize , getClass , hashCode , notify , notifyAll , toString , wait , wait , wait |
필드의 상세 |
---|
protected int defaultTextIconGap
protected int defaultTextShiftOffset
생성자 의 상세 |
---|
public BasicButtonUI()
메소드의 상세 |
---|
public static ComponentUI createUI(JComponent c)
protected String getPropertyPrefix()
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(AbstractButton b)
protected void installListeners(AbstractButton b)
protected void installKeyboardActions(AbstractButton b)
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 uninstallKeyboardActions(AbstractButton b)
protected void uninstallListeners(AbstractButton b)
protected void uninstallDefaults(AbstractButton b)
protected BasicButtonListener createButtonListener(AbstractButton b)
public int getDefaultTextIconGap(AbstractButton b)
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 paintIcon(Graphics g, JComponent c, Rectangle iconRect)
protected void paintText(Graphics g, JComponent c, Rectangle textRect, String text)
protected void paintText(Graphics g, AbstractButton b, Rectangle textRect, String text)
g
- 그래픽스 문맥b
- draw 하는 현재의 버튼textRect
- 텍스트를 draw 하는 경계의 구형text
- draw 하는 캐릭터 라인protected void paintFocus(Graphics g, AbstractButton b, Rectangle viewRect, Rectangle textRect, Rectangle iconRect)
protected void paintButtonPressed(Graphics g, AbstractButton b)
protected void clearTextShiftOffset()
protected void setTextShiftOffset()
protected int getTextShiftOffset()
public 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)
public int getBaseline(JComponent c, int width, int height)
ComponentUI
내의 getBaseline
c
- 요구되는 JComponent
baselinewidth
- baseline를 취득하는 폭height
- baseline를 취득하는 높이
NullPointerException
- c
가 null
의 경우
IllegalArgumentException
- 폭 또는 높이가 0 보다 작은 경우JComponent.getBaseline(int, int)
public Component.BaselineResizeBehavior getBaselineResizeBehavior(JComponent c)
ComponentUI
내의 getBaselineResizeBehavior
c
- baseline의 사이즈 변경의 동작을 돌려주는 JComponent
NullPointerException
- c
가 null
의 경우JComponent.getBaseline(int, int)
|
JavaTM Platform Standard Ed. 6 |
|||||||||
앞의 클래스 다음의 클래스 | 프레임 있어 프레임 없음 | |||||||||
개요: 상자 | 필드 | 생성자 | 메소드 | 상세 : 필드 | 생성자 | 메소드 |
Copyright 2006 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms . Documentation Redistribution Policy 도 참조해 주세요.