All Downloads are FREE. Search and download functionalities are using the official Maven repository.

eu.hansolo.steelseries.tools.DataModel Maven / Gradle / Ivy

Go to download

The SteelSeries is a javabeans component library that contains gauges. You will find linear and radial gauges. In addition you will also find digital displays, indicators from cars and some instruments from airplanes and sailboats.

There is a newer version: 3.9.30
Show newest version
package eu.hansolo.steelseries.tools;

/**
 *
 * @author Gerrit Grunwald 
 */
public interface DataModel 
{
    /**
     * Returns the minimum acceptable value.
     * @return the value of the minimum property     
     */
    double getMinValue();
    
    /**
     * Sets the model's minimum to MIN_VALUE. 
     * The values of the model may change as well, to
     * ensure that the model is valid.     
     * Notifies any listener if the model changes.     
     * @param MIN_VALUE the model's new minimum
     */
    void setMinValue(final double MIN_VALUE);
    
    /**
     * Returns the maximum acceptable value.
     * @return the value of the maximum property
     */
    double getMaxValue();
    
    /**
     * Sets the model's minimum to MAX_VALUE. 
     * The values of the model may change as well, to
     * ensure that the model is valid.     
     * Notifies any listener if the model changes.     
     * @param MAX_VALUE the model's new minimum
     */
    void setMaxValue(final double MAX_VALUE);
    
    /**
     * Returns the range of of the model which is
     * calculated my maxValue - minValue
     * @return the value of the range property
     */
    double getRange();    
    
    /**
     * Set's the model's range defined by MIN_VALUE and
     * MAX_VALUE. The values of the model may change as well,
     * to ensure that the model is valid.
     * Notifies any listener if the model changes.
     * @param MIN_VALUE the model's new minimum
     * @param MAX_VALUE the model's new maximum
     */
    void setRange(final double MIN_VALUE, final double MAX_VALUE);
    
    /**
     * Returns the model's value
     * @return the value of the value property
     */
    double getValue();
    
    /**
     * Set's the model's value
     * The values of the model may change as well,
     * to ensure that the model is valid.
     * @param VALUE the model's new value
     */
    void setValue(final double VALUE);
    
    /**
     * Return's the former value of the model
     * @return the value of the oldValue property
     */
    double getOldValue();
    
    /**
     * Return's the peak value of the model which
     * is only used in the radial bargraphs to visualize
     * the last measured value.
     * @return the value of the peakValue property
     */
    double getPeakValue();
    
    /**
     * Set's the model's peak value
     * @param PEAK_VALUE the model's new peakValue
     */
    void setPeakValue(final double PEAK_VALUE);
    
    /**
     * Returns the state of the model's autoResetToZero property.
     * If true the pointer will return to zero after it reaches
     * the given value.
     * @return the value of the autoReturnToZero property
     */
    boolean isAutoResetToZero();
    
    /**
     * Set's the model's autoResetToZero property
     * @param AUTO_RESET_TO_ZERO the model's new state of the autoResetToZero property
     */
    void setAutoResetToZero(final boolean AUTO_RESET_TO_ZERO);
    
    /**
     * Returns the model's threshold property. The threshold could be
     * visualized by an indicator and also the led will start blinking
     * if the current value is bigger than the threshold
     * @return the value of the threshold property
     */
    double getThreshold();
    
    /**
     * Set's the model's threshold property.
     * @param THRESHOLD the model's new threshold property
     */
    void setThreshold(final double THRESHOLD);
    
    /**
     * Returns the model's minMeasuredValue property. The minMeasuredValue
     * property represents the smallest value that was measured so far.
     * @return the value of the minMeasuredValue property
     */
    double getMinMeasuredValue();
    
    /**
     * Set's the model's minMeasuredValue property
     * @param MIN_MEASURED_VALUE the model's new minMeasuredValue
     */
    void setMinMeasuredValue(final double MIN_MEASURED_VALUE);
    
    /**
     * Reset's the model's minMeasuredValue property to the current value
     */
    void resetMinMeasuredValue();
    
    /**
     * Reset's the model's minMeasuredValue property to the given MIN_MEASURED_VALUE
     * @param MIN_MEASURED_VALUE the model's minMeasuredValue defined by the given MIN_MEASURED_VALUE
     */
    void resetMinMeasuredValue(final double MIN_MEASURED_VALUE);
    
    /**
     * Returns the model's maxMeasuredValue property
     * @return the value of the maxMeasuredValue property
     */
    double getMaxMeasuredValue();
    
    /**
     * Set's the model's maxMeasuredValue property. The maxMeasuredValue
     * property represents the highest value that was measured so far.
     * @param MAX_MEASURED_VALUE the model's new maxMeasuredValue
     */
    void setMaxMeasuredValue(final double MAX_MEASURED_VALUE);
    
    /**
     * Reset's the model's maxMeasuredValue property to the current value
     */
    void resetMaxMeasuredValue();
    
    /**
     * Reset's the model's maxMeasuredValue property to the given MAX_MEASURED_VALUE
     * @param MAX_MEASURED_VALUE the model's maxMeasuredValue defined by the given MAX_MEASURED_VALUE
     */
    void resetMaxMeasuredValue(final double MAX_MEASURED_VALUE);
    
    /**
     * Returns the model's trackStart property. The track is defined by three
     * values, the trackStart, the trackSection and the trackStop value.
     * Each value could also have it's own value. The different to the section
     * property is that the track colors will be visualized by a gradient where
     * the section will be visualized by separate sections with their colors.
     * @return the value of the trackStart property
     */
    double getTrackStart();
    
    /**
     * Set's the model's trackStart property
     * @param TRACK_START the model's new trackStart
     */
    void setTrackStart(final double TRACK_START);
    
    /**
     * Returns the model's trackSection property. The track is defined by three
     * values, the trackStart, the trackSection and the trackStop value.
     * Each value could also have it's own value. The different to the section
     * property is that the track colors will be visualized by a gradient where
     * the section will be visualized by separate sections with their colors.
     * @return the value of the trackSection property
     */
    double getTrackSection();
    
    /**
     * Set's the model's trackSection property
     * @param TRACK_SECTION the model's new trackSection value
     */
    void setTrackSection(final double TRACK_SECTION);
    
    /**
     * Returns the model's trackStop property. The track is defined by three
     * values, the trackStart, the trackSection and the trackStop value.
     * Each value could also have it's own value. The different to the section
     * property is that the track colors will be visualized by a gradient where
     * the section will be visualized by separate sections with their colors.
     * @return the value of the trackStop property
     */
    double getTrackStop();
    
    /**
     * Set's the model's trackStop property
     * @param TRACK_STOP the model's new trackStop value
     */
    void setTrackStop(final double TRACK_STOP);
    
    /**
     * Return a list of all sections of the model. The sections are somewhat
     * similiar to the track except that there could be more than three sections
     * and each section has it's own color.
     * @return the list of all defined sections in the model
     */
    java.util.ArrayList getSections();
    
    /**
     * Set's the model's sections. Every element of the SECTIONS_ARRAY will be
     * added as a new Section to the list of sections which means it's a deep copy of
     * the array.
     * @param SECTIONS_ARRAY the model's new sections
     */
    void setSections(final eu.hansolo.steelseries.tools.Section... SECTIONS_ARRAY);
    
    /**
     * Add the given section to the list of sections of the model
     * @param SECTION
     */
    void addSection(final eu.hansolo.steelseries.tools.Section SECTION);
    
    /**
     * Reset's the model's list of sections by clearing the arraylist
     */
    void resetSections();
    
    /**
     * Returns the model's list of areas. The areas are very similar to
     * the sections except that they would be visualized by an area instead
     * of a ring.
     * @return the list of all defined areas of the model
     */
    java.util.ArrayList getAreas();
        
    /**
     * Set's the model's areas. Every element of the AREAS_ARRAY will be
     * added as a new Section to the list of areas which means it's a deep copy
     * of the array.
     * @param AREAS_ARRAY the model's new areas
     */
    void setAreas(final eu.hansolo.steelseries.tools.Section... AREAS_ARRAY);
    
    /**
     * Add the given area to the list of areas of the model
     * @param AREA
     */
    void addArea(final eu.hansolo.steelseries.tools.Section AREA);
    
    /**
     * Reset's the model's list of areas by clearing the arraylist
     */
    void resetAreas();
    
    /**
     * Return's the model's list of tickmarkSections. The tickmarkSections are sections
     * that define colors and ranges for the tickmark labels.     
     * @return the list of all defined tickmarkSections of the model
     */
    java.util.ArrayList getTickmarkSections();
    
    /**
     * Set's the model's tickmark sections.
     * @param TICKMARK_SECTIONS_ARRAY the models new tickmarkSections
     */
    void setTickmarkSections(final eu.hansolo.steelseries.tools.Section... TICKMARK_SECTIONS_ARRAY);
    
    /**
     * Add's the given tickmark section to the model's list of tickmarkSections
     * @param TICKMARK_SECTION 
     */
    void addTickmarkSection(final eu.hansolo.steelseries.tools.Section TICKMARK_SECTION);
    
    /**
     * Reset's the model's list of tickmarkSections by clearing the arraylist
     */
    void resetTickmarkSections();
    
    /**
     * Return's the model's gaugeType property.
     * @return the value of the model's gaugeType
     */
    eu.hansolo.steelseries.tools.GaugeType getGaugeType();
    
    /**
     * Set's the model's gaugeType property
     * @param GAUGE_TYPE the model's new gaugeType
     */
    void setGaugeType(final eu.hansolo.steelseries.tools.GaugeType GAUGE_TYPE);
    
    /**
     * Return's the model's freeAreaAngle property
     * @return the value of the model's freeAreaAngle
     */
    double getFreeAreaAngle();
            
    /**
     * Return's the model's angleStep property
     * @return the value of the model's angleStep
     */
    double getAngleStep();
    
    /**
     * Return's the model's rotationOffset property
     * @return the value of the model's rotationOffset
     */
    double getRotationOffset();
    
    /**
     * Return's the model's tickmarkOffset property
     * @return the value of the model's tickmarkOffset
     */
    double getTickmarkOffset();
    
    /**
     * Validates all variables of the model that depends on modifications
     * of the minValue and maxValue property.
     */
    void validate();
    
    /**
     * Resets the model
     */
    void reset();
    
    /**
     * Add's the given listener to the list of listeners
     * @param LISTENER
     */
    void addChangeListener(final javax.swing.event.ChangeListener LISTENER);
    
    /**
     * Removes the given listener from the list of listeners
     * @param LISTENER
     */
    void removeChangeListener(final javax.swing.event.ChangeListener LISTENER);
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy