samples.javaclient.analyzer
Class ToolbarFormatListener

java.lang.Object
  extended bysamples.javaclient.analyzer.ToolbarFormatListener
All Implemented Interfaces:
java.util.EventListener, java.beans.PropertyChangeListener

public class ToolbarFormatListener
extends java.lang.Object
implements java.beans.PropertyChangeListener

The purpose of this listener is to help track when a worksheet is dirty. It listens to any changes in format to a worksheet when performed through the Analyzer toolbar. On a related note, the Worksheet class itself tracks any changes made to the worksheet's query. In addition, changes made by the customizer are tracked by the Analyzer main class


Field Summary
private  Analyzer m_analyzer
           
private  java.lang.String validProperties
           
 
Constructor Summary
ToolbarFormatListener(Analyzer analyzer)
          Create a toolbar format listener.
 
Method Summary
private  boolean isValidEvent(java.beans.PropertyChangeEvent evt)
          Looks at the PropertyChangedEvent and determines if this event should cause the worksheet to be marked as dirty.
 void propertyChange(java.beans.PropertyChangeEvent evt)
          A toolbar format change was made to the worksheet.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

m_analyzer

private Analyzer m_analyzer

validProperties

private java.lang.String validProperties
Constructor Detail

ToolbarFormatListener

public ToolbarFormatListener(Analyzer analyzer)
Create a toolbar format listener.

Parameters:
analyzer - A reference to the main Analyzer application instance
Method Detail

propertyChange

public void propertyChange(java.beans.PropertyChangeEvent evt)
A toolbar format change was made to the worksheet. Set the active worksheet to dirty.

Specified by:
propertyChange in interface java.beans.PropertyChangeListener

isValidEvent

private boolean isValidEvent(java.beans.PropertyChangeEvent evt)
Looks at the PropertyChangedEvent and determines if this event should cause the worksheet to be marked as dirty. A list of valid property changes is listed in validProperties member variable