etomica.graphics
Class DevicePlotPoints

java.lang.Object
  extended by etomica.graphics.DevicePlotPoints

public class DevicePlotPoints
extends Object


Field Summary
static int MAX_X
           
static int MAX_Y
           
static int MIN_X
           
static int MIN_Y
           
static int X_DIM
           
static int Y_DIM
           
 
Constructor Summary
DevicePlotPoints(IFunction[] fncts, String[] funcNames, String[] colNames)
           
DevicePlotPoints(String[] sliderLabels, IFunction[] fncts, String[] funcNames, boolean verticalParameters)
           
 
Method Summary
 Component controlGraphic()
          Returns the top level panel that the points table and (if parameters are vertically-oriented) function parameter slider components sit on.
 DisplayPlot getDisplayPlot()
          Returns the top level panel that the function plot components sit on.
 double getParameterValue(String desc)
          Returns the value of the function parameter slider.
 DeviceSlider getPlotSizeSlider(int minMaxXY)
          Returns the plot scale slider for the given parameter (values can be DevicePlotPoints.MIN_X, MAX_X, MIN_Y or MAX_Y.
 DeviceSlider getSlider(String desc)
          Returns the slider for the given parameter.
 DeviceTableModelGeneric getTableModel()
           
 Component graphic()
          Returns the top level panel that the function plot components sit on.
 Component parameterGraphic()
          Returns the panel that contains the parameter sliders.
 void refresh()
          Instructs the plot to redisplay any plotted functions with the most recent data.
 Component resizeGraphic()
          Returns the top level panel that the plot scale resizing components sit on.
 void setAutoScale(boolean isAutoScale)
           
 void setParameterLimits(String desc, double min, double max)
          Sets the minimum and maximum allowable values for a function parameter.
 void setSliderTextboxesEditable(boolean isSliderTextboxesEditable)
           
 void setTableColumnNames(String[] colNames)
          Sets the column headers to the given strings and fires an event indicating the column headers have been changed.
 void setXScale(double min, double max, double middle)
          Sets the minimum and maximum X-axis limits on the function display sliders.
 void setYScale(double min, double max, double middle)
          Sets the minimum and maximum Y-axis limits on the function display sliders.
 void showPointInput(boolean show)
          Sets the visibility of the data point input table.
 void showScale(boolean show)
          Sets the visibility of the plot axis limit sliders.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

X_DIM

public static final int X_DIM
See Also:
Constant Field Values

Y_DIM

public static final int Y_DIM
See Also:
Constant Field Values

MIN_X

public static final int MIN_X
See Also:
Constant Field Values

MAX_X

public static final int MAX_X
See Also:
Constant Field Values

MIN_Y

public static final int MIN_Y
See Also:
Constant Field Values

MAX_Y

public static final int MAX_Y
See Also:
Constant Field Values
Constructor Detail

DevicePlotPoints

public DevicePlotPoints(IFunction[] fncts,
                        String[] funcNames,
                        String[] colNames)

DevicePlotPoints

public DevicePlotPoints(String[] sliderLabels,
                        IFunction[] fncts,
                        String[] funcNames,
                        boolean verticalParameters)
Method Detail

setSliderTextboxesEditable

public void setSliderTextboxesEditable(boolean isSliderTextboxesEditable)

setTableColumnNames

public void setTableColumnNames(String[] colNames)
Sets the column headers to the given strings and fires an event indicating the column headers have been changed.

Parameters:
colNames - Column Header Names

getDisplayPlot

public DisplayPlot getDisplayPlot()
Returns the top level panel that the function plot components sit on.


graphic

public Component graphic()
Returns the top level panel that the function plot components sit on.


controlGraphic

public Component controlGraphic()
Returns the top level panel that the points table and (if parameters are vertically-oriented) function parameter slider components sit on.


parameterGraphic

public Component parameterGraphic()
Returns the panel that contains the parameter sliders. You probably don't want this unless you have horizontal layout for the parameters.


resizeGraphic

public Component resizeGraphic()
Returns the top level panel that the plot scale resizing components sit on.


refresh

public void refresh()
Instructs the plot to redisplay any plotted functions with the most recent data. Any points contained in the data point input table will be displayed (if the data point input table is displayed). The plot axis limits are updated.


getPlotSizeSlider

public DeviceSlider getPlotSizeSlider(int minMaxXY)
Returns the plot scale slider for the given parameter (values can be DevicePlotPoints.MIN_X, MAX_X, MIN_Y or MAX_Y.


setXScale

public void setXScale(double min,
                      double max,
                      double middle)
Sets the minimum and maximum X-axis limits on the function display sliders.

Parameters:
min - Minimum X-axis value
max - Maximum X-axis value
middle - Value at which to split the min/max X-axis limit sliders

setYScale

public void setYScale(double min,
                      double max,
                      double middle)
Sets the minimum and maximum Y-axis limits on the function display sliders.

Parameters:
min - Minimum Y-axis value
max - Maximum Y-axis value
middle - Value at which to split the min/max Y-axis limit sliders

showScale

public void showScale(boolean show)
Sets the visibility of the plot axis limit sliders. Default is true(show).

Parameters:
show - show/unshow boolean

showPointInput

public void showPointInput(boolean show)
Sets the visibility of the data point input table. Default is true(show).

Parameters:
show - show/unshow boolean

getParameterValue

public double getParameterValue(String desc)
Returns the value of the function parameter slider.

Parameters:
desc - label of parameter setting slider. The label was passed into the ctor.
Returns:
slider setting of the parameter value.

setParameterLimits

public void setParameterLimits(String desc,
                               double min,
                               double max)
Sets the minimum and maximum allowable values for a function parameter.

Parameters:
desc - label of parameter setting slider. The label was passed into the ctor.
min - Minimum allowable value for the function parameter.
max - Maxminimum allowable value for the function parameter.

getTableModel

public DeviceTableModelGeneric getTableModel()

getSlider

public DeviceSlider getSlider(String desc)
Returns the slider for the given parameter.


setAutoScale

public void setAutoScale(boolean isAutoScale)