T
- public abstract class GJAbstractDataVector<T> extends GJAbstractObservable implements GJDataVectorInterface<T>
GJDataVectorInterface
interface.
For details see the doc for the GJDataVectorInterface
interface.
GJDataVectorInterfaces
are used for the XData and YData fields
in the plot data model.GJDataVectorInterface
GJDataVectorInterface.AXIS
Modifier and Type | Field and Description |
---|---|
protected java.util.LinkedHashMap<java.lang.Double,Category> |
categories
Associates a string with a specific Double value.
|
Modifier and Type | Method and Description |
---|---|
void |
clearDataBufferData()
Sets the vector in the DataBuffer to null
This method should fire a PropertyChangeEvent
|
java.lang.Class |
getBufferClass() |
java.util.LinkedHashMap<java.lang.Double,Category> |
getCategories()
Returns the LinkedHasMap of category settings.
|
Category |
getCategory(double val)
Returns the category associated with the specified double value.
|
T |
getDataBuffer()
Returns the DataBuffer.
|
java.lang.Object |
getEntry(int index)
Returns a value from the DataBuffer
|
java.lang.String |
getName() |
boolean |
isCategorical()
Determines if this data set is categorical i.e.
|
void |
propertyChange(java.beans.PropertyChangeEvent pce) |
void |
setCategories(java.util.LinkedHashMap<java.lang.Double,Category> cat)
Sets the LinkedHashMap containing the categories.
|
void |
setCategories(java.lang.String... cat) |
void |
setCategory(double index,
java.lang.String val)
Associates a
Category containing {code String} s with the
specified double value. |
void |
setDataBuffer(java.lang.Object buffer)
Sets the DataBuffer used to store the data.
|
void |
setDataBufferData(java.util.Map m)
Sets the vector in the DataBuffer to a series incrementing by 1 for each
element.
|
void |
setName(java.lang.String s) |
addLink, addPropertyChangeListener, addPropertyChangeListener, firePropertyChange, getLinks, getPCS, getPropertyChangeListeners, getPropertyChangeListeners, hasListeners, hasSelfListener, removeLink, removePropertyChangeListener, removePropertyChangeListener, setLinks
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getDataValues, getDimension, getRawDataValues, setDataBufferData, setDataBufferData, setDataBufferData, setEntry
addPropertyChangeListener, addPropertyChangeListener, firePropertyChange, getPropertyChangeListeners, getPropertyChangeListeners, hasListeners, hasSelfListener, removePropertyChangeListener, removePropertyChangeListener
protected java.util.LinkedHashMap<java.lang.Double,Category> categories
categories
is
non-null, isCategorical returns true for that
GJDataVectorInterface
instance.
Strings are stored in a Category
instance which also specifies an
xOffset, yOffset and rotation for rendering the strings.public void clearDataBufferData()
clearDataBufferData
in interface GJDataVectorInterface<T>
public final void setDataBuffer(java.lang.Object buffer)
GJDataVectorInterface
setDataBuffer
in interface GJDataVectorInterface<T>
buffer
- the object array or wrapper.public final T getDataBuffer()
GJDataVectorInterface
getDataBuffer
in interface GJDataVectorInterface<T>
T
public final java.lang.Object getEntry(int index)
GJDataVectorInterface
getEntry
in interface GJDataVectorInterface<T>
index
- of the required entrypublic boolean isCategorical()
isCategorical
in interface GJDataVectorInterface<T>
public void setCategory(double index, java.lang.String val)
Category
containing {code String} s with the
specified double
value.setCategory
in interface GJDataVectorInterface<T>
index
- val
- public java.util.LinkedHashMap<java.lang.Double,Category> getCategories()
GJAbstractDataVector#categories categories
in
GJAbstractDataVector
.getCategories
in interface GJDataVectorInterface<T>
public Category getCategory(double val)
GJDataVectorInterface
getCategory
in interface GJDataVectorInterface<T>
public void setCategories(java.util.LinkedHashMap<java.lang.Double,Category> cat)
setCategories
in interface GJDataVectorInterface<T>
cat
- a LinkedHashMappublic void setCategories(java.lang.String... cat)
public final java.lang.Class getBufferClass()
getBufferClass
in interface GJDataVectorInterface<T>
public void setDataBufferData(java.util.Map m)
m
must be a Map with a single key, which determines
the start value of the series while the value corresponding to the key
represents the upper limit of the series. TODO: Should this be removed??
This method should fire a PropertyChangeEvent when the buffer data are
changedsetDataBufferData
in interface GJDataVectorInterface<T>
m
- a Map of size equal to 1.public java.lang.String getName()
getName
in interface GJDataVectorInterface<T>
public void setName(java.lang.String s)
setName
in interface GJDataVectorInterface<T>
public void propertyChange(java.beans.PropertyChangeEvent pce)
propertyChange
in interface java.beans.PropertyChangeListener