Versions Compared

Key

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

...

You can download the full code example here or see the widget code below.

Widget Header

The IWidget framework comes with a built in header that is attached to all widgets when initializing.  At a minimum the header will have the current title of the widget. (If you are using the plugin, this can be updated by setting the title on your widget in the InfiniteTestApplication.mxml).  Any options you want visible to the users at all times can be added to your widget in a section labeled:

Code Block
<components:headerContent>
        <!-- Put components to be displayed in the header here -->
</components:headerContent>

The widget library comes complete with some components styled to fit in with the widget theme.  A list of all available can be seen in the package com.ikanow.infinit.e.widget.library.components.*.  If you have been using the widget plugin then a sample WidgetToggleButton is already created for you.
Image Added
Common suggestions for header items would include things like current graph types such as a toggle between pie or bar charts, a drop down for current map display types such as Terrain, Satellite, or 2d Map or a slider on how many nodes to show on a graph at once.

More advanced operations

Filtering the data visible by widgets

...

  • "onSaveWidgetOptions" is called periodically by the framework (so shouldn't block)
  • "onLoadWidgetOptions" is called after the widget's intialization is complete.
  • As can be seen by the code fragments above, the "Object" passed to from the callbacks represents a JSON object.
  • See the Special Widget Information page for a distinction between userSaves and communitySaves.

Adding a query term to the builder

...