public class MarsPosition extends AbstractJsonConvertibleRecord implements JsonConvertibleRecord
Molecules
and MarsMetadatas can contain a list of these positions.
Position definitions include the name, value, column (Time (s) or slice or otherwise), and color (in hex). These values are used by mars-fx to draw position on plots based value and color.
| Constructor and Description |
|---|
MarsPosition(com.fasterxml.jackson.core.JsonParser jParser)
Constructor for creating a plot position given a json stream.
|
MarsPosition(java.lang.String name)
Constructor for creating a plot position of a given name with default
settings.
|
MarsPosition(java.lang.String name,
java.lang.String column,
double position,
java.lang.String color,
double stroke)
Constructor for creating a plot region using known parameters.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
createIOMaps()
Must be implemented in subclasses to define how fields, objects, arrays
should be saved based on the Jackson streaming API.
|
java.lang.String |
getColor()
Get the string color of the region in hex.
|
java.lang.String |
getColumn()
Get the name of the column the position value refers to.
|
java.lang.String |
getName()
Get position name.
|
double |
getPosition()
Get the position value.
|
double |
getStroke()
Get the stroke value (line thickness).
|
void |
setColor(java.lang.String color)
Set the hex color string.
|
void |
setColumn(java.lang.String column)
Set the name of the column the position value refers to.
|
void |
setName(java.lang.String name)
Set position name.
|
void |
setPosition(double position)
Set the position value in units of column.
|
void |
setStroke(double stroke)
Set the stroke value (line thickness).
|
dumpJSON, fromJSON, getJsonGenerator, getJsonParser, setJsonField, setShowWarnings, toJSONclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitdumpJSON, fromJSON, getJsonGenerator, getJsonParser, setJsonField, setShowWarnings, toJSONpublic MarsPosition(java.lang.String name)
name - Name of the MarsPosition to create.public MarsPosition(com.fasterxml.jackson.core.JsonParser jParser)
throws java.io.IOException
jParser - Json stream used to build the object.java.io.IOException - Thrown if unable to parse Json from JsonParser.public MarsPosition(java.lang.String name,
java.lang.String column,
double position,
java.lang.String color,
double stroke)
name - Name of the region.column - Name of column the region refers to.position - Location of the position in unit of column.color - Color string in hex format.stroke - Line thickness.protected void createIOMaps()
AbstractJsonConvertibleRecordcreateIOMaps in class AbstractJsonConvertibleRecordpublic java.lang.String getName()
public void setName(java.lang.String name)
name - Position name.public java.lang.String getColumn()
public void setColumn(java.lang.String column)
column - Name of the column that defines the position units.public java.lang.String getColor()
public void setColor(java.lang.String color)
color - The hex color string.public double getPosition()
public void setPosition(double position)
position - Position value.public double getStroke()
public void setStroke(double stroke)
stroke - Line thickness.