public abstract class ChartAnnotation extends PropertiedThing implements org.jfree.chart.annotations.XYAnnotation
| Modifier and Type | Field and Description |
|---|---|
static java.awt.Color |
COLOR_SELECTED
Selected color
|
protected java.awt.geom.AffineTransform |
transform
The transform from the last draw
|
protected int |
x
x location.
|
protected int |
y
y location.
|
propertiesDialog| Constructor and Description |
|---|
ChartAnnotation()
Default ctor
|
ChartAnnotation(PlotWrapper plotWrapper)
Ctro
|
| Modifier and Type | Method and Description |
|---|---|
void |
addPropertyChangeListener(java.beans.PropertyChangeListener listener)
new property change listener
|
protected boolean |
applyProperties()
Apply the properties
|
double |
distance(int x,
int y)
Distance to the given point.
|
static double |
distance(int x1,
int y1,
int x2,
int y2)
utility method to calculate distance
|
void |
doRemove()
Annotation was removed
|
java.lang.String |
formatValue(double v)
tuility
|
java.awt.Color |
getColor()
Get the Color property.
|
java.lang.String |
getName()
Get the Name property.
|
PlotWrapper |
getPlotWrapper()
Get the PlotWrapper property.
|
protected void |
getPropertiesComponents(java.util.List comps,
int tabIdx)
Collect the components that go into the properties dialog
|
boolean |
getSelected()
Get the Selected property.
|
java.lang.String |
getToolTipText()
Hook for tooltip
|
abstract java.lang.String |
getTypeName()
Type of annotation
|
int |
getX()
Get the x position
|
int |
getY()
Get the y position
|
boolean |
isActive()
Get the Active property.
|
void |
removePropertyChangeListener(java.beans.PropertyChangeListener listener)
property change listener
|
void |
setActive(boolean value)
Set the Active property.
|
void |
setColor(java.awt.Color value)
Set the Color property.
|
protected void |
setGraphicsState(java.awt.Graphics2D g2)
Called by base classes when drawn.
|
void |
setName(java.lang.String value)
Set the Name property.
|
void |
setPlotWrapper(PlotWrapper value)
Set the PlotWrapper property.
|
void |
setPosition(int x,
int y)
Set the position to the given x/y screen coordinate
|
void |
setPosition(java.awt.event.MouseEvent event)
Set the position to the x/y of the event
|
void |
setSelected(boolean value)
Set the Selected property.
|
protected boolean |
showColorInProperties()
Should the color widget be shown in the properties dialog
|
java.lang.String |
toString()
tostring
|
doApplyProperties, firePropertyChange, firePropertyChange, getPropertyListeners, getPropertyTabs, isShowing, propertyChange, showProperties, showPropertiesapplySharableProperties, doShare, doShare, doShareExternal, doShareInternal, getReceiveShareTime, getSharablePropertiesComponent, getShareGroup, getSharing, getUniqueId, initSharable, receiveShareData, removeSharable, setReceiveShareTime, setShareGroup, setSharing, setUniqueId, showSharableDialogpublic static final java.awt.Color COLOR_SELECTED
protected int x
protected int y
protected java.awt.geom.AffineTransform transform
public ChartAnnotation()
public ChartAnnotation(PlotWrapper plotWrapper)
plotWrapper - The chart we are inpublic java.lang.String formatValue(double v)
v - valuepublic java.lang.String getToolTipText()
protected void setGraphicsState(java.awt.Graphics2D g2)
g2 - The graphicspublic double distance(int x,
int y)
x - Mouse xy - Mouse ypublic static double distance(int x1,
int y1,
int x2,
int y2)
x1 - x1y1 - y1x2 - x2y2 - y2public abstract java.lang.String getTypeName()
protected boolean applyProperties()
applyProperties in class PropertiedThingprotected void getPropertiesComponents(java.util.List comps,
int tabIdx)
getPropertiesComponents in class PropertiedThingcomps - List of left/right componentstabIdx - Which tabpublic void setPosition(int x,
int y)
x - xy - ypublic void setPosition(java.awt.event.MouseEvent event)
event - The eventpublic void doRemove()
public void setSelected(boolean value)
value - The new value for Selectedpublic boolean getSelected()
protected boolean showColorInProperties()
public void setColor(java.awt.Color value)
value - The new value for Colorpublic java.awt.Color getColor()
public void setPlotWrapper(PlotWrapper value)
value - The new value for PlotWrapperpublic PlotWrapper getPlotWrapper()
public void setName(java.lang.String value)
value - The new value for Namepublic java.lang.String getName()
public int getY()
public int getX()
public void setActive(boolean value)
value - The new value for Activepublic boolean isActive()
public java.lang.String toString()
toString in class java.lang.Objectpublic void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
addPropertyChangeListener in class PropertiedThinglistener - listenerpublic void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
removePropertyChangeListener in class PropertiedThinglistener - listener