public class DefaultChartLegendItem extends Object implements ChartLegendItem
Modifier and Type | Class and Description |
---|---|
static class |
DefaultChartLegendItem.RegisterPersistence |
Modifier and Type | Field and Description |
---|---|
LegendTitle |
legend |
Constructor and Description |
---|
DefaultChartLegendItem() |
DefaultChartLegendItem(LegendTitle legendTitle) |
Modifier and Type | Method and Description |
---|---|
void |
draw(Graphics2D g2,
Rectangle2D area) |
Paint |
getBackground() |
Font |
getItemFont() |
Object |
getLegendItem() |
int |
getXPosition() |
int |
getYPosition() |
boolean |
isVisible() |
void |
loadFromState(PersistentState state)
Set the state of the object from the state passed as parameter.
|
void |
saveToState(PersistentState state)
Saves the internal state of the object on the provided
PersistentState object.
|
void |
setBackground(Paint paint) |
void |
setLegendItem(Object leg) |
void |
setPosition(int x,
int y) |
void |
setPosition(String vertical,
String horizontal) |
void |
setVisible(boolean isVisible) |
public DefaultChartLegendItem()
public DefaultChartLegendItem(LegendTitle legendTitle)
public Object getLegendItem()
getLegendItem
in interface ChartLegendItem
public void setLegendItem(Object leg)
setLegendItem
in interface ChartLegendItem
public Paint getBackground()
getBackground
in interface ChartLegendItem
public void setBackground(Paint paint)
setBackground
in interface ChartLegendItem
public void draw(Graphics2D g2, Rectangle2D area)
draw
in interface ChartLegendItem
public Font getItemFont()
getItemFont
in interface ChartLegendItem
public boolean isVisible()
isVisible
in interface ChartLegendItem
public void setVisible(boolean isVisible)
setVisible
in interface ChartLegendItem
public int getXPosition()
getXPosition
in interface ChartLegendItem
public int getYPosition()
getYPosition
in interface ChartLegendItem
public void setPosition(int x, int y)
setPosition
in interface ChartLegendItem
public void setPosition(String vertical, String horizontal)
setPosition
in interface ChartLegendItem
public void saveToState(PersistentState state) throws PersistenceException
Persistent
saveToState
in interface Persistent
PersistenceException
public void loadFromState(PersistentState state) throws PersistenceException
Persistent
loadFromState
in interface Persistent
PersistenceException