Package com.simplicite.util
Class Graphic
- java.lang.Object
-
- com.simplicite.util.Graphic
-
- All Implemented Interfaces:
java.io.Serializable
public class Graphic extends java.lang.Object implements java.io.Serializable
Graphic definition- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description class
Graphic.Axis
class
Graphic.Serie
-
Field Summary
Fields Modifier and Type Field Description static char
CHART_AREA_CLUSTER
Type Area Clusterstatic char
CHART_AREA_STACK
Type Area Stackstatic char
CHART_BAR_CLUSTER
Type Bar Clusterstatic char
CHART_BAR_STACK
Type Bar Stackstatic char
CHART_LINE
Type Linesstatic char
CHART_PIE
Type Piestatic char
METHOD_AVG_ALG
Method Algebric Averagestatic char
METHOD_AVG_GEO
Method Geometric Averagestatic char
METHOD_COUNT
Method Countstatic char
METHOD_MAX
Method Maxstatic char
METHOD_MIN
Method Minstatic char
METHOD_SUM
Method Sumstatic java.lang.String
SERIE_AREA
static java.lang.String
SERIE_BAR
static java.lang.String
SERIE_BARGLASS
static java.lang.String
SERIE_HORIZBAR
static java.lang.String
SERIE_LINE
static java.lang.String
SERIE_PIE
static java.lang.String
SERIE_RADAR
static java.lang.String
SERIE_STACKAREA
static java.lang.String
SERIE_STACKBAR
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Graphic.Axis
addAxis(java.lang.String key, char type, char method, char chart, java.lang.String label, java.lang.String field)
Add axis to the graphvoid
addGrantedGroup(java.lang.String group)
void
calculate(ObjectDB obj)
Prepare the datastatic char
convertSerieToType(java.lang.String serieType, char defaultType)
Convert Serie to Type of axisstatic java.lang.String
convertTypeToSerie(char graphicType, java.lang.String defaultType)
Convert Type of axis to Seriechar
getChartType()
Chart main typejava.lang.String
getDisplay()
java.util.List<java.lang.String>
getGrantedGroups()
Granted groups ?java.util.Map<java.lang.Integer,java.lang.String>
getGraphicAxisType()
Graphic Values (index and chart type)java.lang.String
getGraphicType()
int
getHeight()
java.lang.String
getImageName()
Get image namejava.lang.String
getLabel()
java.lang.String
getName()
ObjectDB
getObject()
int
getWidth()
java.util.List<Graphic.Axis>
getX()
java.util.List<Graphic.Axis>
getY()
double
getYmax()
double
getYmin()
boolean
isEnabled()
boolean
isGrantable()
Grantable ?boolean
isGranted(Grant g)
boolean
isGraphicSplitted()
Split the graphic ?boolean
isVisible()
Visible and not empty ?void
removeGrantedGroup(java.lang.String group)
void
resetGraphicAxisType()
void
setEnabled(boolean enabled)
void
setGrantable(boolean b)
void
setGraphicAxisType(int index, java.lang.String type)
void
setGraphicSplitted(boolean b)
void
setGraphicType(java.lang.String type)
void
setHeight(int h)
void
setVisible(boolean visible)
void
setWidth(int w)
-
-
-
Field Detail
-
CHART_BAR_STACK
public static final char CHART_BAR_STACK
Type Bar Stack- See Also:
- Constant Field Values
-
CHART_BAR_CLUSTER
public static final char CHART_BAR_CLUSTER
Type Bar Cluster- See Also:
- Constant Field Values
-
CHART_PIE
public static final char CHART_PIE
Type Pie- See Also:
- Constant Field Values
-
CHART_AREA_STACK
public static final char CHART_AREA_STACK
Type Area Stack- See Also:
- Constant Field Values
-
CHART_AREA_CLUSTER
public static final char CHART_AREA_CLUSTER
Type Area Cluster- See Also:
- Constant Field Values
-
CHART_LINE
public static final char CHART_LINE
Type Lines- See Also:
- Constant Field Values
-
SERIE_LINE
public static final java.lang.String SERIE_LINE
- See Also:
- Constant Field Values
-
SERIE_BAR
public static final java.lang.String SERIE_BAR
- See Also:
- Constant Field Values
-
SERIE_BARGLASS
public static final java.lang.String SERIE_BARGLASS
- See Also:
- Constant Field Values
-
SERIE_HORIZBAR
public static final java.lang.String SERIE_HORIZBAR
- See Also:
- Constant Field Values
-
SERIE_STACKBAR
public static final java.lang.String SERIE_STACKBAR
- See Also:
- Constant Field Values
-
SERIE_AREA
public static final java.lang.String SERIE_AREA
- See Also:
- Constant Field Values
-
SERIE_STACKAREA
public static final java.lang.String SERIE_STACKAREA
- See Also:
- Constant Field Values
-
SERIE_RADAR
public static final java.lang.String SERIE_RADAR
- See Also:
- Constant Field Values
-
SERIE_PIE
public static final java.lang.String SERIE_PIE
- See Also:
- Constant Field Values
-
METHOD_COUNT
public static final char METHOD_COUNT
Method Count- See Also:
- Constant Field Values
-
METHOD_SUM
public static final char METHOD_SUM
Method Sum- See Also:
- Constant Field Values
-
METHOD_AVG_ALG
public static final char METHOD_AVG_ALG
Method Algebric Average- See Also:
- Constant Field Values
-
METHOD_AVG_GEO
public static final char METHOD_AVG_GEO
Method Geometric Average- See Also:
- Constant Field Values
-
METHOD_MIN
public static final char METHOD_MIN
Method Min- See Also:
- Constant Field Values
-
METHOD_MAX
public static final char METHOD_MAX
Method Max- See Also:
- Constant Field Values
-
-
Constructor Detail
-
Graphic
public Graphic(ObjectDB object, java.lang.String name, java.lang.String display, int width, int height, boolean visible, boolean grantable)
Constructor- Parameters:
object
- Objectname
- Graph namedisplay
- Labelwidth
- Width in pixelsheight
- Height in pixelsvisible
- Visible ?grantable
- Granted to groups ?
-
-
Method Detail
-
setVisible
public void setVisible(boolean visible)
-
isVisible
public boolean isVisible()
Visible and not empty ?
-
isEnabled
public boolean isEnabled()
-
setEnabled
public void setEnabled(boolean enabled)
-
getGraphicAxisType
public java.util.Map<java.lang.Integer,java.lang.String> getGraphicAxisType()
Graphic Values (index and chart type)
-
resetGraphicAxisType
public void resetGraphicAxisType()
-
setGraphicAxisType
public void setGraphicAxisType(int index, java.lang.String type)
-
setGraphicType
public void setGraphicType(java.lang.String type)
-
getGraphicType
public java.lang.String getGraphicType()
-
convertSerieToType
public static char convertSerieToType(java.lang.String serieType, char defaultType)
Convert Serie to Type of axis
-
convertTypeToSerie
public static java.lang.String convertTypeToSerie(char graphicType, java.lang.String defaultType)
Convert Type of axis to Serie
-
getChartType
public char getChartType()
Chart main type
-
getImageName
public java.lang.String getImageName()
Get image name
-
isGraphicSplitted
public boolean isGraphicSplitted()
Split the graphic ?
-
setGraphicSplitted
public void setGraphicSplitted(boolean b)
-
getObject
public ObjectDB getObject()
-
getName
public java.lang.String getName()
-
getDisplay
public java.lang.String getDisplay()
-
getLabel
public java.lang.String getLabel()
-
isGrantable
public boolean isGrantable()
Grantable ?
-
setGrantable
public void setGrantable(boolean b)
-
getGrantedGroups
public java.util.List<java.lang.String> getGrantedGroups()
Granted groups ?
-
addGrantedGroup
public void addGrantedGroup(java.lang.String group)
-
removeGrantedGroup
public void removeGrantedGroup(java.lang.String group)
-
isGranted
public boolean isGranted(Grant g)
-
getWidth
public int getWidth()
-
getHeight
public int getHeight()
-
getX
public java.util.List<Graphic.Axis> getX()
-
getY
public java.util.List<Graphic.Axis> getY()
-
getYmin
public double getYmin()
-
getYmax
public double getYmax()
-
setWidth
public void setWidth(int w)
-
setHeight
public void setHeight(int h)
-
addAxis
public Graphic.Axis addAxis(java.lang.String key, char type, char method, char chart, java.lang.String label, java.lang.String field)
Add axis to the graph- Parameters:
key
- Axis keytype
- Type 'X' or 'Y'method
- Methodchart
- Chart typelabel
- Axis namefield
- Field name
-
calculate
public void calculate(ObjectDB obj)
Prepare the data- Parameters:
obj
- Object
-
-