|
JavaTM 2 Platform Std. Ed. v1. 4.0 |
||||||||||
ÀüÀÇ Å¬·¡½º ´ÙÀ½ÀÇ Å¬·¡½º | ÇÁ·¹ÀÓ ÀÖ¾î ÇÁ·¹ÀÓ ¾øÀ½ | ||||||||||
°³¿ä: »óÀÚ | Çʵå | constructor | ¸Þ¼Òµå | »ó¼¼: Çʵå | constructor | ¸Þ¼Òµå |
java.lang.Object | +--javax.swing.plaf.ComponentUI | +--javax.swing.plaf.OptionPaneUI | +--javax.swing.plaf.basic.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 ÇàÀÇ ÃÖ´ë ij¸¯Åͼö¸¦ µ¹·ÁÁÝ´Ï´Ù. |
Dimension |
getMaximumSize (JComponent c)
getPreferredSize ¸¦ ¸Þ¼¼Áö·Î¼ º¸³À´Ï´Ù. |
protected Object |
getMessage ()
¸®½Ã¹ö°¡ Look & Feel ¸¦ Á¦°øÇϰí ÀÖ´Â JOptionPane ·ÎºÎÅÍ, Ç¥½ÃÇÏ´Â ¸Þ¼¼Áö¸¦ µ¹·ÁÁÝ´Ï´Ù. |
Dimension |
getMinimumOptionPaneSize ()
¿É¼ÇÀÇ ±¸È¹ÀÇ ÃÖ¼Ò »çÀÌÁ µ¹·ÁÁÝ´Ï´Ù. |
Dimension |
getMinimumSize (JComponent c)
getPreferredSize ¸¦ ¸Þ¼¼Áö·Î¼ º¸³À´Ï´Ù. |
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 , 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 delegateÀÌ ÀνºÅç µÇ°í ÀÖ´Â ÄÄÆÛ³ÍÆ®ComponentUI.uninstallUI(javax.swing.JComponent)
,
JComponent.setUI(javax.swing.plaf.ComponentUI)
,
JComponent.updateUI()
public void uninstallUI(JComponent c)
ComponentUI
³»ÀÇ uninstallUI
c
- ÀÌ UI delegateÀÌ »èÁ¦µÇ´Â ÄÄÆÛ³ÍÆ®. ÀÌ Àμö´Â ÀÚÁÖ ¹«½ÃµÇÁö¸¸, 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)
public Dimension getMinimumSize(JComponent c)
ComponentUI
³»ÀÇ getMinimumSize
c
- ÃÖ¼Ò »çÀÌÁî°¡ Á¶È¸µÇ´Â ÄÄÆÛ³ÍÆ®. ÀÌ Àμö´Â ÀÚÁÖ ¹«½ÃµÇÁö¸¸, UI ¿ÀºêÁ§Æ®°¡ »óžøÀÌ º¹¼öÀÇ ÄÄÆÛ³ÍÆ®¿¡ °øÀ¯µÇ´Â °æ¿ì¿¡ »ç¿ëµÇ´Â ÀÏÀÌ ÀÖ´Ù
Dimension
¿ÀºêÁ§Æ®, ¶Ç´Â null
JComponent.getMinimumSize()
,
LayoutManager.minimumLayoutSize(java.awt.Container)
,
ComponentUI.getPreferredSize(javax.swing.JComponent)
public Dimension getMaximumSize(JComponent c)
ComponentUI
³»ÀÇ getMaximumSize
c
- ÃÖ´ë »çÀÌÁî°¡ Á¶È¸µÇ´Â ÄÄÆÛ³ÍÆ®. ÀÌ Àμö´Â ÀÚÁÖ ¹«½ÃµÇÁö¸¸, UI ¿ÀºêÁ§Æ®°¡ »óžøÀÌ º¹¼öÀÇ ÄÄÆÛ³ÍÆ®¿¡ °øÀ¯µÇ´Â °æ¿ì¿¡ »ç¿ëµÇ´Â ÀÏÀÌ ÀÖ´Ù
Dimension
¿ÀºêÁ§Æ®, ¶Ç´Â null
JComponent.getMaximumSize()
,
LayoutManager2.maximumLayoutSize(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 Std. Ed. v1. 4.0 |
||||||||||
ÀüÀÇ Å¬·¡½º ´ÙÀ½ÀÇ Å¬·¡½º | ÇÁ·¹ÀÓ ÀÖ¾î ÇÁ·¹ÀÓ ¾øÀ½ | ||||||||||
°³¿ä: »óÀÚ | Çʵå | constructor | ¸Þ¼Òµå | »ó¼¼: Çʵå | constructor | ¸Þ¼Òµå |
Java, Java 2 D, ¹× JDBC ´Â ¹Ì±¹ ¹× ±× ¿ÜÀÇ ³ª¶ó¿¡ ÀÖ¾î¼ÀÇ ¹Ì±¹ Sun Microsystems, Inc. ÀÇ »óÇ¥ ȤÀº µî·Ï»óÇ¥ÀÔ´Ï´Ù.
Copyright 1993-2002 Sun Microsystems, Inc. 901 San Antonio Road
Palo Alto, California, 94303, U.S.A. All Rights Reserved.