|
ReportMill 11 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.graphing.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.setDatasetKey("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 | |
---|---|
void |
addGroupingKey(java.lang.String aKey)
Adds a grouping to the table for the given key string. |
void |
addGroupingKey(java.lang.String aKey,
int anIndex)
Adds a grouping to the table for the given key string at the given grouping index. |
void |
addKey(java.lang.String aKey)
Adds a key. |
void |
clearKeys()
Removes all keys. |
RMGraph |
clone()
Standard clone implementation. |
boolean |
equals(java.lang.Object anObj)
Standard equals implementation. |
java.lang.Object |
fromXMLShape(com.reportmill.archiver.RXArchiver anArchiver,
com.reportmill.archiver.RXElement anElement,
java.lang.Object anOwner)
XML unarchival. |
RMShape |
getBarWedgePrototype()
Returns the shape used to represent the basic attributes of bars & wedges. |
RMShape |
getChild(int anIndex)
Override to return table rpg if set. |
int |
getChildCount()
Override to return table rpg if set. |
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). |
java.lang.String |
getDatasetKey()
Returns the dataset key associated with the graph. |
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 dataset 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. |
com.reportmill.base.RMGrouper |
getGrouper()
Returns the grouper associated with the table. |
RMGrouping |
getGrouping()
Returns the graph grouping. |
RMGrouping |
getGrouping(int anIndex)
Returns the individual grouping at the given index. |
RMGrouping |
getGrouping(java.lang.String aKey)
Returns the individual grouping that has the same key as the one given. |
int |
getGroupingCount()
Returns the number of groups in this table. |
java.lang.Float |
getInterval(int anIndex)
Returns the individual interval at a given index as a float value. |
int |
getIntervalCount()
Returns the number of intervals for this filled graph. |
java.lang.Float |
getIntervalLast()
Returns the last interval as a float value. |
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). |
int |
getMinorTickCount()
Returns the number of suggested ticks between the intervals of the RPG'd graph. |
java.util.List |
getObjects()
Returns the list of objects to generate a graph for. |
com.reportmill.base.ReportMill |
getReportMill()
Returns the reportmill. |
java.util.List |
getSampleObjects()
Returns a list of sample objects for this graph. |
RMGraphSection |
getSection(int anIndex)
Returns the individual section at the given index. |
int |
getSectionCount()
Returns the number of sections in this graph. |
RMGraphSeries |
getSeries(int anIndex)
Returns the individual series at the given index. |
int |
getSeriesCount()
Returns the number of series in this graph. |
boolean |
getShowLegend()
Returns whether the graph shows a legend. |
java.lang.String |
getType()
Returns the graph type (TYPE_BAR, TYPE_PIE, etc.). |
void |
moveGrouping(int index1,
int index2)
Moves the grouping at the first index so that it resides at the second index. |
void |
rebuild()
Rebuild graph. |
void |
removeGrouping(RMGrouping aGrouping)
Removes the given grouping. |
void |
removeKey(int anIndex)
Removes a key. |
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. |
void |
setDatasetKey(java.lang.String aKeyPath)
Sets the dataset key associated with the 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 dataset key. |
void |
setGraphTypeString(java.lang.String aString)
Sets the graph type as a simple string: bar, pie or hbar. |
void |
setObjects(java.util.List aList)
Sets the list of objects to generate a graph for. |
void |
setReportMill(com.reportmill.base.ReportMill aReportMill)
Set ReportMill (which tries to get a dataset from reportmill and calls setObjects). |
void |
setReportMillDeep(com.reportmill.base.ReportMill aReportMill)
Override to stifle child rpg. |
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.). |
com.reportmill.archiver.RXElement |
toXMLShape(com.reportmill.archiver.RXArchiver anArchiver,
java.lang.Object anOwner)
XML archival. |
Methods inherited from class com.reportmill.base.RMObject |
---|
addListener, addPropertyChangeListener, firePropertyChange, getListener, getListenerCount, getListeners, isFirePropertyChangeEnabled, isUndoing, removeListener, removePropertyChangeListener, setFirePropertyChangeEnabled, setUndoing |
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 getDatasetKey()
getDatasetKey
in class RMShape
public void setDatasetKey(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 com.reportmill.base.RMGrouper getGrouper()
public int getGroupingCount()
public RMGrouping getGrouping(int anIndex)
public RMGrouping getGrouping(java.lang.String aKey)
public void addGroupingKey(java.lang.String aKey)
public void addGroupingKey(java.lang.String aKey, int anIndex)
public void removeGrouping(RMGrouping aGrouping)
public void moveGrouping(int index1, int index2)
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 com.reportmill.base.ReportMill getReportMill()
getReportMill
in class RMShape
public void setReportMill(com.reportmill.base.ReportMill aReportMill)
setReportMill
in class RMShape
public void setReportMillDeep(com.reportmill.base.ReportMill aReportMill)
setReportMillDeep
in class RMShape
public java.util.List getObjects()
public void setObjects(java.util.List aList)
public int getSeriesCount()
public RMGraphSeries getSeries(int anIndex)
public int getSectionCount()
public RMGraphSection getSection(int anIndex)
public int getIntervalCount()
public java.lang.Float getInterval(int anIndex)
public java.lang.Float getIntervalLast()
public int getMinorTickCount()
public java.util.List getSampleObjects()
public int getChildCount()
getChildCount
in class RMShape
public RMShape getChild(int anIndex)
getChild
in class RMShape
public void rebuild()
public boolean equals(java.lang.Object anObj)
equals
in class RMShape
public RMGraph clone()
clone
in class RMShape
public com.reportmill.archiver.RXElement toXMLShape(com.reportmill.archiver.RXArchiver anArchiver, java.lang.Object anOwner)
toXMLShape
in class RMShape
public java.lang.Object fromXMLShape(com.reportmill.archiver.RXArchiver anArchiver, com.reportmill.archiver.RXElement anElement, java.lang.Object anOwner)
fromXMLShape
in class RMShape
|
ReportMill 11 API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |