|
JavaTM Platform Standard Ed. 6 |
|||||||||
앞의 클래스 다음의 클래스 | 프레임 있어 프레임 없음 | |||||||||
개요 : 상자 | 필드 | 생성자 | 메소드 | 상세 : 필드 | 생성자 | 메소드 |
java.lang.Objectjavax.swing.plaf.ComponentUI
javax.swing.plaf.OptionPaneUI
javax.swing.plaf.basic.BasicOptionPaneUI
public class BasicOptionPaneUI
JOptionPane
에 기본 Look & Feel 를 제공합니다. BasicMessagePaneUI
는,Container
에 아이콘, 메세지, 및 버튼을 배치하는 방법을 제공합니다. 일반적으로, 배치는 다음과 같이 됩니다.
------------------ | i | message | | c | message | | o | message | | n | message | ------------------ | buttons | |________________|아이콘은,
JLabel
의 내부에 랩 되고 있는 Icon
의 인스턴스입니다. 메세지는 불투명한 객체로, 다음과 같이 테스트됩니다. 메세지가 Component
의 경우,Container
에 추가됩니다. Icon
때,JLabel
의 내부에 랩 된 다음,Container
에 추가됩니다. 그 이외의 경우는,JLabel
의 내부에 랩 됩니다.
옵션 구획의 ComponentOrientation
프로퍼티이 수평에서, 왼쪽에서 오른쪽인 경우, 상기의 배치가 사용됩니다. 배치는, 다른 방향에 대해서 적절히 조절됩니다.
Container
, 메세지, 아이콘, 및 버튼은, 모두 추상 메소드로 결정됩니다.
상자의 클래스의 개요 | |
---|---|
class |
BasicOptionPaneUI.ButtonActionListener
이 내부 클래스는 「public」라고 마크 됩니다만, 이것은 컴파일러의 버그가 원인입니다. |
static class |
BasicOptionPaneUI.ButtonAreaLayout
ButtonAreaLayout 는,FlowLayout 와 같은 동작을 합니다. |
class |
BasicOptionPaneUI.PropertyChangeHandler
이 내부 클래스는 「public」라고 마크 됩니다만, 이것은 컴파일러의 버그가 원인입니다. |
필드의 개요 | |
---|---|
protected boolean |
hasCustomComponents
Component 가 메세지 또는 버튼에 포함되는 경우에, 이 필드는 validateComponent 로 true 로 설정됩니다. |
protected Component |
initialFocusComponent
selectInitialValue 를 사용해 메세지가 보내졌을 때에, 포커스를 받는 컴퍼넌트입니다. |
protected JComponent |
inputComponent
optionPane.getWantsInput()가 true 를 돌려주었을 경우에, JComponent 가 입력을 제공합니다. |
static int |
MinimumHeight
|
protected Dimension |
minimumSize
|
static int |
MinimumWidth
|
protected JOptionPane |
optionPane
리시버가 Look & Feel 를 제공하는 JOptionPane 입니다. |
protected PropertyChangeListener |
propertyChangeListener
|
생성자 의 개요 | |
---|---|
BasicOptionPaneUI ()
|
메소드의 개요 | |
---|---|
protected void |
addButtonComponents (Container container,
Object [] buttons,
int initialIndex)
buttons 에 있는 각 객체를 나타내는 적절한 객체를 작성해, 그것을 container 에 추가합니다. |
protected void |
addIcon (Container top)
getIcon 로부터 반환된 아이콘을 나타내는 JLabel 를 작성해,top 에 추가합니다. |
protected void |
addMessageComponents (Container container,
GridBagConstraints cons,
Object msg,
int maxll,
boolean internallyCreated)
msg 를 나타내는 적절한 객체를 작성해, 그것을 container 에 배치합니다. |
protected void |
burstStringInto (Container c,
String d,
int maxll)
d 를 나타내는 JLabel 의 신규 인스턴스를 재귀적으로 생성합니다. |
boolean |
containsCustomComponents (JOptionPane op)
validateComponent 에의 직전의 호출로 메세지 또는 버튼이 Component 의 서브 클래스를 포함한 경우에, true 를 돌려줍니다. |
protected ActionListener |
createButtonActionListener (int buttonIndex)
|
protected Container |
createButtonArea ()
버튼을 포함한 Container 를 작성해 돌려줍니다. |
protected LayoutManager |
createLayoutManager ()
|
protected Container |
createMessageArea ()
installComponents 로부터 메세지로서 보내져, 메세지의 본문을 포함한 Container 를 작성합니다. |
protected PropertyChangeListener |
createPropertyChangeListener ()
|
protected Container |
createSeparator ()
|
static ComponentUI |
createUI (JComponent x)
BasicOptionPaneUI 의 신규 인스턴스를 생성합니다. |
protected Object [] |
getButtons ()
리시버가 Look & Feel 를 제공하고 있는 JOptionPane 로부터, 표시하는 버튼을 돌려줍니다. |
protected Icon |
getIcon ()
리시버가 Look & Feel 를 제공하고 있는 JOptionPane 로부터 아이콘을 돌려주는지, getDefaultIcon 로 반환된 디폴트 아이콘을 돌려줍니다. |
protected Icon |
getIconForType (int messageType)
건네받은 형용의 아이콘을 돌려줍니다. |
protected int |
getInitialValueIndex ()
선택하는 버튼에 최초의 인덱스를 돌려줍니다. |
protected int |
getMaxCharactersPerLineCount ()
1 행의 최대 문자수를 돌려줍니다. |
protected Object |
getMessage ()
리시버가 Look & Feel 를 제공하고 있는 JOptionPane 로부터, 표시하는 메세지를 돌려줍니다. |
Dimension |
getMinimumOptionPaneSize ()
옵션의 구획의 최소 사이즈를 돌려줍니다. |
Dimension |
getPreferredSize (JComponent c)
c 가 리시버를 포함한 JOptionPane 인 경우, 반환되는 적절한 사이즈는,JOptionPane 의 LayoutManager 및 getMinimumOptionPaneSize 의 적절한 사이즈의 최대치입니다. |
protected boolean |
getSizeButtonsToSameWidth ()
true 를 돌려줍니다. |
protected void |
installComponents ()
|
protected void |
installDefaults ()
|
protected void |
installKeyboardActions ()
|
protected void |
installListeners ()
|
void |
installUI (JComponent c)
건네받은 JOptionPane 를 위한 Look & Feel 로서 리시버를 인스톨 합니다. |
protected void |
resetInputValue ()
리시버가 Look & Feel 를 제공하고 있는 옵션 구획에서의 입력치를, inputComponent 의 값을 기본으로 해 설정합니다. |
void |
selectInitialValue (JOptionPane op)
inputComponent 가 null 가 아닌 경우, 포커스는 그 입력 컴퍼넌트에 요구됩니다. |
protected void |
uninstallComponents ()
|
protected void |
uninstallDefaults ()
|
protected void |
uninstallKeyboardActions ()
|
protected void |
uninstallListeners ()
|
void |
uninstallUI (JComponent c)
건네받은 만큼 비율 구획의 Look & Feel 콘트롤러로부터, 리시버를 삭제합니다. |
클래스 javax.swing.plaf. ComponentUI 로부터 상속된 메소드 |
---|
contains , getAccessibleChild , getAccessibleChildrenCount , getBaseline , getBaselineResizeBehavior , getMaximumSize , getMinimumSize , paint , update |
클래스 java.lang. Object 로부터 상속된 메소드 |
---|
clone , equals , finalize , getClass , hashCode , notify , notifyAll , toString , wait , wait , wait |
필드의 상세 |
---|
public static final int MinimumWidth
public static final int MinimumHeight
protected JOptionPane optionPane
JOptionPane
입니다.
protected Dimension minimumSize
protected JComponent inputComponent
protected Component initialFocusComponent
protected boolean hasCustomComponents
protected PropertyChangeListener propertyChangeListener
생성자 의 상세 |
---|
public BasicOptionPaneUI()
메소드의 상세 |
---|
public static ComponentUI createUI(JComponent x)
public void installUI(JComponent c)
JOptionPane
를 위한 Look & Feel 로서 리시버를 인스톨 합니다.
ComponentUI
내의 installUI
c
- UI 위양이 인스톨 되고 있는 컴퍼넌트ComponentUI.uninstallUI(javax.swing.JComponent)
,
JComponent.setUI(javax.swing.plaf.ComponentUI)
,
JComponent.updateUI()
public void uninstallUI(JComponent c)
ComponentUI
내의 uninstallUI
c
- 이 UI 위양을 삭제하는 컴퍼넌트.
이 인수는 일반적으로 무시되지만,
UI 객체에 상태가 없고, 복수의 컴퍼넌트에 공유되고 있는 경우는
사용되는 일이 있는ComponentUI.installUI(javax.swing.JComponent)
,
JComponent.updateUI()
protected void installDefaults()
protected void uninstallDefaults()
protected void installComponents()
protected void uninstallComponents()
protected LayoutManager createLayoutManager()
protected void installListeners()
protected void uninstallListeners()
protected PropertyChangeListener createPropertyChangeListener()
protected void installKeyboardActions()
protected void uninstallKeyboardActions()
public Dimension getMinimumOptionPaneSize()
public Dimension getPreferredSize(JComponent c)
c
가 리시버를 포함한 JOptionPane
인 경우, 반환되는 적절한 사이즈는,JOptionPane
의 LayoutManager
및 getMinimumOptionPaneSize
의 적절한 사이즈의 최대치입니다.
ComponentUI
내의 getPreferredSize
c
- 적절한 사이즈가 조회되는 컴퍼넌트.
이 인수는 일반적으로 무시되지만,
UI 객체에 상태가 없고, 복수의 컴퍼넌트에 공유되고 있는 경우는
사용되는 일이 있는JComponent.getPreferredSize()
,
LayoutManager.preferredLayoutSize(java.awt.Container)
protected Container createMessageArea()
addIcon
를 호출하는 것으로 작성됩니다.
protected void addMessageComponents(Container container, GridBagConstraints cons, Object msg, int maxll, boolean internallyCreated)
msg
를 나타내는 적절한 객체를 작성해, 그것을 container
에 배치합니다. msg
가 Component 의 인스턴스인 경우는, 직접 컨테이너에 추가됩니다. msg
가 Icon 인 경우는, 그것을 나타내는 JLabel 가 작성됩니다. 그렇지 않은 경우는, JLabel 가 캐릭터 라인을 위해서(때문에) 작성됩니다. d
가 Object[] 인 경우, 이 메소드는 아이를 위해서(때문에) 재귀적으로 불려 갑니다. Objc 가 Component 의 인스턴스이며, 이 메소드에 의해 내부에서 작성된 것인 경우,internallyCreated
는 true 입니다. 이것은,! internallyCreated 인 경우에만, hasCustomComponents 를 올바르게 설정하기 위해서 사용됩니다.
protected Object getMessage()
protected void addIcon(Container top)
getIcon
로부터 반환된 아이콘을 나타내는 JLabel 를 작성해,top
에 추가합니다. 이것은,createMessageArea
로부터 메세지로서 보내집니다.
protected Icon getIcon()
getDefaultIcon
로 반환된 디폴트 아이콘을 돌려줍니다.
protected Icon getIconForType(int messageType)
protected int getMaxCharactersPerLineCount()
protected void burstStringInto(Container c, String d, int maxll)
d
를 나타내는 JLabel 의 신규 인스턴스를 재귀적으로 생성합니다. JLabel 의 각 인스턴스는 c
에 추가됩니다.
protected Container createSeparator()
protected Container createButtonArea()
getButtons
의 호출에 의해 작성됩니다.
protected void addButtonComponents(Container container, Object [] buttons, int initialIndex)
buttons
에 있는 각 객체를 나타내는 적절한 객체를 작성해, 그것을 container
에 추가합니다. 이 메소드의 addMessageComponents 와의 차이는,buttons
를 재귀적으로 취급하는 것으로, 버튼이 Component 가 아닌 경우에, JButton 의 인스턴스를 생성하는 것입니다.
protected ActionListener createButtonActionListener(int buttonIndex)
protected Object [] getButtons()
protected boolean getSizeButtonsToSameWidth()
protected int getInitialValueIndex()
protected void resetInputValue()
public void selectInitialValue(JOptionPane op)
OptionPaneUI
내의 selectInitialValue
public boolean containsCustomComponents(JOptionPane op)
OptionPaneUI
내의 containsCustomComponents
|
JavaTM Platform Standard Ed. 6 |
|||||||||
앞의 클래스 다음의 클래스 | 프레임 있어 프레임 없음 | |||||||||
개요 : 상자 | 필드 | 생성자 | 메소드 | 상세 : 필드 | 생성자 | 메소드 |
Copyright 2006 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms . Documentation Redistribution Policy 도 참조해 주세요.