J2ME Polish
J2ME Polish 2.4 Documentation
Enough Software

MessageItem

A MessageItem The MessageItem displays a message together with a headline and optional image.

Design

There are two predefined styles for a MessageItem:

  • messageheadline: designs the headline part
  • messagetext: designs the text part

The above design has been realized with following settings:

.message {
	border-type: round-rect;
	border-color: gray;
}

messageheadline {
	padding-horizontal: 5;
	icon-image: url( idea.png );
	icon-image-align: left;
	layout: expand | bottom;	
	font-color: black;
	font-style: underlined;
}

messagetext {
	font-color:  black;
	font-size: small;
	layout: expand | center;
}

CSS Attributes for the MessageItem

You can use following attributes for designing a MessageItem:

CSS Attributes for messageheadline

Use following attributes for the messageheadline style:

CSS Attributes for messagetext

Use following attributes for the messagetext style:

Programming

Using the MessageItem is simple as the following example shows:

//#style message
MessageItem messageItem = new MessageItem( "Did you know?", "J2ME Polish rocks!");
messageItem.setDefaultCommand(this.cmdShowDetails);
messageItem.setItemCommandListener( this );
this.form.append( messageItem );

JavaDoc

back to top