public abstract class ChartManager
extends java.lang.Object
implements java.awt.image.ImageObserver
Modifier and Type | Class and Description |
---|---|
static class |
ChartManager.FixedWidthLogarithmicAxis
Class FixedWidthLogarithmicAxis fixed width log axis
|
static class |
ChartManager.FixedWidthNumberAxis
Class FixedWidthNumberAxis fixed width axis
|
Modifier and Type | Field and Description |
---|---|
static int |
AXIS_WIDTH
width of axis_
|
protected java.util.List<ChartHolder> |
chartHolders
the charts
|
protected javax.swing.JComponent |
contents
gui_
|
protected DisplayControlImpl |
control
my control
|
static int |
LAYOUT_2COLGRID
chart layout type
|
static int |
LAYOUT_3COLGRID
chart layout type
|
static int |
LAYOUT_CARD
chart layout type
|
static int |
LAYOUT_GRAPH
chart layout type
|
static int |
LAYOUT_HSTACK
chart layout type
|
static int |
LAYOUT_TAB
chart layout type
|
static int |
LAYOUT_VSTACK
chart layout type
|
protected java.lang.Object |
MUTEX
for synching_
|
protected boolean |
okToDraw
ok to draw charts
|
protected boolean |
settingData
currently setting data in chart_
|
Constructor and Description |
---|
ChartManager()
ctor
|
ChartManager(DisplayControlImpl control)
ctor
|
ChartManager(DisplayControlImpl control,
java.lang.String chartName)
Default constructor.
|
Modifier and Type | Method and Description |
---|---|
protected void |
addChart(ChartHolder chartHolder)
add chart
|
protected void |
addLineState(LineState lineState)
add line state
|
protected void |
addRange(double min,
double max,
java.lang.String name)
add a range
|
void |
addViewMenuItems(java.util.List items)
add menu items
|
protected boolean |
applyProperties(ChartHolder chartHolder)
apply properties to chart
|
protected void |
chartNameChanged(java.lang.String oldName,
java.lang.String newName)
The chart name has changed
|
protected void |
clearLineStates()
clear all saved line states
|
protected void |
doMakeContents()
make gui
|
abstract org.jfree.chart.plot.Plot |
doMakePlot()
factory method to make the plot
|
protected void |
doneLoadingData()
Call this after you are done loading data into the charts.
|
void |
editLayout()
change layout
|
protected ChartHolder |
findChartHolder(java.lang.String name)
find chart with name
|
protected ChartHolder |
getChartHolder(LineState lineState)
Get the chart holder that is displaying the given line state.
|
protected ChartHolder |
getChartHolder(java.lang.String name)
find chart with name
|
java.util.List |
getChartHolders()
Get the ChartHolders property.
|
javax.swing.JComponent |
getContents()
get gui
|
DisplayControlImpl |
getControl()
Get the Control property.
|
java.util.List |
getCurrentRanges()
get the ranges
|
protected java.lang.String |
getDefaultChartName()
get name to use for default chart
|
int |
getGridLayoutDimension()
Get the GridLayoutDimension property.
|
int |
getLayout()
Get the Layout property.
|
protected java.lang.Object |
getMutex()
for synching the charts
|
boolean |
getOkToDraw()
ok to draw chart
|
java.util.List |
getPlotNames()
get list of chart names
|
protected java.util.List |
getPlots()
Get the plots
|
protected void |
getPopupMenuItems(ChartHolder chartHolder,
java.util.List items)
get menu items for chart
|
protected java.awt.Dimension |
getPreferredChartSize()
Get the preferred chart size
|
protected void |
getPropertiesComponents(ChartHolder chartHolder,
java.util.List comps)
get properties widgets
|
boolean |
getSettingData()
Are we currently setting data
|
boolean |
getShowThumb()
Get the ShowThumb property.
|
javax.swing.JLabel |
getThumb()
get thumb label
|
boolean |
hasStuff()
do we have anything to show
|
boolean |
imageUpdate(java.awt.Image img,
int flags,
int x,
int y,
int width,
int height)
Handle the image update
|
protected void |
initChart(ChartHolder chartHolder)
init chart
|
protected void |
initCharts()
init all charts
|
protected void |
initPlot(org.jfree.chart.plot.Plot plot)
init plot
|
protected void |
makeInitialChart()
make the chart
|
void |
saveImage()
Save the image
|
void |
setChartHolders(java.util.List value)
Set the ChartHolders property.
|
void |
setChartName(java.lang.String newName)
The chart name has changed
|
void |
setControl(DisplayControlImpl value)
Set the Control property.
|
void |
setGridLayoutDimension(int value)
Set the GridLayoutDimension property.
|
void |
setLayout(int value)
Set the Layout property.
|
void |
setLayoutType(java.lang.Integer i)
set layout
|
void |
setShowThumb(boolean value)
Set the ShowThumb property.
|
protected void |
showPropertiesDialog(ChartHolder chartHolder)
show dialog for chart
|
void |
signalChartChanged()
Tell the chart holds that something changed
|
protected void |
startLoadingData()
Call this before you start loading data into the charts.
|
void |
timeChanged()
Stub for handling time change events.
|
void |
timeChanged(visad.Real value)
Stub for handling time change events.
|
protected void |
updateContents()
update gui
|
protected void |
updateContents(boolean force)
update gui
|
void |
updateThumb()
update thumbnail legend image
|
void |
updateThumbInner()
actually update the thumbnail image
|
public static final int LAYOUT_HSTACK
public static final int LAYOUT_VSTACK
public static final int LAYOUT_2COLGRID
public static final int LAYOUT_3COLGRID
public static final int LAYOUT_GRAPH
public static final int LAYOUT_TAB
public static final int LAYOUT_CARD
public static final int AXIS_WIDTH
protected java.lang.Object MUTEX
protected java.util.List<ChartHolder> chartHolders
protected DisplayControlImpl control
protected javax.swing.JComponent contents
protected boolean settingData
protected boolean okToDraw
public ChartManager()
public ChartManager(DisplayControlImpl control)
control
- the controlpublic ChartManager(DisplayControlImpl control, java.lang.String chartName)
control
- the controlchartName
- name of default chartprotected void addLineState(LineState lineState)
lineState
- line statepublic void saveImage()
protected void clearLineStates()
protected void chartNameChanged(java.lang.String oldName, java.lang.String newName)
oldName
- old namenewName
- new namepublic void setChartName(java.lang.String newName)
newName
- new nameprotected void initCharts()
public java.util.List getCurrentRanges()
protected void addRange(double min, double max, java.lang.String name)
min
- minmax
- maxname
- nameprotected java.lang.Object getMutex()
protected void initChart(ChartHolder chartHolder)
chartHolder
- The chartprotected void initPlot(org.jfree.chart.plot.Plot plot)
plot
- plotpublic abstract org.jfree.chart.plot.Plot doMakePlot()
protected java.util.List getPlots()
public void updateThumb()
public void updateThumbInner()
public void signalChartChanged()
protected void doneLoadingData()
protected void startLoadingData()
protected void getPopupMenuItems(ChartHolder chartHolder, java.util.List items)
chartHolder
- chart_items
- itemsprotected void showPropertiesDialog(ChartHolder chartHolder)
chartHolder
- chartprotected void getPropertiesComponents(ChartHolder chartHolder, java.util.List comps)
chartHolder
- the chartcomps
- compsprotected boolean applyProperties(ChartHolder chartHolder)
chartHolder
- the chartpublic void setLayoutType(java.lang.Integer i)
i
- layout typepublic void editLayout()
public void addViewMenuItems(java.util.List items)
items
- itemspublic boolean getOkToDraw()
public boolean getSettingData()
public void timeChanged()
public void timeChanged(visad.Real value)
value
- the time value (may be null);public boolean imageUpdate(java.awt.Image img, int flags, int x, int y, int width, int height)
imageUpdate
in interface java.awt.image.ImageObserver
img
- imgflags
- flagsx
- xy
- ywidth
- widthheight
- heightpublic boolean hasStuff()
public javax.swing.JComponent getContents()
public java.util.List getPlotNames()
protected ChartHolder getChartHolder(LineState lineState)
lineState
- The line stateprotected ChartHolder findChartHolder(java.lang.String name)
name
- nameprotected ChartHolder getChartHolder(java.lang.String name)
name
- nameprotected void addChart(ChartHolder chartHolder)
chartHolder
- chartprotected java.awt.Dimension getPreferredChartSize()
protected void doMakeContents()
protected void makeInitialChart()
protected java.lang.String getDefaultChartName()
protected void updateContents()
protected void updateContents(boolean force)
force
- always do itpublic javax.swing.JLabel getThumb()
public void setLayout(int value)
value
- The new value for Layoutpublic int getLayout()
public void setGridLayoutDimension(int value)
value
- The new value for GridLayoutDimensionpublic int getGridLayoutDimension()
public void setChartHolders(java.util.List value)
value
- The new value for ChartHolderspublic java.util.List getChartHolders()
public void setControl(DisplayControlImpl value)
value
- The new value for Controlpublic DisplayControlImpl getControl()
public void setShowThumb(boolean value)
value
- The new value for ShowThumbpublic boolean getShowThumb()