edu.psu.geovista.app.parvis.model
Interface ParallelSpaceModel

All Known Implementing Classes:
SimpleParallelSpaceModel

public interface ParallelSpaceModel

Defines the data model for Parallel Coordinate visualisation. The model is defined as read-only because the source of the data is not known and currently no data modification operations are provided. An optional writeback interface might be developed in the future.

Version:
0.1
Author:
flo

Method Summary
 void addChangeListener(javax.swing.event.ChangeListener l)
          Subscribes a ChangeListener with the model.
 java.lang.String getAxisLabel(int dimension)
          Returns a String label for a specific dimension.
 float getMaxValue(int dimension)
          Returns the maximum value for the given dimension.
 float getMinValue(int dimension)
          Returns the minimum value for the given dimension.
 int getNumDimensions()
          Returns the number of dimensions (=columns) of the dataset.
 int getNumRecords()
          Returns the number of records in the dataset.
 java.lang.String getRecordLabel(int num)
          Returns a human-readable label for a specific record.
 float getValue(int record, int dimension)
          Returns a specific value of the dataset.
 java.lang.String getValueLabel(int dimension, float value)
          Returns the label for a single value in a specific dimension, if present.
 java.util.Hashtable getValueLabels(int dimension)
          Returns a Hashtable with labels for specific values.
 float[] getValues(int record)
          Returns all values of a specific record.
 void removeChangeListener(javax.swing.event.ChangeListener l)
          Removes a previously subscribed changeListener.
 

Method Detail

addChangeListener

public void addChangeListener(javax.swing.event.ChangeListener l)
Subscribes a ChangeListener with the model.

Parameters:
l - The ChangeListener to be notified when values change.

removeChangeListener

public void removeChangeListener(javax.swing.event.ChangeListener l)
Removes a previously subscribed changeListener.

Parameters:
l - The ChangeListener to be removed from the model.

getNumDimensions

public int getNumDimensions()
Returns the number of dimensions (=columns) of the dataset.

Returns:
Number of dimensions of the data.

getNumRecords

public int getNumRecords()
Returns the number of records in the dataset.

Returns:
Number of records in the dataset.

getMaxValue

public float getMaxValue(int dimension)
Returns the maximum value for the given dimension.

Returns:
Maximum value of all records for the given dimension.

getMinValue

public float getMinValue(int dimension)
Returns the minimum value for the given dimension.

Returns:
Minimum value of all records for the given dimension.

getValue

public float getValue(int record,
                      int dimension)
Returns a specific value of the dataset.

Parameters:
record - The number of the record to be queried.
dimension - The value of the record to be returned.
Returns:
The value specified by record, dimension.

getValues

public float[] getValues(int record)
Returns all values of a specific record.

Parameters:
record - The number of the record to be returned.
Returns:
All values of the specified record..

getAxisLabel

public java.lang.String getAxisLabel(int dimension)
Returns a String label for a specific dimension.

Parameters:
dimension - The dimension.
Returns:
A Human-readable label for the dimension.

getValueLabels

public java.util.Hashtable getValueLabels(int dimension)
Returns a Hashtable with labels for specific values. This is provided for ordinal values, which might be added as keys to the Hashtable, with the corresponding human-readable labels as values.

Parameters:
dimension - The dimension to retrieve value labels for.
Returns:
A Hashtable containing value-label pairs.

getValueLabel

public java.lang.String getValueLabel(int dimension,
                                      float value)
Returns the label for a single value in a specific dimension, if present.

Parameters:
dimension - The dimension.
value - The value to look up a label for.
Returns:
A String with the label, null if no label is set.

getRecordLabel

public java.lang.String getRecordLabel(int num)
Returns a human-readable label for a specific record.

Parameters:
num - The record number.


Copyright © 1996-2003 GeoVista Center. All Rights Reserved.