public class ProjectionComponent extends WorkspaceComponent
Modifier and Type | Class and Description |
---|---|
class |
ProjectionComponent.Dimension
Object which adds data to one dimension of a projection component.
|
Constructor and Description |
---|
ProjectionComponent(ProjectionModel model,
java.lang.String name)
Create a projection component from an existing set of data.
|
ProjectionComponent(java.lang.String name)
Create new Projection Component.
|
ProjectionComponent(java.lang.String name,
int numDataSources)
Initializes a JFreeChart with specific number of data sources.
|
Modifier and Type | Method and Description |
---|---|
void |
addPoint(double[] newPoint)
Add a new point to the projection dataset using an array.
|
protected void |
addScalarDimension(int i)
Add a dimension object.
|
void |
clearData()
Clear the dataset.
|
void |
closing()
Perform cleanup after closing.
|
void |
couplingAdded(Coupling coupling)
Called when a coupling is attached to this component.
|
void |
debug()
Used for debugging model.
|
ProjectionComponent.Dimension |
getDimension(int i)
Return a dimension object.
|
java.lang.String |
getKeyFromObject(java.lang.Object object)
Returns a unique key associated with an object.
|
java.lang.Object |
getObjectFromKey(java.lang.String objectKey)
Finds objects based on a key.
|
java.util.List<PotentialConsumer> |
getPotentialConsumers()
Return the potential consumers associated with this component.
|
ProjectionModel |
getProjectionModel() |
Projector |
getProjector()
Get reference to underlying projector object.
|
java.lang.String |
getXML()
Override for use with open service.
|
boolean |
hasChangedSinceLastSave()
Returns true if it's changed since the last save.
|
protected void |
initializeConsumers()
Initialize consumers.
|
static ProjectionComponent |
open(java.io.InputStream input,
java.lang.String name,
java.lang.String format)
Opens a saved projection component.
|
void |
save(java.io.OutputStream output,
java.lang.String format)
Used when saving a workspace.
|
protected void |
setDimensions(int numDims)
Set number of dimensions to specified amount.
|
void |
update()
Get the current state of the dimension objects, send this to the
projection algorithm, and update the graphics.
|
addAttributeListener, addConsumerType, addProducerType, addWorkspaceComponentListener, close, couplingRemoved, fireAttributeObjectRemoved, fireAttributeTypeVisibilityChanged, fireComponentToggleEvent, fireGuiToggleEvent, firePotentialAttributesChanged, fireUpdateEvent, getAttributeManager, getConsumerTypes, getCurrentFile, getDefaultFormat, getFormats, getLocks, getLogger, getName, getPotentialProducers, getProducerTypes, getSerializePriority, getSimpleName, getUpdateOn, getUpdateParts, getVisibleConsumerTypes, getVisibleProducerTypes, getWorkspace, getWorkspaceComponentListeners, isGuiOn, removeAttributeListener, removeWorkspaceComponentListener, setChangedSinceLastSave, setCurrentFile, setGuiOn, setLogger, setName, setSerializePriority, setUpdateOn, setWorkspace, stopped, toString
public ProjectionComponent(java.lang.String name)
name
- public ProjectionComponent(java.lang.String name, int numDataSources)
name
- name of componentnumDataSources
- number of data sources to initialize plot withpublic ProjectionComponent(ProjectionModel model, java.lang.String name)
model
- projection modelname
- name of componentprotected void initializeConsumers()
public java.util.List<PotentialConsumer> getPotentialConsumers()
WorkspaceComponent
getPotentialConsumers
in class WorkspaceComponent
protected void addScalarDimension(int i)
i
- index of dimension objectprotected void setDimensions(int numDims)
numDims
- number of dimensions.public ProjectionComponent.Dimension getDimension(int i)
i
- index of dimension object to returnpublic java.lang.Object getObjectFromKey(java.lang.String objectKey)
WorkspaceComponent
getObjectFromKey
in class WorkspaceComponent
objectKey
- String keypublic java.lang.String getKeyFromObject(java.lang.Object object)
WorkspaceComponent
getKeyFromObject
in class WorkspaceComponent
object
- object which should be associated with a keypublic java.lang.String getXML()
WorkspaceComponent
getXML
in class WorkspaceComponent
public static ProjectionComponent open(java.io.InputStream input, java.lang.String name, java.lang.String format)
input
- streamname
- name of fileformat
- formatpublic void save(java.io.OutputStream output, java.lang.String format)
WorkspaceComponent
save
in class WorkspaceComponent
output
- the stream of data to write the data to.format
- a key used to define the requested format.public boolean hasChangedSinceLastSave()
WorkspaceComponent
hasChangedSinceLastSave
in class WorkspaceComponent
public void closing()
WorkspaceComponent
closing
in class WorkspaceComponent
public void addPoint(double[] newPoint)
newPoint
- the new pointpublic void update()
update
in class WorkspaceComponent
public Projector getProjector()
public void clearData()
public void debug()
public ProjectionModel getProjectionModel()
public void couplingAdded(Coupling coupling)
WorkspaceComponent
couplingAdded
in class WorkspaceComponent
coupling
- The coupling that is being added