|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectucar.unidata.collab.SharableImpl
ucar.unidata.collab.PropertiedThing
ucar.unidata.idv.control.chart.ChartAnnotation
public abstract class ChartAnnotation
Class ChartAnnotation is an abstract class for the annotations on charts
| Field Summary | |
|---|---|
static Color |
COLOR_SELECTED
Selected color |
protected AffineTransform |
transform
The transform from the last draw |
protected int |
x
x location. |
protected int |
y
y location. |
| Fields inherited from class ucar.unidata.collab.PropertiedThing |
|---|
propertiesDialog |
| Constructor Summary | |
|---|---|
ChartAnnotation()
Default ctor |
|
ChartAnnotation(PlotWrapper plotWrapper)
Ctro |
|
| Method Summary | |
|---|---|
void |
addPropertyChangeListener(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 |
String |
formatValue(double v)
tuility |
Color |
getColor()
Get the Color property. |
String |
getName()
Get the Name property. |
PlotWrapper |
getPlotWrapper()
Get the PlotWrapper property. |
protected void |
getPropertiesComponents(List comps,
int tabIdx)
Collect the components that go into the properties dialog |
boolean |
getSelected()
Get the Selected property. |
String |
getToolTipText()
Hook for tooltip |
abstract 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(PropertyChangeListener listener)
property change listener |
void |
setActive(boolean value)
Set the Active property. |
void |
setColor(Color value)
Set the Color property. |
protected void |
setGraphicsState(Graphics2D g2)
Called by base classes when drawn. |
void |
setName(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(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 |
String |
toString()
tostring |
| Methods inherited from class ucar.unidata.collab.PropertiedThing |
|---|
doApplyProperties, firePropertyChange, firePropertyChange, getPropertyListeners, getPropertyTabs, isShowing, propertyChange, showProperties, showProperties |
| Methods inherited from class ucar.unidata.collab.SharableImpl |
|---|
applySharableProperties, doShare, doShare, doShareExternal, doShareInternal, getSharablePropertiesComponent, getShareGroup, getSharing, getUniqueId, initSharable, receiveShareData, removeSharable, setShareGroup, setSharing, setUniqueId, showSharableDialog |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.jfree.chart.annotations.XYAnnotation |
|---|
draw |
| Field Detail |
|---|
public static final Color COLOR_SELECTED
protected int x
protected int y
protected AffineTransform transform
| Constructor Detail |
|---|
public ChartAnnotation()
public ChartAnnotation(PlotWrapper plotWrapper)
plotWrapper - The chart we are in| Method Detail |
|---|
public String formatValue(double v)
v - value
public String getToolTipText()
protected void setGraphicsState(Graphics2D g2)
g2 - The graphics
public double distance(int x,
int y)
x - Mouse xy - Mouse y
public static double distance(int x1,
int y1,
int x2,
int y2)
x1 - x1y1 - y1x2 - x2y2 - y2
public abstract String getTypeName()
protected boolean applyProperties()
applyProperties in class PropertiedThing
protected void getPropertiesComponents(List comps,
int tabIdx)
getPropertiesComponents in class PropertiedThingcomps - List of left/right componentstabIdx - Which tab
public void setPosition(int x,
int y)
x - xy - ypublic void setPosition(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(Color value)
value - The new value for Colorpublic Color getColor()
public void setPlotWrapper(PlotWrapper value)
value - The new value for PlotWrapperpublic PlotWrapper getPlotWrapper()
public void setName(String value)
value - The new value for Namepublic String getName()
public int getY()
public int getX()
public void setActive(boolean value)
value - The new value for Activepublic boolean isActive()
public String toString()
toString in class Objectpublic void addPropertyChangeListener(PropertyChangeListener listener)
addPropertyChangeListener in class PropertiedThinglistener - listenerpublic void removePropertyChangeListener(PropertyChangeListener listener)
removePropertyChangeListener in class PropertiedThinglistener - listener
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||