ucar.unidata.collab
Class PropertiedThing

java.lang.Object
  extended by ucar.unidata.collab.SharableImpl
      extended by ucar.unidata.collab.PropertiedThing
All Implemented Interfaces:
PropertyChangeListener, EventListener, Sharable
Direct Known Subclasses:
ChartAnnotation, ComponentHolder, DisplayComponent

public abstract class PropertiedThing
extends SharableImpl
implements PropertyChangeListener

This abstract class handles showing a properties dialog and manages a set of property change listeners.

Version:
$Revision: 1.1 $
Author:
IDV Development Team

Field Summary
protected  JDialog propertiesDialog
          properties
 
Constructor Summary
PropertiedThing()
          Default ctro
 
Method Summary
 void addPropertyChangeListener(PropertyChangeListener listener)
          Adds a PropertyChangeListener to this instance.
protected  boolean applyProperties()
          Apply properties
protected  boolean doApplyProperties()
          Apply the properties
 void firePropertyChange(PropertyChangeEvent event)
          Fires a PropertyChangeEvent.
 void firePropertyChange(String propertyName, Object oldValue, Object newValue)
          Fires a PropertyChangeEvent.
protected  void getPropertiesComponents(List comps, int tabIdx)
          Make the properties gui
protected  PropertyChangeSupport getPropertyListeners()
          Returns the PropertyChangeListener-s of this instance.
 String[] getPropertyTabs()
          return the array of tab names for the proeprties dialog
 boolean isShowing()
          _more_
 void propertyChange(PropertyChangeEvent event)
          Handle the property change event
 void removePropertyChangeListener(PropertyChangeListener listener)
          Removes a PropertyChangeListener from this instance.
 boolean showProperties()
          Show the properties dialog
 boolean showProperties(JComponent where, int x, int y)
          _more_
 
Methods inherited from class ucar.unidata.collab.SharableImpl
applySharableProperties, doShare, doShare, doShareExternal, doShareInternal, getReceiveShareTime, getSharablePropertiesComponent, getShareGroup, getSharing, getUniqueId, initSharable, receiveShareData, removeSharable, setReceiveShareTime, setShareGroup, setSharing, setUniqueId, showSharableDialog
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

propertiesDialog

protected JDialog propertiesDialog
properties

Constructor Detail

PropertiedThing

public PropertiedThing()
Default ctro

Method Detail

propertyChange

public void propertyChange(PropertyChangeEvent event)
Handle the property change event

Specified by:
propertyChange in interface PropertyChangeListener
Parameters:
event - The event

firePropertyChange

public void firePropertyChange(PropertyChangeEvent event)
Fires a PropertyChangeEvent.

Parameters:
event - The PropertyChangeEvent.

firePropertyChange

public void firePropertyChange(String propertyName,
                               Object oldValue,
                               Object newValue)
Fires a PropertyChangeEvent.

Parameters:
propertyName - The name of the property.
oldValue - The old value of the property.
newValue - The new value of the property.

removePropertyChangeListener

public void removePropertyChangeListener(PropertyChangeListener listener)
Removes a PropertyChangeListener from this instance.

Parameters:
listener - The PropertyChangeListener to be removed.

getPropertyListeners

protected PropertyChangeSupport getPropertyListeners()
Returns the PropertyChangeListener-s of this instance.

Returns:
The PropertyChangeListener-s.

addPropertyChangeListener

public void addPropertyChangeListener(PropertyChangeListener listener)
Adds a PropertyChangeListener to this instance.

Parameters:
listener - The PropertyChangeListener to be added.

getPropertiesComponents

protected void getPropertiesComponents(List comps,
                                       int tabIdx)
Make the properties gui

Parameters:
comps - List of components
tabIdx - Which tab in the gui

getPropertyTabs

public String[] getPropertyTabs()
return the array of tab names for the proeprties dialog

Returns:
array of tab names

showProperties

public boolean showProperties()
Show the properties dialog

Returns:
Success

showProperties

public boolean showProperties(JComponent where,
                              int x,
                              int y)
_more_

Parameters:
where - _more_
x - _more_
y - _more_
Returns:
_more_

isShowing

public boolean isShowing()
_more_

Returns:
_more_

applyProperties

protected boolean applyProperties()
Apply properties

Returns:
Was successful

doApplyProperties

protected boolean doApplyProperties()
Apply the properties

Returns:
Was ok