|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.sourceforge.swtlayeredgraph.GraphGridLayer
public class GraphGridLayer
| Constructor Summary | |
|---|---|
GraphGridLayer()
Default constructor |
|
GraphGridLayer(java.lang.Double xInterval,
java.lang.Double yInterval,
LineStyle xLineStyle,
LineStyle yLineStyle,
int xWidth,
int yWidth,
int xMultiplier,
int yMultiplier,
int xMultWidth,
int yMultWidth,
java.lang.Boolean visible,
CoordinateType type,
org.eclipse.swt.graphics.Color color)
Builds a graph grid layer object. |
|
| Method Summary | |
|---|---|
void |
addChangeListener(ChangeListener listener)
Subscribes to change events. |
void |
draw(GCTransformer transformer)
Draws the grid. |
protected org.eclipse.swt.graphics.Color |
drawInit(SwtGC gc)
Initializes drawing. |
protected void |
drawLines(SwtGC gc,
int incX,
int incY,
org.eclipse.swt.graphics.Point startPoint,
org.eclipse.swt.graphics.Point endPoint,
org.eclipse.swt.graphics.Point multipule,
org.eclipse.swt.graphics.Point origin)
Draws the grid using lines. |
protected void |
drawPoints(SwtGC gc,
int incX,
int incY,
int radius,
org.eclipse.swt.graphics.Point startPoint,
org.eclipse.swt.graphics.Point endPoint,
org.eclipse.swt.graphics.Point multipule,
org.eclipse.swt.graphics.Point origin)
Draws the grid using points. |
org.eclipse.swt.graphics.Color |
getColor()
Gets the line color for the grid. |
CoordinateType |
getCoordinateType()
Gets the coordinate type for x/y increments. |
protected org.eclipse.swt.graphics.Point |
getStartingMultiplierValues(GCTransformer transformer,
int incX,
int incY)
|
protected org.eclipse.swt.graphics.Point |
getStartingPoint(GCTransformer transformer,
int incX,
int incY)
Calculates the point to start drawing grid. |
java.lang.Double |
getXInterval()
Gets the X interval. |
int |
getXLineMultiplier()
Gets the x line multiplier. |
int |
getXLineMultiplierWidth()
Gets the with of lines that match the x multiplier. |
LineStyle |
getXLineStyle()
Gets the line style for horizontal lines. |
int |
getXLineWidth()
Gets the horizontal line width in pixels. |
java.lang.Double |
getYInterval()
Gets the Y interval. |
int |
getYLineMultiplier()
Gets the y line multiplier. |
int |
getYLineMultiplierWidth()
Gets the with of lines that match the x multiplier. |
LineStyle |
getYLineStyle()
Gets the line style for vertical lines. |
int |
getYLineWidth()
Gets the vertical line width in pixels. |
java.lang.Boolean |
isVisible()
Checks if the grid is visible. |
void |
removeChangeListener(ChangeListener listener)
Removes subscription to change events. |
void |
setColor(org.eclipse.swt.graphics.Color color)
Sets the line color. |
void |
setCoordinateType(CoordinateType type)
Sets the coordinate type of the x/y intervals. |
void |
setVisible(java.lang.Boolean visible)
Sets the visibility flag for the grid. |
void |
setXInterval(java.lang.Double interval)
Sets the X interval (vertical line spacing). |
void |
setXLineMultiplier(int multiplier)
Sets the new x line multiplier. |
void |
setXLineMultiplierWidth(int width)
Sets the width of lines that match the y multiplier. |
void |
setXLineStyle(LineStyle lineStyle)
Sets the line style for horizontal lines. |
void |
setXLineWidth(int width)
Sets the width (in pixels) of horizontal lines. |
void |
setYInterval(java.lang.Double interval)
Sets the Y interval (horizontal line spacing). |
void |
setYLineMultiplier(int multiplier)
Sets the new y line multiplier. |
void |
setYLineMultiplierWidth(int width)
Sets the width of lines that match the y multiplier. |
void |
setYLineStyle(LineStyle lineStyle)
Sets the line style for vertical lines. |
void |
setYLineWidth(int width)
Sets the width (in pixels) of vertical lines. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public GraphGridLayer()
public GraphGridLayer(java.lang.Double xInterval,
java.lang.Double yInterval,
LineStyle xLineStyle,
LineStyle yLineStyle,
int xWidth,
int yWidth,
int xMultiplier,
int yMultiplier,
int xMultWidth,
int yMultWidth,
java.lang.Boolean visible,
CoordinateType type,
org.eclipse.swt.graphics.Color color)
xInterval - Interval between vertical lines.yInterval - Interval between horizontal lines.xLineStyle - Line style for horizontal lines.yLineStyle - Line style for vertical lines.xWidth - Width (in pixels) of horizontal lines.yWidth - Width (in pixels) of vertical lines.visible - Flag to indicate if grid is visible.xMultiplier - X multiplier interval. Zero disables usage of multiplier
interval.yMultiplier - Y multiplier interval. Zero disables usage of multiplier
interval.xMultWidth - Width of x multiple lines (in pixels).yMultWidth - Width of y multiple lines (in pixels).type - Coordinate system interval is in.color - Color of grid.
IllegalArgumentExcetpion - If xInterval, yInterval, xLineStyle, yLineStyle, visible,
type or color are null. Also thrown if xWidth or yWidth <= 0.| Method Detail |
|---|
protected org.eclipse.swt.graphics.Point getStartingPoint(GCTransformer transformer,
int incX,
int incY)
transformer - GC Transformer that contains gc to draw on.incX - Number of pixels between vertical lines.incY - Number of pixels between horizontal lines.
protected org.eclipse.swt.graphics.Point getStartingMultiplierValues(GCTransformer transformer,
int incX,
int incY)
protected org.eclipse.swt.graphics.Color drawInit(SwtGC gc)
gc - The GC object to draw on.
protected void drawLines(SwtGC gc,
int incX,
int incY,
org.eclipse.swt.graphics.Point startPoint,
org.eclipse.swt.graphics.Point endPoint,
org.eclipse.swt.graphics.Point multipule,
org.eclipse.swt.graphics.Point origin)
gc - The GC to draw to.incX - Number of pixels between vertical lines.incY - Number of pixels between horizontal lines.startPoint - Point to start drawing from.endPoint - Point to end drawing at.multipule - Point that specifies the multiplier value.origin - Point that specifies 0, 0 on the graph.
protected void drawPoints(SwtGC gc,
int incX,
int incY,
int radius,
org.eclipse.swt.graphics.Point startPoint,
org.eclipse.swt.graphics.Point endPoint,
org.eclipse.swt.graphics.Point multipule,
org.eclipse.swt.graphics.Point origin)
gc - The GC to draw to.incX - Number of pixels between vertical lines.incY - Number of pixels between horizontal lines.radius - Number of pixels for diameter of the point. If < 1, 1 is used.startPoint - Point to start drawing from.endPoint - Point to end drawing at.multipule - Point that specifies the multiplier value.origin - Point that specifies 0, 0 on the graph.public void draw(GCTransformer transformer)
IGraphGridLayer
draw in interface IGraphGridLayertransformer - Transformer that contains the GC to draw on.public org.eclipse.swt.graphics.Color getColor()
IGraphGridLayer
getColor in interface IGraphGridLayerpublic CoordinateType getCoordinateType()
IGraphGridLayer
getCoordinateType in interface IGraphGridLayerpublic java.lang.Boolean isVisible()
IGraphGridLayer
isVisible in interface IGraphGridLayerpublic java.lang.Double getXInterval()
IGraphGridLayer
getXInterval in interface IGraphGridLayerpublic LineStyle getXLineStyle()
IGraphGridLayer
getXLineStyle in interface IGraphGridLayerpublic int getXLineWidth()
IGraphGridLayer
getXLineWidth in interface IGraphGridLayerpublic int getXLineMultiplier()
IGraphGridLayer
getXLineMultiplier in interface IGraphGridLayerpublic void setXLineMultiplier(int multiplier)
IGraphGridLayer
setXLineMultiplier in interface IGraphGridLayermultiplier - New multiplier.public int getXLineMultiplierWidth()
IGraphGridLayer
getXLineMultiplierWidth in interface IGraphGridLayerpublic void setXLineMultiplierWidth(int width)
IGraphGridLayer
setXLineMultiplierWidth in interface IGraphGridLayerwidth - New multiplier.public int getYLineMultiplier()
IGraphGridLayer
getYLineMultiplier in interface IGraphGridLayerpublic void setYLineMultiplier(int multiplier)
IGraphGridLayer
setYLineMultiplier in interface IGraphGridLayermultiplier - New multiplier.public int getYLineMultiplierWidth()
IGraphGridLayer
getYLineMultiplierWidth in interface IGraphGridLayerpublic void setYLineMultiplierWidth(int width)
IGraphGridLayer
setYLineMultiplierWidth in interface IGraphGridLayerwidth - New multiplier.public java.lang.Double getYInterval()
IGraphGridLayer
getYInterval in interface IGraphGridLayerpublic LineStyle getYLineStyle()
IGraphGridLayer
getYLineStyle in interface IGraphGridLayerpublic int getYLineWidth()
IGraphGridLayer
getYLineWidth in interface IGraphGridLayerpublic void setColor(org.eclipse.swt.graphics.Color color)
IGraphGridLayer
setColor in interface IGraphGridLayercolor - New color to use for grid.public void setCoordinateType(CoordinateType type)
IGraphGridLayer
setCoordinateType in interface IGraphGridLayertype - New coordinate system type.public void setVisible(java.lang.Boolean visible)
IGraphGridLayer
setVisible in interface IGraphGridLayervisible - Flag to indicate if grid is visible.public void setXInterval(java.lang.Double interval)
IGraphGridLayer
setXInterval in interface IGraphGridLayerinterval - Distance between vertical lines.public void setXLineStyle(LineStyle lineStyle)
IGraphGridLayer
setXLineStyle in interface IGraphGridLayerlineStyle - Line style for horizontal lines.public void setXLineWidth(int width)
IGraphGridLayer
setXLineWidth in interface IGraphGridLayerwidth - Width (in pixels) of horizontal lines.public void setYInterval(java.lang.Double interval)
IGraphGridLayer
setYInterval in interface IGraphGridLayerinterval - Distance between horizontal lines.public void setYLineStyle(LineStyle lineStyle)
IGraphGridLayer
setYLineStyle in interface IGraphGridLayerlineStyle - Line style for vertical lines.public void setYLineWidth(int width)
IGraphGridLayer
setYLineWidth in interface IGraphGridLayerwidth - Width (in pixels) of vertical lines.public void addChangeListener(ChangeListener listener)
IGraphGridLayer
addChangeListener in interface IGraphGridLayerlistener - Listener to call when a change occurs.public void removeChangeListener(ChangeListener listener)
IGraphGridLayer
removeChangeListener in interface IGraphGridLayerlistener - Listener to unregister.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||