|
JavaTM Platform Standard Ed. 6 |
|||||||||
| 앞의 클래스 다음의 클래스 | 프레임 있어 프레임 없음 | |||||||||
| 개요: 상자 | 필드 | 생성자 | 메소드 | 상세 : 필드 | 생성자 | 메소드 | |||||||||
java.lang.Objectjavax.swing.plaf.ComponentUI
javax.swing.plaf.SpinnerUI
javax.swing.plaf.basic.BasicSpinnerUI
public class BasicSpinnerUI
디폴트의 Spinner UI 의 위양입니다.
| 필드의 개요 | |
|---|---|
protected JSpinner |
spinner
UI 위양을 위한 스피나-입니다. |
| 생성자 의 개요 | |
|---|---|
BasicSpinnerUI ()
|
|
| 메소드의 개요 | |
|---|---|
protected JComponent |
createEditor ()
이 메소드는 installUI 에 의해 불려 가 JSpinner 의 에디터 컴퍼넌트를 가져옵니다. |
protected LayoutManager |
createLayout ()
JSpinner 의 아이인 editor,nextButton, 및 previousButton 를 관리하는 LayoutManager 를 작성합니다. |
protected Component |
createNextButton ()
스피나-모델의 값을 spinner.getNextValue 로부터 반환되는 객체로 옮겨놓는 컴퍼넌트를 작성합니다. |
protected Component |
createPreviousButton ()
스피나-모델의 값을 spinner.getPreviousValue로부터 반환되는 객체로 옮겨놓는 컴퍼넌트를 작성합니다. |
protected PropertyChangeListener |
createPropertyChangeListener ()
JSpinner 자체에 추가할 수 있는 PropertyChangeListener 를 작성합니다. |
static ComponentUI |
createUI (JComponent c)
BasicSpinnerUI 의 새로운 인스턴스를 돌려줍니다. |
int |
getBaseline (JComponent c,
int width,
int height)
baseline를 돌려줍니다. |
Component.BaselineResizeBehavior |
getBaselineResizeBehavior (JComponent c)
사이즈의 변화에 맞추어 컴퍼넌트의 baseline가 어떻게 변화하는지를 나타내는 열거를 돌려줍니다. |
protected void |
installDefaults ()
디폴트 테이블의 대응하는 Spinner. * 프로퍼티에 근거하는 프로퍼티 JSpinner border,foreground, 및 background를 초기화합니다. |
protected void |
installKeyboardActions ()
키보드 액션을 JSpinner 에 인스톨 합니다. |
protected void |
installListeners ()
대상의 PropertyChangeEvent 를 protected 메소드에 위양 하는 공용 객체로, PropertyChangeListener 를 초기화합니다. |
protected void |
installNextButtonListeners (Component c)
사용자의 제스처(gesture)에 응해 JSpinner 를 갱신하기 위해서, 필요한 청취자를 「다음에」버튼 c 에 인스톨 합니다. |
protected void |
installPreviousButtonListeners (Component c)
사용자의 제스처(gesture)에 응해 JSpinner 를 갱신하기 위해서, 필요한 청취자를 「돌아온다」버튼 c 에 인스톨 합니다. |
void |
installUI (JComponent c)
installDefaults 와 installListeners 을 호출해,createNextButton,createPreviousButton, 및 createEditor 로부터 반환되는 컴퍼넌트를 추가합니다. |
protected void |
replaceEditor (JComponent oldEditor,
JComponent newEditor)
JSpinner 에디터 프로퍼티으로 변경이 있는 경우,PropertyChangeListener 에 의해 불려 갑니다. |
protected void |
uninstallDefaults ()
JSpinner 의 레이아웃 매니저를 null 로 설정합니다. |
protected void |
uninstallListeners ()
installListener 에 의해 추가된 PropertyChangeListener 를 삭제합니다. |
void |
uninstallUI (JComponent c)
uninstallDefaults 와 uninstallListeners 를 호출해, 스피나-의 아이를 모두 삭제합니다. |
| 클래스 javax.swing.plaf. ComponentUI 로부터 상속된 메소드 |
|---|
contains , getAccessibleChild , getAccessibleChildrenCount , getMaximumSize , getMinimumSize , getPreferredSize , paint , update |
| 클래스 java.lang. Object 로부터 상속된 메소드 |
|---|
clone , equals , finalize , getClass , hashCode , notify , notifyAll , toString , wait , wait , wait |
| 필드의 상세 |
|---|
protected JSpinner spinner
installUI메소드로 초기화되어uninstallUI로 null 에 리셋 됩니다.
installUI(javax.swing.JComponent) ,
uninstallUI(javax.swing.JComponent) | 생성자 의 상세 |
|---|
public BasicSpinnerUI()
| 메소드의 상세 |
|---|
public static ComponentUI createUI(JComponent c)
c - JSpinner (미사용)
ComponentUI.createUI(javax.swing.JComponent) public void installUI(JComponent c)
installDefaults 와 installListeners 을 호출해,createNextButton,createPreviousButton, 및 createEditor 로부터 반환되는 컴퍼넌트를 추가합니다.
ComponentUI 내의 installUI c - JSpinnerinstallDefaults() ,
installListeners() ,
createNextButton() ,
createPreviousButton() ,
createEditor() public void uninstallUI(JComponent c)
uninstallDefaults 와 uninstallListeners 를 호출해, 스피나-의 아이를 모두 삭제합니다.
ComponentUI 내의 uninstallUI c - JSpinner (미사용)ComponentUI.installUI(javax.swing.JComponent) ,
JComponent.updateUI() protected void installListeners()
PropertyChangeListener 를 초기화합니다.
이 메소드는 installUI 에 의해 불려 갑니다.
replaceEditor(javax.swing.JComponent, javax.swing.JComponent) ,
uninstallListeners() protected void uninstallListeners()
PropertyChangeListener 를 삭제합니다.
이 메소드는 uninstallUI 에 의해 불려 갑니다.
installListeners() protected void installDefaults()
JSpinner border,foreground, 및 background를 초기화합니다. JSpinners 의 배치는,createLayout 가 돌려주는 값으로 설정됩니다. 이 메소드는 installUI 에 의해 불려 갑니다.
uninstallDefaults() ,
installUI(javax.swing.JComponent) ,
createLayout() ,
LookAndFeel.installBorder(javax.swing.JComponent, java.lang.String) ,
LookAndFeel.installColors(javax.swing.JComponent, java.lang.String, java.lang.String) protected void uninstallDefaults()
JSpinner 의 레이아웃 매니저를 null 로 설정합니다. 이 메소드는 uninstallUI 에 의해 불려 갑니다.
installDefaults() ,
uninstallUI(javax.swing.JComponent) protected void installNextButtonListeners(Component c)
JSpinner 를 갱신하기 위해서, 필요한 청취자를 「다음에」버튼 c 에 인스톨 합니다.
c - 청취자의 인스톨처의 컴퍼넌트
NullPointerException - c 가 null 의 경우createNextButton() protected void installPreviousButtonListeners(Component c)
JSpinner 를 갱신하기 위해서, 필요한 청취자를 「돌아온다」버튼 c 에 인스톨 합니다.
c - 청취자의 인스톨처의 컴퍼넌트
NullPointerException - c 가 null 의 경우createPreviousButton() protected LayoutManager createLayout()
editor,nextButton, 및 previousButton 를 관리하는 LayoutManager 를 작성합니다. 이 3 살의 아이에게는, 각자의 기능을 「에디터」, 「다음에」, 및 「돌아온다」라고 특정하는 제약을 추가할 필요가 있습니다. 디폴트의 레이아웃 매니저는, 이러한 아이중 어떤 것인가가 빠져 있는 경우에도 대처할 수 있습니다.
createNextButton() ,
createPreviousButton() ,
createEditor() protected PropertyChangeListener createPropertyChangeListener()
PropertyChangeListener 를 작성합니다. 일반적으로, 에디터 프로퍼티의 변경이 있는 경우, 이 청취자는 replaceEditor 를 호출합니다. 에디터를 JSpinner에 추가해, 낡은 에디터를 삭제하는 것은,SpinnerUI의 역할이기 (위해)때문에입니다. 이 메소드는,installListeners에 의해 불려 갑니다.
installListeners() protected Component createPreviousButton()
spinner.getPreviousValue로부터 반환되는 객체로 옮겨놓는 컴퍼넌트를 작성합니다. 디폴트에서는,previousButton 는 JButton 입니다. 이 메소드는, 사용자의 제스처(gesture)에 대응해 JSpinner 의 모델을 갱신하기 위해서,installPreviousButtonListeners 를 호출해 필요한 청취자를 인스톨 합니다. previousButton 가 서브 클래스에는 불필요한 경우, null 를 돌려주기 위해서(때문에) 이 메소드는 오버라이드(override) 됩니다.
installUI(javax.swing.JComponent) ,
createNextButton() ,
installPreviousButtonListeners(java.awt.Component) protected Component createNextButton()
spinner.getNextValue 로부터 반환되는 객체로 옮겨놓는 컴퍼넌트를 작성합니다. 디폴트에서는,nextButton 는 JButton 로, 그 ActionListener 는 그 자체의 JSpinner 상위 모델을 갱신합니다. nextButton 가 서브 클래스에 필요하지 않은 경우, null 를 돌려주기 위해서(때문에) 이 메소드는 오버라이드(override) 됩니다.
installUI(javax.swing.JComponent) ,
createPreviousButton() ,
installNextButtonListeners(java.awt.Component) protected JComponent createEditor()
JSpinner 의 에디터 컴퍼넌트를 가져옵니다. 디폴트에서는,JSpinner.getEditor() 를 돌려줄 뿐입니다. 서브 클래스가 installUI 를 오버라이드(override) 해,JSpinner 에의 에디터의 추가 처리를 하는 경우, 서브 클래스는 createEditor 를 오버라이드(override) 해, 스피나-의 에디터를 포함한 컴퍼넌트, 또는 null 를 돌려줄 수가 있습니다.
에디터의 경계를 직접 설정할 수 없기 때문에, 일반적으로, 이 메소드는 오버라이드(override) 되어 커스텀 경계를 가지는 컨테이너로 에디터를 랩 합니다.
스피나-에디터가 JSpinner.setEditor 로 변경되는 경우,replaceEditor 메소드가 불려 갑니다. 이 메소드를 오버라이드(override) 했을 경우, 똑같이 replaceEditor를 오버라이드(override) 할 수 있습니다.
installUI(javax.swing.JComponent) ,
replaceEditor(javax.swing.JComponent, javax.swing.JComponent) ,
JSpinner.getEditor()
protected void replaceEditor(JComponent oldEditor,
JComponent newEditor)
JSpinner 에디터 프로퍼티으로 변경이 있는 경우,PropertyChangeListener 에 의해 불려 갑니다. 낡은 에디터를 삭제해, 새로운 에디터를 추가하는 것은, 이 메소드의 역할입니다. 디폴트에서는, 이 조작은 다음과 같이 됩니다.
spinner.remove(oldEditor); spinner.add(newEditor, "Editor");
replaceEditor 의 구현은,createEditor 메소드라고 조정할 필요가 있습니다.
createEditor() ,
createPropertyChangeListener() protected void installKeyboardActions()
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 도 참조해 주세요.