[multiple changes]

2005-04-19  Roman Kennke  <roman@kennke.org>

	* javax/swing/plaf/metal/MetalLookAndFeel.java
	(initComponentDefaults): Added defaults for Menu, MenuBar
	MenuEntry fonts.

2005-04-19  Roman Kennke  <roman@kennke.org>

	* javax/swing/plaf/metal/MetalLookAndFeel.java
	(initComponentDefaults): Added Label.font.
	(initSystemColorDefaults): Added this method and adjusted the
	general control color.

2005-04-19  Roman Kennke  <roman@kennke.org>

	* javax/swing/plaf/metal/MetalBorders.java:
	Added.
	* javax/swing/plaf/metal/MetalButtonUI.java:
	(installDefaults): Install button font.
	* javax/swing/plaf/metal/MetalLookAndFeel.java:
	(initComponentDefaults): Added button border, font and margin.
	Changed components background color to the Metal current themes
	standard color.

2005-04-19  Roman Kennke  <roman@kennke.org>

	* javax/swing/plaf/metal/MetalLookAndFeel.java
	(initComponentDefaults): Added to set Metal specific component
	defaults.

2005-04-19  Mark Wielaard  <mark@klomp.org>

	* javax/swing/plaf/metal/MetalLookAndFeel.java
	(initClassDefaults): Call super.initClassDefaults().

2005-04-19  Roman Kennke  <roman@kennke.org>

	* javax/swing/plaf/metal/MetalLookAndFeel.java
	(initClassDefaults): Added to include the *UI classes.

2005-04-19  Roman Kennke  <roman@kennke.org>

	* javax/swing/plaf/metal/MetalComboBoxUI.java:
	Added.
	* javax/swing/plaf/metal/MetalDesktopIconUI.java:
	Added.
	* javax/swing/plaf/metal/MetalInternalFrameUI.java:
	Added.
	* javax/swing/plaf/metal/MetalPopupMenuSeparatorUI.java:
	Added.
	* javax/swing/plaf/metal/MetalProgressBarUI.java:
	Added.
	* javax/swing/plaf/metal/MetalRootPaneUI.java:
	Added.
	* javax/swing/plaf/metal/MetalScrollBarUI.java:
	Added.
	* javax/swing/plaf/metal/MetalSeparatorUI.java:
	Added.
	* javax/swing/plaf/metal/MetalSliderUI.java:
	Added.
	* javax/swing/plaf/metal/MetalSplitPaneUI.java:
	Added.
	* javax/swing/plaf/metal/MetalTextFieldUI.java:
	Added.
	* javax/swing/plaf/metal/MetalToggleButtonUI.java:

2005-04-19  Roman Kennke  <roman@kennke.org>

	* javax/swing/plaf/metal/MetalButtonUI.java:
	Added skeleton class.
	* javax/swing/plaf/metal/MetalCheckBoxUI.java:
	Added skeleton class.
	* javax/swing/plaf/metal/MetalLabelUI.java:
	Added skeleton class.
	* javax/swing/plaf/metal/MetalRadioButtonUI.java:
	Added skeleton class.
	* javax/swing/plaf/metal/MetalScrollPaneUI.java:
	Added skeleton class.
	* javax/swing/plaf/metal/MetalTabbedPaneUI.java:
	Added skeleton class.

2005-04-19  Roman Kennke  <roman@kennke.org>

	* javax/swing/UIDefaults.java:
	Added API documentation for all methods.

2005-04-19  Roman Kennke  <roman@kennke.org>

	* javax/swing/UIDefaults.java
	(put): Now uses new checkAndPut method instead of checking
	directly.
	(putDefaults): Fixed so that it accepts null-values and
	treats them like remove(key).
	(checkAndPut): Added. This checks for null-values and calls
	put or remove.

2005-04-19  Michael Koch  <konqueror@gmx.de>

	* Makefile.am: Added new files.
	* Makefile.in: Regenerated.

From-SVN: r98396
This commit is contained in:
Michael Koch 2005-04-19 09:59:53 +00:00
parent d393cb7237
commit 2330df3bed
27 changed files with 2630 additions and 12 deletions

View File

@ -1,3 +1,104 @@
2005-04-19 Roman Kennke <roman@kennke.org>
* javax/swing/plaf/metal/MetalLookAndFeel.java
(initComponentDefaults): Added defaults for Menu, MenuBar
MenuEntry fonts.
2005-04-19 Roman Kennke <roman@kennke.org>
* javax/swing/plaf/metal/MetalLookAndFeel.java
(initComponentDefaults): Added Label.font.
(initSystemColorDefaults): Added this method and adjusted the
general control color.
2005-04-19 Roman Kennke <roman@kennke.org>
* javax/swing/plaf/metal/MetalBorders.java:
Added.
* javax/swing/plaf/metal/MetalButtonUI.java:
(installDefaults): Install button font.
* javax/swing/plaf/metal/MetalLookAndFeel.java:
(initComponentDefaults): Added button border, font and margin.
Changed components background color to the Metal current themes
standard color.
2005-04-19 Roman Kennke <roman@kennke.org>
* javax/swing/plaf/metal/MetalLookAndFeel.java
(initComponentDefaults): Added to set Metal specific component
defaults.
2005-04-19 Mark Wielaard <mark@klomp.org>
* javax/swing/plaf/metal/MetalLookAndFeel.java
(initClassDefaults): Call super.initClassDefaults().
2005-04-19 Roman Kennke <roman@kennke.org>
* javax/swing/plaf/metal/MetalLookAndFeel.java
(initClassDefaults): Added to include the *UI classes.
2005-04-19 Roman Kennke <roman@kennke.org>
* javax/swing/plaf/metal/MetalComboBoxUI.java:
Added.
* javax/swing/plaf/metal/MetalDesktopIconUI.java:
Added.
* javax/swing/plaf/metal/MetalInternalFrameUI.java:
Added.
* javax/swing/plaf/metal/MetalPopupMenuSeparatorUI.java:
Added.
* javax/swing/plaf/metal/MetalProgressBarUI.java:
Added.
* javax/swing/plaf/metal/MetalRootPaneUI.java:
Added.
* javax/swing/plaf/metal/MetalScrollBarUI.java:
Added.
* javax/swing/plaf/metal/MetalSeparatorUI.java:
Added.
* javax/swing/plaf/metal/MetalSliderUI.java:
Added.
* javax/swing/plaf/metal/MetalSplitPaneUI.java:
Added.
* javax/swing/plaf/metal/MetalTextFieldUI.java:
Added.
* javax/swing/plaf/metal/MetalToggleButtonUI.java:
2005-04-19 Roman Kennke <roman@kennke.org>
* javax/swing/plaf/metal/MetalButtonUI.java:
Added skeleton class.
* javax/swing/plaf/metal/MetalCheckBoxUI.java:
Added skeleton class.
* javax/swing/plaf/metal/MetalLabelUI.java:
Added skeleton class.
* javax/swing/plaf/metal/MetalRadioButtonUI.java:
Added skeleton class.
* javax/swing/plaf/metal/MetalScrollPaneUI.java:
Added skeleton class.
* javax/swing/plaf/metal/MetalTabbedPaneUI.java:
Added skeleton class.
2005-04-19 Roman Kennke <roman@kennke.org>
* javax/swing/UIDefaults.java:
Added API documentation for all methods.
2005-04-19 Roman Kennke <roman@kennke.org>
* javax/swing/UIDefaults.java
(put): Now uses new checkAndPut method instead of checking
directly.
(putDefaults): Fixed so that it accepts null-values and
treats them like remove(key).
(checkAndPut): Added. This checks for null-values and calls
put or remove.
2005-04-19 Michael Koch <konqueror@gmx.de>
* Makefile.am: Added new files.
* Makefile.in: Regenerated.
2005-04-19 Mark Wielaard <mark@klomp.org>
* java/lang/natRuntime.cc (insertSystemProperties): Set

View File

@ -1670,6 +1670,28 @@ javax/swing/plaf/basic/BasicLookAndFeel.java \
javax/swing/plaf/basic/BasicBorders.java \
javax/swing/plaf/basic/BasicIconFactory.java \
javax/swing/plaf/basic/ComboPopup.java \
javax/swing/plaf/metal/MetalBorders.java \
javax/swing/plaf/metal/MetalButtonUI.java \
javax/swing/plaf/metal/MetalCheckBoxUI.java \
javax/swing/plaf/metal/MetalComboBoxUI.java \
javax/swing/plaf/metal/MetalDesktopIconUI.java \
javax/swing/plaf/metal/MetalInternalFrameUI.java \
javax/swing/plaf/metal/MetalLabelUI.java \
javax/swing/plaf/metal/MetalPopupMenuSeparatorUI.java \
javax/swing/plaf/metal/MetalProgressBarUI.java \
javax/swing/plaf/metal/MetalRadioButtonUI.java \
javax/swing/plaf/metal/MetalRootPaneUI.java \
javax/swing/plaf/metal/MetalScrollBarUI.java \
javax/swing/plaf/metal/MetalScrollPaneUI.java \
javax/swing/plaf/metal/MetalSeparatorUI.java \
javax/swing/plaf/metal/MetalSliderUI.java \
javax/swing/plaf/metal/MetalSplitPaneUI.java \
javax/swing/plaf/metal/MetalTabbedPaneUI.java \
javax/swing/plaf/metal/MetalTextFieldUI.java \
javax/swing/plaf/metal/MetalToggleButtonUI.java \
javax/swing/plaf/metal/MetalToolBarUI.java \
javax/swing/plaf/metal/MetalToolTipUI.java \
javax/swing/plaf/metal/MetalTreeUI.java \
javax/swing/plaf/BorderUIResource.java \
javax/swing/plaf/UIResource.java \
javax/swing/plaf/ButtonUI.java \

View File

@ -1582,6 +1582,28 @@ am__libgcj0_convenience_la_SOURCES_DIST = prims.cc jni.cc exception.cc \
javax/swing/plaf/basic/BasicBorders.java \
javax/swing/plaf/basic/BasicIconFactory.java \
javax/swing/plaf/basic/ComboPopup.java \
javax/swing/plaf/metal/MetalBorders.java \
javax/swing/plaf/metal/MetalButtonUI.java \
javax/swing/plaf/metal/MetalCheckBoxUI.java \
javax/swing/plaf/metal/MetalComboBoxUI.java \
javax/swing/plaf/metal/MetalDesktopIconUI.java \
javax/swing/plaf/metal/MetalInternalFrameUI.java \
javax/swing/plaf/metal/MetalLabelUI.java \
javax/swing/plaf/metal/MetalPopupMenuSeparatorUI.java \
javax/swing/plaf/metal/MetalProgressBarUI.java \
javax/swing/plaf/metal/MetalRadioButtonUI.java \
javax/swing/plaf/metal/MetalRootPaneUI.java \
javax/swing/plaf/metal/MetalScrollBarUI.java \
javax/swing/plaf/metal/MetalScrollPaneUI.java \
javax/swing/plaf/metal/MetalSeparatorUI.java \
javax/swing/plaf/metal/MetalSliderUI.java \
javax/swing/plaf/metal/MetalSplitPaneUI.java \
javax/swing/plaf/metal/MetalTabbedPaneUI.java \
javax/swing/plaf/metal/MetalTextFieldUI.java \
javax/swing/plaf/metal/MetalToggleButtonUI.java \
javax/swing/plaf/metal/MetalToolBarUI.java \
javax/swing/plaf/metal/MetalToolTipUI.java \
javax/swing/plaf/metal/MetalTreeUI.java \
javax/swing/plaf/BorderUIResource.java \
javax/swing/plaf/UIResource.java \
javax/swing/plaf/ButtonUI.java \
@ -2870,6 +2892,28 @@ am__objects_10 = gnu/awt/LightweightRedirector.lo \
javax/swing/plaf/basic/BasicBorders.lo \
javax/swing/plaf/basic/BasicIconFactory.lo \
javax/swing/plaf/basic/ComboPopup.lo \
javax/swing/plaf/metal/MetalBorders.lo \
javax/swing/plaf/metal/MetalButtonUI.lo \
javax/swing/plaf/metal/MetalCheckBoxUI.lo \
javax/swing/plaf/metal/MetalComboBoxUI.lo \
javax/swing/plaf/metal/MetalDesktopIconUI.lo \
javax/swing/plaf/metal/MetalInternalFrameUI.lo \
javax/swing/plaf/metal/MetalLabelUI.lo \
javax/swing/plaf/metal/MetalPopupMenuSeparatorUI.lo \
javax/swing/plaf/metal/MetalProgressBarUI.lo \
javax/swing/plaf/metal/MetalRadioButtonUI.lo \
javax/swing/plaf/metal/MetalRootPaneUI.lo \
javax/swing/plaf/metal/MetalScrollBarUI.lo \
javax/swing/plaf/metal/MetalScrollPaneUI.lo \
javax/swing/plaf/metal/MetalSeparatorUI.lo \
javax/swing/plaf/metal/MetalSliderUI.lo \
javax/swing/plaf/metal/MetalSplitPaneUI.lo \
javax/swing/plaf/metal/MetalTabbedPaneUI.lo \
javax/swing/plaf/metal/MetalTextFieldUI.lo \
javax/swing/plaf/metal/MetalToggleButtonUI.lo \
javax/swing/plaf/metal/MetalToolBarUI.lo \
javax/swing/plaf/metal/MetalToolTipUI.lo \
javax/swing/plaf/metal/MetalTreeUI.lo \
javax/swing/plaf/BorderUIResource.lo \
javax/swing/plaf/UIResource.lo javax/swing/plaf/ButtonUI.lo \
javax/swing/plaf/ComponentUI.lo javax/swing/plaf/LabelUI.lo \
@ -5353,6 +5397,28 @@ javax/swing/plaf/basic/BasicLookAndFeel.java \
javax/swing/plaf/basic/BasicBorders.java \
javax/swing/plaf/basic/BasicIconFactory.java \
javax/swing/plaf/basic/ComboPopup.java \
javax/swing/plaf/metal/MetalBorders.java \
javax/swing/plaf/metal/MetalButtonUI.java \
javax/swing/plaf/metal/MetalCheckBoxUI.java \
javax/swing/plaf/metal/MetalComboBoxUI.java \
javax/swing/plaf/metal/MetalDesktopIconUI.java \
javax/swing/plaf/metal/MetalInternalFrameUI.java \
javax/swing/plaf/metal/MetalLabelUI.java \
javax/swing/plaf/metal/MetalPopupMenuSeparatorUI.java \
javax/swing/plaf/metal/MetalProgressBarUI.java \
javax/swing/plaf/metal/MetalRadioButtonUI.java \
javax/swing/plaf/metal/MetalRootPaneUI.java \
javax/swing/plaf/metal/MetalScrollBarUI.java \
javax/swing/plaf/metal/MetalScrollPaneUI.java \
javax/swing/plaf/metal/MetalSeparatorUI.java \
javax/swing/plaf/metal/MetalSliderUI.java \
javax/swing/plaf/metal/MetalSplitPaneUI.java \
javax/swing/plaf/metal/MetalTabbedPaneUI.java \
javax/swing/plaf/metal/MetalTextFieldUI.java \
javax/swing/plaf/metal/MetalToggleButtonUI.java \
javax/swing/plaf/metal/MetalToolBarUI.java \
javax/swing/plaf/metal/MetalToolTipUI.java \
javax/swing/plaf/metal/MetalTreeUI.java \
javax/swing/plaf/BorderUIResource.java \
javax/swing/plaf/UIResource.java \
javax/swing/plaf/ButtonUI.java \
@ -12436,6 +12502,78 @@ javax/swing/plaf/basic/BasicIconFactory.lo: \
javax/swing/plaf/basic/ComboPopup.lo: \
javax/swing/plaf/basic/$(am__dirstamp) \
javax/swing/plaf/basic/$(DEPDIR)/$(am__dirstamp)
javax/swing/plaf/metal/$(am__dirstamp):
@$(mkdir_p) javax/swing/plaf/metal
@: > javax/swing/plaf/metal/$(am__dirstamp)
javax/swing/plaf/metal/$(DEPDIR)/$(am__dirstamp):
@$(mkdir_p) javax/swing/plaf/metal/$(DEPDIR)
@: > javax/swing/plaf/metal/$(DEPDIR)/$(am__dirstamp)
javax/swing/plaf/metal/MetalBorders.lo: \
javax/swing/plaf/metal/$(am__dirstamp) \
javax/swing/plaf/metal/$(DEPDIR)/$(am__dirstamp)
javax/swing/plaf/metal/MetalButtonUI.lo: \
javax/swing/plaf/metal/$(am__dirstamp) \
javax/swing/plaf/metal/$(DEPDIR)/$(am__dirstamp)
javax/swing/plaf/metal/MetalCheckBoxUI.lo: \
javax/swing/plaf/metal/$(am__dirstamp) \
javax/swing/plaf/metal/$(DEPDIR)/$(am__dirstamp)
javax/swing/plaf/metal/MetalComboBoxUI.lo: \
javax/swing/plaf/metal/$(am__dirstamp) \
javax/swing/plaf/metal/$(DEPDIR)/$(am__dirstamp)
javax/swing/plaf/metal/MetalDesktopIconUI.lo: \
javax/swing/plaf/metal/$(am__dirstamp) \
javax/swing/plaf/metal/$(DEPDIR)/$(am__dirstamp)
javax/swing/plaf/metal/MetalInternalFrameUI.lo: \
javax/swing/plaf/metal/$(am__dirstamp) \
javax/swing/plaf/metal/$(DEPDIR)/$(am__dirstamp)
javax/swing/plaf/metal/MetalLabelUI.lo: \
javax/swing/plaf/metal/$(am__dirstamp) \
javax/swing/plaf/metal/$(DEPDIR)/$(am__dirstamp)
javax/swing/plaf/metal/MetalPopupMenuSeparatorUI.lo: \
javax/swing/plaf/metal/$(am__dirstamp) \
javax/swing/plaf/metal/$(DEPDIR)/$(am__dirstamp)
javax/swing/plaf/metal/MetalProgressBarUI.lo: \
javax/swing/plaf/metal/$(am__dirstamp) \
javax/swing/plaf/metal/$(DEPDIR)/$(am__dirstamp)
javax/swing/plaf/metal/MetalRadioButtonUI.lo: \
javax/swing/plaf/metal/$(am__dirstamp) \
javax/swing/plaf/metal/$(DEPDIR)/$(am__dirstamp)
javax/swing/plaf/metal/MetalRootPaneUI.lo: \
javax/swing/plaf/metal/$(am__dirstamp) \
javax/swing/plaf/metal/$(DEPDIR)/$(am__dirstamp)
javax/swing/plaf/metal/MetalScrollBarUI.lo: \
javax/swing/plaf/metal/$(am__dirstamp) \
javax/swing/plaf/metal/$(DEPDIR)/$(am__dirstamp)
javax/swing/plaf/metal/MetalScrollPaneUI.lo: \
javax/swing/plaf/metal/$(am__dirstamp) \
javax/swing/plaf/metal/$(DEPDIR)/$(am__dirstamp)
javax/swing/plaf/metal/MetalSeparatorUI.lo: \
javax/swing/plaf/metal/$(am__dirstamp) \
javax/swing/plaf/metal/$(DEPDIR)/$(am__dirstamp)
javax/swing/plaf/metal/MetalSliderUI.lo: \
javax/swing/plaf/metal/$(am__dirstamp) \
javax/swing/plaf/metal/$(DEPDIR)/$(am__dirstamp)
javax/swing/plaf/metal/MetalSplitPaneUI.lo: \
javax/swing/plaf/metal/$(am__dirstamp) \
javax/swing/plaf/metal/$(DEPDIR)/$(am__dirstamp)
javax/swing/plaf/metal/MetalTabbedPaneUI.lo: \
javax/swing/plaf/metal/$(am__dirstamp) \
javax/swing/plaf/metal/$(DEPDIR)/$(am__dirstamp)
javax/swing/plaf/metal/MetalTextFieldUI.lo: \
javax/swing/plaf/metal/$(am__dirstamp) \
javax/swing/plaf/metal/$(DEPDIR)/$(am__dirstamp)
javax/swing/plaf/metal/MetalToggleButtonUI.lo: \
javax/swing/plaf/metal/$(am__dirstamp) \
javax/swing/plaf/metal/$(DEPDIR)/$(am__dirstamp)
javax/swing/plaf/metal/MetalToolBarUI.lo: \
javax/swing/plaf/metal/$(am__dirstamp) \
javax/swing/plaf/metal/$(DEPDIR)/$(am__dirstamp)
javax/swing/plaf/metal/MetalToolTipUI.lo: \
javax/swing/plaf/metal/$(am__dirstamp) \
javax/swing/plaf/metal/$(DEPDIR)/$(am__dirstamp)
javax/swing/plaf/metal/MetalTreeUI.lo: \
javax/swing/plaf/metal/$(am__dirstamp) \
javax/swing/plaf/metal/$(DEPDIR)/$(am__dirstamp)
javax/swing/plaf/$(am__dirstamp):
@$(mkdir_p) javax/swing/plaf
@: > javax/swing/plaf/$(am__dirstamp)
@ -12469,12 +12607,6 @@ javax/swing/plaf/TreeUI.lo: javax/swing/plaf/$(am__dirstamp) \
javax/swing/plaf/$(DEPDIR)/$(am__dirstamp)
javax/swing/plaf/ViewportUI.lo: javax/swing/plaf/$(am__dirstamp) \
javax/swing/plaf/$(DEPDIR)/$(am__dirstamp)
javax/swing/plaf/metal/$(am__dirstamp):
@$(mkdir_p) javax/swing/plaf/metal
@: > javax/swing/plaf/metal/$(am__dirstamp)
javax/swing/plaf/metal/$(DEPDIR)/$(am__dirstamp):
@$(mkdir_p) javax/swing/plaf/metal/$(DEPDIR)
@: > javax/swing/plaf/metal/$(DEPDIR)/$(am__dirstamp)
javax/swing/plaf/metal/DefaultMetalTheme.lo: \
javax/swing/plaf/metal/$(am__dirstamp) \
javax/swing/plaf/metal/$(DEPDIR)/$(am__dirstamp)
@ -19175,10 +19307,54 @@ mostlyclean-compile:
-rm -f javax/swing/plaf/basic/ComboPopup.lo
-rm -f javax/swing/plaf/metal/DefaultMetalTheme.$(OBJEXT)
-rm -f javax/swing/plaf/metal/DefaultMetalTheme.lo
-rm -f javax/swing/plaf/metal/MetalBorders.$(OBJEXT)
-rm -f javax/swing/plaf/metal/MetalBorders.lo
-rm -f javax/swing/plaf/metal/MetalButtonUI.$(OBJEXT)
-rm -f javax/swing/plaf/metal/MetalButtonUI.lo
-rm -f javax/swing/plaf/metal/MetalCheckBoxUI.$(OBJEXT)
-rm -f javax/swing/plaf/metal/MetalCheckBoxUI.lo
-rm -f javax/swing/plaf/metal/MetalComboBoxUI.$(OBJEXT)
-rm -f javax/swing/plaf/metal/MetalComboBoxUI.lo
-rm -f javax/swing/plaf/metal/MetalDesktopIconUI.$(OBJEXT)
-rm -f javax/swing/plaf/metal/MetalDesktopIconUI.lo
-rm -f javax/swing/plaf/metal/MetalInternalFrameUI.$(OBJEXT)
-rm -f javax/swing/plaf/metal/MetalInternalFrameUI.lo
-rm -f javax/swing/plaf/metal/MetalLabelUI.$(OBJEXT)
-rm -f javax/swing/plaf/metal/MetalLabelUI.lo
-rm -f javax/swing/plaf/metal/MetalLookAndFeel.$(OBJEXT)
-rm -f javax/swing/plaf/metal/MetalLookAndFeel.lo
-rm -f javax/swing/plaf/metal/MetalPopupMenuSeparatorUI.$(OBJEXT)
-rm -f javax/swing/plaf/metal/MetalPopupMenuSeparatorUI.lo
-rm -f javax/swing/plaf/metal/MetalProgressBarUI.$(OBJEXT)
-rm -f javax/swing/plaf/metal/MetalProgressBarUI.lo
-rm -f javax/swing/plaf/metal/MetalRadioButtonUI.$(OBJEXT)
-rm -f javax/swing/plaf/metal/MetalRadioButtonUI.lo
-rm -f javax/swing/plaf/metal/MetalRootPaneUI.$(OBJEXT)
-rm -f javax/swing/plaf/metal/MetalRootPaneUI.lo
-rm -f javax/swing/plaf/metal/MetalScrollBarUI.$(OBJEXT)
-rm -f javax/swing/plaf/metal/MetalScrollBarUI.lo
-rm -f javax/swing/plaf/metal/MetalScrollPaneUI.$(OBJEXT)
-rm -f javax/swing/plaf/metal/MetalScrollPaneUI.lo
-rm -f javax/swing/plaf/metal/MetalSeparatorUI.$(OBJEXT)
-rm -f javax/swing/plaf/metal/MetalSeparatorUI.lo
-rm -f javax/swing/plaf/metal/MetalSliderUI.$(OBJEXT)
-rm -f javax/swing/plaf/metal/MetalSliderUI.lo
-rm -f javax/swing/plaf/metal/MetalSplitPaneUI.$(OBJEXT)
-rm -f javax/swing/plaf/metal/MetalSplitPaneUI.lo
-rm -f javax/swing/plaf/metal/MetalTabbedPaneUI.$(OBJEXT)
-rm -f javax/swing/plaf/metal/MetalTabbedPaneUI.lo
-rm -f javax/swing/plaf/metal/MetalTextFieldUI.$(OBJEXT)
-rm -f javax/swing/plaf/metal/MetalTextFieldUI.lo
-rm -f javax/swing/plaf/metal/MetalTheme.$(OBJEXT)
-rm -f javax/swing/plaf/metal/MetalTheme.lo
-rm -f javax/swing/plaf/metal/MetalToggleButtonUI.$(OBJEXT)
-rm -f javax/swing/plaf/metal/MetalToggleButtonUI.lo
-rm -f javax/swing/plaf/metal/MetalToolBarUI.$(OBJEXT)
-rm -f javax/swing/plaf/metal/MetalToolBarUI.lo
-rm -f javax/swing/plaf/metal/MetalToolTipUI.$(OBJEXT)
-rm -f javax/swing/plaf/metal/MetalToolTipUI.lo
-rm -f javax/swing/plaf/metal/MetalTreeUI.$(OBJEXT)
-rm -f javax/swing/plaf/metal/MetalTreeUI.lo
-rm -f javax/swing/table/AbstractTableModel.$(OBJEXT)
-rm -f javax/swing/table/AbstractTableModel.lo
-rm -f javax/swing/table/DefaultTableCellRenderer.$(OBJEXT)
@ -21821,8 +21997,30 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@javax/swing/plaf/basic/$(DEPDIR)/BasicViewportUI.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@javax/swing/plaf/basic/$(DEPDIR)/ComboPopup.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@javax/swing/plaf/metal/$(DEPDIR)/DefaultMetalTheme.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@javax/swing/plaf/metal/$(DEPDIR)/MetalBorders.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@javax/swing/plaf/metal/$(DEPDIR)/MetalButtonUI.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@javax/swing/plaf/metal/$(DEPDIR)/MetalCheckBoxUI.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@javax/swing/plaf/metal/$(DEPDIR)/MetalComboBoxUI.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@javax/swing/plaf/metal/$(DEPDIR)/MetalDesktopIconUI.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@javax/swing/plaf/metal/$(DEPDIR)/MetalInternalFrameUI.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@javax/swing/plaf/metal/$(DEPDIR)/MetalLabelUI.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@javax/swing/plaf/metal/$(DEPDIR)/MetalLookAndFeel.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@javax/swing/plaf/metal/$(DEPDIR)/MetalPopupMenuSeparatorUI.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@javax/swing/plaf/metal/$(DEPDIR)/MetalProgressBarUI.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@javax/swing/plaf/metal/$(DEPDIR)/MetalRadioButtonUI.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@javax/swing/plaf/metal/$(DEPDIR)/MetalRootPaneUI.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@javax/swing/plaf/metal/$(DEPDIR)/MetalScrollBarUI.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@javax/swing/plaf/metal/$(DEPDIR)/MetalScrollPaneUI.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@javax/swing/plaf/metal/$(DEPDIR)/MetalSeparatorUI.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@javax/swing/plaf/metal/$(DEPDIR)/MetalSliderUI.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@javax/swing/plaf/metal/$(DEPDIR)/MetalSplitPaneUI.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@javax/swing/plaf/metal/$(DEPDIR)/MetalTabbedPaneUI.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@javax/swing/plaf/metal/$(DEPDIR)/MetalTextFieldUI.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@javax/swing/plaf/metal/$(DEPDIR)/MetalTheme.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@javax/swing/plaf/metal/$(DEPDIR)/MetalToggleButtonUI.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@javax/swing/plaf/metal/$(DEPDIR)/MetalToolBarUI.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@javax/swing/plaf/metal/$(DEPDIR)/MetalToolTipUI.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@javax/swing/plaf/metal/$(DEPDIR)/MetalTreeUI.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@javax/swing/table/$(DEPDIR)/AbstractTableModel.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@javax/swing/table/$(DEPDIR)/DefaultTableCellRenderer.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@javax/swing/table/$(DEPDIR)/DefaultTableColumnModel.Plo@am__quote@

View File

@ -64,8 +64,14 @@ import javax.swing.plaf.ComponentUI;
*/
public class UIDefaults extends Hashtable
{
/** Our ResourceBundles. */
private LinkedList bundles;
/** The default locale. */
private Locale defaultLocale;
/** We use this for firing PropertyChangeEvents. */
private PropertyChangeSupport propertyChangeSupport;
public static interface ActiveValue
@ -208,8 +214,12 @@ public class UIDefaults extends Hashtable
}
}
/** Our serialVersionUID for serialization. */
private static final long serialVersionUID = 7341222528856548117L;
/**
* Constructs a new empty UIDefaults instance.
*/
public UIDefaults()
{
bundles = new LinkedList();
@ -217,6 +227,14 @@ public class UIDefaults extends Hashtable
propertyChangeSupport = new PropertyChangeSupport(this);
}
/**
* Constructs a new UIDefaults instance and loads the specified entries.
* The entries are expected to come in pairs, that means
* <code>entries[0]</code> is a key, <code>entries[1]</code> is a value,
* <code>entries[2]</code> a key and so forth.
*
* @param entries the entries to initialize the UIDefaults instance with
*/
public UIDefaults(Object[] entries)
{
this();
@ -225,11 +243,24 @@ public class UIDefaults extends Hashtable
put(entries[2 * i], entries[2 * i + 1]);
}
/**
* Returns the entry for the specified <code>key</code> in the default
* locale.
*
* @return the entry for the specified <code>key</code>
*/
public Object get(Object key)
{
return this.get(key, getDefaultLocale());
}
/**
* Returns the entry for the specified <code>key</code> in the Locale
* <code>loc</code>.
*
* @param key the key for which we return the value
* @param loc the locale
*/
public Object get(Object key, Locale loc)
{
Object obj = null;
@ -284,133 +315,344 @@ public class UIDefaults extends Hashtable
return obj;
}
/**
* Puts a key and value into this UIDefaults object.<br>
* In contrast to
* {@link java.util.Hashtable}s <code>null</code>-values are accepted
* here and treated like #remove(key).
* <br>
* This fires a PropertyChangeEvent with key as name and the old and new
* values.
*
* @param key the key to put into the map
* @param value the value to put into the map
*
* @return the old value for key or <code>null</code> if <code>key</code>
* had no value assigned
*/
public Object put(Object key, Object value)
{
Object old;
if (value != null)
old = super.put(key, value);
else
old = super.remove(key);
Object old = checkAndPut(key, value);
if (key instanceof String && old != value)
firePropertyChange((String) key, old, value);
return old;
}
/**
* Puts a set of key-value pairs into the map.
* The entries are expected to come in pairs, that means
* <code>entries[0]</code> is a key, <code>entries[1]</code> is a value,
* <code>entries[2]</code> a key and so forth.
* <br>
* If a value is <code>null</code> it is treated like #remove(key).
* <br>
* This unconditionally fires a PropertyChangeEvent with
* <code>&apos;UIDefaults&apos;</code> as name and <code>null</code> for
* old and new value.
*
* @param entries the entries to be put into the map
*/
public void putDefaults(Object[] entries)
{
for (int i = 0; (2 * i + 1) < entries.length; ++i)
{
super.put(entries[2 * i], entries[2 * i + 1]);
checkAndPut(entries[2 * i], entries[2 * i + 1]);
}
firePropertyChange("UIDefaults", null, null);
}
/**
* Checks the value for <code>null</code> and put it into the Hashtable, if
* it is not <code>null</code>. If the value is <code>null</code> then
* remove the corresponding key.
*
* @param key the key to put into this UIDefauls table
* @param value the value to put into this UIDefaults table
*
* @return the old value for <code>key</code>
*/
private Object checkAndPut(Object key, Object value)
{
Object old;
if (value != null)
old = super.put(key, value);
else
old = super.remove(key);
return old;
}
/**
* Returns a font entry for the default locale.
*
* @param key the key to the requested entry
*
* @return the font entry for <code>key</code> or null if no such entry
* exists
*/
public Font getFont(Object key)
{
Object o = get(key);
return o instanceof Font ? (Font) o : null;
}
/**
* Returns a font entry for a specic locale.
*
* @param key the key to the requested entry
* @param locale the locale to the requested entry
*
* @return the font entry for <code>key</code> or null if no such entry
* exists
*/
public Font getFont(Object key, Locale l)
{
Object o = get(key, l);
return o instanceof Font ? (Font) o : null;
}
/**
* Returns a color entry for the default locale.
*
* @param key the key to the requested entry
*
* @return the color entry for <code>key</code> or null if no such entry
* exists
*/
public Color getColor(Object key)
{
Object o = get(key);
return o instanceof Color ? (Color) o : null;
}
/**
* Returns a color entry for a specic locale.
*
* @param key the key to the requested entry
* @param locale the locale to the requested entry
*
* @return the color entry for <code>key</code> or null if no such entry
* exists
*/
public Color getColor(Object key, Locale l)
{
Object o = get(key, l);
return o instanceof Color ? (Color) o : null;
}
/**
* Returns an icon entry for the default locale.
*
* @param key the key to the requested entry
*
* @return the icon entry for <code>key</code> or null if no such entry
* exists
*/
public Icon getIcon(Object key)
{
Object o = get(key);
return o instanceof Icon ? (Icon) o : null;
}
/**
* Returns an icon entry for a specic locale.
*
* @param key the key to the requested entry
* @param locale the locale to the requested entry
*
* @return the icon entry for <code>key</code> or null if no such entry
* exists
*/
public Icon getIcon(Object key, Locale l)
{
Object o = get(key, l);
return o instanceof Icon ? (Icon) o : null;
}
/**
* Returns a border entry for the default locale.
*
* @param key the key to the requested entry
*
* @return the border entry for <code>key</code> or null if no such entry
* exists
*/
public Border getBorder(Object key)
{
Object o = get(key);
return o instanceof Border ? (Border) o : null;
}
/**
* Returns a border entry for a specic locale.
*
* @param key the key to the requested entry
* @param locale the locale to the requested entry
*
* @return the border entry for <code>key</code> or null if no such entry
* exists
*/
public Border getBorder(Object key, Locale l)
{
Object o = get(key, l);
return o instanceof Border ? (Border) o : null;
}
/**
* Returns a string entry for the default locale.
*
* @param key the key to the requested entry
*
* @return the string entry for <code>key</code> or null if no such entry
* exists
*/
public String getString(Object key)
{
Object o = get(key);
return o instanceof String ? (String) o : null;
}
/**
* Returns a string entry for a specic locale.
*
* @param key the key to the requested entry
* @param locale the locale to the requested entry
*
* @return the string entry for <code>key</code> or null if no such entry
* exists
*/
public String getString(Object key, Locale l)
{
Object o = get(key, l);
return o instanceof String ? (String) o : null;
}
/**
* Returns an integer entry for the default locale.
*
* @param key the key to the requested entry
*
* @return the integer entry for <code>key</code> or null if no such entry
* exists
*/
public int getInt(Object key)
{
Object o = get(key);
return o instanceof Integer ? ((Integer) o).intValue() : 0;
}
/**
* Returns an integer entry for a specic locale.
*
* @param key the key to the requested entry
* @param locale the locale to the requested entry
*
* @return the integer entry for <code>key</code> or null if no such entry
* exists
*/
public int getInt(Object key, Locale l)
{
Object o = get(key, l);
return o instanceof Integer ? ((Integer) o).intValue() : 0;
}
/**
* Returns a boolean entry for the default locale.
*
* @param key the key to the requested entry
*
* @return the boolean entry for <code>key</code> or null if no such entry
* exists
*/
public boolean getBoolean(Object key)
{
return Boolean.TRUE.equals(get(key));
}
/**
* Returns a boolean entry for a specic locale.
*
* @param key the key to the requested entry
* @param locale the locale to the requested entry
*
* @return the boolean entry for <code>key</code> or null if no such entry
* exists
*/
public boolean getBoolean(Object key, Locale l)
{
return Boolean.TRUE.equals(get(key, l));
}
/**
* Returns an insets entry for the default locale.
*
* @param key the key to the requested entry
*
* @return the insets entry for <code>key</code> or null if no such entry
* exists
*/
public Insets getInsets(Object key)
{
Object o = get(key);
return o instanceof Insets ? (Insets) o : null;
}
/**
* Returns an insets entry for a specic locale.
*
* @param key the key to the requested entry
* @param locale the locale to the requested entry
*
* @return the boolean entry for <code>key</code> or null if no such entry
* exists
*/
public Insets getInsets(Object key, Locale l)
{
Object o = get(key, l);
return o instanceof Insets ? (Insets) o : null;
}
/**
* Returns a dimension entry for the default locale.
*
* @param key the key to the requested entry
*
* @return the dimension entry for <code>key</code> or null if no such entry
* exists
*/
public Dimension getDimension(Object key)
{
Object o = get(key);
return o instanceof Dimension ? (Dimension) o : null;
}
/**
* Returns a dimension entry for a specic locale.
*
* @param key the key to the requested entry
* @param locale the locale to the requested entry
*
* @return the boolean entry for <code>key</code> or null if no such entry
* exists
*/
public Dimension getDimension(Object key, Locale l)
{
Object o = get(key, l);
return o instanceof Dimension ? (Dimension) o : null;
}
/**
* Returns the ComponentUI class that renders a component. <code>id</code>
* is the ID for which the String value of the classname is stored in
* this UIDefaults map.
*
* @param id the ID of the UI class
* @param loader the ClassLoader to use
*
* @return the UI class for <code>id</code>
*/
public Class getUIClass(String id, ClassLoader loader)
{
String className = (String) get (id);
@ -428,16 +670,38 @@ public class UIDefaults extends Hashtable
}
}
/**
* Returns the ComponentUI class that renders a component. <code>id</code>
* is the ID for which the String value of the classname is stored in
* this UIDefaults map.
*
* @param id the ID of the UI class
*
* @return the UI class for <code>id</code>
*/
public Class getUIClass(String id)
{
return getUIClass (id, null);
}
/**
* If a key is requested in #get(key) that has no value, this method
* is called before returning <code>null</code>.
*
* @param msg the error message
*/
protected void getUIError(String msg)
{
System.err.println ("UIDefaults.getUIError: " + msg);
}
/**
* Returns the {@link ComponentUI} for the specified {@link JComponent}.
*
* @param target the component for which the ComponentUI is requested
*
* @return the {@link ComponentUI} for the specified {@link JComponent}
*/
public ComponentUI getUI(JComponent target)
{
String classId = target.getUIClassID ();
@ -477,42 +741,86 @@ public class UIDefaults extends Hashtable
}
}
/**
* Adds a {@link PropertyChangeListener} to this UIDefaults map.
* Registered PropertyChangeListener are notified when values
* are beeing put into this UIDefaults map.
*
* @param listener the PropertyChangeListener to add
*/
public void addPropertyChangeListener(PropertyChangeListener listener)
{
propertyChangeSupport.addPropertyChangeListener(listener);
}
/**
* Removes a PropertyChangeListener from this UIDefaults map.
*
* @param listener the PropertyChangeListener to remove
*/
public void removePropertyChangeListener(PropertyChangeListener listener)
{
propertyChangeSupport.removePropertyChangeListener(listener);
}
/**
* Returns an array of all registered PropertyChangeListeners.
*
* @return all registered PropertyChangeListeners
*/
public PropertyChangeListener[] getPropertyChangeListeners()
{
return propertyChangeSupport.getPropertyChangeListeners();
}
/**
* Fires a PropertyChangeEvent.
*
* @param property the property name
* @param oldValue the old value
* @param newValue the new value
*/
protected void firePropertyChange(String property,
Object oldValue, Object newValue)
{
propertyChangeSupport.firePropertyChange(property, oldValue, newValue);
}
/**
* Adds a ResourceBundle for localized values.
*
* @param name the name of the ResourceBundle to add
*/
public void addResourceBundle(String name)
{
bundles.addFirst(name);
}
/**
* Removes a ResourceBundle.
*
* @param name the name of the ResourceBundle to remove
*/
public void removeResourceBundle(String name)
{
bundles.remove(name);
}
/**
* Sets the current locale to <code>loc</code>.
*
* @param loc the Locale to be set
*/
public void setDefaultLocale(Locale loc)
{
defaultLocale = loc;
}
/**
* Returns the current default locale.
*
* @return the current default locale
*/
public Locale getDefaultLocale()
{
return defaultLocale;

View File

@ -0,0 +1,205 @@
/* MetalBorders.java
Copyright (C) 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
GNU Classpath is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU Classpath is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
conditions of the GNU General Public License cover the whole
combination.
As a special exception, the copyright holders of this library give you
permission to link this library with independent modules to produce an
executable, regardless of the license terms of these independent
modules, and to copy and distribute the resulting executable under
terms of your choice, provided that you also meet, for each linked
independent module, the terms and conditions of the license of that
module. An independent module is a module which is not derived from
or based on this library. If you modify this library, you may extend
this exception to your version of the library, but you are not
obligated to do so. If you do not wish to do so, delete this
exception statement from your version. */
package javax.swing.plaf.metal;
import java.awt.Color;
import java.awt.Component;
import java.awt.Graphics;
import java.awt.Insets;
import javax.swing.AbstractButton;
import javax.swing.ButtonModel;
import javax.swing.JButton;
import javax.swing.border.AbstractBorder;
import javax.swing.border.Border;
import javax.swing.plaf.BorderUIResource;
import javax.swing.plaf.basic.BasicGraphicsUtils;
import javax.swing.plaf.basic.BasicBorders;
/**
* This factory class creates borders for the different Swing components
* UI.
*
* @author Roman Kennke (roman@kennke.org)
*/
public class MetalBorders
{
/**
* A MarginBorder that gets shared by multiple components.
* Created on demand by the private helper function {@link
* #getMarginBorder()}.
*/
private static BasicBorders.MarginBorder sharedMarginBorder;
/**
* The border that is drawn around Swing buttons.
*/
public static class MetalButtonBorder
extends AbstractBorder
{
/** The borders insets. */
protected static Insets borderInsets = new Insets(2, 2, 2, 2);
/**
* Creates a new instance of ButtonBorder.
*/
public MetalButtonBorder()
{
}
/**
* Paints the button border.
*
* @param c the component for which we paint the border
* @param g the Graphics context to use
* @param x the X coordinate of the upper left corner of c
* @param y the Y coordinate of the upper left corner of c
* @param w the width of c
* @param h the height of c
*/
public void paintBorder(Component c, Graphics g, int x, int y, int w,
int h)
{
ButtonModel bmodel = null;
if (c instanceof AbstractButton)
bmodel = ((AbstractButton) c).getModel();
Color darkShadow = MetalLookAndFeel.getControlDarkShadow();
Color shadow = MetalLookAndFeel.getControlShadow();
Color light = MetalLookAndFeel.getWhite();
Color middle = MetalLookAndFeel.getControl();
// draw dark border
g.setColor(darkShadow);
g.drawRect(x, y, w - 2, h - 2);
if (!bmodel.isPressed())
{
// draw light border
g.setColor(light);
g.drawRect(x + 1, y + 1, w - 2, h - 2);
// draw crossing pixels of both borders
g.setColor(middle);
g.drawRect(x + 1, y + h - 2, 0, 0);
g.drawRect(x + w - 2, y + 1, 0, 0);
}
else
{
// draw light border
g.setColor(light);
g.drawLine(x + w - 1, y + 1, x + w - 1, y + h - 1);
g.drawLine(x + 1, y + h - 1, x + w - 1, y + h - 1);
// draw shadow border
g.setColor(middle);
g.drawLine(x + 1, y + 1, x + w - 2, y + 1);
g.drawLine(x + 1, y + 1, x + 1, y + h - 2);
// draw crossing pixels of both borders
g.setColor(shadow);
g.drawRect(x + 1, y + h - 2, 0, 0);
g.drawRect(x + w - 2, y + 1, 0, 0);
}
}
/**
* Returns the insets of the ButtonBorder.
*
* @param c the component for which the border is used
*
* @return the insets of the ButtonBorder
*/
public Insets getBorderInsets(Component c)
{
return getBorderInsets(c, null);
}
/**
* Returns the insets of the ButtonBorder in the specified Insets object.
*
* @param c the component for which the border is used
* @param newInsets the insets object where to put the values
*
* @return the insets of the ButtonBorder
*/
public Insets getBorderInsets(Component c, Insets newInsets)
{
if (newInsets == null)
newInsets = new Insets(0, 0, 0, 0);
newInsets.bottom = borderInsets.bottom;
newInsets.left = borderInsets.left;
newInsets.right = borderInsets.right;
newInsets.top = borderInsets.top;
return newInsets;
}
}
/**
* Returns a border for Swing buttons in the Metal Look &amp; Feel.
*
* @return a border for Swing buttons in the Metal Look &amp; Feel
*/
public static Border getButtonBorder()
{
Border outer = new MetalButtonBorder();
Border inner = getMarginBorder();
return new BorderUIResource.CompoundBorderUIResource(outer, inner);
}
/**
* Returns a shared MarginBorder.
*/
static Border getMarginBorder() // intentionally not public
{
/* Swing is not designed to be thread-safe, so there is no
* need to synchronize the access to the global variable.
*/
if (sharedMarginBorder == null)
sharedMarginBorder = new BasicBorders.MarginBorder();
return sharedMarginBorder;
}
}

View File

@ -0,0 +1,97 @@
/* MetalButtonUI.java
Copyright (C) 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
GNU Classpath is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU Classpath is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
conditions of the GNU General Public License cover the whole
combination.
As a special exception, the copyright holders of this library give you
permission to link this library with independent modules to produce an
executable, regardless of the license terms of these independent
modules, and to copy and distribute the resulting executable under
terms of your choice, provided that you also meet, for each linked
independent module, the terms and conditions of the license of that
module. An independent module is a module which is not derived from
or based on this library. If you modify this library, you may extend
this exception to your version of the library, but you are not
obligated to do so. If you do not wish to do so, delete this
exception statement from your version. */
package javax.swing.plaf.metal;
import javax.swing.AbstractButton;
import javax.swing.JComponent;
import javax.swing.UIDefaults;
import javax.swing.UIManager;
import javax.swing.plaf.ComponentUI;
import javax.swing.plaf.basic.BasicButtonUI;
/**
* The Metal Look &amp; Feel implementation for
* {@link javax.swing.AbstractButton}s.
*
* @author Roman Kennke (roman@kennke.org)
*/
public class MetalButtonUI
extends BasicButtonUI
{
// FIXME: probably substitute with a Map in the future in the case
// that this UI becomes stateful
/** The cached MetalButtonUI instance. */
private static MetalButtonUI instance = null;
/**
* Creates a new instance of MetalButtonUI.
*/
public MetalButtonUI()
{
super();
}
/**
* Returns an instance of MetalButtonUI.
*
* @param component a button for which a UI instance should be returned
*/
public static ComponentUI createUI(JComponent component)
{
if (instance == null)
instance = new MetalButtonUI();
return instance;
}
/**
* Install the Look &amp; Feel defaults for Buttons.
*
* @param button the button for which to install the Look &amp; Feel
*/
public void installDefaults(AbstractButton button)
{
super.installDefaults(button);
UIDefaults defaults = UIManager.getLookAndFeelDefaults();
button.setFont(defaults.getFont("Button.font"));
}
}

View File

@ -0,0 +1,74 @@
/* MetalCheckBoxUI.java
Copyright (C) 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
GNU Classpath is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU Classpath is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
conditions of the GNU General Public License cover the whole
combination.
As a special exception, the copyright holders of this library give you
permission to link this library with independent modules to produce an
executable, regardless of the license terms of these independent
modules, and to copy and distribute the resulting executable under
terms of your choice, provided that you also meet, for each linked
independent module, the terms and conditions of the license of that
module. An independent module is a module which is not derived from
or based on this library. If you modify this library, you may extend
this exception to your version of the library, but you are not
obligated to do so. If you do not wish to do so, delete this
exception statement from your version. */
package javax.swing.plaf.metal;
import javax.swing.JComponent;
import javax.swing.plaf.ComponentUI;
import javax.swing.plaf.basic.BasicCheckBoxUI;
public class MetalCheckBoxUI
extends BasicCheckBoxUI
{
// FIXME: maybe replace by a Map of instances when this becomes stateful
/** The shared UI instance for JCheckBoxes. */
private static MetalCheckBoxUI instance = null;
/**
* Constructs a new instance of MetalCheckBoxUI.
*/
public MetalCheckBoxUI()
{
super();
}
/**
* Returns an instance of MetalCheckBoxUI.
*
* @param component the component for which we return an UI instance
*
* @return an instance of MetalCheckBoxUI
*/
public static ComponentUI createUI(JComponent component)
{
if (instance == null)
instance = new MetalCheckBoxUI();
return instance;
}
}

View File

@ -0,0 +1,74 @@
/* MetalComboBoxUI.java
Copyright (C) 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
GNU Classpath is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU Classpath is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
conditions of the GNU General Public License cover the whole
combination.
As a special exception, the copyright holders of this library give you
permission to link this library with independent modules to produce an
executable, regardless of the license terms of these independent
modules, and to copy and distribute the resulting executable under
terms of your choice, provided that you also meet, for each linked
independent module, the terms and conditions of the license of that
module. An independent module is a module which is not derived from
or based on this library. If you modify this library, you may extend
this exception to your version of the library, but you are not
obligated to do so. If you do not wish to do so, delete this
exception statement from your version. */
package javax.swing.plaf.metal;
import javax.swing.JComponent;
import javax.swing.plaf.ComponentUI;
import javax.swing.plaf.basic.BasicComboBoxUI;
public class MetalComboBoxUI
extends BasicComboBoxUI
{
// FIXME: maybe replace by a Map of instances when this becomes stateful
/** The shared UI instance for JComboBoxes. */
private static MetalComboBoxUI instance = null;
/**
* Constructs a new instance of MetalComboBoxUI.
*/
public MetalComboBoxUI()
{
super();
}
/**
* Returns an instance of MetalComboBoxUI.
*
* @param component the component for which we return an UI instance
*
* @return an instance of MetalComboBoxUI
*/
public static ComponentUI createUI(JComponent component)
{
if (instance == null)
instance = new MetalComboBoxUI();
return instance;
}
}

View File

@ -0,0 +1,74 @@
/* MetalDesktopIconUI.java
Copyright (C) 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
GNU Classpath is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU Classpath is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
conditions of the GNU General Public License cover the whole
combination.
As a special exception, the copyright holders of this library give you
permission to link this library with independent modules to produce an
executable, regardless of the license terms of these independent
modules, and to copy and distribute the resulting executable under
terms of your choice, provided that you also meet, for each linked
independent module, the terms and conditions of the license of that
module. An independent module is a module which is not derived from
or based on this library. If you modify this library, you may extend
this exception to your version of the library, but you are not
obligated to do so. If you do not wish to do so, delete this
exception statement from your version. */
package javax.swing.plaf.metal;
import javax.swing.JComponent;
import javax.swing.plaf.ComponentUI;
import javax.swing.plaf.basic.BasicDesktopIconUI;
public class MetalDesktopIconUI
extends BasicDesktopIconUI
{
// FIXME: maybe replace by a Map of instances when this becomes stateful
/** The shared UI instance for MetalDesktopIcons */
private static MetalDesktopIconUI instance = null;
/**
* Constructs a new instance of MetalDesktopIconUI.
*/
public MetalDesktopIconUI()
{
super();
}
/**
* Returns an instance of MetalDesktopIconUI.
*
* @param component the component for which we return an UI instance
*
* @return an instance of MetalDesktopIconUI
*/
public static ComponentUI createUI(JComponent component)
{
if (instance == null)
instance = new MetalDesktopIconUI();
return instance;
}
}

View File

@ -0,0 +1,75 @@
/* MetalInternalFrameUI.java
Copyright (C) 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
GNU Classpath is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU Classpath is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
conditions of the GNU General Public License cover the whole
combination.
As a special exception, the copyright holders of this library give you
permission to link this library with independent modules to produce an
executable, regardless of the license terms of these independent
modules, and to copy and distribute the resulting executable under
terms of your choice, provided that you also meet, for each linked
independent module, the terms and conditions of the license of that
module. An independent module is a module which is not derived from
or based on this library. If you modify this library, you may extend
this exception to your version of the library, but you are not
obligated to do so. If you do not wish to do so, delete this
exception statement from your version. */
package javax.swing.plaf.metal;
import javax.swing.JComponent;
import javax.swing.JInternalFrame;
import javax.swing.plaf.ComponentUI;
import javax.swing.plaf.basic.BasicInternalFrameUI;
public class MetalInternalFrameUI
extends BasicInternalFrameUI
{
// FIXME: maybe replace by a Map of instances when this becomes stateful
/** The shared UI instance for JInternalFrames */
private static MetalInternalFrameUI instance = null;
/**
* Constructs a new instance of MetalInternalFrameUI.
*/
public MetalInternalFrameUI(JInternalFrame frame)
{
super(frame);
}
/**
* Returns an instance of MetalInternalFrameUI.
*
* @param component the component for which we return an UI instance
*
* @return an instance of MetalInternalFrameUI
*/
public static ComponentUI createUI(JComponent component)
{
if (instance == null)
instance = new MetalInternalFrameUI((JInternalFrame) component);
return instance;
}
}

View File

@ -0,0 +1,74 @@
/* MetalLabelUI.java
Copyright (C) 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
GNU Classpath is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU Classpath is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
conditions of the GNU General Public License cover the whole
combination.
As a special exception, the copyright holders of this library give you
permission to link this library with independent modules to produce an
executable, regardless of the license terms of these independent
modules, and to copy and distribute the resulting executable under
terms of your choice, provided that you also meet, for each linked
independent module, the terms and conditions of the license of that
module. An independent module is a module which is not derived from
or based on this library. If you modify this library, you may extend
this exception to your version of the library, but you are not
obligated to do so. If you do not wish to do so, delete this
exception statement from your version. */
package javax.swing.plaf.metal;
import javax.swing.JComponent;
import javax.swing.plaf.ComponentUI;
import javax.swing.plaf.basic.BasicLabelUI;
public class MetalLabelUI
extends BasicLabelUI
{
// FIXME: maybe replace by a Map of instances when this becomes stateful
/** The shared UI instance for JLabels. */
private static MetalLabelUI instance = null;
/**
* Constructs a new instance of MetalLabelUI.
*/
public MetalLabelUI()
{
super();
}
/**
* Returns an instance of MetalLabelUI.
*
* @param component the component for which we return an UI instance
*
* @return an instance of MetalLabelUI
*/
public static ComponentUI createUI(JComponent component)
{
if (instance == null)
instance = new MetalLabelUI();
return instance;
}
}

View File

@ -38,6 +38,9 @@ exception statement from your version. */
package javax.swing.plaf.metal;
import java.awt.Color;
import java.awt.Insets;
import javax.swing.UIDefaults;
import javax.swing.plaf.ColorUIResource;
import javax.swing.plaf.FontUIResource;
@ -307,4 +310,196 @@ public class MetalLookAndFeel extends BasicLookAndFeel
{
MetalLookAndFeel.theme = theme;
}
/**
* Sets the ComponentUI classes for all Swing components to the Metal
* implementations.
*
* In particular this sets the following keys:
*
* <table>
* <tr>
* <th>Key</th><th>Value</th>
* </tr><tr>
* <td>ButtonUI</td><td>{@link MetalButtonUI}</td>
* </tr><tr>
* <td>CheckBoxUI</td><td>{@link MetalCheckBoxUI}</td>
* </tr><tr>
* <td>ComboBoxUI</td><td>{@link MetalComboBoxUI}</td>
* </tr><tr>
* <td>DesktopIconUI</td><td>{@link MetalDesktopIconUI}</td>
* </tr><tr>
* <td>InternalFrameUI</td><td>{@link MetalInternalFrameUI}</td>
* </tr><tr>
* <td>LabelUI</td><td>{@link MetalLabelUI}</td>
* </tr><tr>
* <td>PopupMenuSeparatorUI</td><td>{@link MetalPopupMenuSeparatorUI}</td>
* </tr><tr>
* <td>ProgressBarUI</td><td>{@link MetalProgressBarUI}</td>
* </tr><tr>
* <td>RadioButtonUI</td><td>{@link MetalRadioButtonUI}</td>
* </tr><tr>
* <td>RootPaneUI</td><td>{@link MetalRootPaneUI}</td>
* </tr><tr>
* <td>ScrollBarUI</td><td>{@link MetalScrollBarUI}</td>
* </tr><tr>
* <td>ScrollPaneUI</td><td>{@link MetalScrollPaneUI}</td>
* </tr><tr>
* <td>SeparatorUI</td><td>{@link MetalSeparatorUI}</td>
* </tr><tr>
* <td>SliderUI</td><td>{@link MetalSliderUI}</td>
* </tr><tr>
* <td>SplitPaneUI</td><td>{@link MetalSplitPaneUI}</td>
* </tr><tr>
* <td>TabbedPaneUI</td><td>{@link MetalTabbedPaneUI}</td>
* </tr><tr>
* <td>TextFieldUI</td><td>{@link MetalTextFieldUI}</td>
* </tr><tr>
* <td>ToggleButtonUI</td><td>{@link MetalToggleButtonUI}</td>
* </tr><tr>
* <td>ToolBarUI</td><td>{@link MetalToolBarUI}</td>
* </tr><tr>
* <td>ToolTipUI</td><td>{@link MetalToolTipUI}</td>
* </tr><tr>
* <td>TreeUI</td><td>{@link MetalTreeUI}</td>
* </tr><tr>
* </table>
*
* @param defaults the UIDefaults where the class defaults are added
*/
protected void initClassDefaults(UIDefaults defaults)
{
super.initClassDefaults(defaults);
// Variables
Object[] uiDefaults;
// Initialize Class Defaults
uiDefaults = new Object[] {
"ButtonUI", "javax.swing.plaf.metal.MetalButtonUI",
"CheckBoxUI", "javax.swing.plaf.metal.MetalCheckBoxUI",
"ComboBoxUI", "javax.swing.plaf.metal.MetalComboBoxUI",
"DesktopIconUI", "javax.swing.plaf.metal.MetalDesktopIconUI",
"InternalFrameUI", "javax.swing.plaf.metal.MetalInternalFrameUI",
"LabelUI", "javax.swing.plaf.metal.MetalLabelUI",
"PopupMenuSeparatorUI",
"javax.swing.plaf.metal.MetalPopupMenuSeparatorUI",
"ProgressBarUI", "javax.swing.plaf.metal.MetalProgressBarUI",
"RadioButtonUI", "javax.swing.plaf.metal.MetalRadioButtonUI",
"RootPaneUI", "javax.swing.plaf.metal.MetalRootPaneUI",
"ScrollBarUI", "javax.swing.plaf.metal.MetalScrollBarUI",
"ScrollPaneUI", "javax.swing.plaf.metal.MetalScrollPaneUI",
"SeparatorUI", "javax.swing.plaf.metal.MetalSeparatorUI",
"SliderUI", "javax.swing.plaf.metal.MetalSliderUI",
"SplitPaneUI", "javax.swing.plaf.metal.MetalSplitPaneUI",
"TabbedPaneUI", "javax.swing.plaf.metal.MetalTabbedPaneUI",
"TextFieldUI", "javax.swing.plaf.metal.MetalTextFieldUI",
"ToggleButtonUI", "javax.swing.plaf.metal.MetalToggleButtonUI",
"ToolBarUI", "javax.swing.plaf.metal.MetalToolBarUI",
"ToolTipUI", "javax.swing.plaf.metal.MetalToolTipUI",
"TreeUI", "javax.swing.plaf.metal.MetalTreeUI",
};
// Add Class Defaults to UI Defaults table
defaults.putDefaults(uiDefaults);
}
/**
* Initializes the component defaults for the Metal Look &amp; Feel.
*
* In particular this sets the following keys (the colors are given
* as RGB hex values):
*
* <table>
* <tr>
* <th>Key</th><th>Value</th>
* </tr><tr>
* <td>Button.background</td><td>0xcccccc</td>
* </tr><tr>
* <td>Button.border</td><td>{@link MetalBorders.ButtonBorder}</td>
* </tr><tr>
* <td>Button.font</td><td>{@link #getControlTextFont}</td>
* </tr><tr>
* <td>Button.margin</td><td><code>new java.awt.Insets(2, 14, 2, 14)</code>
* </td>
* </tr><tr>
* <td>CheckBox.background</td><td>0xcccccc</td>
* </tr><tr>
* <td>CheckBoxMenuItem.background</td><td>0xcccccc</td>
* </tr><tr>
* <td>ToolBar.background</td><td>0xcccccc</td>
* </tr><tr>
* <td>Panel.background</td><td>0xcccccc</td>
* </tr><tr>
* <td>Slider.background</td><td>0xcccccc</td>
* </tr><tr>
* <td>OptionPane.background</td><td>0xcccccc</td>
* </tr><tr>
* <td>ProgressBar.background</td><td>0xcccccc</td>
* </tr><tr>
* <td>TabbedPane.background</td><td>0xcccccc</td>
* </tr><tr>
* <td>Label.background</td><td>0xcccccc</td>
* </tr><tr>
* <td>Label.font</td><td>{@link #getControlTextFont}</td>
* </tr><tr>
* <td>Menu.background</td><td>0xcccccc</td>
* </tr><tr>
* <td>MenuBar.background</td><td>0xcccccc</td>
* </tr><tr>
* <td>MenuItem.background</td><td>0xcccccc</td>
* </tr><tr>
* <td>ScrollBar.background</td><td>0xcccccc</td>
* </tr><tr>
* </table>
*
* @param defaults the UIDefaults instance to which the values are added
*/
protected void initComponentDefaults(UIDefaults defaults)
{
super.initComponentDefaults(defaults);
Object[] myDefaults = new Object[] {
"Button.background", new ColorUIResource(getControl()),
"Button.border", MetalBorders.getButtonBorder(),
"Button.font", getControlTextFont(),
"Button.margin", new Insets(2, 14, 2, 14),
"CheckBox.background", new ColorUIResource(getControl()),
"CheckBoxMenuItem.background", new ColorUIResource(getControl()),
"ToolBar.background", new ColorUIResource(getControl()),
"Panel.background", new ColorUIResource(getControl()),
"Slider.background", new ColorUIResource(getControl()),
"OptionPane.background", new ColorUIResource(getControl()),
"ProgressBar.background", new ColorUIResource(getControl()),
"TabbedPane.background", new ColorUIResource(getControl()),
"Label.background", new ColorUIResource(getControl()),
"Label.font", getControlTextFont(),
"Menu.background", new ColorUIResource(getControl()),
"MenuBar.background", new ColorUIResource(getControl()),
"MenuItem.background", new ColorUIResource(getControl()),
"ScrollBar.background", new ColorUIResource(getControl())
};
defaults.putDefaults(myDefaults);
}
/**
* Initializes the system color defaults.
*
* In particular this sets the following keys:
*
* <table>
* <tr>
* <th>Key</th><th>Value</th><th>Description</th>
* </tr><tr>
* <td>control</td><td>0xcccccc</td><td>The default color for components</td>
* </tr>
* </table>
*/
protected void initSystemColorDefaults(UIDefaults defaults)
{
super.initSystemColorDefaults(defaults);
Object[] uiDefaults;
uiDefaults = new Object[] {
"control", new ColorUIResource(getControl())
};
defaults.putDefaults(uiDefaults);
}
}

View File

@ -0,0 +1,73 @@
/* MetalPopupMenuSeparatorUI.java
Copyright (C) 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
GNU Classpath is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU Classpath is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
conditions of the GNU General Public License cover the whole
combination.
As a special exception, the copyright holders of this library give you
permission to link this library with independent modules to produce an
executable, regardless of the license terms of these independent
modules, and to copy and distribute the resulting executable under
terms of your choice, provided that you also meet, for each linked
independent module, the terms and conditions of the license of that
module. An independent module is a module which is not derived from
or based on this library. If you modify this library, you may extend
this exception to your version of the library, but you are not
obligated to do so. If you do not wish to do so, delete this
exception statement from your version. */
package javax.swing.plaf.metal;
import javax.swing.JComponent;
import javax.swing.plaf.ComponentUI;
public class MetalPopupMenuSeparatorUI
extends MetalSeparatorUI
{
// FIXME: maybe replace by a Map of instances when this becomes stateful
/** The shared UI instance for MetalPopupMenuSeparatorUIs */
private static MetalPopupMenuSeparatorUI instance = null;
/**
* Constructs a new instance of MetalPopupMenuSeparatorUI.
*/
public MetalPopupMenuSeparatorUI()
{
super();
}
/**
* Returns an instance of MetalPopupMenuSeparatorUI.
*
* @param component the component for which we return an UI instance
*
* @return an instance of MetalPopupMenuSeparatorUI
*/
public static ComponentUI createUI(JComponent component)
{
if (instance == null)
instance = new MetalPopupMenuSeparatorUI();
return instance;
}
}

View File

@ -0,0 +1,74 @@
/* MetalProgressBarUI.java
Copyright (C) 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
GNU Classpath is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU Classpath is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
conditions of the GNU General Public License cover the whole
combination.
As a special exception, the copyright holders of this library give you
permission to link this library with independent modules to produce an
executable, regardless of the license terms of these independent
modules, and to copy and distribute the resulting executable under
terms of your choice, provided that you also meet, for each linked
independent module, the terms and conditions of the license of that
module. An independent module is a module which is not derived from
or based on this library. If you modify this library, you may extend
this exception to your version of the library, but you are not
obligated to do so. If you do not wish to do so, delete this
exception statement from your version. */
package javax.swing.plaf.metal;
import javax.swing.JComponent;
import javax.swing.plaf.ComponentUI;
import javax.swing.plaf.basic.BasicProgressBarUI;
public class MetalProgressBarUI
extends BasicProgressBarUI
{
// FIXME: maybe replace by a Map of instances when this becomes stateful
/** The shared UI instance for MetalProgressBarUIs */
private static MetalProgressBarUI instance = null;
/**
* Constructs a new instance of MetalProgressBarUI.
*/
public MetalProgressBarUI()
{
super();
}
/**
* Returns an instance of MetalProgressBarUI.
*
* @param component the component for which we return an UI instance
*
* @return an instance of MetalProgressBarUI
*/
public static ComponentUI createUI(JComponent component)
{
if (instance == null)
instance = new MetalProgressBarUI();
return instance;
}
}

View File

@ -0,0 +1,74 @@
/* MetalRadioButtonUI.java
Copyright (C) 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
GNU Classpath is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU Classpath is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
conditions of the GNU General Public License cover the whole
combination.
As a special exception, the copyright holders of this library give you
permission to link this library with independent modules to produce an
executable, regardless of the license terms of these independent
modules, and to copy and distribute the resulting executable under
terms of your choice, provided that you also meet, for each linked
independent module, the terms and conditions of the license of that
module. An independent module is a module which is not derived from
or based on this library. If you modify this library, you may extend
this exception to your version of the library, but you are not
obligated to do so. If you do not wish to do so, delete this
exception statement from your version. */
package javax.swing.plaf.metal;
import javax.swing.JComponent;
import javax.swing.plaf.ComponentUI;
import javax.swing.plaf.basic.BasicRadioButtonUI;
public class MetalRadioButtonUI
extends BasicRadioButtonUI
{
// FIXME: maybe replace by a Map of instances when this becomes stateful
/** The shared UI instance for JRadioButtons. */
private static MetalRadioButtonUI instance = null;
/**
* Constructs a new instance of MetalRadioButtonUI.
*/
public MetalRadioButtonUI()
{
super();
}
/**
* Returns an instance of MetalRadioButtonUI.
*
* @param component the component for which we return an UI instance
*
* @return an instance of MetalRadioButtonUI
*/
public static ComponentUI createUI(JComponent component)
{
if (instance == null)
instance = new MetalRadioButtonUI();
return instance;
}
}

View File

@ -0,0 +1,74 @@
/* MetalRootPaneUI.java
Copyright (C) 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
GNU Classpath is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU Classpath is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
conditions of the GNU General Public License cover the whole
combination.
As a special exception, the copyright holders of this library give you
permission to link this library with independent modules to produce an
executable, regardless of the license terms of these independent
modules, and to copy and distribute the resulting executable under
terms of your choice, provided that you also meet, for each linked
independent module, the terms and conditions of the license of that
module. An independent module is a module which is not derived from
or based on this library. If you modify this library, you may extend
this exception to your version of the library, but you are not
obligated to do so. If you do not wish to do so, delete this
exception statement from your version. */
package javax.swing.plaf.metal;
import javax.swing.JComponent;
import javax.swing.plaf.ComponentUI;
import javax.swing.plaf.basic.BasicRootPaneUI;
public class MetalRootPaneUI
extends BasicRootPaneUI
{
// FIXME: maybe replace by a Map of instances when this becomes stateful
/** The shared UI instance for MetalRootPaneUIs */
private static MetalRootPaneUI instance = null;
/**
* Constructs a new instance of MetalRootPaneUI.
*/
public MetalRootPaneUI()
{
super();
}
/**
* Returns an instance of MetalRootPaneUI.
*
* @param component the component for which we return an UI instance
*
* @return an instance of MetalRootPaneUI
*/
public static ComponentUI createUI(JComponent component)
{
if (instance == null)
instance = new MetalRootPaneUI();
return instance;
}
}

View File

@ -0,0 +1,74 @@
/* MetalScrollBarUI.java
Copyright (C) 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
GNU Classpath is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU Classpath is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
conditions of the GNU General Public License cover the whole
combination.
As a special exception, the copyright holders of this library give you
permission to link this library with independent modules to produce an
executable, regardless of the license terms of these independent
modules, and to copy and distribute the resulting executable under
terms of your choice, provided that you also meet, for each linked
independent module, the terms and conditions of the license of that
module. An independent module is a module which is not derived from
or based on this library. If you modify this library, you may extend
this exception to your version of the library, but you are not
obligated to do so. If you do not wish to do so, delete this
exception statement from your version. */
package javax.swing.plaf.metal;
import javax.swing.JComponent;
import javax.swing.plaf.ComponentUI;
import javax.swing.plaf.basic.BasicScrollBarUI;
public class MetalScrollBarUI
extends BasicScrollBarUI
{
// FIXME: maybe replace by a Map of instances when this becomes stateful
/** The shared UI instance for JScrollBars. */
private static MetalScrollBarUI instance = null;
/**
* Constructs a new instance of MetalScrollBarUI.
*/
public MetalScrollBarUI()
{
super();
}
/**
* Returns an instance of MetalScrollBarUI.
*
* @param component the component for which we return an UI instance
*
* @return an instance of MetalScrollBarUI
*/
public static ComponentUI createUI(JComponent component)
{
if (instance == null)
instance = new MetalScrollBarUI();
return instance;
}
}

View File

@ -0,0 +1,74 @@
/* MetalScrollPaneUI.java
Copyright (C) 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
GNU Classpath is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU Classpath is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
conditions of the GNU General Public License cover the whole
combination.
As a special exception, the copyright holders of this library give you
permission to link this library with independent modules to produce an
executable, regardless of the license terms of these independent
modules, and to copy and distribute the resulting executable under
terms of your choice, provided that you also meet, for each linked
independent module, the terms and conditions of the license of that
module. An independent module is a module which is not derived from
or based on this library. If you modify this library, you may extend
this exception to your version of the library, but you are not
obligated to do so. If you do not wish to do so, delete this
exception statement from your version. */
package javax.swing.plaf.metal;
import javax.swing.JComponent;
import javax.swing.plaf.ComponentUI;
import javax.swing.plaf.basic.BasicScrollPaneUI;
public class MetalScrollPaneUI
extends BasicScrollPaneUI
{
// FIXME: maybe replace by a Map of instances when this becomes stateful
/** The shared UI instance for JScrollPanes. */
private static MetalScrollPaneUI instance = null;
/**
* Constructs a new instance of MetalScrollPaneUI.
*/
public MetalScrollPaneUI()
{
super();
}
/**
* Returns an instance of MetalScrollPaneUI.
*
* @param component the component for which we return an UI instance
*
* @return an instance of MetalScrollPaneUI
*/
public static ComponentUI createUI(JComponent component)
{
if (instance == null)
instance = new MetalScrollPaneUI();
return instance;
}
}

View File

@ -0,0 +1,74 @@
/* MetalSeparatorUI.java
Copyright (C) 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
GNU Classpath is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU Classpath is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
conditions of the GNU General Public License cover the whole
combination.
As a special exception, the copyright holders of this library give you
permission to link this library with independent modules to produce an
executable, regardless of the license terms of these independent
modules, and to copy and distribute the resulting executable under
terms of your choice, provided that you also meet, for each linked
independent module, the terms and conditions of the license of that
module. An independent module is a module which is not derived from
or based on this library. If you modify this library, you may extend
this exception to your version of the library, but you are not
obligated to do so. If you do not wish to do so, delete this
exception statement from your version. */
package javax.swing.plaf.metal;
import javax.swing.JComponent;
import javax.swing.plaf.ComponentUI;
import javax.swing.plaf.basic.BasicSeparatorUI;
public class MetalSeparatorUI
extends BasicSeparatorUI
{
// FIXME: maybe replace by a Map of instances when this becomes stateful
/** The shared UI instance for MetalSeparatorUIs */
private static MetalSeparatorUI instance = null;
/**
* Constructs a new instance of MetalSeparatorUI.
*/
public MetalSeparatorUI()
{
super();
}
/**
* Returns an instance of MetalSeparatorUI.
*
* @param component the component for which we return an UI instance
*
* @return an instance of MetalSeparatorUI
*/
public static ComponentUI createUI(JComponent component)
{
if (instance == null)
instance = new MetalSeparatorUI();
return instance;
}
}

View File

@ -0,0 +1,74 @@
/* MetalSliderUI.java
Copyright (C) 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
GNU Classpath is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU Classpath is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
conditions of the GNU General Public License cover the whole
combination.
As a special exception, the copyright holders of this library give you
permission to link this library with independent modules to produce an
executable, regardless of the license terms of these independent
modules, and to copy and distribute the resulting executable under
terms of your choice, provided that you also meet, for each linked
independent module, the terms and conditions of the license of that
module. An independent module is a module which is not derived from
or based on this library. If you modify this library, you may extend
this exception to your version of the library, but you are not
obligated to do so. If you do not wish to do so, delete this
exception statement from your version. */
package javax.swing.plaf.metal;
import javax.swing.JComponent;
import javax.swing.plaf.ComponentUI;
import javax.swing.plaf.basic.BasicSliderUI;
public class MetalSliderUI
extends BasicSliderUI
{
// FIXME: maybe replace by a Map of instances when this becomes stateful
/** The shared UI instance for MetalSliderUIs */
private static MetalSliderUI instance = null;
/**
* Constructs a new instance of MetalSliderUI.
*/
public MetalSliderUI()
{
super(null);
}
/**
* Returns an instance of MetalSliderUI.
*
* @param component the component for which we return an UI instance
*
* @return an instance of MetalSliderUI
*/
public static ComponentUI createUI(JComponent component)
{
if (instance == null)
instance = new MetalSliderUI();
return instance;
}
}

View File

@ -0,0 +1,74 @@
/* MetalSplitPaneUI.java
Copyright (C) 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
GNU Classpath is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU Classpath is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
conditions of the GNU General Public License cover the whole
combination.
As a special exception, the copyright holders of this library give you
permission to link this library with independent modules to produce an
executable, regardless of the license terms of these independent
modules, and to copy and distribute the resulting executable under
terms of your choice, provided that you also meet, for each linked
independent module, the terms and conditions of the license of that
module. An independent module is a module which is not derived from
or based on this library. If you modify this library, you may extend
this exception to your version of the library, but you are not
obligated to do so. If you do not wish to do so, delete this
exception statement from your version. */
package javax.swing.plaf.metal;
import javax.swing.JComponent;
import javax.swing.plaf.ComponentUI;
import javax.swing.plaf.basic.BasicSplitPaneUI;
public class MetalSplitPaneUI
extends BasicSplitPaneUI
{
// FIXME: maybe replace by a Map of instances when this becomes stateful
/** The shared UI instance for MetalSplitPaneUIs */
private static MetalSplitPaneUI instance = null;
/**
* Constructs a new instance of MetalSplitPaneUI.
*/
public MetalSplitPaneUI()
{
super();
}
/**
* Returns an instance of MetalSplitPaneUI.
*
* @param component the component for which we return an UI instance
*
* @return an instance of MetalSplitPaneUI
*/
public static ComponentUI createUI(JComponent component)
{
if (instance == null)
instance = new MetalSplitPaneUI();
return instance;
}
}

View File

@ -0,0 +1,86 @@
/* MetalTabbedPaneUI.java
Copyright (C) 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
GNU Classpath is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU Classpath is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
conditions of the GNU General Public License cover the whole
combination.
As a special exception, the copyright holders of this library give you
permission to link this library with independent modules to produce an
executable, regardless of the license terms of these independent
modules, and to copy and distribute the resulting executable under
terms of your choice, provided that you also meet, for each linked
independent module, the terms and conditions of the license of that
module. An independent module is a module which is not derived from
or based on this library. If you modify this library, you may extend
this exception to your version of the library, but you are not
obligated to do so. If you do not wish to do so, delete this
exception statement from your version. */
package javax.swing.plaf.metal;
import java.util.HashMap;
import javax.swing.JComponent;
import javax.swing.plaf.ComponentUI;
import javax.swing.plaf.basic.BasicTabbedPaneUI;
public class MetalTabbedPaneUI
extends BasicTabbedPaneUI
{
/** The shared UI instance for JTabbedPanes. */
private static HashMap instances = null;
/**
* Constructs a new instance of MetalTabbedPaneUI.
*/
public MetalTabbedPaneUI()
{
super();
}
/**
* Returns an instance of MetalTabbedPaneUI.
*
* @param component the component for which we return an UI instance
*
* @return an instance of MetalTabbedPaneUI
*/
public static ComponentUI createUI(JComponent component)
{
if (instances == null)
instances = new HashMap();
Object o = instances.get(component);
MetalTabbedPaneUI instance;
if (o == null)
{
instance = new MetalTabbedPaneUI();
instances.put(component, instance);
}
else
instance = (MetalTabbedPaneUI) o;
return instance;
}
}

View File

@ -0,0 +1,74 @@
/* MetalTextFieldUI.java
Copyright (C) 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
GNU Classpath is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU Classpath is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
conditions of the GNU General Public License cover the whole
combination.
As a special exception, the copyright holders of this library give you
permission to link this library with independent modules to produce an
executable, regardless of the license terms of these independent
modules, and to copy and distribute the resulting executable under
terms of your choice, provided that you also meet, for each linked
independent module, the terms and conditions of the license of that
module. An independent module is a module which is not derived from
or based on this library. If you modify this library, you may extend
this exception to your version of the library, but you are not
obligated to do so. If you do not wish to do so, delete this
exception statement from your version. */
package javax.swing.plaf.metal;
import javax.swing.JComponent;
import javax.swing.plaf.ComponentUI;
import javax.swing.plaf.basic.BasicTextFieldUI;
public class MetalTextFieldUI
extends BasicTextFieldUI
{
// FIXME: maybe replace by a Map of instances when this becomes stateful
/** The shared UI instance for MetalTextFieldUIs */
private static MetalTextFieldUI instance = null;
/**
* Constructs a new instance of MetalTextFieldUI.
*/
public MetalTextFieldUI()
{
super();
}
/**
* Returns an instance of MetalTextFieldUI.
*
* @param component the component for which we return an UI instance
*
* @return an instance of MetalTextFieldUI
*/
public static ComponentUI createUI(JComponent component)
{
if (instance == null)
instance = new MetalTextFieldUI();
return instance;
}
}

View File

@ -0,0 +1,74 @@
/* MetalToggleButtonUI.java
Copyright (C) 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
GNU Classpath is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU Classpath is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
conditions of the GNU General Public License cover the whole
combination.
As a special exception, the copyright holders of this library give you
permission to link this library with independent modules to produce an
executable, regardless of the license terms of these independent
modules, and to copy and distribute the resulting executable under
terms of your choice, provided that you also meet, for each linked
independent module, the terms and conditions of the license of that
module. An independent module is a module which is not derived from
or based on this library. If you modify this library, you may extend
this exception to your version of the library, but you are not
obligated to do so. If you do not wish to do so, delete this
exception statement from your version. */
package javax.swing.plaf.metal;
import javax.swing.JComponent;
import javax.swing.plaf.ComponentUI;
import javax.swing.plaf.basic.BasicToggleButtonUI;
public class MetalToggleButtonUI
extends BasicToggleButtonUI
{
// FIXME: maybe replace by a Map of instances when this becomes stateful
/** The shared UI instance for MetalToggleButtonUIs */
private static MetalToggleButtonUI instance = null;
/**
* Constructs a new instance of MetalToggleButtonUI.
*/
public MetalToggleButtonUI()
{
super();
}
/**
* Returns an instance of MetalToggleButtonUI.
*
* @param component the component for which we return an UI instance
*
* @return an instance of MetalToggleButtonUI
*/
public static ComponentUI createUI(JComponent component)
{
if (instance == null)
instance = new MetalToggleButtonUI();
return instance;
}
}

View File

@ -0,0 +1,74 @@
/* MetalToolBarUI.java
Copyright (C) 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
GNU Classpath is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU Classpath is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
conditions of the GNU General Public License cover the whole
combination.
As a special exception, the copyright holders of this library give you
permission to link this library with independent modules to produce an
executable, regardless of the license terms of these independent
modules, and to copy and distribute the resulting executable under
terms of your choice, provided that you also meet, for each linked
independent module, the terms and conditions of the license of that
module. An independent module is a module which is not derived from
or based on this library. If you modify this library, you may extend
this exception to your version of the library, but you are not
obligated to do so. If you do not wish to do so, delete this
exception statement from your version. */
package javax.swing.plaf.metal;
import javax.swing.JComponent;
import javax.swing.plaf.ComponentUI;
import javax.swing.plaf.basic.BasicToolBarUI;
public class MetalToolBarUI
extends BasicToolBarUI
{
// FIXME: maybe replace by a Map of instances when this becomes stateful
/** The shared UI instance for MetalToolBarUIs */
private static MetalToolBarUI instance = null;
/**
* Constructs a new instance of MetalToolBarUI.
*/
public MetalToolBarUI()
{
super();
}
/**
* Returns an instance of MetalToolBarUI.
*
* @param component the component for which we return an UI instance
*
* @return an instance of MetalToolBarUI
*/
public static ComponentUI createUI(JComponent component)
{
if (instance == null)
instance = new MetalToolBarUI();
return instance;
}
}

View File

@ -0,0 +1,74 @@
/* MetalToolTipUI.java
Copyright (C) 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
GNU Classpath is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU Classpath is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
conditions of the GNU General Public License cover the whole
combination.
As a special exception, the copyright holders of this library give you
permission to link this library with independent modules to produce an
executable, regardless of the license terms of these independent
modules, and to copy and distribute the resulting executable under
terms of your choice, provided that you also meet, for each linked
independent module, the terms and conditions of the license of that
module. An independent module is a module which is not derived from
or based on this library. If you modify this library, you may extend
this exception to your version of the library, but you are not
obligated to do so. If you do not wish to do so, delete this
exception statement from your version. */
package javax.swing.plaf.metal;
import javax.swing.JComponent;
import javax.swing.plaf.ComponentUI;
import javax.swing.plaf.basic.BasicToolTipUI;
public class MetalToolTipUI
extends BasicToolTipUI
{
// FIXME: maybe replace by a Map of instances when this becomes stateful
/** The shared UI instance for MetalToolTipUIs */
private static MetalToolTipUI instance = null;
/**
* Constructs a new instance of MetalToolTipUI.
*/
public MetalToolTipUI()
{
super();
}
/**
* Returns an instance of MetalToolTipUI.
*
* @param component the component for which we return an UI instance
*
* @return an instance of MetalToolTipUI
*/
public static ComponentUI createUI(JComponent component)
{
if (instance == null)
instance = new MetalToolTipUI();
return instance;
}
}

View File

@ -0,0 +1,74 @@
/* MetalTreeUI.java
Copyright (C) 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
GNU Classpath is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU Classpath is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
conditions of the GNU General Public License cover the whole
combination.
As a special exception, the copyright holders of this library give you
permission to link this library with independent modules to produce an
executable, regardless of the license terms of these independent
modules, and to copy and distribute the resulting executable under
terms of your choice, provided that you also meet, for each linked
independent module, the terms and conditions of the license of that
module. An independent module is a module which is not derived from
or based on this library. If you modify this library, you may extend
this exception to your version of the library, but you are not
obligated to do so. If you do not wish to do so, delete this
exception statement from your version. */
package javax.swing.plaf.metal;
import javax.swing.JComponent;
import javax.swing.plaf.ComponentUI;
import javax.swing.plaf.basic.BasicTreeUI;
public class MetalTreeUI
extends BasicTreeUI
{
// FIXME: maybe replace by a Map of instances when this becomes stateful
/** The shared UI instance for MetalTreeUIs */
private static MetalTreeUI instance = null;
/**
* Constructs a new instance of MetalTreeUI.
*/
public MetalTreeUI()
{
super();
}
/**
* Returns an instance of MetalTreeUI.
*
* @param component the component for which we return an UI instance
*
* @return an instance of MetalTreeUI
*/
public static ComponentUI createUI(JComponent component)
{
if (instance == null)
instance = new MetalTreeUI();
return instance;
}
}