aboutsummaryrefslogtreecommitdiff
path: root/libjava/javax/swing/JButton.java
diff options
context:
space:
mode:
Diffstat (limited to 'libjava/javax/swing/JButton.java')
-rw-r--r--libjava/javax/swing/JButton.java150
1 files changed, 75 insertions, 75 deletions
diff --git a/libjava/javax/swing/JButton.java b/libjava/javax/swing/JButton.java
index 13e3d571634..dea37811a7f 100644
--- a/libjava/javax/swing/JButton.java
+++ b/libjava/javax/swing/JButton.java
@@ -53,90 +53,90 @@ public class JButton extends AbstractButton
private static final long serialVersionUID = -1907255238954382202L;
boolean def;
boolean is_def;
-
- public JButton()
- {
- this(null, null);
- }
-
- public JButton(Action a)
- {
- this();
- setAction(a);
- }
-
- public JButton(Icon icon)
- {
- this(null, icon);
- }
-
- public JButton(String text)
- {
- this(text, null);
- }
-
- public JButton(String text, Icon icon)
- {
- super(text, icon);
- }
-
- public Object[] getSelectedObjects()
- {
- return null;
- }
-
- protected void configurePropertiesFromAction(Action a)
- {
- //Factory method which sets the AbstractButton's properties according to values from the Action instance.
- super.configurePropertiesFromAction(a);
- }
-
- public AccessibleContext getAccessibleContext()
- {
- //Gets the AccessibleContext associated with this JButton.
- return null;
- }
-
- public String getUIClassID()
- {
+
+ public JButton()
+ {
+ this(null, null);
+ }
+
+ public JButton(Action a)
+ {
+ this();
+ setAction(a);
+ }
+
+ public JButton(Icon icon)
+ {
+ this(null, icon);
+ }
+
+ public JButton(String text)
+ {
+ this(text, null);
+ }
+
+ public JButton(String text, Icon icon)
+ {
+ super(text, icon);
+ }
+
+ public Object[] getSelectedObjects()
+ {
+ return null;
+ }
+
+ protected void configurePropertiesFromAction(Action a)
+ {
+ //Factory method which sets the AbstractButton's properties according to values from the Action instance.
+ super.configurePropertiesFromAction(a);
+ }
+
+ public AccessibleContext getAccessibleContext()
+ {
+ //Gets the AccessibleContext associated with this JButton.
+ return null;
+ }
+
+ public String getUIClassID()
+ {
//Returns a string that specifies the name of the L&F class that renders this component.
- return "ButtonUI";
- }
-
- public boolean isDefaultButton()
- {
- //Returns whether or not this button is the default button on the RootPane.
- return is_def;
- }
-
- public boolean isDefaultCapable()
- {
- //Returns whether or not this button is capable of being the default button on the RootPane.
- return def;
- }
-
- protected String paramString()
- {
- return "JButton";
- }
-
+ return "ButtonUI";
+ }
+
+ public boolean isDefaultButton()
+ {
+ //Returns whether or not this button is the default button on the RootPane.
+ return is_def;
+ }
+
+ public boolean isDefaultCapable()
+ {
+ //Returns whether or not this button is capable of being the default button on the RootPane.
+ return def;
+ }
+
+ protected String paramString()
+ {
+ return "JButton";
+ }
+
/**
* Overrides JComponent.removeNotify to check if this button is currently
* set as the default button on the RootPane, and if so, sets the RootPane's
* default button to null to ensure the RootPane doesn't hold onto an invalid
* button reference.
*/
- public void removeNotify()
- {
- }
-
- public void setDefaultCapable(boolean defaultCapable)
+ public void removeNotify()
+ {
+ }
+
+ public void setDefaultCapable(boolean defaultCapable)
{
def = defaultCapable;
}
-
- public void updateUI()
- {
+
+ public void updateUI()
+ {
setUI((ButtonUI) UIManager.getUI(this));
- }
+ }
}