net.sourceforge.eclipsetrader.charts
Class IndicatorPlot
java.lang.Object
org.eclipse.swt.widgets.Widget
org.eclipse.swt.widgets.Control
org.eclipse.swt.widgets.Scrollable
org.eclipse.swt.widgets.Composite
org.eclipse.swt.widgets.Canvas
net.sourceforge.eclipsetrader.charts.IndicatorPlot
- All Implemented Interfaces:
- org.eclipse.swt.events.ControlListener, org.eclipse.swt.events.DisposeListener, org.eclipse.swt.graphics.Drawable, java.util.EventListener, org.eclipse.swt.events.PaintListener, org.eclipse.swt.internal.SWTEventListener
- public class IndicatorPlot
- extends org.eclipse.swt.widgets.Canvas
- implements org.eclipse.swt.events.ControlListener, org.eclipse.swt.events.DisposeListener, org.eclipse.swt.events.PaintListener
Fields inherited from class org.eclipse.swt.widgets.Composite |
embeddedHandle |
Fields inherited from class org.eclipse.swt.widgets.Widget |
handle |
Constructor Summary |
IndicatorPlot(org.eclipse.swt.widgets.Composite parent,
int style)
|
Methods inherited from class org.eclipse.swt.widgets.Canvas |
drawBackground, getCaret, scroll, setCaret, setFont |
Methods inherited from class org.eclipse.swt.widgets.Composite |
changed, computeSize, getBackgroundMode, getChildren, getClientArea, getLayout, getLayoutDeferred, getTabList, isLayoutDeferred, layout, layout, layout, layout, setBackgroundMode, setFocus, setLayout, setLayoutDeferred, setTabList |
Methods inherited from class org.eclipse.swt.widgets.Scrollable |
computeTrim, getBorderWidth, getHorizontalBar, getVerticalBar |
Methods inherited from class org.eclipse.swt.widgets.Control |
addControlListener, addFocusListener, addHelpListener, addKeyListener, addMouseListener, addMouseMoveListener, addMouseTrackListener, addPaintListener, addTraverseListener, computeSize, forceFocus, getAccessible, getBackground, getBackgroundImage, getBounds, getEnabled, getFont, getForeground, getLayoutData, getLocation, getMenu, getMonitor, getParent, getShell, getSize, getToolTipText, getVisible, internal_dispose_GC, internal_new_GC, isEnabled, isFocusControl, isReparentable, isVisible, moveAbove, moveBelow, pack, pack, redraw, redraw, removeControlListener, removeFocusListener, removeHelpListener, removeKeyListener, removeMouseListener, removeMouseMoveListener, removeMouseTrackListener, removePaintListener, removeTraverseListener, setBackground, setBackgroundImage, setBounds, setBounds, setCapture, setCursor, setEnabled, setForeground, setLayoutData, setLocation, setLocation, setMenu, setParent, setRedraw, setSize, setSize, setToolTipText, setVisible, toControl, toControl, toDisplay, toDisplay, traverse, update |
Methods inherited from class org.eclipse.swt.widgets.Widget |
addDisposeListener, addListener, dispose, getData, getData, getDisplay, getStyle, isDisposed, isListening, notifyListeners, removeDisposeListener, removeListener, setData, setData, toString |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
IndicatorPlot
public IndicatorPlot(org.eclipse.swt.widgets.Composite parent,
int style)
setGridColor
public void setGridColor(org.eclipse.swt.graphics.Color newGridColor)
getBarData
public BarData getBarData()
setBarData
public void setBarData(BarData barData)
addIndicator
public void addIndicator(Indicator indicator)
removeIndicator
public void removeIndicator(Indicator indicator)
clearIndicators
public void clearIndicators()
getIndicators
public java.util.List getIndicators()
addObject
public void addObject(ObjectPlugin object)
removeObject
public void removeObject(ObjectPlugin object)
getObjects
public java.util.List getObjects()
getPlotLocation
public org.eclipse.swt.graphics.Point getPlotLocation()
setPlotLocation
public void setPlotLocation(org.eclipse.swt.graphics.Point location)
setPlotLocation
public void setPlotLocation(int x,
int y)
getPlotSize
public org.eclipse.swt.graphics.Point getPlotSize()
setPlotSize
public void setPlotSize(int width,
int height)
getPlotBounds
public org.eclipse.swt.graphics.Rectangle getPlotBounds()
setPlotBounds
public void setPlotBounds(int x,
int y,
int width,
int height)
setPlotBounds
public void setPlotBounds(org.eclipse.swt.graphics.Rectangle rectangle)
addPlotListener
public void addPlotListener(net.sourceforge.eclipsetrader.charts.events.PlotListener listener)
removePlotListener
public void removePlotListener(net.sourceforge.eclipsetrader.charts.events.PlotListener listener)
getGridWidth
public int getGridWidth()
setGridWidth
public void setGridWidth(int columnWidth)
getMarginWidth
public int getMarginWidth()
setMarginWidth
public void setMarginWidth(int marginWidth)
setScaler
public void setScaler(Scaler scaler)
controlMoved
public void controlMoved(org.eclipse.swt.events.ControlEvent e)
- Specified by:
controlMoved
in interface org.eclipse.swt.events.ControlListener
controlResized
public void controlResized(org.eclipse.swt.events.ControlEvent e)
- Specified by:
controlResized
in interface org.eclipse.swt.events.ControlListener
deselectAll
public void deselectAll()
getSelection
public Indicator getSelection()
setSelection
public void setSelection(Indicator selection)
getElementsAt
public java.lang.Object[] getElementsAt(org.eclipse.swt.graphics.Point point)
- Returns a possibly empty array of all chart elements at the given position.
- Parameters:
point
- - position
- Returns:
- an array of ObjectPlugin and Indicator objects
getIndicatorAt
public Indicator[] getIndicatorAt(org.eclipse.swt.graphics.Point point)
- Returns a possibly empty array of all chart indicators at the given position.
- Parameters:
point
- - position
- Returns:
- an array of indicators
getObjectSelection
public ObjectPlugin getObjectSelection()
setObjectSelection
public void setObjectSelection(ObjectPlugin selection)
getObjectAt
public ObjectPlugin[] getObjectAt(int x,
int y)
- Returns a possibly empty array of all drawing objects at the given position.
- Parameters:
x
- - x positiony
- - y position
- Returns:
- an array of objects
redrawAll
public void redrawAll()
draw
public void draw(org.eclipse.swt.graphics.GC gc)
paintControl
public void paintControl(org.eclipse.swt.events.PaintEvent e)
- Specified by:
paintControl
in interface org.eclipse.swt.events.PaintListener
widgetDisposed
public void widgetDisposed(org.eclipse.swt.events.DisposeEvent e)
- Specified by:
widgetDisposed
in interface org.eclipse.swt.events.DisposeListener
setMarketValue
public void setMarketValue(double value)
hideMarketValue
public void hideMarketValue()
isAutoScale
public boolean isAutoScale()
setAutoScale
public void setAutoScale(boolean autoScale)