public class BasicComboBoxUI extends ComboBoxUI
ã³ã³ãããã¯ã¹ã¯ãè€åã³ã³ããŒãã³ããã€ãŸãå€ãã®åçŽãªã³ã³ããŒãã³ãã®éåã§ãã ãã®ã¯ã©ã¹ã¯ãã³ã³ãããã¯ã¹ãšã³ã³ãã»ããã¯ã¹ã»ã¢ãã«äžã®ãªã¹ããŒãäœæãã管çããŸãã ãããã®ãªã¹ããŒã¯ãã³ã³ãããã¯ã¹ã®ç¶æ ãšããããã£ã«ããã倿Žã«å¿ããŠããŠãŒã¶ãŒã»ã€ã³ã¿ãã§ãŒã¹ãæŽæ°ããŸãã
ãã¹ãŠã®ã€ãã³ãåŠçã¯ãcreatexxxListener()ã®åã¡ãœãããããã³å
éšã¯ã©ã¹ã䜿çšããŠäœæããããªã¹ããŒã»ã¯ã©ã¹ã«ããåŠçãããŸãã ãã®ã¯ã©ã¹ã®åäœã倿Žããã«ã¯ãcreatexxxListener()ã®åã¡ãœããããªãŒããŒã©ã€ãããäžã§ãç¬èªã®ã€ãã³ãã»ãªã¹ããŒãæäŸãããããã®ã¯ã©ã¹ã§æäŸãããŠããã€ãã³ãã»ãªã¹ããŒãããµãã¯ã©ã¹åããŸãã
ç¹å®ã®ã¢ã¯ã·ã§ã³ã远å ããã«ã¯ãinstallKeyboardActionsããªãŒããŒã©ã€ãããŠãKeyStrokeãã€ã³ãã£ã³ã°ã«å¿ããŠã¢ã¯ã·ã§ã³ã远å ããŸãã èšäºãããŒã»ãã€ã³ãã£ã³ã°ã®äœ¿ç𿹿³ããåç
§ããŠãã ããã
| 修食åãšå | ã¯ã©ã¹ | 説æ |
|---|---|---|
class |
BasicComboBoxUI.ComboBoxLayoutManager |
ãã®ã¬ã€ã¢ãŠãã»ãããŒãžã£ã¯ãã³ã³ãããã¯ã¹ã®ãæšæºãã¬ã€ã¢ãŠããæ±ããŸãã
|
class |
BasicComboBoxUI.FocusHandler |
ãã©ãŒã«ã¹ã倱ããããšãã«ããã®ãªã¹ããŒã¯ãããã¢ãããé ããŸãã
|
class |
BasicComboBoxUI.ItemHandler |
ãã®ãªã¹ããŒã¯ãã³ã³ãããã¯ã¹ã®éžæã®å€æŽãç£èŠããŸãã
|
class |
BasicComboBoxUI.KeyHandler |
ãã®ãªã¹ããŒã¯ãããŒã»ã€ãã³ããããã²ãŒã·ã§ã³ã»ããŒã§ãªããã©ããã確èªããŸãã
|
class |
BasicComboBoxUI.ListDataHandler |
ãã®ãªã¹ããŒã¯ã
ComboBoxModelå
ã§ã®å€æŽãç£èŠããŸãã |
class |
BasicComboBoxUI.PropertyChangeHandler |
ãã®ãªã¹ããŒã¯ãã³ã³ãããã¯ã¹å
ã§å€æŽãããããŠã³ãã»ããããã£ãç£èŠããŸãã
|
| 修食åãšå | ãã£ãŒã«ã | 説æ |
|---|---|---|
protected JButton |
arrowButton |
|
protected Dimension |
cachedMinimumSize |
|
protected JComboBox |
comboBox |
|
protected CellRendererPane |
currentValuePane |
|
protected Component |
editor |
|
protected FocusListener |
focusListener |
ãã®protectedãã£ãŒã«ãã¯å®è£
åºæã®ãã®ã§ãã
|
protected boolean |
hasFocus |
ãã®protectedãã£ãŒã«ãã¯å®è£
åºæã®ãã®ã§ãã
|
protected boolean |
isMinimumSizeDirty |
|
protected ItemListener |
itemListener |
ãã®protectedãã£ãŒã«ãã¯å®è£
åºæã®ãã®ã§ãã
|
protected KeyListener |
keyListener |
ãã®protectedãã£ãŒã«ãã¯å®è£
åºæã®ãã®ã§ãã
|
protected JList |
listBox |
|
protected ListDataListener |
listDataListener |
ãã®protectedãã£ãŒã«ãã¯å®è£
åºæã®ãã®ã§ãã
|
protected Insets |
padding |
ãããã®ã€ã³ã»ã»ããã¯ããéžæããããé
ç®ãã³ã³ãããã¯ã¹ã«é
眮ãããã€ã³ãããéã«ãã»ã«ã»ã¬ã³ãã©åšå²ã®ããã£ã³ã°ãšããŠæ©èœããŸãã
|
protected ComboPopup |
popup |
|
protected KeyListener |
popupKeyListener |
|
protected MouseListener |
popupMouseListener |
|
protected MouseMotionListener |
popupMouseMotionListener |
|
protected PropertyChangeListener |
propertyChangeListener |
ãã®protectedãã£ãŒã«ãã¯å®è£
åºæã®ãã®ã§ãã
|
protected boolean |
squareButton |
ã³ã³ãããã¯ã¹ã»ãã¿ã³ãæ£æ¹åœ¢ã«ããã¹ããã©ããã瀺ããŸãã
|
| ã³ã³ã¹ãã©ã¯ã¿ | 説æ |
|---|---|
BasicComboBoxUI() |
| 修食åãšå | ã¡ãœãã | 説æ |
|---|---|---|
void |
addEditor() |
ãã®publicã¡ãœããã¯å®è£
åºæã®ãã®ã§ãprivateã§ããã¹ãã§ãã
|
void |
configureArrowButton() |
ãã®publicã¡ãœããã¯å®è£
åºæã®ãã®ã§ãprivateã§ããã¹ãã§ãã
|
protected void |
configureEditor() |
ãã®protectedã¡ãœããã¯å®è£
åºæã®ãã®ã§ãprivateã§ããã¹ãã§ãã
|
protected JButton |
createArrowButton() |
ã³ã³ãããã¯ã¹ã®ãããã¢ããéšåã®è¡šç€ºãŸãã¯é衚瀺ã®å¶åŸ¡ã«äœ¿çšããããã¿ã³ãäœæããŸãã
|
protected ComboBoxEditor |
createEditor() |
ç·šéå¯èœãªã³ã³ãããã¯ã¹ã§äœ¿çšãããããã©ã«ãã»ãšãã£ã¿ãäœæããŸãã
|
protected FocusListener |
createFocusListener() |
ã³ã³ãããã¯ã¹ã«è¿œå ããã
FocusListenerãäœæããŸãã |
protected ItemListener |
createItemListener() |
ã³ã³ãããã¯ã¹ã«è¿œå ããã
ItemListenerãäœæããŸãã |
protected KeyListener |
createKeyListener() |
ã³ã³ãããã¯ã¹ã«è¿œå ããã
KeyListenerãäœæããŸãã |
protected LayoutManager |
createLayoutManager() |
ã³ã³ãããã¯ã¹ãæ§æããã³ã³ããŒãã³ãã管çããããã®ã¬ã€ã¢ãŠãã»ãããŒãžã£ãäœæããŸãã
|
protected ListDataListener |
createListDataListener() |
ComboBoxModelã«è¿œå ããããªã¹ãã»ããŒã¿ã»ãªã¹ããŒãäœæããŸãã |
protected ComboPopup |
createPopup() |
ã³ã³ãããã¯ã¹ã®ãããã¢ããéšåãäœæããŸãã
|
protected PropertyChangeListener |
createPropertyChangeListener() |
ã³ã³ãããã¯ã¹ã«è¿œå ããã
PropertyChangeListenerãäœæããŸãã |
protected ListCellRenderer |
createRenderer() |
ç·šéäžå¯èœãªã³ã³ãããã¯ã¹ã§äœ¿çšãããããã©ã«ãã»ã¬ã³ãã©ãäœæããŸãã
|
static ComponentUI |
createUI(JComponent c) |
|
Accessible |
getAccessibleChild(JComponent c, int i) |
ãªããžã§ã¯ãã®
içªç®ã®Accessibleã®åãè¿ããŸãã |
int |
getAccessibleChildrenCount(JComponent c) |
ãªããžã§ã¯ãå
ã®ã¢ã¯ã»ã·ããªãã£å¯Ÿå¿ã®åã®æ°ãè¿ããŸãã
|
int |
getBaseline(JComponent c, int width, int height) |
ããŒã¹ã©ã€ã³ãè¿ããŸãã
|
Component.BaselineResizeBehavior |
getBaselineResizeBehavior(JComponent c) |
ãµã€ãºã®å€åã«åãããŠã³ã³ããŒãã³ãã®ããŒã¹ã©ã€ã³ãã©ã®ããã«å€åãããã瀺ãåæãè¿ããŸãã
|
protected Dimension |
getDefaultSize() |
çŸåšã®ã¬ã³ãã©ãšãã©ã³ãã䜿çšããã³ã³ãããã¯ã¹ã®ã空ã®ãã£ã¹ãã¬ã€é åã®ããã©ã«ãã»ãµã€ãºãè¿ããŸãã
|
protected Dimension |
getDisplaySize() |
ãã£ã¹ãã¬ã€é åã®ãèšç®ããããµã€ãºãè¿ããŸãã
|
protected Insets |
getInsets() |
JComboBoxããã€ã³ã»ã»ãããååŸããŸãã
|
Dimension |
getMaximumSize(JComponent c) |
æå®ãããã³ã³ããŒãã³ãã®ãLook & Feelã«é©ããæå€§ãµã€ãºãè¿ããŸãã
|
Dimension |
getMinimumSize(JComponent c) |
æå°ãµã€ãºã¯ããã£ã¹ãã¬ã€é åãã€ã³ã»ããããã³ãã¿ã³ãè¶³ãããµã€ãºã§ãã
|
Dimension |
getPreferredSize(JComponent c) |
æå®ãããã³ã³ããŒãã³ãã®ãLook & Feelã«é©ããæšå¥šãµã€ãºãè¿ããŸãã
|
protected Dimension |
getSizeForComponent(Component comp) |
ã»ã«ã»ã¬ã³ãã©ãšããŠäœ¿çšãããå Žåã®ã³ã³ããŒãã³ãã®ãµã€ãºãè¿ããŸãã
|
protected void |
installComponents() |
éåã³ã³ãããã¯ã¹ãæ§æããã³ã³ããŒãã³ããäœæããåæåããŸãã
|
protected void |
installDefaults() |
JComboBoxã«ãããã©ã«ãã®ã«ã©ãŒããã©ã³ããã¬ã³ãã©ãããã³ãšãã£ã¿ãã€ã³ã¹ããŒã«ããŸãã
|
protected void |
installKeyboardActions() |
JComboBoxã«ããŒããŒãã»ã¢ã¯ã·ã§ã³ã远å ããŸãã
|
protected void |
installListeners() |
ã³ã³ãããã¯ã¹ãšãã®ã¢ãã«ã®ããã®ãªã¹ããŒãäœæããã€ã³ã¹ããŒã«ããŸãã
|
void |
installUI(JComponent c) |
æå®ãããã³ã³ããŒãã³ããLook & Feelã«å¿ããŠé©åã«æ§æããŸãã
|
boolean |
isFocusTraversable(JComboBox c) |
JComboBoxãããã©ãŒã«ã¹ã®ãã©ããŒã¹ãå¯èœã§ãããã©ãããå€å®ããŸãã
|
protected boolean |
isNavigationKey(int keyCode) |
æå®ãããkeyCodeããããã²ãŒã·ã§ã³çšã®ããŒã«ãããããããã©ãããè¿ããŸãã
|
boolean |
isPopupVisible(JComboBox c) |
ãããã¢ãããå¯èŠãã©ãããå€å®ããŸãã
|
void |
paint(Graphics g, JComponent c) |
æå®ãããã³ã³ããŒãã³ããLook & Feelã«åãããŠãã€ã³ãããŸãã
|
void |
paintCurrentValue(Graphics g, Rectangle bounds, boolean hasFocus) |
çŸåšéžæãããŠããé
ç®ããã€ã³ãããŸãã
|
void |
paintCurrentValueBackground(Graphics g, Rectangle bounds, boolean hasFocus) |
çŸåšéžæãããŠããé
ç®ã®ããã¯ã°ã©ãŠã³ãããã€ã³ãããŸãã
|
protected Rectangle |
rectangleForCurrentValue() |
çŸåšéžæãããŠããé
ç®ãæç»ããããã«äºçŽãããŠããé åãè¿ããŸãã
|
void |
removeEditor() |
ãã®publicã¡ãœããã¯å®è£
åºæã®ãã®ã§ãprivateã§ããã¹ãã§ãã
|
protected void |
selectNextPossibleValue() |
ãªã¹ãã®æ¬¡ã®é
ç®ãéžæããŸãã
|
protected void |
selectPreviousPossibleValue() |
ãªã¹ããã1ã€åã®é
ç®ãéžæããŸãã
|
void |
setPopupVisible(JComboBox c, boolean v) |
ãããã¢ãããé衚瀺ã«ããŸãã
|
protected void |
toggleOpenClose() |
ãããã¢ããã衚瀺ãããŠããå Žåã¯é衚瀺ã«ããé衚瀺ã«ãªã£ãŠããå Žåã¯è¡šç€ºããŸãã
|
void |
unconfigureArrowButton() |
ãã®publicã¡ãœããã¯å®è£
åºæã®ãã®ã§ãprivateã§ããã¹ãã§ãã
|
protected void |
unconfigureEditor() |
ãã®protectedã¡ãœããã¯å®è£
åºæã®ãã®ã§ãprivateã§ããã¹ãã§ãã
|
protected void |
uninstallComponents() |
ã³ã³ãã»ããã¯ã¹ãæ§æããéåã³ã³ããŒãã³ãã¯ç»é²è§£é€ãããåæåè§£é€ãããŸãã
|
protected void |
uninstallDefaults() |
ã³ã³ãããã¯ã¹ããããã©ã«ãã®ã«ã©ãŒããã©ã³ããã¬ã³ãã©ãããã³ãšãã£ã¿ãã¢ã³ã€ã³ã¹ããŒã«ããŸãã
|
protected void |
uninstallKeyboardActions() |
ãã©ãŒã«ã¹InputMapããã³ActionMapãåé€ããŸãã
|
protected void |
uninstallListeners() |
ã€ã³ã¹ããŒã«ããããªã¹ããŒããã³ã³ãããã¯ã¹ãšãã®ã¢ãã«ããåé€ããŸãã
|
void |
uninstallUI(JComponent c) |
installUIæã«ãæå®ãããã³ã³ããŒãã³ãã«å¯ŸããŠè¡ãããæ§æãåãæ¶ããŸãã |
contains, updateprotected JComboBox comboBox
protected boolean hasFocus
protected JList listBox
protected CellRendererPane currentValuePane
protected ComboPopup popup
protected Component editor
protected JButton arrowButton
protected KeyListener keyListener
createKeyListener()protected FocusListener focusListener
createFocusListener()protected PropertyChangeListener propertyChangeListener
createPropertyChangeListener()protected ItemListener itemListener
createItemListener()protected MouseListener popupMouseListener
protected MouseMotionListener popupMouseMotionListener
protected KeyListener popupKeyListener
protected ListDataListener listDataListener
createListDataListener()protected boolean isMinimumSizeDirty
protected Dimension cachedMinimumSize
protected boolean squareButton
protected Insets padding
public static ComponentUI createUI(JComponent c)
public void installUI(JComponent c)
ComponentUIComponentUIã€ã³ã¹ã¿ã³ã¹ããæå®ãããã³ã³ããŒãã³ãã®UIå§è²ãšããŠã€ã³ã¹ããŒã«ãããŠãããšãã«åŒã³åºãããŸãã ãã®ã¡ãœããã¯ã次ãå«ãLook & Feelçšã®ã³ã³ããŒãã³ããå®å
šã«æ§æããã¹ãã§ãã
LayoutManagerãã€ã³ã¹ããŒã«ããã
PropertyChangeListenerãäœæããŠã³ã³ããŒãã³ãã«ã€ã³ã¹ããŒã«ããã
installUIãã¯ã©ã¹ComponentUIc - UIå§è²ãã€ã³ã¹ããŒã«ãããã³ã³ããŒãã³ãComponentUI.uninstallUI(javax.swing.JComponent), JComponent.setUI(javax.swing.plaf.ComponentUI), JComponent.updateUI()public void uninstallUI(JComponent c)
ComponentUIinstallUIæã«ãæå®ãããã³ã³ããŒãã³ãã«å¯ŸããŠè¡ãããæ§æãåãæ¶ããŸãã ãã®ã¡ãœããã¯ããã®UIComponentã€ã³ã¹ã¿ã³ã¹ããæå®ãããã³ã³ããŒãã³ãã®UIå§è²ãšããŠåé€ãããŠãããšãã«åŒã³åºãããŸãã ãã®ã¡ãœããã¯ãinstallUIã«ãã£ãŠå®è¡ãããæ§æãå
ã«æ»ãã¹ãã§ãããã®å ŽåãJComponentã€ã³ã¹ã¿ã³ã¹ãã¯ãªãŒã³ãªç¶æ
(äœåãªãªã¹ããŒããLook & Feelåºæã®ããããã£ã»ãªããžã§ã¯ããæ®ããªãããã«)ã«ããããååæ³šæããŠãã ããã æé ã«ã¯æ¬¡ã®ãã®ãå«ãŸããã¹ãã§ãã
uninstallUIãã¯ã©ã¹ComponentUIc - ãã®UIå§è²ãåé€ãããã³ã³ããŒãã³ãããã®åŒæ°ã¯éåžžç¡èŠãããããUIãªããžã§ã¯ããã¹ããŒãã¬ã¹ã§ãè€æ°ã®ã³ã³ããŒãã³ãã§å
±æãããŠããå Žåã¯äœ¿çšãããããšãããComponentUI.installUI(javax.swing.JComponent), JComponent.updateUI()protected void installDefaults()
protected void installListeners()
protected void uninstallDefaults()
protected void uninstallListeners()
installListenersã§è¿œå ããããã®ãšåãã§ããã¹ãã§ãã protected ComboPopup createPopup()
ComboPopupã®ã€ã³ã¹ã¿ã³ã¹ComboPopupprotected KeyListener createKeyListener()
KeyListenerãäœæããŸãã ãã®ã¡ãœãããnullãè¿ãå Žåãã³ã³ãããã¯ã¹ã«ã¯è¿œå ãããŸããã KeyListenerã®ã€ã³ã¹ã¿ã³ã¹ãŸãã¯nullprotected FocusListener createFocusListener()
FocusListenerãäœæããŸãã ãã®ã¡ãœãããnullãè¿ãå Žåãã³ã³ãããã¯ã¹ã«ã¯è¿œå ãããŸããã FocusListenerã®ã€ã³ã¹ã¿ã³ã¹ããŸãã¯nullprotected ListDataListener createListDataListener()
ComboBoxModelã«è¿œå ããããªã¹ãã»ããŒã¿ã»ãªã¹ããŒãäœæããŸãã ãã®ã¡ãœãããnullãè¿ãå Žåãã³ã³ãã»ããã¯ã¹ã»ã¢ãã«ã«ã¯è¿œå ãããŸããã ListDataListenerã®ã€ã³ã¹ã¿ã³ã¹ããŸãã¯nullprotected ItemListener createItemListener()
ItemListenerãäœæããŸãã ãã®ã¡ãœãããnullãè¿ãå Žåãã³ã³ãããã¯ã¹ã«ã¯è¿œå ãããŸããã
ãµãã¯ã©ã¹ã¯ããã®ã¡ãœããããªãŒããŒã©ã€ãããŠãç¬èªã®ItemEventãã³ãã©ã®ã€ã³ã¹ã¿ã³ã¹ãè¿ãããšãã§ããŸãã
ItemListenerã®ã€ã³ã¹ã¿ã³ã¹ããŸãã¯nullprotected PropertyChangeListener createPropertyChangeListener()
PropertyChangeListenerãäœæããŸãã ãã®ã¡ãœãããnullãè¿ãå Žåãã³ã³ãããã¯ã¹ã«ã¯è¿œå ãããŸããã PropertyChangeListenerã®ã€ã³ã¹ã¿ã³ã¹ããŸãã¯nullprotected LayoutManager createLayoutManager()
protected ListCellRenderer createRenderer()
setRendererã§æç€ºçã«èšå®ãããŠããªãå Žåã ããããã©ã«ãã»ã¬ã³ãã©ã䜿çšãããŸãã ListCellRenderJComboBox.setRenderer(javax.swing.ListCellRenderer<? super E>)protected ComboBoxEditor createEditor()
setEditorã§æç€ºçã«èšå®ãããŠããªãå Žåã ããããã©ã«ãã»ãšãã£ã¿ã䜿çšãããŸãã ComboBoxEditorJComboBox.setEditor(javax.swing.ComboBoxEditor)protected void installComponents()
protected void uninstallComponents()
public void addEditor()
ComboBoxEditorãäœæããŠãã ããã public void removeEditor()
addEditor()protected void configureEditor()
addEditor()protected void unconfigureEditor()
addEditor()public void configureArrowButton()
createArrowButton()public void unconfigureArrowButton()
createArrowButton()protected JButton createArrowButton()
public boolean isPopupVisible(JComboBox c)
isPopupVisibleãã¯ã©ã¹ComboBoxUIpublic void setPopupVisible(JComboBox c, boolean v)
setPopupVisibleãã¯ã©ã¹ComboBoxUIpublic boolean isFocusTraversable(JComboBox c)
isFocusTraversableãã¯ã©ã¹ComboBoxUIpublic void paint(Graphics g, JComponent c)
ComponentUIComponentUI.updateã¡ãœããããåŒã³åºãããŸãã ãµãã¯ã©ã¹ã¯ããã®ã¡ãœããããªãŒããŒã©ã€ãããŠãæå®ãããGraphicsãªããžã§ã¯ãã䜿ã£ãŠã³ã³ããŒãã³ãã®å
容ãæç»ããã¹ãã§ãã paintãã¯ã©ã¹ComponentUIg - ãã€ã³ã察象ã®Graphicsã³ã³ããã¹ãc - ãã€ã³ããããã³ã³ããŒãã³ãããã®åŒæ°ã¯éåžžç¡èŠãããããUIãªããžã§ã¯ããã¹ããŒãã¬ã¹ã§ãè€æ°ã®ã³ã³ããŒãã³ãã§å
±æãããŠããå Žåã¯äœ¿çšãããããšãããComponentUI.update(java.awt.Graphics, javax.swing.JComponent)public Dimension getPreferredSize(JComponent c)
ComponentUInullãè¿ãããå Žåãé©åãªãµã€ãºã¯ä»£ããã«ã³ã³ããŒãã³ãã®ã¬ã€ã¢ãŠãã»ãããŒãžã£ã«ãã£ãŠèšç®ãããŸã(ããã¯ãç¹å®ã®ã¬ã€ã¢ãŠãã»ãããŒãžã£ãã€ã³ã¹ããŒã«ããŠããã³ã³ããŒãã³ãã®å Žåã«æšå¥šããæ¹æ³ã§ã)ã ãã®ã¡ãœããã®ããã©ã«ãå®è£
ã¯nullãè¿ããŸãã getPreferredSizeãã¯ã©ã¹ComponentUIc - æšå¥šãµã€ãºãç
§äŒãããã³ã³ããŒãã³ãããã®åŒæ°ã¯éåžžç¡èŠãããããUIãªããžã§ã¯ããã¹ããŒãã¬ã¹ã§ãè€æ°ã®ã³ã³ããŒãã³ãã§å
±æãããŠããå Žåã¯äœ¿çšãããããšãããJComponent.getPreferredSize(), LayoutManager.preferredLayoutSize(java.awt.Container)public Dimension getMinimumSize(JComponent c)
getMinimumSizeãã¯ã©ã¹ComponentUIc - æå°ãµã€ãºãç
§äŒãããã³ã³ããŒãã³ãããã®åŒæ°ã¯éåžžç¡èŠãããããUIãªããžã§ã¯ããã¹ããŒãã¬ã¹ã§ãè€æ°ã®ã³ã³ããŒãã³ãã§å
±æãããŠããå Žåã¯äœ¿çšãããããšãããDimensionãªããžã§ã¯ããŸãã¯nullJComponent.getMinimumSize(), LayoutManager.minimumLayoutSize(java.awt.Container), ComponentUI.getPreferredSize(javax.swing.JComponent)public Dimension getMaximumSize(JComponent c)
ComponentUInullãè¿ãããå Žåãæå€§ãµã€ãºã¯ä»£ããã«ã³ã³ããŒãã³ãã®ã¬ã€ã¢ãŠãã»ãããŒãžã£ã«ãã£ãŠèšç®ãããŸã(ããã¯ãç¹å®ã®ã¬ã€ã¢ãŠãã»ãããŒãžã£ãã€ã³ã¹ããŒã«ããŠããã³ã³ããŒãã³ãã®å Žåã«æšå¥šããæ¹æ³ã§ã)ã ãã®ã¡ãœããã®ããã©ã«ãå®è£
ã¯getPreferredSizeãåŒã³åºããŠããã®å€ãè¿ããŸãã getMaximumSizeãã¯ã©ã¹ComponentUIc - æå€§ãµã€ãºãç
§äŒãããã³ã³ããŒãã³ãããã®åŒæ°ã¯éåžžç¡èŠãããããUIãªããžã§ã¯ããã¹ããŒãã¬ã¹ã§ãè€æ°ã®ã³ã³ããŒãã³ãã§å
±æãããŠããå Žåã¯äœ¿çšãããããšãããDimensionãªããžã§ã¯ããŸãã¯nullJComponent.getMaximumSize(), LayoutManager2.maximumLayoutSize(java.awt.Container)public int getBaseline(JComponent c, int width, int height)
getBaselineãã¯ã©ã¹ComponentUIc - ããŒã¹ã©ã€ã³ãèŠæ±ãããJComponentwidth - ããŒã¹ã©ã€ã³ãååŸããå¹
height - ããŒã¹ã©ã€ã³ãååŸããé«ãNullPointerException - cãnullã§ããå ŽåIllegalArgumentException - å¹
ãŸãã¯é«ãã0ããå°ããå ŽåJComponent.getBaseline(int, int)public Component.BaselineResizeBehavior getBaselineResizeBehavior(JComponent c)
getBaselineResizeBehaviorãã¯ã©ã¹ComponentUIc - ããŒã¹ã©ã€ã³ã®ãµã€ãºå€æŽã®åäœãè¿ãJComponentNullPointerException - cãnullã§ããå ŽåJComponent.getBaseline(int, int)public int getAccessibleChildrenCount(JComponent c)
ComponentUIAccessibleã€ã³ã¿ãã§ãŒã¹ãå®è£
ããŠããå Žåããã®ã¡ãœããã¯ãã®ãªããžã§ã¯ãã®åã®æ°ãè¿ãã¹ãã§ãã UIããç»é¢äžã«ã³ã³ããŒãã³ããšããŠè¡šç€ºãããé åã¯æäŸããããå®éã®ã³ã³ããŒãã³ãããã®é åãæäŸããããã«äœ¿çšãããªãå ŽåãUIã«ãããŠå¿
èŠã«å¿ããŠãã®ã¡ãœããããªãŒããŒã©ã€ãã§ããŸãã ããŒã: ããŒãžã§ã³1.3以éã¯ããã®ã¡ãœããã®ä»£ããã«Component.AccessibleAWTComponent.getAccessibleChildrenCount()ãåŒã³åºãããšããå§ãããŸãã getAccessibleChildrenCountãã¯ã©ã¹ComponentUIComponentUI.getAccessibleChild(javax.swing.JComponent, int)public Accessible getAccessibleChild(JComponent c, int i)
ComponentUIiçªç®ã®Accessibleã®åãè¿ããŸãã UIããç»é¢äžã«ã³ã³ããŒãã³ããšããŠè¡šç€ºãããé åã¯æäŸãããããã®é åãæäŸããã®ã«å®éã®ã³ã³ããŒãã³ãã䜿çšããªãå ŽåãUIã¯å¿
èŠã«å¿ããŠãã®ã¡ãœããããªãŒããŒã©ã€ãããŸãã
ããŒã: ããŒãžã§ã³1.3以éã¯ããã®ã¡ãœããã®ä»£ããã«Component.AccessibleAWTComponent.getAccessibleChild()ãåŒã³åºãããšããå§ãããŸãã
getAccessibleChildãã¯ã©ã¹ComponentUIi - åã®ãŒãããå§ãŸãã€ã³ããã¯ã¹içªç®ã®Accessibleã®åComponentUI.getAccessibleChildrenCount(javax.swing.JComponent)protected boolean isNavigationKey(int keyCode)
protected void selectNextPossibleValue()
protected void selectPreviousPossibleValue()
protected void toggleOpenClose()
protected Rectangle rectangleForCurrentValue()
protected Insets getInsets()
public void paintCurrentValue(Graphics g, Rectangle bounds, boolean hasFocus)
public void paintCurrentValueBackground(Graphics g, Rectangle bounds, boolean hasFocus)
protected Dimension getDefaultSize()
getDisplaySize()protected Dimension getDisplaySize()
é ç®æ°ã®å€ãã³ã³ãããã¯ã¹ã«ã€ããŠã¯ããããã¿ã€ãã»ãã£ã¹ãã¬ã€å€ã䜿çšããŠããã£ã¹ãã¬ã€ã»ãµã€ãºã®èšç®ãå€§å¹ ã«éããããšããå§ãããŸãã
JComboBox.setPrototypeDisplayValue(E)protected Dimension getSizeForComponent(Component comp)
comp - ãã§ãã¯ããComponentprotected void installKeyboardActions()
protected void uninstallKeyboardActions()
ãã°ãŸãã¯æ©èœãéä¿¡
詳现ãªAPIãªãã¡ã¬ã³ã¹ããã³éçºè
ããã¥ã¡ã³ãã«ã€ããŠã¯ãJava SEã®ããã¥ã¡ã³ããåç
§ããŠãã ããã ãã®ããã¥ã¡ã³ãã«ã¯ãæŠå¿µçãªæŠèŠãçšèªã®å®çŸ©ãåé¿æ¹æ³ãæå¹ãªã³ãŒãäŸãªã©ã®ãéçºè
ã察象ã«ãããã詳现ãªèª¬æãå«ãŸããŠããŸãã
Copyright © 1993, 2025, Oracle and/or its affiliates. All rights reserved. Use is subject to license terms. Documentation Redistribution Policyãåç
§ããŠãã ããã