Package org.gephi.io.importer.api
Interface ElementDraft
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interface
ElementDraft.Factory
Node and edge draft factory.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
addInterval(double start, double end)
void
addInterval(String startDateTime, String endDateTime)
void
addIntervals(String intervals)
void
addTimestamp(double timestamp)
void
addTimestamp(String dateTime)
void
addTimestamps(String timestamps)
Color
getColor()
Returns the element's color.Iterable<ColumnDraft>
getColumns()
Interval
getGraphInterval()
Double
getGraphTimestamp()
String
getId()
Returns the element's id.String
getLabel()
Returns the element's label.Color
getLabelColor()
Returns the label's color.float
getLabelSize()
Returns the label's size.TimeSet
getTimeSet()
Object
getValue(String key)
Returns the element's value forkey
.boolean
isLabelVisible()
Returns true if the label is visible.void
parseAndSetValue(String key, String value)
Parses and sets thevalue
forkey
.void
parseAndSetValue(String key, String value, double timestamp)
Parses and sets thevalue
forkey
at the giventimestamp
.void
parseAndSetValue(String key, String value, double start, double end)
Parses and sets thevalue
forkey
at the given interval[start,end]
.void
parseAndSetValue(String key, String value, String dateTime)
Parses and sets thevalue
forkey
at the givendateTime
.void
parseAndSetValue(String key, String value, String startDateTime, String endDateTime)
Parses and sets thevalue
forkey
at the givendateTime
.void
setColor(float r, float g, float b)
Sets this element's color using real color numbers (i.e numbers between 0 and 1).void
setColor(int r, int g, int b)
Sets this element's color using int color numbers (i.e numbers between 0 and 255).void
setColor(Color color)
Sets this element's color.void
setColor(String color)
Parse and sets this element's color.void
setColor(String r, String g, String b)
Parses and sets this element's color using string components.void
setLabel(String label)
Sets this element's label.void
setLabelColor(float r, float g, float b)
Sets the label's color using real color numbers (i.e numbers between 0 and 1).void
setLabelColor(int r, int g, int b)
Sets the label's color using int color numbers (i.e numbers between 0 and 255).void
setLabelColor(Color color)
Sets the label's color.void
setLabelColor(String color)
Parses and sets the label's color.void
setLabelColor(String r, String g, String b)
Parses and sets the label's color using string components.void
setLabelSize(float size)
Sets the label's size.void
setLabelVisible(boolean labelVisible)
Sets whether the label is visible.void
setValue(String key, Object value)
Sets thevalue
forkey
.void
setValue(String key, Object value, double timestamp)
Sets thevalue
forkey
at the giventimestamp
.void
setValue(String key, Object value, double start, double end)
Sets thevalue
forkey
at the given interval[start,end]
.void
setValue(String key, Object value, String dateTime)
Sets thevalue
forkey
at the givendateTime
.void
setValue(String key, Object value, String startDateTime, String endDateTime)
Sets thevalue
forkey
at the given interval[startDateTime,endDateTime]
.
-
-
-
Method Detail
-
getId
String getId()
Returns the element's id.The element id is unique.
- Returns:
- element's id
-
getValue
Object getValue(String key)
Returns the element's value forkey
.- Parameters:
key
- key- Returns:
- value or null if not found
-
getLabel
String getLabel()
Returns the element's label.- Returns:
- label or null if unset
-
setLabel
void setLabel(String label)
Sets this element's label.- Parameters:
label
- label
-
getColor
Color getColor()
Returns the element's color.- Returns:
- color or null if unset
-
setColor
void setColor(Color color)
Sets this element's color.- Parameters:
color
- color
-
setColor
void setColor(String color)
Parse and sets this element's color.Color can be an existing Java color (e.g. yellow, blue, cyan) or an octal or hexadecimal color representation (e.g. 0xFF0096, #FF0096).
- Parameters:
color
- color to be parsed and set
-
isLabelVisible
boolean isLabelVisible()
Returns true if the label is visible.Default value is true.
- Returns:
- true if label is visible, false otherwise
-
setLabelVisible
void setLabelVisible(boolean labelVisible)
Sets whether the label is visible.- Parameters:
labelVisible
- label visible flag
-
getLabelSize
float getLabelSize()
Returns the label's size.Default value is -1.
- Returns:
- label size
-
setLabelSize
void setLabelSize(float size)
Sets the label's size.- Parameters:
size
- label size
-
getLabelColor
Color getLabelColor()
Returns the label's color.- Returns:
- label's color
-
setLabelColor
void setLabelColor(Color color)
Sets the label's color.- Parameters:
color
- label color
-
setLabelColor
void setLabelColor(String color)
Parses and sets the label's color.Color can be an existing Java color (e.g. yellow, blue, cyan) or an octal or hexadecimal color representation (e.g. 0xFF0096, #FF0096).
- Parameters:
color
- color to be parsed and set
-
setValue
void setValue(String key, Object value)
Sets thevalue
forkey
.- Parameters:
key
- keyvalue
- value
-
setValue
void setValue(String key, Object value, double timestamp)
Sets thevalue
forkey
at the giventimestamp
.- Parameters:
key
- keyvalue
- valuetimestamp
- timestamp
-
setValue
void setValue(String key, Object value, double start, double end)
Sets thevalue
forkey
at the given interval[start,end]
.- Parameters:
key
- keyvalue
- valuestart
- interval startend
- interval end
-
setValue
void setValue(String key, Object value, String dateTime)
Sets thevalue
forkey
at the givendateTime
.- Parameters:
key
- keyvalue
- valuedateTime
- dateTime
-
setValue
void setValue(String key, Object value, String startDateTime, String endDateTime)
Sets thevalue
forkey
at the given interval[startDateTime,endDateTime]
.- Parameters:
key
- keyvalue
- valuestartDateTime
- interval start datetimeendDateTime
- interval end datetime
-
parseAndSetValue
void parseAndSetValue(String key, String value)
Parses and sets thevalue
forkey
.- Parameters:
key
- keyvalue
- value
-
parseAndSetValue
void parseAndSetValue(String key, String value, double timestamp)
Parses and sets thevalue
forkey
at the giventimestamp
.- Parameters:
key
- keyvalue
- valuetimestamp
- timestamp
-
parseAndSetValue
void parseAndSetValue(String key, String value, double start, double end)
Parses and sets thevalue
forkey
at the given interval[start,end]
.- Parameters:
key
- keyvalue
- valuestart
- interval startend
- interval end
-
parseAndSetValue
void parseAndSetValue(String key, String value, String dateTime)
Parses and sets thevalue
forkey
at the givendateTime
.- Parameters:
key
- keyvalue
- valuedateTime
- dateTime
-
parseAndSetValue
void parseAndSetValue(String key, String value, String startDateTime, String endDateTime)
Parses and sets thevalue
forkey
at the givendateTime
.- Parameters:
key
- keyvalue
- valuestartDateTime
- interval start datetimeendDateTime
- interval end datetime
-
setColor
void setColor(String r, String g, String b)
Parses and sets this element's color using string components.Components should be numbers between 0 and 255.
- Parameters:
r
- red component as stringg
- green component as stringb
- blue component as string
-
setColor
void setColor(float r, float g, float b)
Sets this element's color using real color numbers (i.e numbers between 0 and 1).- Parameters:
r
- red component as floatg
- green component as floatb
- blue component as float
-
setColor
void setColor(int r, int g, int b)
Sets this element's color using int color numbers (i.e numbers between 0 and 255).- Parameters:
r
- red component as intg
- green component as intb
- blue component as int
-
setLabelColor
void setLabelColor(String r, String g, String b)
Parses and sets the label's color using string components.Components should be numbers between 0 and 255.
- Parameters:
r
- red component as stringg
- green component as stringb
- blue component as string
-
setLabelColor
void setLabelColor(float r, float g, float b)
Sets the label's color using real color numbers (i.e numbers between 0 and 1).- Parameters:
r
- red component as floatg
- green component as floatb
- blue component as float
-
setLabelColor
void setLabelColor(int r, int g, int b)
Sets the label's color using int color numbers (i.e numbers between 0 and 255).- Parameters:
r
- red component as intg
- green component as intb
- blue component as int
-
addTimestamp
void addTimestamp(double timestamp)
-
addTimestamp
void addTimestamp(String dateTime)
-
addTimestamps
void addTimestamps(String timestamps)
-
addInterval
void addInterval(double start, double end)
-
addIntervals
void addIntervals(String intervals)
-
getTimeSet
TimeSet getTimeSet()
-
getColumns
Iterable<ColumnDraft> getColumns()
-
getGraphTimestamp
Double getGraphTimestamp()
-
getGraphInterval
Interval getGraphInterval()
-
-