Interface ItemLayoutHint

public interface ItemLayoutHint

ItemLayoutHint is an interface to identify classes containing hints that control the layout of Items by subclasses of FormLayoutPolicy. Each layout subclass defines the classes that specify the hints it uses and how they affect layout. Refer to the subclasses of FormLayoutPolicy for a description of the layout hints accepted.

For example, a layout policy might choose to display items in a priority order. Each item would need to have a priority set for it.

     class ItemPriority implements ItemLayoutHint {
         int getPriority();
         void setPriority(int priority);
To set the priority of each item an ItemPriority class would be created and set for each item.
     Item[] items = ...
     for (int i = 0; i < items.length; i++) {
         // Set the priority to reverse the list.
         ItemPriority prio = new ItemPriority(items.length - i);

MIDP 3.0
See Also:


Send a comment or suggestionVersion 3.0 of Mobile Information Device Profile Specification
Java is a trademark or registered trademark of Sun Microsystems, Inc. in the US and other countries. Copyright 2002-2009 Motorola Inc. Portions copyright 1993-2002 Sun Microsystems, Inc. and Motorola, Inc. All Rights Reserved.