My favorites | Sign in
Project Home Downloads Wiki Issues Source
READ-ONLY: This project has been archived. For more information see this post.
Search
for
GettingStarted  
Updated Feb 26, 2010 by minichate

Getting Started

The simplest dashboard widget is outlined below. The following preconditions are necessary for the widget to build properly:

  • Inherit from "com.christroup.gashboard.wrapper.Gashboard". eg <inherits name="com.christroup.gashboard.wrapper.Gashboard" />
  • Create an HTML file in the public directory. Don't place it in the war directory, since it must be output in a directory with the rest of the compiled Javascript
  • Instead of a regular entry point class, have your main class inherit from DashboardWidget
  • Annotate class with @WidgetOptions and fill out required fields.

@WidgetOptions(
	height=380, 
	width=280, 
	allowNetworkAccess=true,
	mainHTML="index.html",
	displayName="Gashboard Sample Widget",
	version="1.0"
)
public class GashboardSample extends DashboardWidget {

	protected void widgetFront(AbsolutePanel front) {
	}

	protected void widgetBack(AbsolutePanel back) {
	}

}

Entry Point Layout

Your class must implement two interfaces: widgetFront and widgetBack. Most dashboard widgets will have a main front panel and a back informational panel. If you do not want a back panel, simply leave this method empty.

There are two "special" widgets included with Gashboard. InfoButton and BackButton wrap Apple's elements that allow you to flip from the front of the widget to the back of the widget.

Powered by Google Project Hosting