aboutsummaryrefslogtreecommitdiff
path: root/libjava
diff options
context:
space:
mode:
authorMichael Koch <konqueror@gmx.de>2004-01-23 15:19:28 +0000
committerMichael Koch <mkoch@gcc.gnu.org>2004-01-23 15:19:28 +0000
commitf1184d57e2dc3a6bf4eb717a87ea6a4723c6bb7f (patch)
treed0c678b7ce950be79461657b5c8214c7e4076dff /libjava
parentf0bf056e74c52135e14eb3ae11a599c2ab7ecb4a (diff)
downloadgcc-f1184d57e2dc3a6bf4eb717a87ea6a4723c6bb7f.zip
gcc-f1184d57e2dc3a6bf4eb717a87ea6a4723c6bb7f.tar.gz
gcc-f1184d57e2dc3a6bf4eb717a87ea6a4723c6bb7f.tar.bz2
AbstractAction.java: Reformated.
2004-01-23 Michael Koch <konqueror@gmx.de> * javax/swing/AbstractAction.java: Reformated. From-SVN: r76424
Diffstat (limited to 'libjava')
-rw-r--r--libjava/ChangeLog4
-rw-r--r--libjava/javax/swing/AbstractAction.java249
2 files changed, 141 insertions, 112 deletions
diff --git a/libjava/ChangeLog b/libjava/ChangeLog
index ffec8ce..613e34a 100644
--- a/libjava/ChangeLog
+++ b/libjava/ChangeLog
@@ -1,5 +1,9 @@
2004-01-23 Michael Koch <konqueror@gmx.de>
+ * javax/swing/AbstractAction.java: Reformated.
+
+2004-01-23 Michael Koch <konqueror@gmx.de>
+
* java/text/CollationElementIterator.java:
(setText): New method.
diff --git a/libjava/javax/swing/AbstractAction.java b/libjava/javax/swing/AbstractAction.java
index e616bad..8890449 100644
--- a/libjava/javax/swing/AbstractAction.java
+++ b/libjava/javax/swing/AbstractAction.java
@@ -56,118 +56,143 @@ public abstract class AbstractAction
{
static final long serialVersionUID = -6803159439231523484L;
- /**
- * enabled
- */
- protected boolean enabled = true;
-
- /**
- * changeSupport
- */
- protected SwingPropertyChangeSupport changeSupport =
- new SwingPropertyChangeSupport(this);
-
- /**
- * store
- */
- private transient HashMap store = new HashMap();
-
- /**
- * Constructor AbstractAction
- */
- public AbstractAction() {
- this(""); // TODO: default name
- } // AbstractAction()
-
- /**
- * Constructor AbstractAction
- * @param name TODO
- */
- public AbstractAction(String name) {
- this(name, null); // TODO: default icon??
- } // AbstractAction()
-
- /**
- * Constructor AbstractAction
- * @param name TODO
- * @param icon TODO
- */
- public AbstractAction(String name, Icon icon) {
- putValue(NAME, name);
- putValue(SMALL_ICON, icon);
- } // AbstractAction()
-
- /**
- * readObject
- * @param stream TODO
- * @exception ClassNotFoundException TODO
- * @exception IOException TODO
- */
- private void readObject(ObjectInputStream stream)
- throws ClassNotFoundException, IOException {
- // TODO
- } // readObject()
-
- /**
- * writeObject
- * @param stream TODO
- * @exception IOException TODO
- */
- private void writeObject(ObjectOutputStream stream) throws IOException {
- // TODO
- } // writeObject()
-
- /**
- * clone
- * @exception CloneNotSupportedException TODO
- * @returns Object
- */
- protected Object clone() throws CloneNotSupportedException {
- // What to do??
- return null;
- } // clone()
-
- /**
- * getValue
- * @param key TODO
- * @returns Object
- */
- public Object getValue(String key) {
- return store.get(key);
- } // getValue()
-
- /**
- * putValue
- * @param key TODO
- * @param value TODO
- */
- public void putValue(String key, Object value) {
- store.put(key, value);
- } // putValue()
-
- /**
- * isEnabled
- * @returns boolean
- */
- public boolean isEnabled() {
- return enabled;
- } // isEnabled()
-
- /**
- * setEnabled
- * @param enabled TODO
- */
- public void setEnabled(boolean enabled) {
- this.enabled = enabled;
- } // setEnabled()
-
- /**
- * getKeys
- * @returns Object[]
- */
- public Object[] getKeys() {
- return store.keySet().toArray();
- } // getKeys()
+ /**
+ * enabled
+ */
+ protected boolean enabled = true;
+
+ /**
+ * changeSupport
+ */
+ protected SwingPropertyChangeSupport changeSupport =
+ new SwingPropertyChangeSupport(this);
+
+ /**
+ * store
+ */
+ private transient HashMap store = new HashMap();
+
+ /**
+ * Constructor AbstractAction
+ */
+ public AbstractAction()
+ {
+ this(""); // TODO: default name
+ }
+
+ /**
+ * Constructor AbstractAction
+ *
+ * @param name TODO
+ */
+ public AbstractAction(String name)
+ {
+ this(name, null); // TODO: default icon??
+ }
+
+ /**
+ * Constructor AbstractAction
+ *
+ * @param name TODO
+ * @param icon TODO
+ */
+ public AbstractAction(String name, Icon icon)
+ {
+ putValue(NAME, name);
+ putValue(SMALL_ICON, icon);
+ }
+
+ /**
+ * readObject
+ *
+ * @param stream the stream to read from
+ *
+ * @exception ClassNotFoundException TODO
+ * @exception IOException if an error occurs
+ */
+ private void readObject(ObjectInputStream stream)
+ throws ClassNotFoundException, IOException
+ {
+ // TODO
+ }
+
+ /**
+ * writeObject
+ *
+ * @param stream the stream to write to
+ *
+ * @exception IOException if an error occurs
+ */
+ private void writeObject(ObjectOutputStream stream) throws IOException
+ {
+ // TODO
+ }
+
+ /**
+ * clone
+ *
+ * @return Object
+ *
+ * @exception CloneNotSupportedException TODO
+ */
+ protected Object clone() throws CloneNotSupportedException
+ {
+ AbstractAction copy = (AbstractAction) super.clone();
+ copy.store = (HashMap) store.clone();
+ return copy;
+ }
+
+ /**
+ * Returns a value for a given key from the built-in store.
+ *
+ * @param key the key to get the value for
+ *
+ * @return Object
+ */
+ public Object getValue(String key)
+ {
+ return store.get(key);
+ }
+
+ /**
+ * Puts a key/value pair into the built-in store.
+ *
+ * @param key the key
+ * @param value the value
+ */
+ public void putValue(String key, Object value)
+ {
+ store.put(key, value);
+ }
+
+ /**
+ * isEnabled
+ *
+ * @return boolean
+ */
+ public boolean isEnabled()
+ {
+ return enabled;
+ }
+
+ /**
+ * setEnabled
+ *
+ * @param enabled TODO
+ */
+ public void setEnabled(boolean enabled)
+ {
+ this.enabled = enabled;
+ }
+
+ /**
+ * getKeys
+ * @returns Object[]
+ */
+ public Object[] getKeys()
+ {
+ return store.keySet().toArray();
+ }
/**
* firePropertyChange