|
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcorelib.services.web.components.WebComponent
corelib.services.web.components.VisualComponent
corelib.services.web.components.diagrams.Diagram
public class Diagram
This class is used to inject a diagram in your web page. The Component Diagram is based on the MVC architecture pattern (Model, view, controller). The component is able to display multiple data models on view. There are several types of views: HistogramView, CurveView and PieView. Here is an example of using this component:
<diagram:Diagram caption="Sales per month">
<diagram:HistogramView drawLegend="true" drawValues="false" />
<diagram:Model name="Sales for 2009" color="rgb(255,0,0)">
<diagram:Datum key="January" value="120000" />
<!-- ... -->
</diagram:Model>
<diagram:Model name="Sales for 2010" color="#00FF00">
<diagram:Datum key="January" value="140000" />
<!-- ... -->
</diagram:Model>
</diagram:Diagram>
Here is an example of the image that could produce this component:
Notice that in case of multiple models injected into the component, only the first model defines the structure of the data. In consequence, all models injected in a diagram component must have the same keys that the first model.
Model,
DiagramView,
HistogramView,
CurveView,
PieView| Field Summary |
|---|
| Fields inherited from class corelib.services.web.components.VisualComponent |
|---|
cssClass, cssStyle, toolTipText, visible |
| Fields inherited from class corelib.services.web.components.WebComponent |
|---|
dataBindings, webPage, xmlNode |
| Constructor Summary | |
|---|---|
Diagram()
|
|
| Method Summary | |
|---|---|
void |
component_load(WebPageEvent event)
Fired when the web page is fully initialized. |
void |
component_renderBegin(WebPageEvent webPageEvent)
|
void |
component_renderChildren(WebPageEvent webPageEvent)
|
void |
component_renderEnd(WebPageEvent webPageEvent)
|
int |
getCanvasHeight()
Returns the height of the canvas used by this diagram component. |
int |
getCanvasWidth()
Returns the width of the canvas used by this diagram component. |
java.lang.String |
getCaption()
Returns the displayed caption for this diagram. |
void |
setCanvasHeight(int canvasHeight)
Changes the height of the canvas used by this diagram component. |
void |
setCanvasWidth(int canvasWidth)
Changes the width of the canvas used by this diagram component. |
void |
setCaption(java.lang.String caption)
Set the displayed caption for this diagram. |
| Methods inherited from class corelib.services.web.components.VisualComponent |
|---|
component_postRender, component_preRender, component_renderJavascriptLocalisation, encodeAttributeValue, getCssClass, getCssStyle, getOnClickListener, getSharedAttributesHtmlEncoding, getToolTipText, isVisible, renderElement, setCssClass, setCssStyle, setOnClickListener, setToolTipText, setVisible |
| Methods inherited from class corelib.services.web.components.WebComponent |
|---|
addBindingExpression, addChildComponent, component_init, component_preRepeaterDuplications, getChildComponents, getDataBinding, getElementsByTagName, getId, getWebPage, getXmlNode, setId, setWebPage, setXmlNode |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Diagram()
| Method Detail |
|---|
public java.lang.String getCaption()
public void setCaption(java.lang.String caption)
caption - The new caption to display.public int getCanvasWidth()
Returns the width of the canvas used by this diagram component.
Notice that the diagram component can be bigger than the canvas ( per example, the diagram legend is not displayed by the canvas).
public void setCanvasWidth(int canvasWidth)
Changes the width of the canvas used by this diagram component.
Notice that the diagram component can be bigger than the canvas ( per example, the diagram legend is not displayed by the canvas).
canvasWidth - The new width for the canvas.public int getCanvasHeight()
Returns the height of the canvas used by this diagram component.
Notice that the diagram component can be bigger than the canvas ( per example, the diagram legend is not displayed by the canvas).
public void setCanvasHeight(int canvasHeight)
Changes the height of the canvas used by this diagram component.
Notice that the diagram component can be bigger than the canvas ( per example, the diagram legend is not displayed by the canvas).
canvasHeight - The new height for the canvas.public void component_load(WebPageEvent event)
WebComponent
component_load in class WebComponentevent - Qualify the current web page event.public void component_renderBegin(WebPageEvent webPageEvent)
component_renderBegin in class VisualComponentpublic void component_renderChildren(WebPageEvent webPageEvent)
component_renderChildren in class VisualComponentpublic void component_renderEnd(WebPageEvent webPageEvent)
component_renderEnd in class VisualComponent
|
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||