|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JPanel
Plotting.TwoDPlotter<E>
public class TwoDPlotter<E>
Two dimensional plot class.
This class implements the public two D plotting related APIs in TwoDPlot interface. It contains a buffered image for faster repaints.
This class serves as a container for two dimensional plotting.The container can show a line plot along with a histogram (on the same X axis). The left Y Axis corresponds to line plot data and right Y axis shows the corresponding values for histogram.
This class has a template parameter representing the type of data, e.g. Double, Integer etc.
TwoDPlot,
Histogram,
Serialized Form| Nested Class Summary | |
|---|---|
static class |
TwoDPlotter.PlotType
|
| Nested classes/interfaces inherited from class javax.swing.JPanel |
|---|
javax.swing.JPanel.AccessibleJPanel |
| Nested classes/interfaces inherited from class javax.swing.JComponent |
|---|
javax.swing.JComponent.AccessibleJComponent |
| Nested classes/interfaces inherited from class java.awt.Container |
|---|
java.awt.Container.AccessibleAWTContainer |
| Nested classes/interfaces inherited from class java.awt.Component |
|---|
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BaselineResizeBehavior, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy |
| Field Summary | |
|---|---|
private boolean |
bAutoFitOn
|
private boolean |
bFinancialPresent
flag indicating if financial plot is present |
private boolean |
bFourierPresent
flag indicating if fourier plot is present |
private boolean |
bGridOn
|
private boolean |
bHighlightDataPoints
|
private boolean |
bHighlightDataPresent
Is highlighting data present (prevents race condition between drawing and computing) |
private boolean |
bHistogramPresent
flag indicating if atleast one histogram data is present |
private boolean |
bLegendOn
|
private boolean |
bShowHighlightedCoord
Flag for showing/hiding highlighted coordinates in a box |
private boolean |
bSuperimposePhase
flag indicating if phase should be superimposed on amplitude chart for fourier plots |
private boolean |
bXLabelOn
|
private boolean |
bXMajorTicksOn
|
private boolean |
bXMinorTicksOn
|
private boolean |
bYLabelOn
|
private boolean |
bYMajorTicksOn
|
private boolean |
bYMinorTicksOn
|
private static int |
HIGHLIGHT_CIRCLE_RADIUS
|
private static float |
HISTOGRAM_FRACTION
Percentage of y axis given to histogram , expressed in decimal |
private static int |
INSET
Insets between the drawing area and plot axis. |
private static int |
LEGEND_ITEM_SQUARE_LEN
|
private boolean |
m_bDrawingRuler
|
private boolean |
m_bDrawMode
|
private boolean |
m_bJapaneseCandlesticks
|
private java.awt.Color |
m_RulerColor
|
private static int |
MAX_HISTOGRAM_TICKS
|
private static int |
MAX_LEGEND_BOX_WIDTH
|
private static int |
MAX_MAJOR_TICKS
|
private static int |
MAX_MINOR_TICKS
|
private java.awt.Color |
mAxisColor
|
private java.awt.Color |
mAxisLabelColor
|
private java.awt.Color |
mBGColor
|
private java.awt.image.BufferedImage |
mBufImg
Buffered image |
private ConnectionType |
mConnType
|
private java.awt.Color |
mCoordBoxColor
|
private Pair<java.lang.Double> |
mCurrMousePoint
|
private java.util.List<PlotData<E>> |
mDataSetList
A list of line plots, each element is a different line plot. |
private java.awt.Color |
mGridLineColor
|
private Pair<java.lang.Integer> |
mHighlightPoint
X and Y coordinates of point for highlighting (in screen coordinates) |
private float |
mHistYMax
|
private float |
mHistYMin
min max for histogram data. |
private int |
mLeftPtIndex
|
private LineType |
mLineType
|
private int |
mLineWidth
|
protected int |
mMouseX
X coordinate (in screen coordinates of mouse pressed event. |
private int |
mMouseY
Y coordinate (in screen coordinates of mouse pressed event. |
private java.awt.Color |
mNegHistogramColor
color of negative bar in histogram |
private int |
mNewMouseX
|
private int |
mNewMouseY
|
private int |
mPlotDataIndex
|
private java.util.ArrayList<TwoDPlotter.PlotType> |
mPlotTypeList
A list containing flags telling if the corresponding line plot is a histogram, financial plot, fourier plot or a line plot. |
private java.awt.Color |
mPosHistogramColor
Color of positive bar in histogram |
private int |
mPosXAxis
|
private int |
mPosYAxis
|
private double |
mProjX
Nearest point X coord (in world coordinates) |
private double |
mProjY
Nearest point Y coord (in world coordinates) |
private java.awt.Color |
mTickColor
|
private int |
mXLegendBox
|
private float |
mXMajorTickSpacing
|
private float |
mXMax
|
private float |
mXMin
min, max for plot data (excluding histogram data) which may have a different axis scale. |
private float |
mXMinorTickSpacing
|
private java.lang.String |
mXTitle
|
private int |
mYLegendBox
|
private float |
mYMajorTickSpacing
|
private float |
mYMax
|
private float |
mYMin
|
private float |
mYMinorTickSpacing
|
private java.lang.String |
mYTitle
|
private static int |
SPACING
Spacing inside legend box, between legend items, box boundaries |
| Fields inherited from class javax.swing.JComponent |
|---|
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW |
| Fields inherited from class java.awt.Component |
|---|
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
| Fields inherited from interface java.awt.image.ImageObserver |
|---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
| Constructor Summary | |
|---|---|
TwoDPlotter()
|
|
TwoDPlotter(int width,
int height)
|
|
| Method Summary | |
|---|---|
void |
AddDataSet(PlotData<E> data)
Add a data set representing line plot. |
void |
AddFinancialSet(PlotData<E> data)
Add a data set representing financial data (typically includes day high, low, close, volume. |
void |
AddFourierSet(PlotData<E> data)
Add a data set representing Fourier Transform plot. |
void |
AddHistogramSet(PlotData<E> data)
Add a data set representing histogram plot. |
private void |
ComputeMinMax()
|
private void |
ConvertScreenToWorldCoord(int pt_x,
int pt_y,
Pair<java.lang.Double> worldCoord)
|
private void |
ConvertWorldToScreenCoord(double pt_x,
double pt_y,
Pair<java.lang.Integer> screenCoord)
|
void |
DeleteAllData()
|
private void |
Draw(java.awt.Graphics g)
Draw the graph on provided graphics instance. |
private void |
DrawCoordBox(java.awt.Graphics g)
|
private void |
DrawDataPoints(java.awt.Graphics g)
|
private void |
DrawGraph(java.awt.Graphics g)
The actual method responsible for drawing the appropriate graph. |
private void |
DrawGrid(java.awt.Graphics g)
|
private void |
DrawLegend(java.awt.Graphics g)
Draw the legend box at specified location. |
private void |
DrawLineGraph(java.awt.Graphics g)
|
private void |
DrawNewtonGraph(java.awt.Graphics g)
|
protected void |
DrawRulerOutline(java.awt.Graphics g)
|
private void |
DrawXAxisTitle(java.awt.Graphics g)
|
private void |
DrawXMajorTicks(java.awt.Graphics g)
|
private void |
DrawXMinorTicks(java.awt.Graphics g)
|
private void |
DrawXYAxis(java.awt.Graphics g)
|
private void |
DrawYAxisTitle(java.awt.Graphics g)
|
private void |
DrawYMajorTicks(java.awt.Graphics g)
|
private void |
DrawYMinorTicks(java.awt.Graphics g)
|
boolean |
FourierTransform(int plotIndex)
|
java.awt.Color |
GetAxisColor()
|
java.awt.Color |
GetAxisLabelColor()
|
java.awt.Color |
GetBGColor()
|
boolean |
GetCandlestickFlag()
|
java.awt.Color |
GetCoordBoxColor()
|
java.awt.Color |
GetGridLineColor()
|
boolean |
GetHighlightedCoordDisplayFlag()
|
java.awt.Graphics |
GetImageGraphics()
Get the Graphics2d instance associated with buffered image. |
int |
GetLegendBoxXCorner()
|
int |
GetLegendBoxYCorner()
|
float |
GetMajorXTickSpacing()
|
float |
GetMajorYTickSpacing()
|
float |
GetMaxXRange()
|
float |
GetMaxYRange()
|
float |
GetMinorXTickSpacing()
|
float |
GetMinorYTickSpacing()
|
float |
GetMinXRange()
|
float |
GetMinYRange()
|
java.awt.Color |
GetNegativeRectColor()
|
java.util.List<PlotData<E>> |
GetPlotData()
|
TwoDPlotter.PlotType |
GetPlotType(int i)
|
java.awt.Color |
GetPositiveRectColor()
|
java.awt.Dimension |
getPreferredSize()
|
java.awt.Dimension |
GetSize()
|
boolean |
GetSuperimposePhase()
|
java.awt.Color |
GetTickColor()
|
int |
GetXAxisPos()
|
java.lang.String |
GetXTitle()
|
int |
GetYAxisPos()
|
java.lang.String |
GetYTitle()
|
void |
HighlightCandlestick(int pattern)
highlight special candlestick pattern. |
void |
HighlightDataPoints(boolean toHighlight)
|
boolean |
IsGridOn()
|
boolean |
IsLegendOn()
|
boolean |
IsXMajorTickOn()
|
boolean |
IsXMinorTickOn()
|
boolean |
IsYMajorTickOn()
|
boolean |
IsYMinorTickOn()
|
void |
mouseClicked(java.awt.event.MouseEvent e)
Handler for mouseClicked event.. |
void |
mouseDragged(java.awt.event.MouseEvent e)
|
void |
mouseEntered(java.awt.event.MouseEvent e)
|
void |
mouseExited(java.awt.event.MouseEvent e)
|
void |
mouseMoved(java.awt.event.MouseEvent e)
Handler for mouseMoved event. |
void |
mousePressed(java.awt.event.MouseEvent e)
|
void |
mouseReleased(java.awt.event.MouseEvent e)
|
protected void |
paintComponent(java.awt.Graphics g)
|
void |
Redraw()
|
void |
RegenerateImage()
Paint the buffered image again, after possibly resizing it. |
PlotData<E> |
RemoveDataSet(int setNum)
|
private void |
ResizeBufferedImage()
Resize the buffered image to drawing canvas size. |
void |
SaveScreenShot(java.io.File file,
java.lang.String extension)
Save the screen shot of graphics window in JPG, BMP, TIG or PNG format. |
void |
SetAutoFitOn(boolean on)
|
void |
SetAxisColor(java.awt.Color col)
|
void |
SetAxisLabelColor(java.awt.Color col)
|
void |
SetBGColor(java.awt.Color col)
|
void |
SetCandlestickFlag(boolean flag)
|
void |
SetConnectionType(ConnectionType connType)
|
void |
SetCoordBoxColor(java.awt.Color col)
|
void |
SetDrawMode(boolean on)
|
void |
SetGridLineColor(java.awt.Color col)
|
void |
SetHighlightedCoordDisplayFlag(boolean flag)
|
void |
SetLegendBoxXCorner(int xcorner)
|
void |
SetLegendBoxYCorner(int ycorner)
|
void |
SetLineType(LineType lineType)
|
void |
SetLineWidth(int width)
|
void |
SetMajorXTickSpacing(float delta)
|
void |
SetMajorYTickSpacing(float delta)
|
void |
SetMinorXTickSpacing(float delta)
|
void |
SetMinorYTickSpacing(float delta)
|
void |
SetNegativeRectColor(java.awt.Color col)
Set the color of negative valued bar. |
void |
SetPlotSize(int xPixelNum,
int yPixelNum)
|
void |
SetPositiveRectColor(java.awt.Color col)
Set the color of positive valued bar. |
void |
SetRulerColor(java.awt.Color col)
|
void |
SetSuperimposePhase(boolean flag)
|
void |
SetTickColor(java.awt.Color col)
|
void |
SetXAxisPos(int pos)
|
void |
SetXLabelOn(boolean on)
|
void |
SetXRange(float min,
float max)
|
void |
SetXTitle(java.lang.String title)
|
void |
SetYAxisPos(int pos)
|
void |
SetYLabelOn(boolean on)
|
void |
SetYRange(float min,
float max)
|
void |
SetYTitle(java.lang.String title)
|
void |
ShowGrid(boolean on)
|
void |
ShowLegend(boolean legendOn)
|
void |
ShowXMajorTicks(boolean showXTicks)
|
void |
ShowXMinorTicks(boolean showXTicks)
|
void |
ShowYMajorTicks(boolean showYTicks)
|
void |
ShowYMinorTicks(boolean showYTicks)
|
void |
ZoomIn(int screen_x,
int screen_y,
int width,
int height)
|
| Methods inherited from class javax.swing.JPanel |
|---|
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI |
| Methods inherited from class javax.swing.JComponent |
|---|
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update |
| Methods inherited from class java.awt.Container |
|---|
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusBackward, transferFocusDownCycle, validate, validateTree |
| Methods inherited from class java.awt.Component |
|---|
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusUpCycle |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
private java.util.List<PlotData<E>> mDataSetList
PlotDataprivate java.util.ArrayList<TwoDPlotter.PlotType> mPlotTypeList
TwoDPlotter.PlotTypeprivate static final int INSET
private static final int SPACING
private static final int LEGEND_ITEM_SQUARE_LEN
private static final int MAX_LEGEND_BOX_WIDTH
private static final int HIGHLIGHT_CIRCLE_RADIUS
private static final int MAX_MAJOR_TICKS
private static final int MAX_MINOR_TICKS
private static final int MAX_HISTOGRAM_TICKS
private static final float HISTOGRAM_FRACTION
private float mXMin
private float mXMax
private float mYMin
private float mYMax
private float mHistYMin
private float mHistYMax
private boolean bHistogramPresent
private boolean bFourierPresent
private boolean bFinancialPresent
private boolean bSuperimposePhase
private boolean bXMajorTicksOn
private boolean bXMinorTicksOn
private boolean bYMajorTicksOn
private boolean bYMinorTicksOn
private boolean bGridOn
private float mXMinorTickSpacing
private float mXMajorTickSpacing
private float mYMinorTickSpacing
private float mYMajorTickSpacing
private boolean bXLabelOn
private boolean bYLabelOn
private java.lang.String mXTitle
private java.lang.String mYTitle
private boolean bLegendOn
private java.awt.Color mBGColor
private java.awt.Color mAxisColor
private java.awt.Color mAxisLabelColor
private java.awt.Color mTickColor
private java.awt.Color mGridLineColor
private java.awt.Color mPosHistogramColor
private java.awt.Color mNegHistogramColor
private boolean bHighlightDataPoints
private LineType mLineType
private ConnectionType mConnType
private int mLineWidth
private boolean bAutoFitOn
private int mPosXAxis
private int mPosYAxis
private int mXLegendBox
private int mYLegendBox
protected int mMouseX
private int mMouseY
private int mNewMouseX
private int mNewMouseY
private boolean bShowHighlightedCoord
private java.awt.Color mCoordBoxColor
private Pair<java.lang.Integer> mHighlightPoint
private double mProjX
private double mProjY
private boolean bHighlightDataPresent
private Pair<java.lang.Double> mCurrMousePoint
private int mPlotDataIndex
private int mLeftPtIndex
private java.awt.image.BufferedImage mBufImg
private boolean m_bDrawMode
private boolean m_bDrawingRuler
private java.awt.Color m_RulerColor
private boolean m_bJapaneseCandlesticks
| Constructor Detail |
|---|
public TwoDPlotter()
public TwoDPlotter(int width,
int height)
| Method Detail |
|---|
public TwoDPlotter.PlotType GetPlotType(int i)
public boolean GetCandlestickFlag()
public void SetCandlestickFlag(boolean flag)
public boolean GetHighlightedCoordDisplayFlag()
public void SetHighlightedCoordDisplayFlag(boolean flag)
public java.awt.Color GetCoordBoxColor()
public void SetRulerColor(java.awt.Color col)
public void SetDrawMode(boolean on)
public void SetCoordBoxColor(java.awt.Color col)
public void SetXRange(float min,
float max)
SetXRange in interface HistogramSetXRange in interface TwoDPlotpublic void SetPositiveRectColor(java.awt.Color col)
Histogram
SetPositiveRectColor in interface Histogrampublic void SetNegativeRectColor(java.awt.Color col)
Histogram
SetNegativeRectColor in interface Histogrampublic java.awt.Color GetPositiveRectColor()
public java.awt.Color GetNegativeRectColor()
public float GetMinXRange()
public float GetMaxXRange()
public void SetYRange(float min,
float max)
SetYRange in interface HistogramSetYRange in interface TwoDPlotpublic float GetMinYRange()
public float GetMaxYRange()
public void SetXAxisPos(int pos)
public int GetXAxisPos()
public void SetYAxisPos(int pos)
public int GetYAxisPos()
public void ShowXMajorTicks(boolean showXTicks)
ShowXMajorTicks in interface HistogramShowXMajorTicks in interface TwoDPlotpublic boolean IsXMajorTickOn()
public void ShowYMajorTicks(boolean showYTicks)
ShowYMajorTicks in interface HistogramShowYMajorTicks in interface TwoDPlotpublic boolean IsYMajorTickOn()
public void ShowXMinorTicks(boolean showXTicks)
ShowXMinorTicks in interface HistogramShowXMinorTicks in interface TwoDPlotpublic boolean IsXMinorTickOn()
public void ShowYMinorTicks(boolean showYTicks)
ShowYMinorTicks in interface HistogramShowYMinorTicks in interface TwoDPlotpublic boolean IsYMinorTickOn()
public void SetMinorXTickSpacing(float delta)
SetMinorXTickSpacing in interface HistogramSetMinorXTickSpacing in interface TwoDPlotpublic float GetMinorXTickSpacing()
public void SetMajorXTickSpacing(float delta)
SetMajorXTickSpacing in interface HistogramSetMajorXTickSpacing in interface TwoDPlotpublic float GetMajorXTickSpacing()
public void SetMinorYTickSpacing(float delta)
SetMinorYTickSpacing in interface HistogramSetMinorYTickSpacing in interface TwoDPlotpublic float GetMinorYTickSpacing()
public void SetMajorYTickSpacing(float delta)
SetMajorYTickSpacing in interface HistogramSetMajorYTickSpacing in interface TwoDPlotpublic float GetMajorYTickSpacing()
public void ShowGrid(boolean on)
ShowGrid in interface PlotBasepublic void SetXLabelOn(boolean on)
public void SetYLabelOn(boolean on)
public void SetXTitle(java.lang.String title)
public java.lang.String GetXTitle()
public void SetYTitle(java.lang.String title)
public java.lang.String GetYTitle()
public void ShowLegend(boolean legendOn)
ShowLegend in interface PlotBasepublic boolean IsLegendOn()
public void SetBGColor(java.awt.Color col)
SetBGColor in interface PlotBasepublic java.awt.Color GetBGColor()
public void SetAxisColor(java.awt.Color col)
public java.awt.Color GetAxisColor()
public void SetAxisLabelColor(java.awt.Color col)
public java.awt.Color GetAxisLabelColor()
public void SetTickColor(java.awt.Color col)
public java.awt.Color GetTickColor()
public void SetGridLineColor(java.awt.Color col)
public java.awt.Color GetGridLineColor()
public void HighlightDataPoints(boolean toHighlight)
HighlightDataPoints in interface PlotBasepublic void SetLegendBoxXCorner(int xcorner)
SetLegendBoxXCorner in interface PlotBasepublic int GetLegendBoxXCorner()
public void SetLegendBoxYCorner(int ycorner)
SetLegendBoxYCorner in interface PlotBasepublic int GetLegendBoxYCorner()
public boolean IsGridOn()
public boolean FourierTransform(int plotIndex)
public boolean GetSuperimposePhase()
public void SetSuperimposePhase(boolean flag)
public void SetAutoFitOn(boolean on)
SetAutoFitOn in interface PlotBase
public void SetPlotSize(int xPixelNum,
int yPixelNum)
SetPlotSize in interface PlotBasepublic java.awt.Dimension GetSize()
GetSize in interface PlotBasepublic void AddDataSet(PlotData<E> data)
public void AddHistogramSet(PlotData<E> data)
public void AddFinancialSet(PlotData<E> data)
public void AddFourierSet(PlotData<E> data)
public java.util.List<PlotData<E>> GetPlotData()
public PlotData<E> RemoveDataSet(int setNum)
public void DeleteAllData()
DeleteAllData in interface PlotBasepublic void SetLineType(LineType lineType)
SetLineType in interface TwoDPlotpublic void SetConnectionType(ConnectionType connType)
SetConnectionType in interface TwoDPlotpublic void SetLineWidth(int width)
SetLineWidth in interface TwoDPlotpublic void Redraw()
protected void paintComponent(java.awt.Graphics g)
paintComponent in class javax.swing.JComponentprotected void DrawRulerOutline(java.awt.Graphics g)
public java.awt.Dimension getPreferredSize()
getPreferredSize in class javax.swing.JComponentprivate void ResizeBufferedImage()
public java.awt.Graphics GetImageGraphics()
public void RegenerateImage()
private void Draw(java.awt.Graphics g)
g - Graphics instance where painting needs to be done.private void DrawGraph(java.awt.Graphics g)
g - Graphics instance on which graph needs to be rendered.
public void ZoomIn(int screen_x,
int screen_y,
int width,
int height)
public void HighlightCandlestick(int pattern)
private void ComputeMinMax()
private void DrawCoordBox(java.awt.Graphics g)
private void DrawXYAxis(java.awt.Graphics g)
private void DrawXMajorTicks(java.awt.Graphics g)
private void DrawXMinorTicks(java.awt.Graphics g)
private void DrawYMajorTicks(java.awt.Graphics g)
private void DrawYMinorTicks(java.awt.Graphics g)
private void DrawXAxisTitle(java.awt.Graphics g)
private void DrawYAxisTitle(java.awt.Graphics g)
private void DrawGrid(java.awt.Graphics g)
private void DrawNewtonGraph(java.awt.Graphics g)
private void ConvertWorldToScreenCoord(double pt_x,
double pt_y,
Pair<java.lang.Integer> screenCoord)
private void ConvertScreenToWorldCoord(int pt_x,
int pt_y,
Pair<java.lang.Double> worldCoord)
private void DrawLineGraph(java.awt.Graphics g)
private void DrawDataPoints(java.awt.Graphics g)
private void DrawLegend(java.awt.Graphics g)
mXLegendBox,
mYLegendBox
public void SaveScreenShot(java.io.File file,
java.lang.String extension)
public void mouseClicked(java.awt.event.MouseEvent e)
mouseClicked in interface java.awt.event.MouseListenere - MouseEvent corresponding to mouse movementpublic void mouseMoved(java.awt.event.MouseEvent e)
mouseMoved in interface java.awt.event.MouseMotionListenere - MouseEvent corresponding to mouse movementpublic void mouseExited(java.awt.event.MouseEvent e)
mouseExited in interface java.awt.event.MouseListenerpublic void mouseReleased(java.awt.event.MouseEvent e)
mouseReleased in interface java.awt.event.MouseListenerpublic void mouseEntered(java.awt.event.MouseEvent e)
mouseEntered in interface java.awt.event.MouseListenerpublic void mousePressed(java.awt.event.MouseEvent e)
mousePressed in interface java.awt.event.MouseListenerpublic void mouseDragged(java.awt.event.MouseEvent e)
mouseDragged in interface java.awt.event.MouseMotionListener
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||