J2ME Polish
J2ME Polish 2.4 Documentation
Enough Software

Using FramedForms

The FramedForm provides several frames that remain static on the screen, while only the center frame can be scrolled.

Design

FramedForm
The above design has been realized with the following settings in polish.css:

.gradientFramedForm {
	padding: 2;
	background-color: screenBgColor;
	layout: vertical-center | horizontal-center;
}

rightframe {
	layout: vertical-expand | vertical-center;
}

The FramedForm contains any kind of items in several frames. The user can jump between different frames by clicking left and right (when the non-scrollable frames contain selectable items).

The FramedForm uses different styles for its design:

  • leftframe: the design of the frame left of the main content area
  • rightframe: the design of the frame right of the main content area
  • topframe: the design of the frame over the main content area
  • bottomframe: the design of the frame below the main content area

You can use the following CSS attributes for the FramedForm:

Programming

The FramedForm is used like a normal Form but you have some additional methods for adding contents to a specific frame:

  • append( int frameOrientation, Item item ): Adds the given item to the specified frame (either Graphics.TOP, Graphics.BOTTOM, Graphics.LEFT or Graphics.RIGHT), can be used with a style preprocessing directive.
  • set( int frameOrientation, int itemNum, Item item ): Updates an existing item in the specified frame.
  • delete( int frameOrientation, int itemNum ): Removes the given item from the specifid frame.
  • deleteAll( int frameOrientation ): Removes all items from the specified frame.
  • boolean deleteFrame(int frameOrientation): Deletes a complete frame.
  • setActiveFrame( int frameOrientation ): Focuses the specified frame.

For a complete example please refer to the "framedform" sample application.

JavaDoc

back to top