ElegantJCharts Java API Specification v2.0

com.elegantj.graphx.pie
Class MPieGraph

java.lang.Object
  |
  +--com.elegantj.graphx.GraphTypeObject
        |
        +--com.elegantj.graphx.pie.MPieGraph
All Implemented Interfaces:
java.io.Serializable

public class MPieGraph
extends GraphTypeObject
implements java.io.Serializable

MPieGraph is used to render Multiple Pie Graph

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(LEFT/RIGHT/TOP/BOTTOM/CENTER)
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  GraphPieDetail m_GraphPieDetail
          Specifies the Pie 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  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  int m_NegValRep
          Specifies the representation type for yaxis label -ve value
protected  DrillDownDetail m_OldMODetail
          Specifies old Mouse Over Object (DrillDownDetail)
protected  PieGraph m_PieGraph
          Specifies PieGraph Object
protected  PieGraphExplanNotes m_PieGraphExplanNotes
          Specifies the graph explanation notes
protected  java.awt.Rectangle m_PieRect
          Specifies Pie Rectangle
protected  java.awt.Polygon[] m_PieRectangle
          Specifies Individual Pie Rectangle
protected  int m_PieWidth
          Specifies the Pie width
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  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_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  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 static int V_SPACE
          Specifies the Verticle offset
 
Fields inherited from class com.elegantj.graphx.GraphTypeObject
m_GraphicsEx
 
Constructor Summary
MPieGraph(PieGraph inGraphMain)
          Creates the GraphMPieGraph with specified PieGraph object
 
Method Summary
 void draw3DGraph()
           
 java.awt.Rectangle drawBorder(GraphicsEx inGraphicsEx, int click_x, int click_y, int old, int index, int indexX)
           
protected  void drawExplanNotes()
          Draws the explanation notes
 void drawGraph()
          Draws the Graph
 boolean drawMouseOverEffect(GraphicsEx inGraphicsEx, DrillDownDetail inDDD, boolean isMOEDraw, boolean isMOTDraw, boolean isRestore, java.awt.Rectangle rect, int old)
           
 java.awt.Rectangle drawMouseOverText(GraphicsEx inGraphicsEx, DrillDownDetail inDDD, int inH, int inV, int inWidth, int inHeight, java.awt.Rectangle rect)
           
 java.awt.Rectangle drawStaticMouseOverText(GraphicsEx inGraphicsEx)
           
protected  void drawTitle()
          Draws the title
protected  void drawXAxisLabels()
          Draws The X-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
 void getDimentions()
           
 DrillDownDetail getDrillDetail(int click_x, int click_y)
           
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()
           
 java.awt.Rectangle getMouseOverText(int click_x, int click_y, int inOut, int theStringWidth, int theStringHeight)
           
protected  java.awt.Polygon getPolygon(int xStart, int yStart, int Width, int Height, int hOffset, int vOffset)
          Return polygon(surface) for 3D effect
static int getPreferredHeight(PieGraph inPieGraph, GraphicsEx inGraphicsEx, int inWidth, int inHeight, int prefWidth, int prefHeight, int inPieHeight, int inPieDepth)
          Return preferred heigth of Graph for given Pie height.
static int getPreferredWidth(PieGraph inPieGraph, GraphicsEx inGraphicsEx, int inWidth, int prefWidth, int prefHeight, int inHeight, int inPieWidth)
          Return preferred width of Graph for given Pie width.
 java.awt.Rectangle getStaticMouseOverTextInside(int index, int indexX, int inOut, int theStringWidth, int theStringHeight)
           
protected  void init(GraphPanel inGraphPanel)
          Initialization of Graph
protected  void initFields()
           
 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
 
Methods inherited from class com.elegantj.graphx.GraphTypeObject
drawGraphAreaBackground, drawXAxisGridAndTick, drawXAxisLine, drawYAxisGridAndTick, drawYAxisLabels, drawYAxisLine, 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

V_SPACE

protected static final int V_SPACE
Specifies the Verticle 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_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_PieWidth

protected int m_PieWidth
Specifies the Pie width


m_GraphLabel

protected GraphLabel m_GraphLabel
Specifies the graph label


m_PieGraphExplanNotes

protected PieGraphExplanNotes m_PieGraphExplanNotes
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_GraphPieDetail

protected GraphPieDetail m_GraphPieDetail
Specifies the Pie 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_PieGraph

protected PieGraph m_PieGraph
Specifies PieGraph Object


m_ExplanAreaAlign

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


m_ExplanAreaPosition

protected int m_ExplanAreaPosition
Specifies the explanation area position(LEFT/RIGHT/TOP/BOTTOM/CENTER)


m_ExplanAreaHeight

protected int m_ExplanAreaHeight
Specifies the explanation area height


m_GraphRectangle

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


m_PieRectangle

protected java.awt.Polygon[] m_PieRectangle
Specifies Individual Pie 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)


m_NegValRep

protected int m_NegValRep
Specifies the representation type for yaxis label -ve value


m_PieRect

protected java.awt.Rectangle m_PieRect
Specifies Pie Rectangle

Constructor Detail

MPieGraph

public MPieGraph(PieGraph inGraphMain)
          throws GraphException
Creates the GraphMPieGraph with specified PieGraph object

Method Detail

init

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

Overrides:
init in class GraphTypeObject
GraphException

initFields

protected void initFields()
                   throws GraphException
GraphException

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

drawGraph

public void drawGraph()
Draws the Graph

Overrides:
drawGraph in class GraphTypeObject

draw3DGraph

public void draw3DGraph()

drawXAxisLabels

protected void drawXAxisLabels()
Description copied from class: GraphTypeObject
Draws The X-Axis Labels

Overrides:
drawXAxisLabels in class GraphTypeObject

initTitle

public void initTitle()
Calculation for Title Of Graph


drawTitle

protected void drawTitle()
Draws the title

Overrides:
drawTitle in class GraphTypeObject

drawExplanNotes

protected void drawExplanNotes()
Draws the explanation notes

Overrides:
drawExplanNotes in class GraphTypeObject

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)

getMouseOverText

public java.awt.Rectangle getMouseOverText(int click_x,
                                           int click_y,
                                           int inOut,
                                           int theStringWidth,
                                           int theStringHeight)

getStaticMouseOverTextInside

public java.awt.Rectangle getStaticMouseOverTextInside(int index,
                                                       int indexX,
                                                       int inOut,
                                                       int theStringWidth,
                                                       int theStringHeight)

drawBorder

public java.awt.Rectangle drawBorder(GraphicsEx inGraphicsEx,
                                     int click_x,
                                     int click_y,
                                     int old,
                                     int index,
                                     int indexX)

drawMouseOverEffect

public boolean drawMouseOverEffect(GraphicsEx inGraphicsEx,
                                   DrillDownDetail inDDD,
                                   boolean isMOEDraw,
                                   boolean isMOTDraw,
                                   boolean isRestore,
                                   java.awt.Rectangle rect,
                                   int old)

drawMouseOverText

public java.awt.Rectangle drawMouseOverText(GraphicsEx inGraphicsEx,
                                            DrillDownDetail inDDD,
                                            int inH,
                                            int inV,
                                            int inWidth,
                                            int inHeight,
                                            java.awt.Rectangle rect)

drawStaticMouseOverText

public java.awt.Rectangle drawStaticMouseOverText(GraphicsEx inGraphicsEx)

getPolygon

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


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


getPreferredWidth

public static int getPreferredWidth(PieGraph inPieGraph,
                                    GraphicsEx inGraphicsEx,
                                    int inWidth,
                                    int prefWidth,
                                    int prefHeight,
                                    int inHeight,
                                    int inPieWidth)
                             throws GraphException
Return preferred width of Graph for given Pie width. This method is used for user Defined Pie width.

GraphException

getPreferredHeight

public static int getPreferredHeight(PieGraph inPieGraph,
                                     GraphicsEx inGraphicsEx,
                                     int inWidth,
                                     int inHeight,
                                     int prefWidth,
                                     int prefHeight,
                                     int inPieHeight,
                                     int inPieDepth)
                              throws GraphException
Return preferred heigth of Graph for given Pie height. This method is used for use defined Pie height.

GraphException

getGraphAreaPolygon

public java.awt.Polygon getGraphAreaPolygon()

getDimentions

public void getDimentions()

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.