JavaTM Platform
Standard Ed. 6

javax.swing.plaf.metal
�� DefaultMetalTheme

java.lang.Object
  �̳��� javax.swing.plaf.metal.MetalTheme
      �̳��� javax.swing.plaf.metal.DefaultMetalTheme
ֱ����֪���ࣺ
OceanTheme

public class DefaultMetalTheme
extends MetalTheme

�ṩ Java ���ԭ�͵� MetalTheme ��һ������ʵ�֣���������Ϊ��Steel�����йظ���Ĭ���������ϸ��Ϣ������� MetalLookAndFeel.setCurrentTheme(javax.swing.plaf.metal.MetalTheme)��

DefaultMetalTheme ���ص�������ɫ������ȫ��͸���ġ�

������ʽ

DefaultMetalTheme ������ؼ�ʹ�ú��塣Ҫʹ���пؼ����ڲ�����������Ϳͻ�����װ�δ�����������⣩ʹ���޸�ʽ���壬����ִ�����²���֮һ�� Ĭ������ swing.boldMetal����������ã�������ͬ����ϵͳ���ԡ����ô�Ĭ�����Ժ���Ҫ���°�װ MetalLookAndFeel��������������ǰ�����Ĵ���С������ UI�����򣬽���Dz�ȷ���ġ����´���˵������ν��д˲�����
   // turn off bold fonts
   UIManager.put("swing.boldMetal", Boolean.FALSE);

   // re-install the Metal Look and Feel
   UIManager.setLookAndFeel(new MetalLookAndFeel());

   // Update the ComponentUIs for all Components. This
   // needs to be invoked for all windows.
   SwingUtilities.updateComponentTreeUI(rootComponent);
 

���棺��������л��������Ժ�� Swing �汾�����ݡ���ǰ���л�֧�������ڶ��ڴ洢��������ͬ Swing �汾��Ӧ�ó���֮��� RMI���� 1.4 �汾��ʼ������ java.beans ����������֧������ JavaBeansTM ���ڴ洢�Ĺ��ܡ���μ� XMLEncoder��

������
MetalLookAndFeel, MetalLookAndFeel.setCurrentTheme(javax.swing.plaf.metal.MetalTheme)

���췽��ժҪ
DefaultMetalTheme()
          ���������� DefaultMetalTheme ��һ��ʵ����
 
����ժҪ
 FontUIResource getControlTextFont()
          ���ؿؼ��ı����塣
 FontUIResource getMenuTextFont()
          ���ز˵��ı����塣
 String getName()
          ���ش���������ơ�
protected  ColorUIResource getPrimary1()
          ���� primary 1 ��ɫ��
protected  ColorUIResource getPrimary2()
          ���� primary 2 ��ɫ��
protected  ColorUIResource getPrimary3()
          ���� primary 3 ��ɫ��
protected  ColorUIResource getSecondary1()
          ���� secondary 1 ��ɫ��
protected  ColorUIResource getSecondary2()
          ���� secondary 2 ��ɫ��
protected  ColorUIResource getSecondary3()
          ���� secondary 3 ��ɫ��
 FontUIResource getSubTextFont()
          �������ı����塣
 FontUIResource getSystemTextFont()
          ����ϵͳ�ı����塣
 FontUIResource getUserTextFont()
          �����û��ı����塣
 FontUIResource getWindowTitleFont()
          ���ش��ڱ������塣
 
���� javax.swing.plaf.metal.MetalTheme �̳еķ���
addCustomEntriesToTable, getAcceleratorForeground, getAcceleratorSelectedForeground, getBlack, getControl, getControlDarkShadow, getControlDisabled, getControlHighlight, getControlInfo, getControlShadow, getControlTextColor, getDesktopColor, getFocusColor, getHighlightedTextColor, getInactiveControlTextColor, getInactiveSystemTextColor, getMenuBackground, getMenuDisabledForeground, getMenuForeground, getMenuSelectedBackground, getMenuSelectedForeground, getPrimaryControl, getPrimaryControlDarkShadow, getPrimaryControlHighlight, getPrimaryControlInfo, getPrimaryControlShadow, getSeparatorBackground, getSeparatorForeground, getSystemTextColor, getTextHighlightColor, getUserTextColor, getWhite, getWindowBackground, getWindowTitleBackground, getWindowTitleForeground, getWindowTitleInactiveBackground, getWindowTitleInactiveForeground
 
���� java.lang.Object �̳еķ���
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

���췽����ϸ��Ϣ

DefaultMetalTheme

public DefaultMetalTheme()
���������� DefaultMetalTheme ��һ��ʵ����

������ϸ��Ϣ

getName

public String getName()
���ش���������ơ��˷������� "Steel"��

ָ���ߣ�
�� MetalTheme �е� getName
���أ�
�����������

getPrimary1

protected ColorUIResource getPrimary1()
���� primary 1 ��ɫ���˷������� rgb ֵ�ֱ�Ϊ 102��102 �� 153 ����ɫ��

ָ���ߣ�
�� MetalTheme �е� getPrimary1
���أ�
primary 1 ��ɫ

getPrimary2

protected ColorUIResource getPrimary2()
���� primary 2 ��ɫ���˷������� rgb ֵ�ֱ�Ϊ 153��153��204 ����ɫ��

ָ���ߣ�
�� MetalTheme �е� getPrimary2
���أ�
primary 2 ��ɫ

getPrimary3

protected ColorUIResource getPrimary3()
���� primary 3 ��ɫ���˷������� rgb ֵ�ֱ�Ϊ 204��204��255 ����ɫ��

ָ���ߣ�
�� MetalTheme �е� getPrimary3
���أ�
primary 3 ��ɫ

getSecondary1

protected ColorUIResource getSecondary1()
���� secondary 1 ��ɫ���˷������� rgb ֵ�ֱ�Ϊ 102��102 �� 102 ����ɫ��

ָ���ߣ�
�� MetalTheme �е� getSecondary1
���أ�
secondary 1 ��ɫ

getSecondary2

protected ColorUIResource getSecondary2()
���� secondary 2 ��ɫ���˷������� rgb ֵ�ֱ�Ϊ 153��153 �� 153 ����ɫ��

ָ���ߣ�
�� MetalTheme �е� getSecondary2
���أ�
secondary 2 ��ɫ

getSecondary3

protected ColorUIResource getSecondary3()
���� secondary 3 ��ɫ���˷������� rgb ֵ�ֱ�Ϊ 204��204 �� 204 ����ɫ��

ָ���ߣ�
�� MetalTheme �е� getSecondary3
���أ�
secondary 3 ��ɫ

getControlTextFont

public FontUIResource getControlTextFont()
���ؿؼ��ı����塣�˷������� Dialog��12pt�������������ʽ�������������޸�ʽ���壬��������ʽΪ�޸�ʽ�ġ�����������ʽΪ���塣

ָ���ߣ�
�� MetalTheme �е� getControlTextFont
���أ�
�ؼ��ı�����

getSystemTextFont

public FontUIResource getSystemTextFont()
����ϵͳ�ı����塣�˷������� Dialog��12pt���޸�ʽ��

ָ���ߣ�
�� MetalTheme �е� getSystemTextFont
���أ�
ϵͳ�ı�����

getUserTextFont

public FontUIResource getUserTextFont()
�����û��ı����塣�˷������� Dialog��12pt���޸�ʽ��

ָ���ߣ�
�� MetalTheme �е� getUserTextFont
���أ�
�û��ı�����

getMenuTextFont

public FontUIResource getMenuTextFont()
���ز˵��ı����塣�˷������� Dialog��12pt�������������ʽ�������������޸�ʽ���壬��������ʽΪ�޸�ʽ�ġ�����������ʽΪ���塣

ָ���ߣ�
�� MetalTheme �е� getMenuTextFont
���أ�
�˵��ı�����

getWindowTitleFont

public FontUIResource getWindowTitleFont()
���ش��ڱ������塣�˷������� Dialog��12pt�����塣

ָ���ߣ�
�� MetalTheme �е� getWindowTitleFont
���أ�
���ڱ�������

getSubTextFont

public FontUIResource getSubTextFont()
�������ı����塣�˷������� Dialog��10pt���޸�ʽ��

ָ���ߣ�
�� MetalTheme �е� getSubTextFont
���أ�
���ı�����

JavaTM Platform
Standard Ed. 6

�ύ��������
�йظ���� API �ο����ϺͿ�����Ա�ĵ�������� Java SE ������Ա�ĵ������ĵ���������ϸ�ġ����򿪷���Ա���������Լ�������������ﶨ�塢ʹ�ü��ɺ͹�������ʾ����

��Ȩ���� 2007 Sun Microsystems, Inc. ��������Ȩ���� ����������֤��������������ĵ����·ַ�������