ToggleButtonModel.java: Remove dead class.

2004-02-09  Graydon Hoare  <graydon@redhat.com>

	* javax/swing/ToggleButtonModel.java: Remove dead class.
	* javax/swing/plaf/basic/BasicDefaults.java: Remove dead class.
	* javax/swing/plaf/basic/BasicButtonListener.java: New class.
	* javax/swing/plaf/basic/BasicRootPaneUI.java: New class.
	* Makefile.am: Update for new and removed files.
	* Makefile.in: Regenerate.

	* gnu/java/awt/peer/gtk/GdkGraphics2D.java: Initialize default hints.
	* javax/swing/AbstractButton.java
	(AbstractButton): Initialize fields correctly in ctor.
	* javax/swing/JCheckbox.java
	(JCheckBox): Override painting flags.
	* javax/swing/DefaultButtonModel.java: Conform to sun.
	* javax/swing/JComponent.java (paint): Fill with background color
	if available.
	(processComponentKeyEvent)
	(processFocusEvent)
	(processKeyEvent)
	(processMouseMotionEvent): Remove event-consuming empty methods.
	(getUIClassID): Return "ComponentUI" not "JComponent"
	* javax/swing/JFrame.java: Remove some debugging chatter.
	(JFrame): Subscribe to window events.
	* javax/swing/JRadioButton.java
	(JRadioButton): Override painting flags.
	* javax/swing/JRootPane.java
	(JRootPane): Set background from UIDefaults.
	* javax/swing/JToggleButton.java
	(ToggleButtonModel): New inner class.
	(JToggleButton): Override layout alighment.
	* javax/swing/SwingUtilities.java:
	(getLocalBounds): Return width and height, not x and y.
	(calculateInnerArea): Use local bounds, not bounds.
	(layoutCompoundLabel): Provide overridden form.
	(layoutCompoundLabel): Correct bugs.
	* javax/swing/UIDefaults.java: Correct comment.
	* javax/swing/plaf/basic/BasicButtonUI.java:
	Move most logic into defaults, external listener.
	(paintIcon): Implement icon painting.
	(paint): Fix state painting to conform to changes in model.
	* javax/swing/plaf/basic/BasicCheckBoxUI.java:
	Remove most dead/wrong methods.
	(getDefaultIcon): Return defaults.getIcon("CheckBox.icon").
	* javax/swing/plaf/basic/BasicIconFactory.java:
	(DummyIcon): New class.
	(getMenuItemCheckIcon)
	(getMenuItemArrowIcon)
	(getMenuArrowIcon)
	(getCheckBoxMenuItemIcon)
	(getRadioButtonMenuItemIcon)
	(createEmptyFrameIcon): Return DummyIcons, not null.
	(getCheckBoxIcon): Implement an icon that looks like sun's.
	(getRadioButtonIcon): Implement an icon that looks like sun's.
	* javax/swing/plaf/basic/BasicLookAndFeel.java
	(initComponentDefaults): Fix impossible values, add some missing.
	* javax/swing/plaf/basic/BasicPanelUI.java (gap): Remove field.
	* javax/swing/plaf/basic/BasicRadioButtonUI.java:
	Remove most dead/wrong methods.
	(icon): New field.
	(getDefaultIcon): New method.
	* javax/swing/plaf/basic/BasicToggleButtonUI.java:
	Remove most dead/wrong methods.
	* javax/swing/plaf/metal/MetalLookAndFeel.java
	(getDefaults): Return super.getDefaults(), not BasicDefaults.
	* jni/gtk-peer/gnu_java_awt_peer_gtk_GdkGraphics.c
	(Java_gnu_java_awt_peer_gtk_GdkGraphics_clearRect):
	Implement "clearing" as drawing, when on pixmap drawables.

	* javax/swing/JButton.java (getUIClassID):
	* javax/swing/JCheckBox.java (getUIClassID):
	* javax/swing/JEditorPane.java (getUIClassID):
	* javax/swing/JLabel.java (getUIClassID):
	* javax/swing/JList.java (getUIClassID):
	* javax/swing/JOptionPane.java (getUIClassID):
	* javax/swing/JPanel.java (getUIClassID):
	* javax/swing/JPasswordField.java (uiClassID):
	* javax/swing/JRadioButton.java (getUIClassID):
	* javax/swing/JRootPane.java (getUIClassID):
	* javax/swing/JScrollPane.java (getUIClassID):
	* javax/swing/JTabbedPane.java (getUIClassID):
	* javax/swing/JToggleButton.java (getUIClassID):
	* javax/swing/JTree.java (getUIClassID):
	* javax/swing/JViewport.java (getUIClassID):
	* javax/swing/text/JTextComponent.java (getUIClassID):
	Return "fooUI" not "Jfoo"

From-SVN: r77686
This commit is contained in:
Graydon Hoare 2004-02-12 00:17:26 +00:00 committed by Graydon Hoare
parent feec892281
commit 9288d11204
35 changed files with 866 additions and 742 deletions

View file

@ -227,29 +227,40 @@ public abstract class BasicLookAndFeel extends LookAndFeel
{
Object[] uiDefaults;
uiDefaults = new Object[] {
"AbstractUndoableEdit.undoText", "Undo",
"AbstractUndoableEdit.redoText", "Redo",
"Button.background", new ColorUIResource(Color.lightGray),
"Button.border", new BorderUIResource.CompoundBorderUIResource(null,
null),
"Button.border", BorderUIResource.getEtchedBorderUIResource(),
"Button.darkShadow", new ColorUIResource(Color.darkGray),
"Button.focusInputMap", new UIDefaults.LazyInputMap(new Object[] {
"SPACE", "pressed",
"released SPACE", "released"
}),
"Button.font", new FontUIResource("Dialog", Font.PLAIN, 12),
"Button.foreground", new ColorUIResource(Color.black),
"Button.highlight", new ColorUIResource(Color.white),
"Button.light", new ColorUIResource(Color.lightGray.brighter()),
"Button.margin", new InsetsUIResource(2, 14, 2, 14),
"Button.shadow", new ColorUIResource(Color.gray),
"Button.textIconGap", new Integer(4),
"Button.textShiftOffset", new Integer(0),
"CheckBox.background", new ColorUIResource(Color.lightGray),
"CheckBox.border", new BorderUIResource.CompoundBorderUIResource(null,
null),
"CheckBox.darkShadow", new ColorUIResource(Color.darkGray),
"CheckBox.focusInputMap", new UIDefaults.LazyInputMap(new Object[] {
"SPACE", "pressed",
"released SPACE", "released"
}),
"CheckBox.font", new FontUIResource("Dialog", Font.PLAIN, 12),
"CheckBox.foreground", new ColorUIResource(Color.black),
"CheckBox.highlight", new ColorUIResource(Color.white),
"CheckBox.icon", BasicIconFactory.getCheckBoxIcon(),
"CheckBox.light", new ColorUIResource(Color.lightGray.brighter()),
"CheckBox.margin",new InsetsUIResource(2, 2, 2, 2),
"CheckBox.shadow", new ColorUIResource(Color.gray),
"CheckBox.textIconGap", new Integer(4),
"CheckBox.textShiftOffset", new Integer(0),
"CheckBoxMenuItem.acceleratorFont", new FontUIResource("Dialog",
@ -540,7 +551,7 @@ public abstract class BasicLookAndFeel extends LookAndFeel
"PopupMenu.font", new FontUIResource("Dialog", Font.PLAIN, 12),
"PopupMenu.foreground", new ColorUIResource(Color.black),
"ProgressBar.background", new ColorUIResource(Color.lightGray),
"ProgressBar.border", new BorderUIResource.LineBorderUIResource(null),
"ProgressBar.border", new BorderUIResource.LineBorderUIResource(Color.darkGray),
"ProgressBar.cellLength", new Integer(1),
"ProgressBar.cellSpacing", new Integer(0),
"ProgressBar.font", new FontUIResource("Dialog", Font.PLAIN, 12),
@ -550,14 +561,18 @@ public abstract class BasicLookAndFeel extends LookAndFeel
"RadioButton.background", new ColorUIResource(Color.lightGray),
"RadioButton.border", new BorderUIResource.CompoundBorderUIResource(null,
null),
"RadioButton.darkShadow", new ColorUIResource(Color.darkGray),
"RadioButton.focusInputMap", new UIDefaults.LazyInputMap(new Object[] {
"SPACE", "pressed",
"released SPACE", "released"
}),
"RadioButton.font", new FontUIResource("Dialog", Font.PLAIN, 12),
"RadioButton.foreground", new ColorUIResource(Color.black),
"RadioButton.highlight", new ColorUIResource(Color.white),
"RadioButton.icon", BasicIconFactory.getRadioButtonIcon(),
"RadioButton.light", new ColorUIResource(Color.lightGray.brighter()),
"RadioButton.margin", new InsetsUIResource(2, 2, 2, 2),
"RadioButton.shadow", new ColorUIResource(Color.gray),
"RadioButton.textIconGap", new Integer(4),
"RadioButton.textShiftOffset", new Integer(0),
"RadioButtonMenuItem.acceleratorFont", new FontUIResource("Dialog",
@ -742,7 +757,7 @@ public abstract class BasicLookAndFeel extends LookAndFeel
"Table.background", new ColorUIResource(Color.white),
"Table.focusCellBackground", new ColorUIResource(Color.white),
"Table.focusCellForeground", new ColorUIResource(Color.black),
"Table.focusCellHighlightBorder", new BorderUIResource.LineBorderUIResource(null),
"Table.focusCellHighlightBorder", new BorderUIResource.LineBorderUIResource(Color.white),
"Table.font", new FontUIResource("Dialog", Font.PLAIN, 12),
"Table.foreground", new ColorUIResource(Color.black),
"Table.gridColor", new ColorUIResource(Color.gray),
@ -849,7 +864,7 @@ public abstract class BasicLookAndFeel extends LookAndFeel
"ToolBar.foreground", new ColorUIResource(Color.black),
"ToolBar.separatorSize", new DimensionUIResource(10, 10),
"ToolTip.background", new ColorUIResource(Color.white),
"ToolTip.border", new BorderUIResource.LineBorderUIResource(null),
"ToolTip.border", new BorderUIResource.LineBorderUIResource(Color.lightGray),
"ToolTip.font", new FontUIResource("SansSerif", Font.PLAIN, 12),
"ToolTip.foreground", new ColorUIResource(Color.black),
"Tree.ancestorInputMap", new UIDefaults.LazyInputMap(new Object[] {
@ -860,7 +875,7 @@ public abstract class BasicLookAndFeel extends LookAndFeel
// XXX Don't use gif
"Tree.closedIcon", new IconUIResource(new ImageIcon("icons/TreeClosed.gif")),
"Tree.drawsFocusBorderAroundIcon", Boolean.FALSE,
"Tree.editorBorder", new BorderUIResource.LineBorderUIResource(null),
"Tree.editorBorder", new BorderUIResource.LineBorderUIResource(Color.lightGray),
"Tree.focusInputMap", new UIDefaults.LazyInputMap(new Object[] {
"shift PAGE_DOWN", "scrollDownExtendSelection",
"PAGE_DOWN", "scrollDownChangeSelection",