|
JIDE 3.5.15 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.jidesoft.dashboard.AbstractGadget
public abstract class AbstractGadget
AbstractGadget
is the abstract implementation of Gadget
which implements all methods except
Gadget.createGadgetComponent()
and Gadget.disposeGadgetComponent(GadgetComponent)
.
Field Summary | |
---|---|
static String |
PROPERTY_DESCRIPTION
|
static String |
PROPERTY_GADGET_MANAGER
|
static String |
PROPERTY_ICON
|
static String |
PROPERTY_KEY
|
static String |
PROPERTY_LARGE_ICON
|
static String |
PROPERTY_NAME
|
Constructor Summary | |
---|---|
AbstractGadget(String key)
|
|
AbstractGadget(String key,
Icon icon)
|
|
AbstractGadget(String key,
Icon icon,
Icon largeIcon)
|
Method Summary | |
---|---|
void |
addPropertyChangeListener(PropertyChangeListener listener)
Adds a PropertyChangeListener to the listener list. |
void |
addPropertyChangeListener(String propertyName,
PropertyChangeListener listener)
Adds a PropertyChangeListener to the listener list for a specific property. |
protected void |
firePropertyChange(String propertyName,
boolean oldValue,
boolean newValue)
Support for reporting bound property changes for boolean properties. |
protected void |
firePropertyChange(String propertyName,
int oldValue,
int newValue)
Support for reporting bound property changes for integer properties. |
protected void |
firePropertyChange(String propertyName,
Object oldValue,
Object newValue)
Support for reporting bound property changes for Object properties. |
String |
getDescription()
Returns the description of the Gadget . |
GadgetManager |
getGadgetManager()
Gets the gadget manager. |
Icon |
getIcon()
Gets the icon. |
String |
getKey()
Returns the key of the Gadget . |
Icon |
getLargeIcon()
Gets the large icon. |
String |
getName()
Returns the name of the Gadget . |
PropertyChangeListener[] |
getPropertyChangeListeners()
Returns an array of all the property change listeners registered on this component. |
PropertyChangeListener[] |
getPropertyChangeListeners(String propertyName)
Returns an array of all the listeners which have been associated with the named property. |
void |
removePropertyChangeListener(PropertyChangeListener listener)
Removes a PropertyChangeListener from the listener list. |
void |
removePropertyChangeListener(String propertyName,
PropertyChangeListener listener)
Removes a PropertyChangeListener from the listener list for a specific property. |
void |
setDescription(String description)
Sets the description of the Gadget . |
void |
setGadgetManager(GadgetManager gadgetManager)
Sets the gadget manager that manages this gadget. |
void |
setIcon(Icon icon)
Sets the icon. |
void |
setLargeIcon(Icon largeIcon)
Sets the large icon. |
void |
setName(String name)
Sets the name of the Gadget . |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.jidesoft.dashboard.Gadget |
---|
createGadgetComponent, disposeGadgetComponent |
Field Detail |
---|
public static final String PROPERTY_KEY
public static final String PROPERTY_NAME
public static final String PROPERTY_DESCRIPTION
public static final String PROPERTY_LARGE_ICON
public static final String PROPERTY_ICON
public static final String PROPERTY_GADGET_MANAGER
Constructor Detail |
---|
public AbstractGadget(String key)
public AbstractGadget(String key, Icon icon)
public AbstractGadget(String key, Icon icon, Icon largeIcon)
Method Detail |
---|
public String getKey()
Gadget
. The key is used to uniquely identify a Gadget in one GadgetManager.
The key is not displayed anywhere in the user interface so it is OK to be a non-localized string. The strings for
the name should be localized although if you never set the name, the key will be used as the name.
getKey
in interface Gadget
String
containing this Gadget's keypublic String getName()
Gadget
. The name is displayed on the title bar of the Gadget if any. If the
name
is never set, the key will be used.
getName
in interface Gadget
public void setName(String name)
Gadget
. The name is displayed on the title bar of the Gadget if any. If the
name
is never set, the key will be used.
This setter will fire PROPERTY_NAME property change event.
name
- the new namepublic String getDescription()
Gadget
. Description is used in the GadgetPalette
to give
user an idea of what the gadget is.
getDescription
in interface Gadget
public void setDescription(String description)
Gadget
. The description is displayed on the title bar of the Gadget if
any.
This setter will fire PROPERTY_DESCRIPTION property change event.
description
- the new descriptionpublic Icon getLargeIcon()
GadgetPalette
to represent a gadget. You can specify
two icons for each gadget. This is the larger one of the two. We didn't specify the exact size of this icon. But
all gadgets' icon should have the same size to look good on the palette.
getLargeIcon
in interface Gadget
public void setLargeIcon(Icon largeIcon)
GadgetPalette
to represent a gadget. You can specify
two icons for each gadget. This is the larger one of the two. We didn't specify the exact size of this icon. But
all gadgets' icon should have the same size to look good on the palette.
largeIcon
- the large icon.public Icon getIcon()
getIcon
in interface Gadget
public void setIcon(Icon icon)
icon
- the icon.public void setGadgetManager(GadgetManager gadgetManager)
Gadget
to a
GadgetManager
which will call this method indirectly.
setGadgetManager
in interface Gadget
gadgetManager
- the gadget manager.public GadgetManager getGadgetManager()
getGadgetManager
in interface Gadget
public void addPropertyChangeListener(PropertyChangeListener listener)
listener
- the PropertyChangeListener to be addedremovePropertyChangeListener(java.beans.PropertyChangeListener)
,
getPropertyChangeListeners()
,
addPropertyChangeListener(String,java.beans.PropertyChangeListener)
public void removePropertyChangeListener(PropertyChangeListener listener)
listener
- the PropertyChangeListener to be removedaddPropertyChangeListener(java.beans.PropertyChangeListener)
,
getPropertyChangeListeners()
,
removePropertyChangeListener(String,java.beans.PropertyChangeListener)
public PropertyChangeListener[] getPropertyChangeListeners()
PropertyChangeListener
s or an empty array if no property change
listeners are currently registeredaddPropertyChangeListener(java.beans.PropertyChangeListener)
,
removePropertyChangeListener(java.beans.PropertyChangeListener)
,
getPropertyChangeListeners(String)
,
PropertyChangeSupport.getPropertyChangeListeners()
public void addPropertyChangeListener(String propertyName, PropertyChangeListener listener)
propertyName
- one of the property names listed abovelistener
- the PropertyChangeListener to be addedremovePropertyChangeListener(String,java.beans.PropertyChangeListener)
,
getPropertyChangeListeners(String)
,
addPropertyChangeListener(String,java.beans.PropertyChangeListener)
public void removePropertyChangeListener(String propertyName, PropertyChangeListener listener)
propertyName
- a valid property namelistener
- the PropertyChangeListener to be removedaddPropertyChangeListener(String,java.beans.PropertyChangeListener)
,
getPropertyChangeListeners(String)
,
removePropertyChangeListener(java.beans.PropertyChangeListener)
public PropertyChangeListener[] getPropertyChangeListeners(String propertyName)
propertyName
- the property name.
PropertyChangeListeners
associated with the named property or an empty array if
no listeners have been addedaddPropertyChangeListener(String,java.beans.PropertyChangeListener)
,
removePropertyChangeListener(String,java.beans.PropertyChangeListener)
,
getPropertyChangeListeners()
protected void firePropertyChange(String propertyName, Object oldValue, Object newValue)
propertyName
- the property whose value has changedoldValue
- the property's previous valuenewValue
- the property's new valueprotected void firePropertyChange(String propertyName, boolean oldValue, boolean newValue)
propertyName
- the property whose value has changedoldValue
- the property's previous valuenewValue
- the property's new valueprotected void firePropertyChange(String propertyName, int oldValue, int newValue)
propertyName
- the property whose value has changedoldValue
- the property's previous valuenewValue
- the property's new value
|
JIDE 3.5.15 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |