/*
This file is part of the software framework JStatCom,
a library for building applications for data based analysis.
Copyright (C) 2000-2005 Markus Kraetzig
This library is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
published by the Free Software Foundation; either version 2.1 of the
License, or (at your option) any later version.
This library is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
USA
*/
package com.jstatcom.model;
/**
* This enumeration contains all existing JSCDataEvent types,
* that a JSCDataListener can be registered to.
* If new data types are to be added, this class needs to be extended.
*
* Usage Note:
* The events that are fired by the JSCData objects are intended
* for internal communication only. Events do not occur in the EventDispatchingThread.
* Clients should rather listen to changes in JSCSymbol objects, especially
* if GUI related actions are performed.
*
* @author Markus Kraetzig
*/
public class JSCDataEventTypes {
private final String name;
/**
* Fired if the respective JSCData changed empty state.
*/
public static final JSCDataEventTypes EMPTY_STATE =
new JSCDataEventTypes("EMPTY_STATE");
/**
* Fired if the respective JSCData has changed.
*/
public static final JSCDataEventTypes VALUE_CHANGED =
new JSCDataEventTypes("VALUE_CHANGED");
/**
* JSCDataEventTypes constructor.
*/
protected JSCDataEventTypes(String name) {
this.name = name;
}
/**
* Override prevention method to enforce
* a.equals(b) if and only if a==b.
*
* @param o object to compare with
* @return true if equal, false otherwise
*/
public final boolean equals(Object o) {
return super.equals(o);
}
/**
* Gets a new JSCDataEventTypes array with all
* elements of this enumeration.
*
* @return JSCDataEventTypes[] array containing all types
*/
public static JSCDataEventTypes[] getTypes() {
return new JSCDataEventTypes[] { EMPTY_STATE, VALUE_CHANGED };
}
/**
* Override prevention method invokes super method.
*
* @return hash code
*/
public final int hashCode() {
return super.hashCode();
}
/**
* Gets string representation of this object.
*
* @return a string
*/
public final String toString() {
return name;
}
}
Ads help maintain this website.