ElegantJCharts Java API Specification v2.0

com.elegantj.graphx.doughnut
Class SingleDoughnutGraphTypeObject

java.lang.Object
  |
  +--com.elegantj.graphx.GraphTypeObject
        |
        +--com.elegantj.graphx.doughnut.DoughnutGraphTypeObject
              |
              +--com.elegantj.graphx.doughnut.SingleDoughnutGraphTypeObject
All Implemented Interfaces:
java.io.Serializable

public class SingleDoughnutGraphTypeObject
extends DoughnutGraphTypeObject
implements java.io.Serializable

DoughnutGraphTyepObject is used to render Doughnut Graph

See Also:
Serialized Form

Field Summary
protected  int m_TotalOfDataMatrix
           
 
Fields inherited from class com.elegantj.graphx.doughnut.DoughnutGraphTypeObject
dataPointRect, EXPLAN_HOFFSET, H_SPACE, m_DonutBarWidth, m_DonutBoundRect, m_DonutHeight, m_DonutHOffset, m_DonutShapeList, m_DonutVOffset, m_DonutWidth, m_DoughnutGraph, m_DoughnutGraphExplanNotes, m_ExplanAreaAlign, m_ExplanAreaHeight, m_ExplanAreaPosition, m_ExplanAreaWidth, m_fDebug, m_FontHeight, m_GraphAreaWidth, m_GraphDonutDetail, m_GraphLabel, m_GraphRectangle, m_GraphTitleDetail, m_GraphXAxisDetail, m_GraphXAxisRectangle, m_GraphYAxisDetail, m_GraphYAxisRectangle, m_GraphZAxisDetail, m_GraphZAxisRectangle, m_Height, m_HOffset, m_Is3DGraph, m_IsPointSet, m_MinusYClipLabels, m_MinusYClipLength, m_MouseOverTextRect, m_NegValRep, m_OldMODetail, m_PlusYClipLabels, m_PlusYClipLength, m_StaticTextPoint, m_TextAlign, m_TitleFont, m_TitleFontHeight, m_TitleHeight, m_TitleRectangle, m_VOffset, m_Width, m_XAxisHeight, m_XAxisLabelFont, m_XAxisWidth, m_XGradLength, m_XLabelHeight, m_XLabels, m_XLabelVSteps, m_XLength, m_XMaxLabelWidth, m_YAbsGradLabel, m_YAxisHeight, m_YAxisLabelFont, m_YAxisWidth, m_YClipLabels, m_YClipLength, m_YGradLength, m_YMaxLabelValue, m_YMaxLabelWidth, m_YMinLabelValue, m_ZLabels, V_SPACE
 
Fields inherited from class com.elegantj.graphx.GraphTypeObject
m_GraphicsEx
 
Constructor Summary
SingleDoughnutGraphTypeObject(DoughnutGraph inGraphMain)
          Creates the SingleDoughnutGraphTypeObject with specified DoughnutGraph object
 
Method Summary
 void calculateTotalofRowData(java.util.Vector theDataMatrix, int theRowLabels)
           
 void draw2DGraph()
           
 void draw3DGraph()
          Draw 3D Donut Graph
protected  void drawExplanNotes()
          Draws the explanation notes
 void drawGraph()
          Draws Graph this method should be overriden by the subclass
protected  void drawGraphAreaBackground(GraphicsEx inGraphicsEx)
          Draws Backgound of Actual graph Area
 boolean drawMouseOverEffect(GraphicsEx inGraphicsEx, DrillDownDetail inDDD, boolean isMOEDraw, boolean isMOTDraw, int theH, int theV, boolean isRestore)
          This method returns true If any shape is drawn on given graphics Object otherwize false
 java.awt.Rectangle drawStaticMouseOverText(GraphicsEx inGraphicsEx)
          This method draws Static mouse over Text
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 drawYAxisLabels()
          Draws The Y-Axis Labels
 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
 java.awt.Polygon getGraphAreaPolygon()
          Get Polygon for Graph Area excluding title space, x-Axis space, y-Axis space and Legend space
static java.awt.Dimension getPreferredWidth(DoughnutGraph inDoughnutGraph, GraphicsEx inGraphicsEx, int inWidth, int inHeight)
           
 int getSeriesIndex(int click_x, int click_y)
          Return Series Index near to given horizontal distance
protected  void init(GraphPanel inGraphPanel)
          Initialization of Graph
protected  void initFields()
          Initialization of the fields
 
Methods inherited from class com.elegantj.graphx.doughnut.DoughnutGraphTypeObject
drawDonutBorder, drawDonutTop, drawMouseOverText, drawYAxisGridAndTick, drawYAxisLine, getXMaxLabelWidthString, initTitle, reDrawing, setMouseOverPoint
 
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_TotalOfDataMatrix

protected int m_TotalOfDataMatrix
Constructor Detail

SingleDoughnutGraphTypeObject

public SingleDoughnutGraphTypeObject(DoughnutGraph inGraphMain)
                              throws GraphException
Creates the SingleDoughnutGraphTypeObject with specified DoughnutGraph object

Method Detail

init

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

Overrides:
init in class DoughnutGraphTypeObject
GraphException

initFields

protected void initFields()
                   throws GraphException
Initialization of the fields

Overrides:
initFields in class DoughnutGraphTypeObject
GraphException

calculateTotalofRowData

public void calculateTotalofRowData(java.util.Vector theDataMatrix,
                                    int theRowLabels)
Overrides:
calculateTotalofRowData in class DoughnutGraphTypeObject

drawGraph

public void drawGraph()
Description copied from class: GraphTypeObject
Draws Graph this method should be overriden by the subclass

Overrides:
drawGraph in class DoughnutGraphTypeObject

draw3DGraph

public void draw3DGraph()
Draw 3D Donut Graph

Overrides:
draw3DGraph in class DoughnutGraphTypeObject

draw2DGraph

public void draw2DGraph()
Overrides:
draw2DGraph in class DoughnutGraphTypeObject

drawGraphAreaBackground

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

Overrides:
drawGraphAreaBackground in class DoughnutGraphTypeObject

drawXAxisLine

protected void drawXAxisLine()
Draws The X-Axis Line

Overrides:
drawXAxisLine in class DoughnutGraphTypeObject

drawXAxisLabels

protected void drawXAxisLabels()
Draws The X-Axis Labels

Overrides:
drawXAxisLabels in class DoughnutGraphTypeObject

drawXAxisGridAndTick

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

Overrides:
drawXAxisGridAndTick in class DoughnutGraphTypeObject

drawYAxisLabels

protected void drawYAxisLabels()
Draws The Y-Axis Labels

Overrides:
drawYAxisLabels in class DoughnutGraphTypeObject

drawTitle

protected void drawTitle()
Draws the title

Overrides:
drawTitle in class DoughnutGraphTypeObject

drawExplanNotes

protected void drawExplanNotes()
Draws the explanation notes

Overrides:
drawExplanNotes in class DoughnutGraphTypeObject

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

Overrides:
getDrillDownDetail in class DoughnutGraphTypeObject
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

Overrides:
getClickedXAxisLabel in class DoughnutGraphTypeObject
Parameters:
click_x - x coordinate of mouse over point
click_y - y coordinate of mouse over point
Returns:
DrillDownDetail object of DrillDownDetail

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

Overrides:
getClickedYAxisLabel in class DoughnutGraphTypeObject
Parameters:
click_x - x coordinate of mouse over point
click_y - y coordinate of mouse over point
Returns:
DrillDownDetail object of DrillDownDetail

getSeriesIndex

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

Overrides:
getSeriesIndex in class DoughnutGraphTypeObject
Parameters:
click_x - Horizontal Distance
Returns:
int

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)

Overrides:
getDrillDetail in class DoughnutGraphTypeObject
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,
                                   int theH,
                                   int theV,
                                   boolean isRestore)
This method returns true If any shape is drawn on given graphics Object otherwize false

Overrides:
drawMouseOverEffect in class DoughnutGraphTypeObject
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

drawStaticMouseOverText

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

Overrides:
drawStaticMouseOverText in class DoughnutGraphTypeObject
Parameters:
inGraphicsEx - GraphicsEx Object

getPreferredWidth

public static java.awt.Dimension getPreferredWidth(DoughnutGraph inDoughnutGraph,
                                                   GraphicsEx inGraphicsEx,
                                                   int inWidth,
                                                   int inHeight)
                                            throws GraphException
GraphException

getGraphAreaPolygon

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

Overrides:
getGraphAreaPolygon in class DoughnutGraphTypeObject
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.