452 |
/** |
/** |
453 |
* Add a client property <code>value</code> to this component, associated |
* Add a client property <code>value</code> to this component, associated |
454 |
* with <code>key</code>. If there is an existing client property |
* with <code>key</code>. If there is an existing client property |
455 |
* associated with <code>key</code>, it will be replaced. |
* associated with <code>key</code>, it will be replaced. A |
456 |
|
* {@link PropertyChangeEvent} is sent to registered listeners (with the |
457 |
|
* name of the property being <code>key.toString()</code>). |
458 |
* |
* |
459 |
* @param key The key of the client property association to add |
* @param key The key of the client property association to add |
460 |
* @param value The value of the client property association to add |
* @param value The value of the client property association to add |
465 |
*/ |
*/ |
466 |
public final void putClientProperty(Object key, Object value) |
public final void putClientProperty(Object key, Object value) |
467 |
{ |
{ |
468 |
|
Hashtable t = getClientProperties(); |
469 |
|
Object old = t.get(key); |
470 |
if (value != null) |
if (value != null) |
471 |
getClientProperties().put(key, value); |
t.put(key, value); |
472 |
else |
else |
473 |
getClientProperties().remove(key); |
t.remove(key); |
474 |
|
firePropertyChange(key.toString(), old, value); |
475 |
} |
} |
476 |
|
|
477 |
/** |
/** |