|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.sonar.plugins.api.web.gwt.client.ResourceWidget
public abstract class ResourceWidget
Nested Class Summary | |
---|---|
class |
ResourceWidget.StandAloneResourceHandler
|
Constructor Summary | |
---|---|
ResourceWidget()
|
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 java.lang.String |
getGwtId()
Return the GWT id of the widget |
protected abstract java.lang.String |
getHtmlRootId()
Returns the root HTML ID to bind this widget with |
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.Panel |
render(com.google.gwt.user.client.ui.RootPanel root)
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 |
Constructor Detail |
---|
public ResourceWidget()
Method Detail |
---|
public void onModuleLoad()
onModuleLoad
in interface com.google.gwt.core.client.EntryPoint
public Resource getResource()
public final void onResourceLoaded()
public final void loadContainer()
protected abstract java.lang.String getGwtId()
protected abstract com.google.gwt.user.client.ui.Panel render(com.google.gwt.user.client.ui.RootPanel root)
root
- the root html panelprotected abstract java.lang.String getHtmlRootId()
protected com.google.gwt.core.client.JavaScriptObject getResourceJSONObject()
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
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |