|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.google.gwt.user.client.ui.UIObject
com.google.gwt.user.client.ui.Widget
com.rednels.ofcgwt.client.ChartWidget
public class ChartWidget
A gwt chart widget based on Open Flash Chart.
Create the ChartWidget and add anywhere a GWT widget can be used. Use
ChartData.toString() to produce a JSON string that this chart widget
uses via its setJsonData(String) method.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class com.google.gwt.user.client.ui.UIObject |
|---|
com.google.gwt.user.client.ui.UIObject.DebugIdImpl, com.google.gwt.user.client.ui.UIObject.DebugIdImplEnabled |
| Field Summary | |
|---|---|
static java.lang.String |
ALTERNATE_SWF_SRC
|
static java.lang.String |
BLANK_CHART_JSON_DATA
|
static java.lang.String |
MIN_PLAYER_VERSION
|
| Fields inherited from class com.google.gwt.user.client.ui.UIObject |
|---|
DEBUG_ID_PREFIX |
| Constructor Summary | |
|---|---|
ChartWidget()
Creates a new ChartWidget. |
|
| Method Summary | |
|---|---|
void |
addChartListeners(IChartListener listener)
Adds an IChartListener that implements the handleChartReadyEvent method |
java.lang.String |
addOnClickListener(IOnClickListener listener)
Adds an IOnClickListener that implements the handleOnClickEvent method. |
java.lang.String |
getFlashUrl()
Gets the current OFC flash URL. |
java.lang.String |
getHeight()
Gets the objects height. |
java.lang.String |
getInnerDivTextForFlashPlayerNotFound()
Gets the InnerDiv Text for when flash player is not found or can't be injected. |
java.lang.String |
getJsonData()
Gets the current JSON data for this chart. |
java.lang.String |
getSwfId()
Get the currently set swf ID of this chart widget |
java.lang.String |
getUrlPrefix()
|
java.lang.String |
getWidth()
Gets the objects width. |
boolean |
isCacheFixEnabled()
Is the CacheFix Enabled? |
void |
notifyImageSaved()
Notifies registered chart listeners that the image was saved |
void |
notifyOnClick(java.lang.String evt)
Notifies registered chart listeners that the chart is ready |
void |
notifyReady()
Notifies registered chart listeners that the chart is ready |
void |
removeChartListeners(IChartListener listener)
Removes an IChartListener |
void |
saveJpgImagetoURL(java.lang.String url,
boolean debug)
Saves a JPG image of this chart and send the JPG to the url provided. |
void |
setCacheFixEnabled(boolean enable)
Enables an fix/workaround that stops caching of the swf which on IE may solve some bugs. |
void |
setFlashUrl(java.lang.String url)
Sets the OFC flash URL. |
void |
setHeight(java.lang.String height)
|
void |
setInnerDivTextForFlashPlayerNotFound(java.lang.String divtext)
Sets the InnerDiv Text for when flash player is not found or can't be injected. |
void |
setJsonData(java.lang.String json)
Sets the JSON data for this chart & updates the chart if ready. |
void |
setUrlPrefix(java.lang.String urlPrefix)
Sets the url prefix of the OFC flash swf file. |
void |
setWidth(java.lang.String width)
|
| Methods inherited from class com.google.gwt.user.client.ui.Widget |
|---|
getParent, isAttached, onBrowserEvent, removeFromParent |
| Methods inherited from class com.google.gwt.user.client.ui.UIObject |
|---|
addStyleDependentName, addStyleName, ensureDebugId, ensureDebugId, getAbsoluteLeft, getAbsoluteTop, getElement, getOffsetHeight, getOffsetWidth, getStyleName, getStylePrimaryName, getTitle, isVisible, isVisible, removeStyleDependentName, removeStyleName, setPixelSize, setSize, setStyleName, setStylePrimaryName, setTitle, setVisible, setVisible, sinkEvents, toString, unsinkEvents |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String BLANK_CHART_JSON_DATA
public static final java.lang.String MIN_PLAYER_VERSION
public static final java.lang.String ALTERNATE_SWF_SRC
| Constructor Detail |
|---|
public ChartWidget()
| Method Detail |
|---|
public void addChartListeners(IChartListener listener)
listener - an IChartListenerpublic java.lang.String addOnClickListener(IOnClickListener listener)
Note: not really intended to be used directly - you must add the returned function signature to the JSON onClick event.
Easier Option: Use addOnClickListener within the models (such as Element/Pie.Slice etc) and this method will get function signature, register the event handler and add to JSON string.
addOnClickListener in interface IChartDatalistener - an IChartListener
public java.lang.String getFlashUrl()
public java.lang.String getHeight()
public java.lang.String getInnerDivTextForFlashPlayerNotFound()
public java.lang.String getJsonData()
getJsonData in interface IChartDatapublic java.lang.String getSwfId()
IChartData
getSwfId in interface IChartDatapublic java.lang.String getUrlPrefix()
public java.lang.String getWidth()
public boolean isCacheFixEnabled()
public void notifyImageSaved()
public void notifyOnClick(java.lang.String evt)
notifyOnClick in interface IChartDataevt - the event id Stringpublic void notifyReady()
notifyReady in interface IChartDatapublic void removeChartListeners(IChartListener listener)
listener - an IChartListener
public void saveJpgImagetoURL(java.lang.String url,
boolean debug)
url - the url to calldebug - enable debugpublic void setCacheFixEnabled(boolean enable)
enable - - true to enable, false to disablepublic void setFlashUrl(java.lang.String url)
url - stringpublic void setHeight(java.lang.String height)
setHeight in class com.google.gwt.user.client.ui.UIObjectpublic void setInnerDivTextForFlashPlayerNotFound(java.lang.String divtext)
divtext - a stringpublic void setJsonData(java.lang.String json)
json - a JSON stringpublic void setUrlPrefix(java.lang.String urlPrefix)
urlPrefix - a URL stringpublic void setWidth(java.lang.String width)
setWidth in class com.google.gwt.user.client.ui.UIObject
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||