ElegantJCharts Java API Specification v2.0

com.elegantj.graphx.line
Class LineGraphTypeObject

java.lang.Object
  |
  +--com.elegantj.graphx.GraphTypeObject
        |
        +--com.elegantj.graphx.line.LineGraphTypeObject
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
StackedLineGraph, XYScatterGraphTypeObject

public class LineGraphTypeObject
extends GraphTypeObject
implements java.io.Serializable

LineGraphTypeObject class provides the basic functionality to render the Graphs line

See Also:
Serialized Form

Field Summary
protected static int EXPLAN_HOFFSET
          Specifies the constant for explanation notes horizontal offset
protected static int H_SPACE
          Specifies the Horizontal offset
protected  int m_3DHOffset
          Specifies the Horizontal Deviation for Display 3D effect
protected  int m_3DVOffset
          Specifies the Vertical Deviation for Display 3D effect
protected  int m_ExplanAreaAlign
          Specifies the Explanation area Alignment(LEFT/CENTER/RIGHT OR TOP/CENTER/BOTTOM)
protected  int m_ExplanAreaHeight
          Specifies the explanation area height
protected  int m_ExplanAreaPosition
          Specifies the Explanation area Position(NORTH/EAST/SOUTH/WEST)
protected  int m_ExplanAreaWidth
          Specifies the explanation area width
protected static boolean m_fDebug
          Specifies the execution mode
protected  int m_FontHeight
          Specifies the font height
protected  int m_GraphAreaWidth
          Specifies the graph width
protected  GraphLabel m_GraphLabel
          Specifies the graph label
protected  GraphLineDetail m_GraphLineDetail
          Specifies the Line Properties of Graph
protected  java.awt.Polygon m_GraphRectangle
          Specifies Actual Graph Area Rectangle
protected  GraphTitleDetail m_GraphTitleDetail
          Specifies the Title Detail for Graph
protected  GraphXAxisDetail m_GraphXAxisDetail
          Specifies the X-Axis Detail for Graph
protected  java.awt.Rectangle m_GraphXAxisRectangle
          Specifies Actual X-Axis label Area Rectangle
protected  GraphYAxisDetail m_GraphYAxisDetail
          Specifies the Y-Axis Detail for Graph
protected  java.awt.Rectangle m_GraphYAxisRectangle
          Specifies Actual Y-Axis Label Area Rectangle
protected  GraphZAxisDetail m_GraphZAxisDetail
          Specifies the Z-Axis (Legends) Detail for Graph
protected  java.awt.Rectangle m_GraphZAxisRectangle
          Specifies Actual Z-Axis Label Area Rectangle
protected  int m_Height
          Specifies the total height
protected  int m_HOffset
          Specifies the horizontal offset
protected  boolean m_Is3DGraph
          Specifies 3D effect is Enable or Disable
protected  boolean m_IsPointSet
          Specifies the Mouse Over effect is drawn then this flag is false
protected  LineGraph m_LineGraph
          Specifies LineGraph Object
protected  LineGraphExplanNotes m_LineGraphExplanNotes
          Specifies the graph explanation notes
protected  int m_LinePosition
          Specifies the position of line (MIDDLE/FRONT/BACK)
protected  int m_LineWidth
          Specifies the line width
protected  int m_MinusYClipLabels
          Specifies the total number of y-axis minimum labels
protected  int m_MinusYClipLength
          Specifies the y-axis minimum extra length
protected  java.awt.Rectangle m_MouseOverTextRect
          Specifies Mouse Over text Area Rectangle
protected  DrillDownDetail m_OldMODetail
          Specifies old Mouse Over Object (DrillDownDetail)
protected  int m_PlusYClipLabels
          Specifies the total number of y-axis maximum labels
protected  int m_PlusYClipLength
          Specifies the y-axis maximum extra length
protected  java.awt.Polygon[] m_PolXLabelList
          contain bound polygon of X axis labels
protected  java.awt.Polygon[] m_PolYLabelList
          contain bound polygon of Y axis labels
protected  TextAlign m_TextAlign
          Specifies the text alignment
protected  java.awt.Font m_TitleFont
          Specifies Title Font
protected  int m_TitleFontHeight
          Specifies Graph Title Font Height
protected  int m_TitleHeight
          Specifies Graph Title Height
protected  java.awt.Rectangle m_TitleRectangle
          Specifies Title Rectangle
protected  int m_VOffset
          Specifies the vertical offset
protected  int m_Width
          Specifies the total width
protected  int m_XAxisHeight
          Specifies X-Axis Label Height
protected  java.awt.Font m_XAxisLabelFont
          Specifies X-Axis Font
protected  int m_XAxisWidth
          Specifies X-Axis Label Width
protected  int m_XGradLength
          Specifies the x-axis gradient length
protected  int m_XLabels
          Specifies the total number of x-axis labels
protected  int m_XLabelVSteps
          Specifies the total number of x-axis labels vertical steps
protected  int m_XLength
          Specifies the x-axis length
protected  double m_YAbsGradLabel
          Specifies the y-axis gradient absolute label size
protected  int m_YAxisHeight
          Specifies Y-Axis Label Height
protected  java.awt.Font m_YAxisLabelFont
          Specifies Y-Axis Font
protected  int m_YAxisPosition
          Specifies the position of Y Axis (LEFT/RIGHT)
protected  int m_YAxisWidth
          Specifies Y-Axis Label Width
protected  int m_YClipLabels
          Specifies the total number of y-axis labels
protected  int m_YClipLength
          Specifies the y-axis length
protected  int m_YGradLength
          Specifies the y-axis gradient length
protected  int m_YLabelVSteps
          Specifies the number of Y-axis labels skip steps
protected  double m_YMaxLabelValue
          Specifies the y-axis maximum value
protected  int m_YMaxLabelWidth
          Specifies Y-Axis Label Maximum Width
protected  double m_YMinLabelValue
          Specifies the y-axis minimum value
protected  int m_ZGradLength
          Specifies the z-axis gradient length
protected  int m_ZLabels
          Specifies the total number of z-axis labels
protected  int theLeftGap
          Horizontal gap
protected  java.awt.Rectangle zoomedRect
          stores the boundes of zommed datapointshape area
 
Fields inherited from class com.elegantj.graphx.GraphTypeObject
m_GraphicsEx
 
Constructor Summary
LineGraphTypeObject(LineGraph inGraphMain)
          Creates the LineGraphTypeObject with specified LineGraph object
 
Method Summary
protected  java.util.Vector calcLinePoints()
          This method calculate points to draw lne graph
protected  void computeSplineSlopePoints(double[] x, double[] y, double[] xCurved, double[] yCurved, int nDivs)
           
protected  java.awt.Rectangle DraeDataPointShape(GraphicsEx inGraphicsEx, int x, int y, LineGraphRowInfo rowInfo)
          This method accepts the point on which shape is to be drswn The complete information about the shape is picked from its argument rowInfo
protected  void drawExplanNotes()
          Draws the explanation notes
protected  void drawGraph()
          Draws the Graph
 void drawGraph(java.util.Vector thePointsVector)
          Draws the Graph
protected  void drawGraphAreaBackground(GraphicsEx inGraphicsEx)
          Draws Backgound of Actual graph Area
protected  void DrawLineGraph(double[] x, double[] y, LineGraphRowInfo rowInfo)
          This method accept array of cordinates of all the points on a line and a object of LineGraphRowInfo type that contains the all info about that line.
protected  void DrawLineGraphShadow(double[] x, double[] y, LineGraphRowInfo rowInfo)
          This method accept array of cordinates of all the points on a line and a object of LineGraphRowInfo type that contains the all info about that line.
 boolean drawMouseOverEffect(GraphicsEx inGraphicsEx, DrillDownDetail inDDD, boolean isMOEDraw, boolean isMOTDraw, boolean isRestore)
          This method returns true If any shape is drawn on given graphics Object otherwize false
 java.awt.Rectangle drawMouseOverText(GraphicsEx inGraphicsEx, DrillDownDetail inDDD, int inH, int inV, int inWidth, int inHeight, int theI)
          This method draws mouse over Text
protected  void DrawPointGraph(double[] x, double[] y, LineGraphRowInfo rowInfo)
          This method accept array of cordinates of all the points on a line and a object of LineGraphRowInfo type that contains the all info about that line.
 java.awt.Rectangle drawStaticMouseOverText(GraphicsEx inGraphicsEx)
          This method draws Static mouse over Text
protected  void DrawStripGraph(double[] x, double[] y, LineGraphRowInfo rowInfo)
          This method accept array of cordinates of all the points on a line and a object of LineGraphRowInfo type that contains the all info about that line.
protected  void DrawStyledGraphLine(double[] x, double[] y, LineGraphRowInfo rowInfo)
          This method accept array of cordinates of all the points on a line and a object of LineGraphRowInfo type that contains the all info about that line.
protected  void drawTitle()
          Draws the title
protected  void drawXAxisGridAndTick()
          Draws The X-Axis Grid and Tick lines
protected  void drawXAxisLabels()
          Draws The X-Axis Labels
protected  void drawXAxisLine()
          Draws The X-Axis Line
protected  void drawYAxisGridAndTick()
          Draws The Y-Axis Grid and Tick lines
protected  void drawYAxisLabels()
          Draws The Y-Axis Labels
protected  void drawYAxisLine()
          Draws The Y-Axis
 DrillDownDetail getClickedXAxisLabel(int click_x, int click_y)
          If Given Point on X axis Label then it will Return Drilldowndetail Object Otherwise Return null
 DrillDownDetail getClickedYAxisLabel(int click_x, int click_y)
          If Given Point on Y axis Label then it will Return Drilldowndetail Object Otherwise Return null
 DrillDownDetail getDrillDetail(int click_x, int click_y)
          If Given Point on Graph then it will Return Drilldowndetail Object Otherwise Return null (Common function for 2D and 3D Graph)
protected  DrillDownDetail getDrillDownDetail(GraphicsEx inGraphicsEx, int click_x, int click_y)
          If Given Point on Graph then it will Return Drilldowndetail Object and draw mouse over effect and mouse over text Otherwise Return null
protected  DrillDownDetail getDrillDownDetail(int click_x, int click_y)
          If Given Point on Graph then it will Return Drilldowndetail Object Otherwise Return null
 java.awt.Polygon getGraphAreaPolygon()
          Get Polygon for Graph Area excluding title space, x-Axis space, y-Axis space and Legend space
protected  java.awt.Polygon getPolygon(int xStart, int yStart, int Width, int Height)
          Return polygon(surface) for 3D effect
protected  java.awt.Polygon getPolygon(int xStart, int yStart, int Width, int Height, int hOffset, int vOffset)
          Return polygon(surface) for 3D effect
static java.awt.Dimension getPreferredSize(LineGraph inLineGraph, GraphicsEx inGraphicsEx, int inWidth, int inHeight)
          Return preferred Dimenssion of Graph for given width and height of graph area.
 int getSeriesIndex(int click_x)
          Return Series Index near to given horizontal distance
static int getTickAt(AxisDetail inAxisDetail)
          This methods return the tickheight when y axis in on right side
static int getTickHeight(AxisDetail inAxisDetail)
          Return preferred Dimenssion of Graph for given width and height of graph area.
protected  void init(GraphPanel inGraphPanel)
          Initialization of Graph
 void initFields()
          Initialization of the fields
 void initTitle()
          Calculation for Title Of Graph
 void reDrawing(GraphicsEx inGraphicsEx)
          Redraw Graph According to Graphics's clipping rectangle th
 DrillDownDetail setMouseOverPoint(GraphicsEx inGraphicsEx, int click_x, int click_y)
          If Given Point on Graph then it will Return Drilldowndetail Object and draw mouse over effect and mouse over text Otherwise Return null
 java.awt.Rectangle ZoomIn_DataPointShape(GraphicsEx inGraphicsEx, int x, int y, int itemIndex)
          This method enLarge the shape shown on line
 
Methods inherited from class com.elegantj.graphx.GraphTypeObject
initDrawing
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

m_fDebug

protected static final boolean m_fDebug
Specifies the execution mode

See Also:
Constant Field Values

m_IsPointSet

protected boolean m_IsPointSet
Specifies the Mouse Over effect is drawn then this flag is false


EXPLAN_HOFFSET

protected static final int EXPLAN_HOFFSET
Specifies the constant for explanation notes horizontal offset

See Also:
Constant Field Values

H_SPACE

protected static final int H_SPACE
Specifies the Horizontal offset

See Also:
Constant Field Values

m_Width

protected int m_Width
Specifies the total width


m_Height

protected int m_Height
Specifies the total height


m_GraphAreaWidth

protected int m_GraphAreaWidth
Specifies the graph width


m_ExplanAreaWidth

protected int m_ExplanAreaWidth
Specifies the explanation area width


m_ExplanAreaHeight

protected int m_ExplanAreaHeight
Specifies the explanation area height


m_HOffset

protected int m_HOffset
Specifies the horizontal offset


m_VOffset

protected int m_VOffset
Specifies the vertical offset


m_XLength

protected int m_XLength
Specifies the x-axis length


m_XLabels

protected int m_XLabels
Specifies the total number of x-axis labels


m_XGradLength

protected int m_XGradLength
Specifies the x-axis gradient length


m_XLabelVSteps

protected int m_XLabelVSteps
Specifies the total number of x-axis labels vertical steps


m_YClipLength

protected int m_YClipLength
Specifies the y-axis length


m_PlusYClipLength

protected int m_PlusYClipLength
Specifies the y-axis maximum extra length


m_MinusYClipLength

protected int m_MinusYClipLength
Specifies the y-axis minimum extra length


m_YClipLabels

protected int m_YClipLabels
Specifies the total number of y-axis labels


m_PlusYClipLabels

protected int m_PlusYClipLabels
Specifies the total number of y-axis maximum labels


m_MinusYClipLabels

protected int m_MinusYClipLabels
Specifies the total number of y-axis minimum labels


m_YGradLength

protected int m_YGradLength
Specifies the y-axis gradient length


m_YAbsGradLabel

protected double m_YAbsGradLabel
Specifies the y-axis gradient absolute label size


m_YMaxLabelValue

protected double m_YMaxLabelValue
Specifies the y-axis maximum value


m_YMinLabelValue

protected double m_YMinLabelValue
Specifies the y-axis minimum value


m_ZLabels

protected int m_ZLabels
Specifies the total number of z-axis labels


m_ZGradLength

protected int m_ZGradLength
Specifies the z-axis gradient length


m_FontHeight

protected int m_FontHeight
Specifies the font height


m_LineWidth

protected int m_LineWidth
Specifies the line width


m_GraphLabel

protected GraphLabel m_GraphLabel
Specifies the graph label


m_LineGraphExplanNotes

protected LineGraphExplanNotes m_LineGraphExplanNotes
Specifies the graph explanation notes


m_TextAlign

protected TextAlign m_TextAlign
Specifies the text alignment


m_GraphTitleDetail

protected GraphTitleDetail m_GraphTitleDetail
Specifies the Title Detail for Graph


m_GraphXAxisDetail

protected GraphXAxisDetail m_GraphXAxisDetail
Specifies the X-Axis Detail for Graph


m_GraphYAxisDetail

protected GraphYAxisDetail m_GraphYAxisDetail
Specifies the Y-Axis Detail for Graph


m_GraphZAxisDetail

protected GraphZAxisDetail m_GraphZAxisDetail
Specifies the Z-Axis (Legends) Detail for Graph


m_GraphLineDetail

protected GraphLineDetail m_GraphLineDetail
Specifies the Line Properties of Graph


m_TitleFont

protected java.awt.Font m_TitleFont
Specifies Title Font


m_TitleFontHeight

protected int m_TitleFontHeight
Specifies Graph Title Font Height


m_XAxisLabelFont

protected java.awt.Font m_XAxisLabelFont
Specifies X-Axis Font


m_YAxisLabelFont

protected java.awt.Font m_YAxisLabelFont
Specifies Y-Axis Font


m_TitleHeight

protected int m_TitleHeight
Specifies Graph Title Height


m_XAxisHeight

protected int m_XAxisHeight
Specifies X-Axis Label Height


m_XAxisWidth

protected int m_XAxisWidth
Specifies X-Axis Label Width


m_YAxisHeight

protected int m_YAxisHeight
Specifies Y-Axis Label Height


m_YAxisWidth

protected int m_YAxisWidth
Specifies Y-Axis Label Width


m_YMaxLabelWidth

protected int m_YMaxLabelWidth
Specifies Y-Axis Label Maximum Width


m_Is3DGraph

protected boolean m_Is3DGraph
Specifies 3D effect is Enable or Disable


m_3DHOffset

protected int m_3DHOffset
Specifies the Horizontal Deviation for Display 3D effect


m_3DVOffset

protected int m_3DVOffset
Specifies the Vertical Deviation for Display 3D effect


m_LineGraph

protected LineGraph m_LineGraph
Specifies LineGraph Object


m_ExplanAreaPosition

protected int m_ExplanAreaPosition
Specifies the Explanation area Position(NORTH/EAST/SOUTH/WEST)


m_ExplanAreaAlign

protected int m_ExplanAreaAlign
Specifies the Explanation area Alignment(LEFT/CENTER/RIGHT OR TOP/CENTER/BOTTOM)


m_GraphRectangle

protected java.awt.Polygon m_GraphRectangle
Specifies Actual Graph Area Rectangle


m_GraphXAxisRectangle

protected java.awt.Rectangle m_GraphXAxisRectangle
Specifies Actual X-Axis label Area Rectangle


m_GraphYAxisRectangle

protected java.awt.Rectangle m_GraphYAxisRectangle
Specifies Actual Y-Axis Label Area Rectangle


m_GraphZAxisRectangle

protected java.awt.Rectangle m_GraphZAxisRectangle
Specifies Actual Z-Axis Label Area Rectangle


m_TitleRectangle

protected java.awt.Rectangle m_TitleRectangle
Specifies Title Rectangle


m_MouseOverTextRect

protected java.awt.Rectangle m_MouseOverTextRect
Specifies Mouse Over text Area Rectangle


m_OldMODetail

protected DrillDownDetail m_OldMODetail
Specifies old Mouse Over Object (DrillDownDetail)


zoomedRect

protected java.awt.Rectangle zoomedRect
stores the boundes of zommed datapointshape area


theLeftGap

protected int theLeftGap
Horizontal gap


m_LinePosition

protected int m_LinePosition
Specifies the position of line (MIDDLE/FRONT/BACK)


m_YAxisPosition

protected int m_YAxisPosition
Specifies the position of Y Axis (LEFT/RIGHT)


m_PolXLabelList

protected java.awt.Polygon[] m_PolXLabelList
contain bound polygon of X axis labels


m_PolYLabelList

protected java.awt.Polygon[] m_PolYLabelList
contain bound polygon of Y axis labels


m_YLabelVSteps

protected int m_YLabelVSteps
Specifies the number of Y-axis labels skip steps

Constructor Detail

LineGraphTypeObject

public LineGraphTypeObject(LineGraph inGraphMain)
                    throws GraphException
Creates the LineGraphTypeObject with specified LineGraph object

Method Detail

init

protected void init(GraphPanel inGraphPanel)
             throws GraphException
Initialization of Graph

Overrides:
init in class GraphTypeObject
GraphException

initFields

public void initFields()
                throws GraphException
Initialization of the fields

GraphException

DrawStripGraph

protected void DrawStripGraph(double[] x,
                              double[] y,
                              LineGraphRowInfo rowInfo)
This method accept array of cordinates of all the points on a line and a object of LineGraphRowInfo type that contains the all info about that line. Draw a 3D strip of specified color

Parameters:
x - Array of x coordinates
y - Array of y coordinates
rowInfo - object of LineGraphRowInfo

DrawLineGraph

protected void DrawLineGraph(double[] x,
                             double[] y,
                             LineGraphRowInfo rowInfo)
This method accept array of cordinates of all the points on a line and a object of LineGraphRowInfo type that contains the all info about that line. Draw the LINE GRAPH

Parameters:
x - Array of x coordinates
y - Array of y coordinates
rowInfo - object of LineGraphRowInfo

DrawStyledGraphLine

protected void DrawStyledGraphLine(double[] x,
                                   double[] y,
                                   LineGraphRowInfo rowInfo)
This method accept array of cordinates of all the points on a line and a object of LineGraphRowInfo type that contains the all info about that line. Draw the styled line on graph along with specified shapes on data points

Parameters:
x - Array of x coordinates
y - Array of y coordinates
rowInfo - object of LineGraphRowInfo

DrawPointGraph

protected void DrawPointGraph(double[] x,
                              double[] y,
                              LineGraphRowInfo rowInfo)
This method accept array of cordinates of all the points on a line and a object of LineGraphRowInfo type that contains the all info about that line. Draw the POINT GRAPH

Parameters:
x - Array of x coordinates
y - Array of y coordinates
rowInfo - object of LineGraphRowInfo

DrawLineGraphShadow

protected void DrawLineGraphShadow(double[] x,
                                   double[] y,
                                   LineGraphRowInfo rowInfo)
This method accept array of cordinates of all the points on a line and a object of LineGraphRowInfo type that contains the all info about that line. Draw the Shadow under the line on graph

Parameters:
x - Array of x coordinates
y - Array of y coordinates
rowInfo - object of LineGraphRowInfo

DraeDataPointShape

protected java.awt.Rectangle DraeDataPointShape(GraphicsEx inGraphicsEx,
                                                int x,
                                                int y,
                                                LineGraphRowInfo rowInfo)
This method accepts the point on which shape is to be drswn The complete information about the shape is picked from its argument rowInfo

Parameters:
inGraphicsEx - graphics object
x - x coordinates
y - y coordinates
rowInfo - object of LineGraphRowInfo

reDrawing

public void reDrawing(GraphicsEx inGraphicsEx)
               throws GraphException
Description copied from class: GraphTypeObject
Redraw Graph According to Graphics's clipping rectangle th

Overrides:
reDrawing in class GraphTypeObject
Throws:
GraphException

initTitle

public void initTitle()
Calculation for Title Of Graph


drawGraphAreaBackground

protected void drawGraphAreaBackground(GraphicsEx inGraphicsEx)
Draws Backgound of Actual graph Area

Overrides:
drawGraphAreaBackground in class GraphTypeObject

drawXAxisLine

protected void drawXAxisLine()
Draws The X-Axis Line

Overrides:
drawXAxisLine in class GraphTypeObject

drawXAxisLabels

protected void drawXAxisLabels()
Draws The X-Axis Labels

Overrides:
drawXAxisLabels in class GraphTypeObject

drawXAxisGridAndTick

protected void drawXAxisGridAndTick()
Draws The X-Axis Grid and Tick lines

Overrides:
drawXAxisGridAndTick in class GraphTypeObject

drawYAxisLine

protected void drawYAxisLine()
Draws The Y-Axis

Overrides:
drawYAxisLine in class GraphTypeObject

drawYAxisLabels

protected void drawYAxisLabels()
Draws The Y-Axis Labels

Overrides:
drawYAxisLabels in class GraphTypeObject

drawYAxisGridAndTick

protected void drawYAxisGridAndTick()
Draws The Y-Axis Grid and Tick lines

Overrides:
drawYAxisGridAndTick in class GraphTypeObject

ZoomIn_DataPointShape

public java.awt.Rectangle ZoomIn_DataPointShape(GraphicsEx inGraphicsEx,
                                                int x,
                                                int y,
                                                int itemIndex)
This method enLarge the shape shown on line

Parameters:
inGraphicsEx - Graphics object
x - Array of x coordinates
y - Array of y coordinates
itemIndex - item index of the line

calcLinePoints

protected java.util.Vector calcLinePoints()
This method calculate points to draw lne graph

Returns:
vector Containing the point cordinates for graph

drawGraph

protected void drawGraph()
Draws the Graph

Overrides:
drawGraph in class GraphTypeObject

drawGraph

public void drawGraph(java.util.Vector thePointsVector)
Draws the Graph

Parameters:
thePointsVector - contains the calculated line points cordinates

computeSplineSlopePoints

protected void computeSplineSlopePoints(double[] x,
                                        double[] y,
                                        double[] xCurved,
                                        double[] yCurved,
                                        int nDivs)

drawExplanNotes

protected void drawExplanNotes()
Draws the explanation notes

Overrides:
drawExplanNotes in class GraphTypeObject

drawTitle

protected void drawTitle()
Draws the title

Overrides:
drawTitle in class GraphTypeObject

drawStaticMouseOverText

public java.awt.Rectangle drawStaticMouseOverText(GraphicsEx inGraphicsEx)
This method draws Static mouse over Text

Parameters:
inGraphicsEx - GraphicsEx Object

drawMouseOverText

public java.awt.Rectangle drawMouseOverText(GraphicsEx inGraphicsEx,
                                            DrillDownDetail inDDD,
                                            int inH,
                                            int inV,
                                            int inWidth,
                                            int inHeight,
                                            int theI)
This method draws mouse over Text

Parameters:
inGraphicsEx - GraphicsEx Object
inDDD - DrillDownDetail Object
inH - x point
inV - y point
inWidth - Line Width
inHeight - Line Height
Returns:
Rectangle Rectangle area where mouse over text is drawn

getSeriesIndex

public int getSeriesIndex(int click_x)
Return Series Index near to given horizontal distance

Parameters:
click_x - Horizontal Distance
Returns:
int

getPolygon

protected java.awt.Polygon getPolygon(int xStart,
                                      int yStart,
                                      int Width,
                                      int Height)
Return polygon(surface) for 3D effect


getPolygon

protected java.awt.Polygon getPolygon(int xStart,
                                      int yStart,
                                      int Width,
                                      int Height,
                                      int hOffset,
                                      int vOffset)
Return polygon(surface) for 3D effect


setMouseOverPoint

public DrillDownDetail setMouseOverPoint(GraphicsEx inGraphicsEx,
                                         int click_x,
                                         int click_y)
If Given Point on Graph then it will Return Drilldowndetail Object and draw mouse over effect and mouse over text Otherwise Return null

Parameters:
inGraphicsEx - GraphicsEx Object
click_x - x point on graph
click_y - y point on graph

getDrillDetail

public DrillDownDetail getDrillDetail(int click_x,
                                      int click_y)
If Given Point on Graph then it will Return Drilldowndetail Object Otherwise Return null (Common function for 2D and 3D Graph)

Parameters:
click_x - x point on graph
click_y - y point on graph

drawMouseOverEffect

public boolean drawMouseOverEffect(GraphicsEx inGraphicsEx,
                                   DrillDownDetail inDDD,
                                   boolean isMOEDraw,
                                   boolean isMOTDraw,
                                   boolean isRestore)
This method returns true If any shape is drawn on given graphics Object otherwize false

Parameters:
inGraphicsEx - GraphicsEx Object
inDDD - DrillDownDetail Object
isMOEDraw - true - to draw mouse over effect
isMOTDraw - true - to draw mouse over Text
isRestore - true - to draw mouse over effect or mouse over text, false - to remove mouse over effect or mouse over text
Returns:
boolean true If any shape is drawn on given graphics Object otherwize false

getDrillDownDetail

protected DrillDownDetail getDrillDownDetail(int click_x,
                                             int click_y)
If Given Point on Graph then it will Return Drilldowndetail Object Otherwise Return null


getDrillDownDetail

protected DrillDownDetail getDrillDownDetail(GraphicsEx inGraphicsEx,
                                             int click_x,
                                             int click_y)
If Given Point on Graph then it will Return Drilldowndetail Object and draw mouse over effect and mouse over text Otherwise Return null

Parameters:
inGraphicsEx - GraphicsEx Object
click_x - x point on graph
click_y - y point on graph

getClickedXAxisLabel

public DrillDownDetail getClickedXAxisLabel(int click_x,
                                            int click_y)
If Given Point on X axis Label then it will Return Drilldowndetail Object Otherwise Return null


getClickedYAxisLabel

public DrillDownDetail getClickedYAxisLabel(int click_x,
                                            int click_y)
If Given Point on Y axis Label then it will Return Drilldowndetail Object Otherwise Return null


getPreferredSize

public static java.awt.Dimension getPreferredSize(LineGraph inLineGraph,
                                                  GraphicsEx inGraphicsEx,
                                                  int inWidth,
                                                  int inHeight)
                                           throws GraphException
Return preferred Dimenssion of Graph for given width and height of graph area.

Parameters:
inLineGraph - LineGraph object
inGraphicsEx - Graphics object
inWidth - actural width of graph
inHeight - actual height of graph
GraphException

getTickHeight

public static int getTickHeight(AxisDetail inAxisDetail)
Return preferred Dimenssion of Graph for given width and height of graph area. inLineGraph LineGraph object inGraphicsEx Graphics object inWidth actural width of graph inHeight actual height of graph prefWidth minimum width for graph area prefHeight minimum height for graph area / public static int getPreferredWidth(LineGraph inLineGraph, GraphicsEx inGraphicsEx, int inWidth, int inHeight, int prefWidth,int prefHeight) throws GraphException { int theWidth = 0; int theGraphAreaWidth = 0; int theXGradLength = 0; int theZLabels = (inLineGraph.m_ZLabelList.size() == 0)? 1: inLineGraph.m_ZLabelList.size(); int tempXGradLength = 0; int theXLabels = inLineGraph.m_XLabelList.size(); int the3DHOffset = inLineGraph.getGraph3DHorizontalOffset(); int the3DVOffset = inLineGraph.getGraph3DVerticalOffset(); boolean the3DGraph = inLineGraph.getGraph3DEffect(); Font oldFont = inGraphicsEx.getFont(); GraphLabel theGraphLabel = new GraphLabel( inGraphicsEx, inLineGraph.getYAxisMaxLabelValue(), inLineGraph.getYAxisMinLabelValue(), inLineGraph.m_GraphYAxisDetail.isCommaFormatted(), inLineGraph.m_XLabelList, inLineGraph.m_ZLabelList, inLineGraph.m_DataMatrix,3 ); String theYMaxLabelWidthString = theGraphLabel.getYMaxLabelWidthString(); int theYMaxLabelWidth = 0; int theYAxisUnitLabelWidth = 0; int theYLabelHeight = 0; Font theYAxisLabelFont = inLineGraph.m_GraphYAxisDetail.getAxisLabelFont(); if(theYAxisLabelFont != null) inGraphicsEx.setFont(theYAxisLabelFont); FontMetrics theYAxisFontMetrics = inGraphicsEx.getFontMetrics(); String theTagLabel = inLineGraph.m_GraphYAxisDetail.getTagLabel(); int theTagWidth = 0; if(!theTagLabel.equals("")) theTagWidth = theYAxisFontMetrics.stringWidth( theTagLabel ); theYMaxLabelWidth = theYAxisFontMetrics.stringWidth( theYMaxLabelWidthString ); theYAxisUnitLabelWidth = theYAxisFontMetrics.stringWidth( inLineGraph.getYAxisUnitLabel() ); inGraphicsEx.setFont(oldFont); theYMaxLabelWidth += theTagWidth; if( theYMaxLabelWidth <= theYAxisUnitLabelWidth ) { theYMaxLabelWidth = theYAxisUnitLabelWidth; } Object theObj = inLineGraph.m_XLabelList.elementAt(0); String theStr = ""; if(theObj != null) theStr = theObj.toString(); int theYLabelStringWidth = theYAxisFontMetrics.stringWidth( theStr ); int theXLabelLeftOverWidth = (theYLabelStringWidth - theXGradLength) / 2; if( theYMaxLabelWidth <= theXLabelLeftOverWidth ) theYMaxLabelWidth = theXLabelLeftOverWidth; // for Y-Axis name display int theYAxisNameWidth = 0; int theYAxisNameHeight = 0; String theYAxisName = inLineGraph.m_GraphYAxisDetail.getAxisName(); if( inLineGraph.m_GraphYAxisDetail.getAxisNameVisible() && !theYAxisName.equals("") && inLineGraph.m_GraphYAxisDetail.getAxisNameMaxLine() > 0) { Font nameFont = inLineGraph.m_GraphYAxisDetail.getAxisNameFont(); if(nameFont != null) inGraphicsEx.setFont( nameFont ); FontMetrics theYANFontMetrics = inGraphicsEx.getFontMetrics(); theYAxisNameHeight = theYANFontMetrics.getHeight(); theYAxisNameWidth = inLineGraph.m_GraphYAxisDetail.getAxisNameMaxLine() * DrawString.getCharMaxWidth(theYANFontMetrics); int theYANBrStyle = inLineGraph.m_GraphYAxisDetail.getAxisNameBorderStyle(); int theYANShStyle = inLineGraph.m_GraphYAxisDetail.getAxisNameShadowStyle(); theYAxisNameWidth += theYAxisNameHeight; if(theYANBrStyle != GraphicsEx.DR_LINE_NONE) theYAxisNameWidth += 2 * inLineGraph.m_GraphYAxisDetail.getAxisNameBorderWidth(); if(theYANShStyle != GraphicsEx.DR_SHADOW_NONE) theYAxisNameWidth += 2 * inLineGraph.m_GraphYAxisDetail.getAxisNameShadowWidth(); inGraphicsEx.setFont(oldFont); } theWidth = theYMaxLabelWidth + inLineGraph.m_GraphYAxisDetail.getAxisLineWidth() + theYAxisNameWidth + theYAxisNameHeight; int theTitleHeight = 0; Font theTitleFont = inLineGraph.m_GraphTitleDetail.getGraphTitleFont(); if(theTitleFont != null) inGraphicsEx.setFont(theTitleFont); FontMetrics theTitleFontMetrics = inGraphicsEx.getFontMetrics(); int theTitleFontHeight = theTitleFontMetrics.getHeight(); int tempHeight = theTitleFontHeight * inLineGraph.m_GraphTitleDetail.getGraphTitleMaxLine(); int theTitleBrStyle = inLineGraph.m_GraphTitleDetail.getGraphTitleBorderStyle(); int theTitleShStyle = inLineGraph.m_GraphTitleDetail.getGraphTitleShadowStyle(); tempHeight += theTitleFontHeight/6; if( theTitleBrStyle != GraphicsEx.DR_LINE_NONE ) tempHeight += 2 * inLineGraph.m_GraphTitleDetail.getGraphTitleBorderWidth(); if( theTitleShStyle != GraphicsEx.DR_SHADOW_NONE ) tempHeight += 2 * inLineGraph.m_GraphTitleDetail.getGraphTitleShadowWidth(); theTitleHeight = DrawString.getStringHeight( inGraphicsEx, inLineGraph.m_GraphTitleDetail.getGraphTitle(), inWidth - theTitleFontHeight, tempHeight, theTitleBrStyle, inLineGraph.m_GraphTitleDetail.getGraphTitleBorderWidth(), theTitleShStyle, inLineGraph.m_GraphTitleDetail.getGraphTitleShadowWidth(), inLineGraph.m_GraphTitleDetail.getGraphTitleAlign(), GraphConstants.HORIZONTAL); theTitleHeight += theTitleFontHeight; inGraphicsEx.setFont(oldFont); int theExplanAreaPosition = inLineGraph.m_GraphZAxisDetail.getZAxisPosition(); LineGraphExplanNotes theLineGraphExplanNotes = new LineGraphExplanNotes( inGraphicsEx, inLineGraph.m_OriginalClipRect, inLineGraph.m_GraphZAxisDetail, inLineGraph.m_GraphLineDetail, theExplanAreaPosition, inLineGraph.m_ExplainNotesStrLen); int theExplanAreaHeight = 0; int theExplanAreaWidth = 0; if( inLineGraph.m_GraphZAxisDetail.getZAxisVisible() ) { if((LineGraphExplanNotes.HORIZONTAL & theExplanAreaPosition) != 0) { theExplanAreaHeight = theLineGraphExplanNotes.getNoteHeight( theGraphAreaWidth, inHeight - theTitleHeight, inLineGraph.m_ZLabelList ); int theAxisNameHeight = theLineGraphExplanNotes.getNoteNameHeight( theGraphAreaWidth, inHeight - theTitleHeight - theExplanAreaHeight ); theExplanAreaHeight += theAxisNameHeight; theExplanAreaWidth = theLineGraphExplanNotes.getNoteWidth( theGraphAreaWidth, theExplanAreaHeight - theAxisNameHeight, inLineGraph.m_ZLabelList); if(inLineGraph.m_GraphZAxisDetail.getZAxisBorderStyle() != GraphicsEx.DR_LINE_NONE) { theExplanAreaWidth += 2*inLineGraph.m_GraphZAxisDetail.getZAxisBorderWidth(); //// changes on 23 feb , 05 theExplanAreaHeight += 2*inLineGraph.m_GraphZAxisDetail.getZAxisBorderWidth(); } theWidth += (theExplanAreaWidth + EXPLAN_HOFFSET); } else { theExplanAreaWidth = theLineGraphExplanNotes.getWidth( inLineGraph.m_ExplainNotesStrLen ); int cols = ((theZLabels/2) <= 0 ? 2 : (theZLabels/2)); theExplanAreaWidth = theLineGraphExplanNotes.getNoteWidth( theExplanAreaWidth * cols, ////Changed by Devang on 21/01/2005 inHeight - theTitleHeight, inLineGraph.m_ZLabelList); int theAxisNameHeight = theLineGraphExplanNotes.getNoteNameHeight( theExplanAreaWidth, inHeight - theTitleHeight); theExplanAreaWidth = theLineGraphExplanNotes.getNoteWidth( theExplanAreaWidth * cols, ////Changed by Devang on 21/01/2005 inHeight - theTitleHeight - theAxisNameHeight, inLineGraph.m_ZLabelList); if(inLineGraph.m_GraphZAxisDetail.getZAxisBorderStyle()!= GraphicsEx.DR_LINE_NONE) { theExplanAreaWidth += 2*inLineGraph.m_GraphZAxisDetail.getZAxisBorderWidth(); } theWidth += (theExplanAreaWidth + EXPLAN_HOFFSET); } } int height = theExplanAreaHeight + theTitleHeight; if(prefHeight == 0){ // calculation for width int temp = inWidth - theWidth; if( prefWidth < temp) prefWidth = temp; if(theWidth < prefWidth ) theWidth = prefWidth + theWidth; }else if(prefWidth == 0){ // calculation for Height int temp = inHeight - height; if( prefHeight < temp) prefHeight = temp; if(height < prefHeight ) theWidth = prefHeight + height; } return theWidth; }


getTickAt

public static int getTickAt(AxisDetail inAxisDetail)
This methods return the tickheight when y axis in on right side


getGraphAreaPolygon

public java.awt.Polygon getGraphAreaPolygon()
Get Polygon for Graph Area excluding title space, x-Axis space, y-Axis space and Legend space

Returns:
Polygon Polygon object of graph area

ElegantJCharts Java API Specification v2.0

For any feedback, suggestion, or query, please revert back to support@elegantcharts.com

Copyright(c)
Elegant Microweb Technologies Pvt. Ltd.
www.elegantmicroweb.com
www.elegantjcharts.com
All Rights Reserved.