Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

This guide is written to be picked up from the end of the Getting Started tutorial for getting set up with the Eclipse Plugin and Widget Library.

Overview of an Infinit.e Widget

An infinit.e widget is a flex module that gets run inside a window in the infinit.e application.

The Infinit.e Webpage handles all interactions with the window such as moving, dragging, changing size, hiding/showing, and data transfer.  You are responsible for handling the content inside the widget.
A widget must implement the com.ikanow.infinit.e.widget.library.widget.IWidget interface which is included in the infinit.e.widget.library.swc library.  This involves implementing the following functions: onInit(IWidgetContext), onReceiveNewQuery(), onReceiveNewFilter(), and reScale(Number,Number).  The first 3 functions are for data transfer while the last is used for resizing the content you create.

If you are using the Infinit.e Eclipse Plugin then these methods will already be stubbed out for you with sample code.

Overview of function to implement

The IWidget interface requires you to implement 4 methods, which will be called from the framework.  We will go over each method in detail below:

...

4. reScale(Number,Number) - This function is used to resize data in your widget.  When the parent window the widget is housed in gets resized, it will let the module inside know that it has changed width and height so you can change your data accordingly.  If you are using the Infinit.e Eclipse Plugin this method has stubbed out an example for you that will set this modules width and height to the incoming width and height so the parent and internal module will stay the same size.  Some examples where you may not want to do this is if you want to instead scale the data in your window so it is always shown or resize in another manor.

Example of displaying data received from a query or filter

Here we will step through and example of displaying the titles and entities of a query to show how you can display data your widget receives.

...