AbstractAction.java: Reformated.

2004-01-23  Michael Koch  <konqueror@gmx.de>

	* javax/swing/AbstractAction.java: Reformated.

From-SVN: r76424
This commit is contained in:
Michael Koch 2004-01-23 15:19:28 +00:00 committed by Michael Koch
parent f0bf056e74
commit f1184d57e2
2 changed files with 128 additions and 99 deletions

View File

@ -1,3 +1,7 @@
2004-01-23 Michael Koch <konqueror@gmx.de>
* javax/swing/AbstractAction.java: Reformated.
2004-01-23 Michael Koch <konqueror@gmx.de> 2004-01-23 Michael Koch <konqueror@gmx.de>
* java/text/CollationElementIterator.java: * java/text/CollationElementIterator.java:

View File

@ -56,118 +56,143 @@ public abstract class AbstractAction
{ {
static final long serialVersionUID = -6803159439231523484L; static final long serialVersionUID = -6803159439231523484L;
/** /**
* enabled * enabled
*/ */
protected boolean enabled = true; protected boolean enabled = true;
/** /**
* changeSupport * changeSupport
*/ */
protected SwingPropertyChangeSupport changeSupport = protected SwingPropertyChangeSupport changeSupport =
new SwingPropertyChangeSupport(this); new SwingPropertyChangeSupport(this);
/** /**
* store * store
*/ */
private transient HashMap store = new HashMap(); private transient HashMap store = new HashMap();
/** /**
* Constructor AbstractAction * Constructor AbstractAction
*/ */
public AbstractAction() { public AbstractAction()
this(""); // TODO: default name {
} // AbstractAction() this(""); // TODO: default name
}
/** /**
* Constructor AbstractAction * Constructor AbstractAction
* @param name TODO *
*/ * @param name TODO
public AbstractAction(String name) { */
this(name, null); // TODO: default icon?? public AbstractAction(String name)
} // AbstractAction() {
this(name, null); // TODO: default icon??
}
/** /**
* Constructor AbstractAction * Constructor AbstractAction
* @param name TODO *
* @param icon TODO * @param name TODO
*/ * @param icon TODO
public AbstractAction(String name, Icon icon) { */
putValue(NAME, name); public AbstractAction(String name, Icon icon)
putValue(SMALL_ICON, icon); {
} // AbstractAction() putValue(NAME, name);
putValue(SMALL_ICON, icon);
}
/** /**
* readObject * readObject
* @param stream TODO *
* @exception ClassNotFoundException TODO * @param stream the stream to read from
* @exception IOException TODO *
*/ * @exception ClassNotFoundException TODO
private void readObject(ObjectInputStream stream) * @exception IOException if an error occurs
throws ClassNotFoundException, IOException { */
// TODO private void readObject(ObjectInputStream stream)
} // readObject() throws ClassNotFoundException, IOException
{
// TODO
}
/** /**
* writeObject * writeObject
* @param stream TODO *
* @exception IOException TODO * @param stream the stream to write to
*/ *
private void writeObject(ObjectOutputStream stream) throws IOException { * @exception IOException if an error occurs
// TODO */
} // writeObject() private void writeObject(ObjectOutputStream stream) throws IOException
{
// TODO
}
/** /**
* clone * clone
* @exception CloneNotSupportedException TODO *
* @returns Object * @return Object
*/ *
protected Object clone() throws CloneNotSupportedException { * @exception CloneNotSupportedException TODO
// What to do?? */
return null; protected Object clone() throws CloneNotSupportedException
} // clone() {
AbstractAction copy = (AbstractAction) super.clone();
copy.store = (HashMap) store.clone();
return copy;
}
/** /**
* getValue * Returns a value for a given key from the built-in store.
* @param key TODO *
* @returns Object * @param key the key to get the value for
*/ *
public Object getValue(String key) { * @return Object
return store.get(key); */
} // getValue() public Object getValue(String key)
{
return store.get(key);
}
/** /**
* putValue * Puts a key/value pair into the built-in store.
* @param key TODO *
* @param value TODO * @param key the key
*/ * @param value the value
public void putValue(String key, Object value) { */
store.put(key, value); public void putValue(String key, Object value)
} // putValue() {
store.put(key, value);
}
/** /**
* isEnabled * isEnabled
* @returns boolean *
*/ * @return boolean
public boolean isEnabled() { */
return enabled; public boolean isEnabled()
} // isEnabled() {
return enabled;
}
/** /**
* setEnabled * setEnabled
* @param enabled TODO *
*/ * @param enabled TODO
public void setEnabled(boolean enabled) { */
this.enabled = enabled; public void setEnabled(boolean enabled)
} // setEnabled() {
this.enabled = enabled;
}
/** /**
* getKeys * getKeys
* @returns Object[] * @returns Object[]
*/ */
public Object[] getKeys() { public Object[] getKeys()
return store.keySet().toArray(); {
} // getKeys() return store.keySet().toArray();
}
/** /**
* firePropertyChange * firePropertyChange