sonification.dataimport.visbards_resourcetoolkit.repository.category
Class PseudoLocation

java.lang.Object
  extended by sonification.dataimport.visbards_resourcetoolkit.repository.category.DefaultPseudoCategory
      extended by sonification.dataimport.visbards_resourcetoolkit.repository.category.PseudoLocation
All Implemented Interfaces:
CategoryPoolListener, DatasetContainerListener, RangeModelListener, SettingsHolder, Category, PseudoCategory, PseudoCategoryListener

public class PseudoLocation
extends DefaultPseudoCategory
implements RangeModelListener, CategoryPoolListener, DatasetContainerListener


Field Summary
protected  java.lang.String fName
           
protected  Range fOverallRange
           
protected  ColorPalette fPalette
           
protected  Range fRange
           
protected  CategoryType fType
           
 
Fields inherited from class sonification.dataimport.visbards_resourcetoolkit.repository.category.DefaultPseudoCategory
fParent
 
Fields inherited from interface sonification.dataimport.visbards_resourcetoolkit.model.RangeModelListener
ALL_CHANGED, OVERALL_RANGE_CHANGED, SELECTED_RANGE_CHANGED
 
Constructor Summary
PseudoLocation(Category parent, boolean presentational)
           
 
Method Summary
 void addListener(CategoryListener listener)
          Registers a listener to this instance.
 boolean canProject()
           
 void categoryAdded(CategoryPool source, Category cat)
          Indicates that a category has been added to the system.
 void categoryRemoved(CategoryPool source, Category cat)
          Indicates that a category has been removed from the system.
 void datasetAdded(DatasetContainer source, Dataset set)
          Indicates that a dataset has been added to the container.
 void datasetRemoved(DatasetContainer source, Dataset set)
          Indicates that a dataset has been removed from the container.
 void encompasingTimeRangesChanged(DatasetContainer source)
          Indicates that time ranges of some datasets have changed.
 boolean equals(java.lang.Object obj)
           
 ColorPalette getColorPalette()
          Returns the color palette for this category.
 java.lang.String getHolderID()
          Returns a string which identifies this object uniquely.
 java.lang.String getName()
          Returns the display name of this category.
 Range getOverallRange()
          Returns the overall data range for this category.
 Range getRange()
          Returns the data range for this category.
 double getReferencetime()
           
 float getScalar(Repository rep, int row)
          Computes a scalar for this pseudo-category using data from the specified repository for the specified row.
 double getScalarDouble(Repository rep, int row)
          Computes a scalar for this pseudo-category using data from the specified repository FOR the specified row.
 java.util.HashMap getSettings()
          Returns a hashmap of settings (strings) which represent the current object state, and are keyed by string names.
 CategoryType getType()
          Returns the type of this category.
 boolean getUserVsw()
           
 float getUserVswValue()
           
 float[] getVector(Repository rep, int row)
          Computes a vector for this pseudo-category using data from the specified repository for the specified row.
 boolean isHeliocentricScaling()
           
 boolean isPresentational()
          Returns true if category is presentational.
 boolean isProjecting()
           
 void rangeModelChanged(RangeModel source, int eventID)
          Indicates that the range model changed.
 void removeListener(CategoryListener listener)
          Unregisters a listener.
 void selectedGlyphChanged(DatasetContainer source, Dataset set)
          Indicates that selected glyph has changed in one of the attached datasets.
 void setColorPalette(ColorPalette pal)
          Changes the color palette.
 void setHeliocentricScaling(boolean scaling)
           
 void setOverallRange(Range rng)
          Changes the overall data range for this category.
 void setProjection(boolean projection)
           
 void setRange(Range rng)
          Changes the data range for this category.
 void setSettings(java.util.HashMap settings)
          Changes the settings of this object to match the settings in the specified hashmap.
 void setUserVsw(boolean userVsw)
           
 void setUserVswValue(float val)
           
 java.lang.String toString()
          Basic output
 
Methods inherited from class sonification.dataimport.visbards_resourcetoolkit.repository.category.DefaultPseudoCategory
addListener, firePseudoCategoryChanged, getParent, getVectorDouble, isPseudo, pseudoCategoryChanged, removeListener
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface sonification.dataimport.visbards_resourcetoolkit.repository.category.Category
addListener, getColorPalette, getName, getOverallRange, getRange, getType, isPresentational, removeListener, setColorPalette, setOverallRange, setRange
 
Methods inherited from interface sonification.dataimport.visbards_resourcetoolkit.model.SettingsHolder
getHolderID, getSettings, setSettings
 

Field Detail

fName

protected java.lang.String fName

fType

protected CategoryType fType

fPalette

protected ColorPalette fPalette

fRange

protected Range fRange

fOverallRange

protected Range fOverallRange
Constructor Detail

PseudoLocation

public PseudoLocation(Category parent,
                      boolean presentational)
Method Detail

getScalar

public float getScalar(Repository rep,
                       int row)
Computes a scalar for this pseudo-category using data from the specified repository for the specified row.

Specified by:
getScalar in interface PseudoCategory
Overrides:
getScalar in class DefaultPseudoCategory

getVector

public float[] getVector(Repository rep,
                         int row)
Computes a vector for this pseudo-category using data from the specified repository for the specified row.

Specified by:
getVector in interface PseudoCategory
Overrides:
getVector in class DefaultPseudoCategory

getScalarDouble

public double getScalarDouble(Repository rep,
                              int row)
Description copied from interface: PseudoCategory
Computes a scalar for this pseudo-category using data from the specified repository FOR the specified row.

Specified by:
getScalarDouble in interface PseudoCategory
Overrides:
getScalarDouble in class DefaultPseudoCategory

datasetAdded

public void datasetAdded(DatasetContainer source,
                         Dataset set)
Description copied from interface: DatasetContainerListener
Indicates that a dataset has been added to the container.

Specified by:
datasetAdded in interface DatasetContainerListener

selectedGlyphChanged

public void selectedGlyphChanged(DatasetContainer source,
                                 Dataset set)
Description copied from interface: DatasetContainerListener
Indicates that selected glyph has changed in one of the attached datasets.

Specified by:
selectedGlyphChanged in interface DatasetContainerListener

datasetRemoved

public void datasetRemoved(DatasetContainer source,
                           Dataset set)
Description copied from interface: DatasetContainerListener
Indicates that a dataset has been removed from the container.

Specified by:
datasetRemoved in interface DatasetContainerListener

encompasingTimeRangesChanged

public void encompasingTimeRangesChanged(DatasetContainer source)
Description copied from interface: DatasetContainerListener
Indicates that time ranges of some datasets have changed.

Specified by:
encompasingTimeRangesChanged in interface DatasetContainerListener

setHeliocentricScaling

public void setHeliocentricScaling(boolean scaling)

setProjection

public void setProjection(boolean projection)

getUserVsw

public boolean getUserVsw()

getUserVswValue

public float getUserVswValue()

setUserVsw

public void setUserVsw(boolean userVsw)

setUserVswValue

public void setUserVswValue(float val)

canProject

public boolean canProject()

getReferencetime

public double getReferencetime()

isProjecting

public boolean isProjecting()

isHeliocentricScaling

public boolean isHeliocentricScaling()

rangeModelChanged

public void rangeModelChanged(RangeModel source,
                              int eventID)
Description copied from interface: RangeModelListener
Indicates that the range model changed.

Specified by:
rangeModelChanged in interface RangeModelListener

categoryAdded

public void categoryAdded(CategoryPool source,
                          Category cat)
Indicates that a category has been added to the system.

Specified by:
categoryAdded in interface CategoryPoolListener

categoryRemoved

public void categoryRemoved(CategoryPool source,
                            Category cat)
Indicates that a category has been removed from the system.

Specified by:
categoryRemoved in interface CategoryPoolListener

getName

public java.lang.String getName()
Returns the display name of this category.

Specified by:
getName in interface Category

getType

public CategoryType getType()
Returns the type of this category.

Specified by:
getType in interface Category

isPresentational

public boolean isPresentational()
Returns true if category is presentational.

Specified by:
isPresentational in interface Category

getColorPalette

public ColorPalette getColorPalette()
Returns the color palette for this category.

Specified by:
getColorPalette in interface Category

setColorPalette

public void setColorPalette(ColorPalette pal)
Changes the color palette. Informes the listeners.

Specified by:
setColorPalette in interface Category

getRange

public Range getRange()
Returns the data range for this category. This range of data values expected for this category.

Specified by:
getRange in interface Category

setRange

public void setRange(Range rng)
Changes the data range for this category.

Specified by:
setRange in interface Category

getOverallRange

public Range getOverallRange()
Returns the overall data range for this category.

Specified by:
getOverallRange in interface Category

setOverallRange

public void setOverallRange(Range rng)
Changes the overall data range for this category.

Specified by:
setOverallRange in interface Category

addListener

public void addListener(CategoryListener listener)
Registers a listener to this instance.

Specified by:
addListener in interface Category

removeListener

public void removeListener(CategoryListener listener)
Unregisters a listener.

Specified by:
removeListener in interface Category

getSettings

public java.util.HashMap getSettings()
Returns a hashmap of settings (strings) which represent the current object state, and are keyed by string names.

Specified by:
getSettings in interface SettingsHolder

setSettings

public void setSettings(java.util.HashMap settings)
Changes the settings of this object to match the settings in the specified hashmap. HashMap may be empty, in which case no settings are delivered

Specified by:
setSettings in interface SettingsHolder

getHolderID

public java.lang.String getHolderID()
Returns a string which identifies this object uniquely. Any string is valid as long as it does not contain the underscore character.

Specified by:
getHolderID in interface SettingsHolder

toString

public java.lang.String toString()
Basic output

Overrides:
toString in class java.lang.Object

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object