|
ReportMill 10 API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.reportmill.base.RMObject
com.reportmill.shape.RMShape
com.reportmill.shape.graph.RMGraph
public class RMGraph
The RMGraph class provides a template and the machinery for generating graphs. It primarily encapsulates a list key for defining the set of objects to graph and a keys string for defining the attributes of those objects to graph. For instance, the list key might be "Movies" and the keys string might be "revenue". You can programatically create a graph like this:
RMGraph graph = new RMGraph(); graph.setBounds(0, 0, 640, 480); graph.setListKey("Movies"); graph.setKeysString("revenue"); graph.setType(RMGraph.TYPE_PIE);
Field Summary | |
---|---|
static java.lang.String |
TYPE_AREA
|
static java.lang.String |
TYPE_BAR
|
static java.lang.String |
TYPE_BARH
|
static java.lang.String |
TYPE_LINE
|
static java.lang.String |
TYPE_PIE
|
static java.lang.String |
TYPE_SCATTER
|
static java.lang.String[] |
TYPES
|
Fields inherited from class com.reportmill.shape.RMShape |
---|
WRAP_TYPE_BOTH, WRAP_TYPE_NONE |
Constructor Summary | |
---|---|
RMGraph()
Creates a plain graph shape. |
Method Summary | |
---|---|
boolean |
acceptsChildren()
Editor method indicates that graph can accept new children. |
void |
addKey(java.lang.String aKey)
Adds a key. |
boolean |
canBeUngrouped()
Editor method indicates that graph cannot be ungrouped. |
void |
clearKeys()
Removes all keys. |
java.lang.Object |
clone()
Standard clone implementation. |
void |
copy(java.lang.Object anObj)
Copies the attributes from the given object into receiver (for undo). |
boolean |
equals(java.lang.Object anObj)
Standard equals implementation. |
java.lang.Object |
fromXML(com.reportmill.archiver.RXArchiver anArchiver,
com.reportmill.archiver.RXElement anElement)
XML unarchival. |
RMShape |
getBarWedgePrototype()
Returns the shape used to represent the basic attributes of bars & wedges. |
RMColor |
getColor(int anIndex)
Returns the specific color at the given index. |
int |
getColorCount()
Returns the number of colors set for this graph. |
java.util.List |
getColors()
Returns the list of colors to be used by this graph (or the default graph colors, if null). |
static java.util.List |
getDefaultColors()
Returns the default list of colors to be used by any graph without an explicit list of colors. |
boolean |
getDraw3D()
Returns whether the graph draws in 3D. |
java.lang.String |
getFilterKey()
Returns the optional key chain (expression) used to limit the table list derived from list key. |
RMGraphArea |
getGraphArea()
Returns the shape that represents the conent of the graph. |
java.lang.String |
getGraphTypeString()
Returns the graph type as a simple string: bar, pie or hbar. |
RMGrouping |
getGrouping()
Returns the graph grouping. |
java.lang.String |
getKey(int anIndex)
Returns the specific key at the given index. |
int |
getKeyCount()
Returns the number of keys for this graph. |
RMGraphLegend |
getLegend()
Returns the child of the graph that represents the legend (if present). |
java.lang.String |
getListKey()
Returns the list key associated with the graph. |
boolean |
getShowLegend()
Returns whether the graph shows a legend. |
java.lang.String |
getType()
Returns the graph type (TYPE_BAR, TYPE_PIE, etc.). |
void |
rebuild()
Rebuild graph. |
void |
removeKey(int anIndex)
Removes a key. |
RMShape |
rpgClone(com.reportmill.base.ReportMill aReportMill)
Returns a clone of this shape with report generation. |
void |
setBarWedgePrototype(RMShape aShape)
Sets the shape used to represent the basic attributes of bars & wedges. |
void |
setColors(java.util.List aColorList)
Sets the list of colors to be used by this graph. |
static void |
setDefaultColors(java.util.List aList)
Sets the default list of colors to be used by any graph without an explicit list of colors. |
void |
setDraw3D(boolean aFlag)
Sets whether the graph draws in 3D. |
void |
setFilterKey(java.lang.String aKeyExpr)
Sets the optional key chain (expression) used to limit the table list derived from list key. |
void |
setGraphTypeString(java.lang.String aString)
Sets the graph type as a simple string: bar, pie or hbar. |
void |
setGrouping(RMGrouping aGrouping)
Sets the graph grouping. |
void |
setListKey(java.lang.String aKeyPath)
Sets the list key associated with the graph. |
void |
setShowLegend(boolean aFlag)
Sets whether the graph shows a legend. |
void |
setType(java.lang.String aType)
Sets the graph type (TYPE_BAR, TYPE_PIE, etc.). |
boolean |
superSelectable()
Editor method indicates that graph can be super selected. |
com.reportmill.archiver.RXElement |
toXML(com.reportmill.archiver.RXArchiver anArchiver)
XML archival. |
Methods inherited from class com.reportmill.base.RMObject |
---|
didUndo, getAnimAttribute, getClassNameShort |
Methods inherited from class java.lang.Object |
---|
getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String TYPE_BAR
public static final java.lang.String TYPE_BARH
public static final java.lang.String TYPE_AREA
public static final java.lang.String TYPE_LINE
public static final java.lang.String TYPE_SCATTER
public static final java.lang.String TYPE_PIE
public static final java.lang.String[] TYPES
Constructor Detail |
---|
public RMGraph()
Method Detail |
---|
public java.lang.String getListKey()
getListKey
in class RMShape
public void setListKey(java.lang.String aKeyPath)
public java.lang.String getFilterKey()
public void setFilterKey(java.lang.String aKeyExpr)
public int getKeyCount()
public java.lang.String getKey(int anIndex)
public void addKey(java.lang.String aKey)
public void removeKey(int anIndex)
public void clearKeys()
public java.lang.String getType()
public void setType(java.lang.String aType)
public java.lang.String getGraphTypeString()
public void setGraphTypeString(java.lang.String aString)
public RMGrouping getGrouping()
public void setGrouping(RMGrouping aGrouping)
public boolean getDraw3D()
public void setDraw3D(boolean aFlag)
public RMGraphLegend getLegend()
public boolean getShowLegend()
public void setShowLegend(boolean aFlag)
public int getColorCount()
public RMColor getColor(int anIndex)
public java.util.List getColors()
public void setColors(java.util.List aColorList)
public static java.util.List getDefaultColors()
public static void setDefaultColors(java.util.List aList)
public RMShape getBarWedgePrototype()
public void setBarWedgePrototype(RMShape aShape)
public RMGraphArea getGraphArea()
public void rebuild()
public boolean equals(java.lang.Object anObj)
equals
in class RMShape
public java.lang.Object clone()
clone
in class RMShape
public void copy(java.lang.Object anObj)
copy
in class RMShape
public RMShape rpgClone(com.reportmill.base.ReportMill aReportMill)
rpgClone
in class RMShape
public boolean superSelectable()
superSelectable
in class RMShape
public boolean canBeUngrouped()
canBeUngrouped
in class RMShape
public boolean acceptsChildren()
acceptsChildren
in class RMShape
public com.reportmill.archiver.RXElement toXML(com.reportmill.archiver.RXArchiver anArchiver)
toXML
in class RMShape
public java.lang.Object fromXML(com.reportmill.archiver.RXArchiver anArchiver, com.reportmill.archiver.RXElement anElement)
fromXML
in class RMShape
|
ReportMill 10 API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |