sonification.dataimport.visbards_resourcetoolkit.repository.category
Class DefaultPseudoCategory

java.lang.Object
  extended by sonification.dataimport.visbards_resourcetoolkit.repository.category.DefaultPseudoCategory
All Implemented Interfaces:
SettingsHolder, Category, PseudoCategory, PseudoCategoryListener
Direct Known Subclasses:
PseudoLocation

public class DefaultPseudoCategory
extends java.lang.Object
implements PseudoCategory, PseudoCategoryListener


Field Summary
protected  java.lang.String fName
           
protected  Range fOverallRange
           
protected  ColorPalette fPalette
           
protected  Category fParent
           
protected  Range fRange
           
protected  CategoryType fType
           
 
Constructor Summary
DefaultPseudoCategory(Category parent, boolean presentational)
           
 
Method Summary
 void addListener(CategoryListener listener)
          Registers a listener to this instance.
 void addListener(PseudoCategoryListener listener)
          Registers a listener.
 boolean equals(java.lang.Object obj)
           
protected  void firePseudoCategoryChanged()
          Sends an event to the listeners to indicate that this pseudo category has changed.
 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.
 Category getParent()
          Returns the parent of this pseudocategory
 Range getRange()
          Returns the data range for this category.
 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.
 float[] getVector(Repository rep, int row)
          Computes a vector for this pseudo-category using data from the specified repository FOR the specified row.
 double[] getVectorDouble(Repository rep, int row)
          Computes a vector for this pseudo-category using data from the specified repository FOR the specified row.
 boolean isPresentational()
          Returns true if category is presentational.
 boolean isPseudo()
          This is not an implementation of a pseudo category.
 void pseudoCategoryChanged(PseudoCategory source)
          An event that indicates that this pseudo category has changed how it computes its values.
 void removeListener(CategoryListener listener)
          Unregisters a listener.
 void removeListener(PseudoCategoryListener listener)
          Unregisters a listener.
 void setColorPalette(ColorPalette pal)
          Changes the color palette.
 void setOverallRange(Range rng)
          Changes the overall data range for this category.
 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.
 java.lang.String toString()
          Basic output
 
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

fParent

protected Category fParent

fName

protected java.lang.String fName

fType

protected CategoryType fType

fPalette

protected ColorPalette fPalette

fRange

protected Range fRange

fOverallRange

protected Range fOverallRange
Constructor Detail

DefaultPseudoCategory

public DefaultPseudoCategory(Category parent,
                             boolean presentational)
Method Detail

getScalar

public float getScalar(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:
getScalar in interface PseudoCategory

getVector

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

Specified by:
getVector in interface PseudoCategory

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

getVectorDouble

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

Specified by:
getVectorDouble in interface PseudoCategory

getParent

public Category getParent()
Returns the parent of this pseudocategory

Specified by:
getParent in interface PseudoCategory

isPseudo

public boolean isPseudo()
This is not an implementation of a pseudo category.

Specified by:
isPseudo in interface Category

firePseudoCategoryChanged

protected void firePseudoCategoryChanged()
Sends an event to the listeners to indicate that this pseudo category has changed.


addListener

public void addListener(PseudoCategoryListener listener)
Registers a listener.

Specified by:
addListener in interface PseudoCategory

removeListener

public void removeListener(PseudoCategoryListener listener)
Unregisters a listener.

Specified by:
removeListener in interface PseudoCategory

pseudoCategoryChanged

public void pseudoCategoryChanged(PseudoCategory source)
An event that indicates that this pseudo category has changed how it computes its values.

Specified by:
pseudoCategoryChanged in interface PseudoCategoryListener

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