Class SwingWrapper<T extends Chart<?,?> >
java.lang.Object
org.knowm.xchart.SwingWrapper<T>
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final List<XChartPanel<T>> private booleanprivate intprivate intprivate String -
Constructor Summary
ConstructorsConstructorDescriptionSwingWrapper(List<T> charts) Constructor - The number of rows and columns will be calculated automatically ConstructorSwingWrapper(List<T> charts, int numRows, int numColumns) ConstructorSwingWrapper(T chart) Constructor -
Method Summary
Modifier and TypeMethodDescriptionDisplay the chart in a Swing JFrameDisplay the chart in a Swing JFrameGet the default XChartPanel.getXChartPanel(int index) Get the XChartPanel given the provided index.isCentered(boolean isCentered) Set the Window in the center of screenvoidRepaint the default XChartPanel.voidrepaintChart(int index) Repaint the XChartPanel given the provided index.Set the Window Title
-
Field Details
-
chartPanels
-
windowTitle
-
isCentered
private boolean isCentered -
charts
-
numRows
private int numRows -
numColumns
private int numColumns
-
-
Constructor Details
-
SwingWrapper
-
SwingWrapper
-
SwingWrapper
-
-
Method Details
-
displayChart
Display the chart in a Swing JFrame -
displayChartMatrix
Display the chart in a Swing JFrame -
getXChartPanel
Get the default XChartPanel. This is the only one for single panel chart displays and the first panel in matrix chart displays- Returns:
- the XChartPanel
-
repaintChart
public void repaintChart()Repaint the default XChartPanel. This is the only one for single panel chart displays and the first panel in matrix chart displays -
getXChartPanel
Get the XChartPanel given the provided index.- Parameters:
index-- Returns:
- the XChartPanel
-
repaintChart
public void repaintChart(int index) Repaint the XChartPanel given the provided index.- Parameters:
index-
-
isCentered
Set the Window in the center of screen- Parameters:
isCentered-- Returns:
-
setTitle
Set the Window Title- Parameters:
windowTitle-- Returns:
-