|
JavaTM Platform Standard Ed. 6 |
|||||||||
��һ���� ��һ���� | ��� ��� ������ | |||||||||
ժҪ�� Ƕ�� | �ֶ� | ���췽�� | ���� | ��ϸ��Ϣ�� �ֶ� | ���췽�� | ���� |
java.lang.Objectjavax.swing.plaf.ComponentUI
javax.swing.plaf.ComboBoxUI
javax.swing.plaf.basic.BasicComboBoxUI
javax.swing.plaf.metal.MetalComboBoxUI
public class MetalComboBoxUI
JComboBox �� Metal UI
���棺����������л��������Ժ�� Swing �汾�����ݡ���ǰ���л�֧�������ڶ��ڴ洢��������ͬ Swing �汾��Ӧ�ó���֮��� RMI���� 1.4 �汾��ʼ������ java.beans
����������֧������ JavaBeansTM ���ڴ洢�Ĺ��ܡ���μ� XMLEncoder
��
MetalComboBoxEditor
,
MetalComboBoxButton
Ƕ����ժҪ | |
---|---|
class |
MetalComboBoxUI.MetalComboBoxLayoutManager
���ڲ�������������϶������Ϊ "public"�� |
class |
MetalComboBoxUI.MetalComboPopup
�ѹ�ʱ�� �� Java 2 platform v1.4 ��ʼ�� |
class |
MetalComboBoxUI.MetalPropertyChangeListener
���ڲ������ڱ��������϶������Ϊ "public"�� |
���� javax.swing.plaf.basic.BasicComboBoxUI �̳е�Ƕ����/�ӿ� |
---|
BasicComboBoxUI.ComboBoxLayoutManager, BasicComboBoxUI.FocusHandler, BasicComboBoxUI.ItemHandler, BasicComboBoxUI.KeyHandler, BasicComboBoxUI.ListDataHandler, BasicComboBoxUI.PropertyChangeHandler |
�ֶ�ժҪ |
---|
���� javax.swing.plaf.basic.BasicComboBoxUI �̳е��ֶ� |
---|
arrowButton, cachedMinimumSize, comboBox, currentValuePane, editor, focusListener, hasFocus, isMinimumSizeDirty, itemListener, keyListener, listBox, listDataListener, popup, popupKeyListener, popupMouseListener, popupMouseMotionListener, propertyChangeListener |
���췽��ժҪ | |
---|---|
MetalComboBoxUI()
|
����ժҪ | |
---|---|
void |
configureEditor()
���ܱ����������ض���ʵ�ֵģ�Ӧ��Ϊ˽�У���Ҫ���û���д�� |
protected JButton |
createArrowButton()
����һ����ť����ʹ������������ʾ��������Ͽ�ĵ������֡� |
protected ComboBoxEditor |
createEditor()
�������ڿɱ༭����Ͽ���ʹ�õ�Ĭ�ϱ༭���� |
protected LayoutManager |
createLayoutManager()
�������ڹ���������Ͽ������IJ��ֹ������� |
protected ComboPopup |
createPopup()
������Ͽ�ĵ������֡� |
PropertyChangeListener |
createPropertyChangeListener()
���������ӵ���Ͽ�� PropertyChangeListener �� |
static ComponentUI |
createUI(JComponent c)
|
protected void |
editablePropertyChanged(PropertyChangeEvent e)
�ѹ�ʱ�� �� Java 2 platform v1.4 ��ʼ�� |
int |
getBaseline(JComponent c,
int width,
int height)
���ػ��ߡ� |
Dimension |
getMinimumSize(JComponent c)
��С��СΪ��ʾ������� insets �ټ��ϰ�ť�Ĵ�С�� |
void |
layoutComboBox(Container parent,
MetalComboBoxUI.MetalComboBoxLayoutManager manager)
|
void |
paint(Graphics g,
JComponent c)
����ָ�������ʹ���ʺ���ۡ� |
void |
paintCurrentValue(Graphics g,
Rectangle bounds,
boolean hasFocus)
���б�Ҫ�����Ƶ�ǰ��ѡ� |
void |
paintCurrentValueBackground(Graphics g,
Rectangle bounds,
boolean hasFocus)
���б�Ҫ�����Ƶ�ǰ��ѡ��ı����� |
protected void |
removeListeners()
�ѹ�ʱ�� �� Java 2 platform v1.4 ��ʼ�� |
void |
unconfigureEditor()
���ܱ����������ض���ʵ�ֵģ�Ӧ��Ϊ˽�С� |
���� javax.swing.plaf.ComponentUI �̳еķ��� |
---|
contains, update |
���� java.lang.Object �̳еķ��� |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
���췽����ϸ��Ϣ |
---|
public MetalComboBoxUI()
������ϸ��Ϣ |
---|
public static ComponentUI createUI(JComponent c)
public void paint(Graphics g, JComponent c)
ComponentUI
���Ƶ�����ComponentUI.update
�����е��ô˷���������Ӧ����д�˷�����ʹ��ָ�� Graphics
������������������ݡ�
BasicComboBoxUI
�е� paint
g
- �������н��л��Ƶ� Graphics
������c
- �����Ƶ�������˲����������ԣ������ UI ��������״̬�IJ��ɶ����������������ʹ�øò���ComponentUI.update(java.awt.Graphics, javax.swing.JComponent)
public void paintCurrentValue(Graphics g, Rectangle bounds, boolean hasFocus)
BasicComboBoxUI
�е� paintCurrentValue
g
- ��Ϊ����Ŀ��� Graphicbounds
- ��ǰֵ�Ļ��Ʒ�ΧhasFocus
- JComboBox �Ƿ�ӵ�н���
NullPointerException
- ������в�����Ϊ null��public void paintCurrentValueBackground(Graphics g, Rectangle bounds, boolean hasFocus)
BasicComboBoxUI
�е� paintCurrentValueBackground
g
- ��Ϊ����Ŀ��� Graphicbounds
- �����Ļ��Ʒ�ΧhasFocus
- JComboBox �Ƿ�ӵ�н���
NullPointerException
- ������в�����Ϊ null��public int getBaseline(JComponent c, int width, int height)
BasicComboBoxUI
�е� getBaseline
c
- Ϊ��������ߵ� JComponent
width
- Ϊ���ȡ���ߵĿ���height
- Ϊ���ȡ���ߵĸ߶�
NullPointerException
- ��� c
Ϊ null
IllegalArgumentException
- ������Ȼ�߶� < 0JComponent.getBaseline(int, int)
protected ComboBoxEditor createEditor()
BasicComboBoxUI
���Ƶ�����setEditor
��ʽ���ñ༭��ʱ��ʹ��Ĭ�ϱ༭����
BasicComboBoxUI
�е� createEditor
ComboBoxEditor
JComboBox.setEditor(javax.swing.ComboBoxEditor)
protected ComboPopup createPopup()
BasicComboBoxUI
���Ƶ�����
BasicComboBoxUI
�е� createPopup
ComboPopup
��ʵ��ComboPopup
protected JButton createArrowButton()
BasicComboBoxUI
���Ƶ�����
BasicComboBoxUI
�е� createArrowButton
public PropertyChangeListener createPropertyChangeListener()
BasicComboBoxUI
���Ƶ�����PropertyChangeListener
������˷������� null���Ὣ�����ӵ���Ͽ�
BasicComboBoxUI
�е� createPropertyChangeListener
PropertyChangeListener
��ʵ���� null@Deprecated protected void editablePropertyChanged(PropertyChangeEvent e)
protected LayoutManager createLayoutManager()
BasicComboBoxUI
���Ƶ�����
BasicComboBoxUI
�е� createLayoutManager
public void layoutComboBox(Container parent, MetalComboBoxUI.MetalComboBoxLayoutManager manager)
@Deprecated protected void removeListeners()
public void configureEditor()
BasicComboBoxUI
���Ƶ�����
BasicComboBoxUI
�е� configureEditor
BasicComboBoxUI.addEditor()
public void unconfigureEditor()
BasicComboBoxUI
���Ƶ�����
BasicComboBoxUI
�е� unconfigureEditor
BasicComboBoxUI.addEditor()
public Dimension getMinimumSize(JComponent c)
BasicComboBoxUI
���Ƶ�����
BasicComboBoxUI
�е� getMinimumSize
c
- ����ѯ����С��С��������˲����������ԣ������ UI ��������״̬�IJ��ɶ����������������ʹ�øò���
Dimension
����� null
JComponent.getMinimumSize()
,
LayoutManager.minimumLayoutSize(java.awt.Container)
,
ComponentUI.getPreferredSize(javax.swing.JComponent)
|
JavaTM Platform Standard Ed. 6 |
|||||||||
��һ���� ��һ���� | ��� ��� ������ | |||||||||
ժҪ�� Ƕ�� | �ֶ� | ���췽�� | ���� | ��ϸ��Ϣ�� �ֶ� | ���췽�� | ���� |
��Ȩ���� 2007 Sun Microsystems, Inc. ��������Ȩ���� ����������֤��������������ĵ����·ַ�������