|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.sonar.api.web.gwt.client.AbstractViewer
public abstract class AbstractViewer
Nested Class Summary | |
---|---|
class |
AbstractViewer.StandAloneResourceHandler
|
Field Summary | |
---|---|
static String |
HTML_ROOT_ID
|
Constructor Summary | |
---|---|
AbstractViewer()
|
Method Summary | |
---|---|
protected abstract void |
exportJavascript()
Export GWT javascript methods to load and control the plugin, must export currently 2 method : I.E for plugin GWT id : foo.bar.MyPlugin, class foo.bar.client.MyPlugin : $wnd.load_foo_bar_MyPlugin = function() { called to the plugin init from JS obj.@foo.bar.client.MyPlugin::loadContainer()(); } $wnd.on_resource_loaded_foo_bar_MyPlugin = function() { called when a resource JSON object has been refreshed within the page obj.@foo.bar.client.MyPlugin::onResourceLoaded()(); } |
protected abstract String |
getGwtId()
Return the GWT id of the widget |
Resource |
getResource()
|
protected com.google.gwt.core.client.JavaScriptObject |
getResourceJSONObject()
Return a JavaScriptObject object containing all the measure available for the current resource key |
protected abstract boolean |
isDefault(WSMetrics.Metric metric,
Resource resource)
When multiple widgets are bound to the same HTML div, this method will indicate If the resource widget is the default one to show when the widget is initialized |
protected abstract boolean |
isForResource(Resource resource)
When multiple widgets are in the same page, this method will indicate if the widget can be shown for the given resource |
protected boolean |
isMetricInList(WSMetrics.Metric metric,
WSMetrics.Metric... metricsList)
Finds if a given metric is in the provided metrics list |
void |
loadContainer()
Called to render the widget for the given resource object loaded via the onResourceLoaded() method call |
void |
onModuleLoad()
|
void |
onResourceLoaded()
Called when a resource JSON object has been loaded within the page |
protected abstract com.google.gwt.user.client.ui.Widget |
render(Resource resource)
Renders the widget for the current resource |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String HTML_ROOT_ID
Constructor Detail |
---|
public AbstractViewer()
Method Detail |
---|
public void onModuleLoad()
onModuleLoad
in interface com.google.gwt.core.client.EntryPoint
protected abstract void exportJavascript()
protected abstract boolean isDefault(WSMetrics.Metric metric, Resource resource)
metric
- the metric for which the widget is shown, cannot be nullresource
- the resource bound to the widget
protected boolean isMetricInList(WSMetrics.Metric metric, WSMetrics.Metric... metricsList)
metric
- the metric to searchmetricsList
- the metric list
protected abstract boolean isForResource(Resource resource)
resource
- the resource bound to the page
public Resource getResource()
public final void onResourceLoaded()
public final void loadContainer()
protected abstract String getGwtId()
protected abstract com.google.gwt.user.client.ui.Widget render(Resource resource)
protected com.google.gwt.core.client.JavaScriptObject getResourceJSONObject()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |