public class Chart extends Object
| 构造器 | 说明 |
|---|---|
Chart() |
Constructor
|
Chart(String title,
Plot plot) |
Constructor
|
Chart(String title,
Plot plot,
ChartPanel parent) |
Constructor
|
Chart(ChartPanel parent) |
Constructor
|
Chart(Plot plot) |
Constructor
|
Chart(Plot plot,
ChartPanel parent) |
Constructor
|
| 限定符和类型 | 方法 | 说明 |
|---|---|---|
void |
addPlot(Plot plot) |
Add a plot
|
void |
addText(ChartText text) |
Add text
|
void |
clearPlots() |
Clear plots
|
void |
clearTexts() |
Clear texts
|
void |
draw(Graphics2D g,
Rectangle2D area) |
Draw plot
|
Plot |
findPlot(int x,
int y) |
Find a plot by point
|
Color |
getBackground() |
Get background
|
int |
getColumnNum() |
Get column number of sub plots
|
Plot |
getCurrentPlot() |
Get current plot
|
Rectangle2D |
getGraphArea() |
Get graph area
|
ChartLegend |
getLegend() |
Get chart legend
|
Plot |
getPlot() |
Get the first plot
|
Plot |
getPlot(int plotIdx) |
Get plot by plot index
|
Rectangle2D |
getPlotArea() |
Get plot area
|
int |
getPlotIndex(Plot plot) |
Get plot index
|
List<Plot> |
getPlots() |
Get plot
|
int |
getRowNum() |
Get row number of sub plots
|
ChartText |
getSubTitle() |
Get sub title
|
ChartText |
getTitle() |
Get title
|
boolean |
hasWebMap() |
Check if has web map layer
|
boolean |
isAntiAlias() |
Get if is anti-alias
|
boolean |
isDrawLegend() |
Get if draw legend
|
boolean |
isSymbolAntialias() |
Get symbol antialias
|
void |
removePlot(Plot plot) |
Remove a plot
|
void |
setAntiAlias(boolean value) |
Set if is anti-alias
|
void |
setBackground(Color value) |
Set background
|
void |
setColumnNum(int value) |
Set column number of sub plots
|
void |
setCurrentPlot(int value) |
Set current plot index
|
void |
setCurrentPlot(Plot value) |
Set current plot
|
void |
setDrawLegend(boolean value) |
Set if draw legend
|
void |
setParent(ChartPanel value) |
Set ChartPanel parent
|
void |
setPlot(Plot plot) |
Set plot
|
void |
setRowNum(int value) |
Set row number of sub plots
|
void |
setSubTitle(ChartText value) |
Set sub title
|
void |
setSymbolAntialias(boolean value) |
Set symbol antialias
|
void |
setTitle(ChartText value) |
Set title
|
public Chart()
public Chart(ChartPanel parent)
parent - ChartPanel parentpublic Chart(Plot plot, ChartPanel parent)
plot - Plotparent - ChartPanelpublic Chart(Plot plot)
plot - Plotpublic Chart(String title, Plot plot, ChartPanel parent)
title - Titleplot - Plotparent - ChartPanelpublic void setParent(ChartPanel value)
value - ChartPanelpublic Plot getCurrentPlot()
public void setCurrentPlot(Plot value)
value - Current plotpublic void setCurrentPlot(int value)
value - Current plot indexpublic Plot getPlot()
public int getRowNum()
public void setRowNum(int value)
value - Row number of sub plotspublic int getColumnNum()
public void setColumnNum(int value)
value - Column number of sub plotspublic ChartText getTitle()
public void setTitle(ChartText value)
value - Titlepublic ChartText getSubTitle()
public void setSubTitle(ChartText value)
value - Sub titlepublic Color getBackground()
public void setBackground(Color value)
value - Backgroundpublic ChartLegend getLegend()
public boolean isDrawLegend()
public void setDrawLegend(boolean value)
value - Booleanpublic Rectangle2D getPlotArea()
public boolean isAntiAlias()
public void setAntiAlias(boolean value)
value - Booleanpublic boolean isSymbolAntialias()
public void setSymbolAntialias(boolean value)
value - Booleanpublic void draw(Graphics2D g, Rectangle2D area)
g - Graphics2Darea - Drawing areapublic Rectangle2D getGraphArea()
public Plot findPlot(int x, int y)
x - Xy - Ypublic void clearPlots()
public void clearTexts()
public void removePlot(Plot plot)
plot - The plotpublic void addPlot(Plot plot)
plot - Plotpublic void setPlot(Plot plot)
plot - Plotpublic Plot getPlot(int plotIdx)
plotIdx - Plot index - begin with 1public int getPlotIndex(Plot plot)
plot - The plotpublic boolean hasWebMap()
public void addText(ChartText text)
text - TextCopyright © 2019. All rights reserved.