Adding a Quick tour guide to your portlet

From Gcube Wiki
Jump to: navigation, search

gCube Quick tour guide

gCube Quick tour guide is a customizable dialogBox that can be loaded when your portlet starts up for new users. It is shipped with a built-in clickable option that allows a user to specify to not open it again.

gCube Quick tour guide comes with 12 different themes and is highly customizable. See some available themes in the picture below.

GCubeThemes.jpg

Adding a gCube Quick tour guide to your gCube Portlet Project

  • Download the latest jar from here: gcube-quicktour.jar and add it to your build path.
  • Add the following to your project .gwt.xml file
<!-- inherits GCUBE Quick tour -->
<inherits name='org.gcube.portlets.user.guidedtour.GuidedTour' />

You are ready to use it.

Show Quick tour guide at your portlet startup

In order to load the quick tour at portlet startup create a private (void) method in your GWT EntryPoint class, say you name it showGuidedTour() then you would put showGuidedTour() and the end of your public void onModuleLoad() method.


Customize Quick tour guide for your portlet

Within the showGuidedTour() method you must instanciate the GCUBEGuidedTour class (org.gcube.portlets.user.guidedtour.client.GCUBEGuidedTour)

There are several constructors you can use, please refer to documentation to find the one that fits your needs.

Adding steps to the tour

GCUBEGuidedTour supports templates for its steps. Although any Composite will do, we reccomend to use predefined Templates as shown in the following.

Creating Step from template

There are 3 Templates you can choose In order to add steps to the tour you have to add themThe GCUBEGuidedTour class

The body of your showGuidedTour() method will have something like the following:

private void showGuidedTour() {
    //this line create 
    GCUBEGuidedTour gt = new GCUBEGuidedTour("Workspace", Workspace.class.getName(), 750, 450, false);