Ticker
A ticker scrolls information over a screen and can include images in J2ME Polish.
Design

The above example has been realized with the following CSS code:
colors {
fontColor: #222;
fontShadowColor: #fff;
}
.mailTicker {
ticker-step: 1;
padding-horizontal: 5;
layout: vertical-center;
icon-image: url( sending.png );
font-color: fontColor;
font-size: small;
text-effect: shadow;
text-shadow-color: fontShadowColor;
}
Specific design attributes:
| CSS Attribute | Default | Values | Explanation |
|---|---|---|---|
| ticker-position | top | top, bottom | You can specify the position of the ticker on the screen. |
| ticker-step | 2 | integer | The number of pixels by which the ticker is shifted at each update. |
| Further CSS Attribute | Default | Values | Explanation |
| after | - | imageurl | The URL of the image that should be shown after the item in question. |
| always-include | false | true, false | Defines if a style should always be included, even if not used. |
| background | - | background definition | The background of an item or screen. The default background for items is "none", the default background for screens is a simple white background. |
| before | - | imageurl | The URL of the image that should be shown before the item in question. |
| border | - | border definition | The border of an item or screen. The default border is "none". |
| colspan | 1 | integer | The number of columns wich are used by the item within a table. |
| complete-border | - | border | A border reference from the borders section. The border includes the label of the item and is independent of the item's normal border. |
| complete-background-padding | - | integer | The padding that is added to the complete-background and/or complete-border. Note that this does not change the size of the item, so you might need to adapt margins or normal paddings for your design. |
| focused-style | focused | style | The name of the style for the currently focused item, usually applied with a [style-name]:hover construct. |
| font-bitmap | - | string | Defines which bitmap (bmf) font should be used. |
| icon-horizontal-adjustment | 0 | integer | Adjusts the icon by the specified number of pixels horizontally. Negative values move the icon-image to the left. |
| icon-image | none | imageurl | The URL of the image. The keyword %INDEX% can be used for adding the position of the icon to the name, e.g."icon-image: url(icon%INDEX%.png);". |
| icon-image-align | left | left, right, top, bottom, center | The position of the image relative to the text. |
| icon-image-align-next | false | true, false | Specifies if a horizontal aligned image should be painted at the border (=default) or next to the content when the item has an expand layout. |
| icon-inactive | false | true, false | Can be used to deactivate a specific ChoiceGroup/List item permanently. This can be useful to integrate explanations, headings etc into an ChoiceGroup/List. |
| icon-padding | 1 | integer | The padding between the image and the text of an icon. |
| inherit | true | true, false | Defines if a style that extends this style should inherit all attributes. |
| label-style | label | style | The name of the style for the label of the corresponding Item. |
| max-height | - | integer | The maximum height of an item. |
| max-width | - | integer | The maximum width of an item. |
| min-height | - | integer | The minimum height of an item. |
| min-width | - | integer | The minimum width of an item. |
| table-selected-background | - | background | The background for selected cells of a table. |
| table-selected-row-background | - | background | The background for selected rows of a table. |
| include-label | false | true, false | Usually the label of an item is rendered separately of the item's content. You can expand the background and border over the label as well using this attribute. |
| opacity | 255 | integer | The opacity of an item between 0 (fully transparent) and 255 (fully opaque). |
| pressed-style | - | style | The style which indicates that an item is being pressed, usually applied with a [style-name]:pressed construct. |
| scale-factor | - | integer | The factor in percent by which the image should be scaled, e.g. 200. |
| scale-steps | 5 | integer | The number of intermediate steps that should be used for scaling an image. |
| table-selected-column-background | - | background | The background for selected columns of a table. |
| complete-background | - | background | A background name from the backgrounds section. The background includes the label of the item and is independent of the item's normal background. |
| icon-vertical-adjustment | 0 | integer | Adjusts the icon by the specified number of pixels vertically. Negative values move the icon-image to the top. |
| text-effect | - | Sets a text effect. | |
| text-horizontal-adjustment | 0 | integer | Adjusts the text by the specified number of pixels horizontally. Negative values move the text to the left. |
| text-vertical-adjustment | 0 | integer | Adjusts the text by the specified number of pixels vertically. Negative values move the text to the top. |
| text-wrap | true | true, false | Determines wether the text should be wrapped or whether it should be kept on a single line, even when it is larger than the available width. |
| text-wrap-animate | true | true, false | You can deactivate animations for texts that should not be wrapped and which are too long for a single line. |
| text-wrap-animation-direction | both | both, left, right | The direction of the animation when the text is too wide and wrapping is deactivated. |
| text-wrap-animation-speed | 1 | integer | The speed of the animation when the text is too wide and wrapping is deactivated. |
| view-type | - | fade-in, fade-out, particle, size-decrease, size-increase | Defines another visualization for an Item or a Screen. |
| visible | true | true, false | Toggles the visibility of an item. When an item is invisible, it will not occupy any space. |
| x-adjust | 0 | integer | The horizontal position adjustment. |
Programming
You can exchange the image of the ticker by calling UiAccess.setTickerImage( Ticker ticker, Image image ).
You can also apply a style to a ticker by calling the screen's setTicker( Ticker ticker ) method
with a #style preprocessing directive:
//#style alarmTicker form.setTicker( ticker );
You can also add Ticker as a normal, yet constantly animated item by calling
UiAccess.appendTicker( Ticker ticker, Form form ).