Commit f1184d57 by Michael Koch Committed by Michael Koch

AbstractAction.java: Reformated.

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

	* javax/swing/AbstractAction.java: Reformated.

From-SVN: r76424
parent f0bf056e
2004-01-23 Michael Koch <konqueror@gmx.de> 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: * java/text/CollationElementIterator.java:
(setText): New method. (setText): New method.
......
...@@ -56,118 +56,143 @@ public abstract class AbstractAction ...@@ -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 /**
* @param name TODO * Constructor AbstractAction
*/ *
public AbstractAction(String name) { * @param name TODO
this(name, null); // TODO: default icon?? */
} // AbstractAction() public AbstractAction(String name)
{
/** this(name, null); // TODO: default icon??
* Constructor AbstractAction }
* @param name TODO
* @param icon TODO /**
*/ * Constructor AbstractAction
public AbstractAction(String name, Icon icon) { *
putValue(NAME, name); * @param name TODO
putValue(SMALL_ICON, icon); * @param icon TODO
} // AbstractAction() */
public AbstractAction(String name, Icon icon)
/** {
* readObject putValue(NAME, name);
* @param stream TODO putValue(SMALL_ICON, icon);
* @exception ClassNotFoundException TODO }
* @exception IOException TODO
*/ /**
private void readObject(ObjectInputStream stream) * readObject
throws ClassNotFoundException, IOException { *
// TODO * @param stream the stream to read from
} // readObject() *
* @exception ClassNotFoundException TODO
/** * @exception IOException if an error occurs
* writeObject */
* @param stream TODO private void readObject(ObjectInputStream stream)
* @exception IOException TODO throws ClassNotFoundException, IOException
*/ {
private void writeObject(ObjectOutputStream stream) throws IOException { // TODO
// TODO }
} // writeObject()
/**
/** * writeObject
* clone *
* @exception CloneNotSupportedException TODO * @param stream the stream to write to
* @returns Object *
*/ * @exception IOException if an error occurs
protected Object clone() throws CloneNotSupportedException { */
// What to do?? private void writeObject(ObjectOutputStream stream) throws IOException
return null; {
} // clone() // TODO
}
/**
* getValue /**
* @param key TODO * clone
* @returns Object *
*/ * @return Object
public Object getValue(String key) { *
return store.get(key); * @exception CloneNotSupportedException TODO
} // getValue() */
protected Object clone() throws CloneNotSupportedException
/** {
* putValue AbstractAction copy = (AbstractAction) super.clone();
* @param key TODO copy.store = (HashMap) store.clone();
* @param value TODO return copy;
*/ }
public void putValue(String key, Object value) {
store.put(key, value); /**
} // putValue() * Returns a value for a given key from the built-in store.
*
/** * @param key the key to get the value for
* isEnabled *
* @returns boolean * @return Object
*/ */
public boolean isEnabled() { public Object getValue(String key)
return enabled; {
} // isEnabled() return store.get(key);
}
/**
* setEnabled /**
* @param enabled TODO * Puts a key/value pair into the built-in store.
*/ *
public void setEnabled(boolean enabled) { * @param key the key
this.enabled = enabled; * @param value the value
} // setEnabled() */
public void putValue(String key, Object value)
/** {
* getKeys store.put(key, value);
* @returns Object[] }
*/
public Object[] getKeys() { /**
return store.keySet().toArray(); * isEnabled
} // getKeys() *
* @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 * firePropertyChange
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment