Wednesday, September 2, 2009

About widgets

Widgets in ArcWeb Explorer are easy to use, and re-use modules that provide specific functionality. You can use one of the provided widgets, use someone else’s widget, or create and use your own widgets. For example, you might want to create a widget that provides easy access to your data or services; a widget that’s almost a complete application in its own right; or a widget that creates driving directions to your specific locations. The possibilities are endless.
Widgets are based on three important concepts:
Widget containers: Widget containers are used to “house” the widgets, for example, FloatingWidgetContainer.
The non-UI part of the widget: This contains the business logic for the widget.
Widget view: The widget view can contain one or more widget states, for example, DEFAULT, INFO, and ICON.
To display widgets, you put them in widget containers. You can either use one of the existing four widget containers, or create your own. The existing widget containers are:
AccordionWidgetContainer: AccordionWidgetContainer can be used to group several widgets into one. It supports the DEFAULT widget state.
BarWidgetContainer: BarWidgetContainer is a type of "carousel container" that provides the ability to scroll through its content, either horizontally or vertically. It uses the ICON and ICON_ACTION widget states.
DockWidgetContainer: DockWidgetContainer is an interactive widget container that can be "docked" to the side of an application. It contains a BarWidgetContainer, and thus uses the ICON and ICON_ACTION widget states.
FloatingWidgetContainer: FloatingWidgetContainer is a "popup" widget container that "floats" atop the application. This is the widget container used by the "Base Maps", "Find", and "Pan and Zoom" widgets. Alternatively you could put those widgets in a different widget container. FloatingWidgetContainer uses the DEFAULT, INFO, and ICON widget states. Use the WidgetPopupManager to open (“pop up”) floating widget containers.
NOTE: This page does not discuss creating your own widget container (HINT: extend BaseWidgetContainer).
If you style your widgets correctly, they will have the same look and feel as the widgets provided in ArcWeb Explorer. Using stylesheets, you can change the look and feel of all widgets (including your own).

No comments:

Post a Comment