org.jplot2d.element
Interface XYGraph
-
- All Superinterfaces:
- Element, Graph, PComponent
- All Known Subinterfaces:
- XYGraphEx
- All Known Implementing Classes:
- XYGraphImpl
public interface XYGraph extends Graph
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface and Description static classXYGraph.ChartTypestatic classXYGraph.FillClosureTypeDefines how close the line for filling.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method and Description voidclearIndSymbolColor()Clear individual symbol colors and reset all data point to the overall symbol color, which assigned bysetSymbolColor(Color)XYGraph.ChartTypegetChartType()XYGraphDatagetData()Returns the graph data that this graph will draw.floatgetErrorbarCapSize()Returns the errorbar cap size in pt.XYGraph.FillClosureTypegetFillClosureType()Returns the method type to close the line for filling.java.awt.PaintgetFillPaint()java.awt.ColorgetIndSymbolColor(int idx)Returns the special color for data point idx.LegendItemgetLegendItem()Returns the legend item associated with this graph.java.awt.BasicStrokegetLineStroke()java.lang.StringgetName()Returns the text displayed in the legend itemjava.awt.ColorgetSymbolColor()Returns the overall color of the symbols.SymbolShapegetSymbolShape()Returns the symbol shape.floatgetSymbolSize()Returns the size of the symbol usedbooleanisFillEnabled()booleanisLineVisible()booleanisSymbolVisible()voidsetChartType(XYGraph.ChartType chartType)Sets the chart type.voidsetData(XYGraphData data)voidsetErrorbarCapSize(float size)Sets the errorbar cap size in pt.voidsetFillClosureType(XYGraph.FillClosureType type)Sets the method type to close the line for filling.voidsetFillEnabled(boolean fillEnabled)voidsetFillPaint(java.awt.Paint paint)voidsetIndSymbolColor(int[] idxes, java.awt.Color color)Sets special color to data point indexes.voidsetIndSymbolColor(int idx, java.awt.Color color)Sets special color to data point index.voidsetLineStroke(java.awt.BasicStroke stroke)voidsetLineVisible(boolean lineVisible)voidsetName(java.lang.String text)Sets the text displayed in the legend itemvoidsetSymbolColor(java.awt.Color color)Set the overall color of the symbols.voidsetSymbolShape(SymbolShape symbolShape)Sets the specified symbol shape to be used.voidsetSymbolSize(float size)Set the size of symbolsvoidsetSymbolVisible(boolean symbolVisible)-
Methods inherited from interface org.jplot2d.element.PComponent
getBounds, getColor, getEffectiveFont, getFontName, getFontScale, getFontSize, getFontStyle, getLocation, getPaperTransform, getSelectableBounds, getSize, getZOrder, isCacheable, isSelectable, isVisible, setCacheable, setColor, setFont, setFontName, setFontScale, setFontSize, setFontStyle, setSelectable, setVisible, setZOrder
-
Methods inherited from interface org.jplot2d.element.Element
getEnvironment, getId
-
-
-
-
Method Detail
-
getLegendItem
LegendItem getLegendItem()
Returns the legend item associated with this graph.- Returns:
- the legend item
-
getData
XYGraphData getData()
Description copied from interface:GraphReturns the graph data that this graph will draw.
-
setData
void setData(XYGraphData data)
-
getName
java.lang.String getName()
Returns the text displayed in the legend item- Returns:
- the text
-
setName
void setName(java.lang.String text)
Sets the text displayed in the legend item- Parameters:
text- the text displayed in the legend item
-
isSymbolVisible
boolean isSymbolVisible()
-
setSymbolVisible
void setSymbolVisible(boolean symbolVisible)
-
getSymbolShape
SymbolShape getSymbolShape()
Returns the symbol shape.- Returns:
- the symbol shape
-
setSymbolShape
void setSymbolShape(SymbolShape symbolShape)
Sets the specified symbol shape to be used.- Parameters:
symbolShape- the symbol shape
-
getSymbolSize
float getSymbolSize()
Returns the size of the symbol used- Returns:
- the size of the symbol used
-
setSymbolSize
void setSymbolSize(float size)
Set the size of symbols- Parameters:
size- the size of symbols
-
getSymbolColor
java.awt.Color getSymbolColor()
Returns the overall color of the symbols.- Returns:
- the Color of the symbols, can be
null
-
setSymbolColor
void setSymbolColor(java.awt.Color color)
Set the overall color of the symbols. If the given color isnull, the color of the symbols will be the same of the color of the line.- Parameters:
color- the color of the symbols
-
getIndSymbolColor
java.awt.Color getIndSymbolColor(int idx)
Returns the special color for data point idx. Ornullif the data point use the overall symbol color.- Parameters:
idx- data point idx- Returns:
- the color for data point idx.
-
setIndSymbolColor
void setIndSymbolColor(int idx, java.awt.Color color)Sets special color to data point index. This method can be called many times to assign different color to the given index.- Parameters:
idx-color-
-
setIndSymbolColor
void setIndSymbolColor(int[] idxes, java.awt.Color color)Sets special color to data point indexes. This method can be called many times to assign different color to the given indexes.- Parameters:
idxes-color-
-
clearIndSymbolColor
void clearIndSymbolColor()
Clear individual symbol colors and reset all data point to the overall symbol color, which assigned bysetSymbolColor(Color)
-
isLineVisible
boolean isLineVisible()
-
setLineVisible
void setLineVisible(boolean lineVisible)
-
getLineStroke
java.awt.BasicStroke getLineStroke()
-
setLineStroke
void setLineStroke(java.awt.BasicStroke stroke)
-
getChartType
XYGraph.ChartType getChartType()
- Returns:
- the chart type
-
setChartType
void setChartType(XYGraph.ChartType chartType)
Sets the chart type.- Parameters:
chartType- the chart type
-
isFillEnabled
boolean isFillEnabled()
-
setFillEnabled
void setFillEnabled(boolean fillEnabled)
-
getFillPaint
java.awt.Paint getFillPaint()
-
setFillPaint
void setFillPaint(java.awt.Paint paint)
-
getFillClosureType
XYGraph.FillClosureType getFillClosureType()
Returns the method type to close the line for filling.- Returns:
- the closure type
-
setFillClosureType
void setFillClosureType(XYGraph.FillClosureType type)
Sets the method type to close the line for filling.- Parameters:
type- the closure type
-
getErrorbarCapSize
float getErrorbarCapSize()
Returns the errorbar cap size in pt. If the cap size is 0, no cap is drawn.- Returns:
- the errorbar cap size
-
setErrorbarCapSize
void setErrorbarCapSize(float size)
Sets the errorbar cap size in pt. The default cap size is 0, means no cap is drawn.- Parameters:
size- the errorbar cap size
-
-
DMelt 3.0 © DataMelt by jWork.ORG