|
JavaTM 2 Platform Standard Ed. 5.0 |
|||||||||
ÀÌÀü Ŭ·¡½º ´ÙÀ½ Ŭ·¡½º | ÇÁ·¹ÀÓÀ¸·Î ÇÁ·¹ÀÓ ¾øÀÌ | |||||||||
°³¿ä: NESTED | Çʵå | constructor | ¸Þ¼µå | »ó¼¼: Çʵå | »ý¼ºÀÚ | ¸Þ¼µå |
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
, ¸Þ¼¼Áö,ÀڽľÆÀÌÄÜ ¹× ¹öưÀº ¸ðµÎ Ãß»ó ¸Þ¼µå·Î °áÁ¤µË´Ï´Ù.
Áßø(Nested) Ŭ·¡½º °³¿ä | |
---|---|
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,
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°¡ ij¸¯ÅÍ ¶óÀÎÀ» À§Çؼ ÀÛ¼ºµË´Ï´Ù. 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 2 Platform Standard Ed. 5.0 |
|||||||||
ÀÌÀü Ŭ·¡½º ´ÙÀ½ Ŭ·¡½º | ÇÁ·¹ÀÓÀ¸·Î ÇÁ·¹ÀÓ ¾øÀÌ | |||||||||
°³¿ä: NESTED | Çʵå | constructor | ¸Þ¼µå | »ó¼¼: Çʵå | »ý¼ºÀÚ | ¸Þ¼µå |
Copyright 2004 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms . Documentation Redistribution Policy µµ ÂüÁ¶ÇϽʽÿÀ.