net.rim.device.api.ui.container
Class DialogFieldManager

java.lang.Object
  |
  +--net.rim.device.api.ui.Field
        |
        +--net.rim.device.api.ui.Manager
              |
              +--net.rim.device.api.ui.container.DialogFieldManager
All Implemented Interfaces:
IComponent, InputMethodListener

public class DialogFieldManager
extends Manager

A field manager used for laying out Dialog and Status screens.

Behaviour
This manager handles an icon, a message, and a special area which can hold a list of user-specified custom fields. To manage the list of fields in its user area, this manager employs a simple vertical field manager.

This manager lays out its icon in the top left corner, and its message label in the top left corner. The rich text field object containing the message label specifies the formatting and alignment of the label.

This manager lays out the subordinate field manager controlling the user field area below its icon and label. The task of laying out the user fields is delegated to the subordinate field manager.


Fields inherited from class net.rim.device.api.ui.Manager
BOTTOMMOST, DOWNWARD, HORIZONTAL_SCROLL, HORIZONTAL_SCROLL_MASK, HORIZONTAL_SCROLLBAR, HORIZONTAL_SCROLLBAR_MASK, LEAVE_BLANK_SPACE, LEFTMOST, LEFTWARD, NO_HORIZONTAL_SCROLL, NO_HORIZONTAL_SCROLLBAR, NO_SCROLL_RESET, NO_VERTICAL_SCROLL, NO_VERTICAL_SCROLLBAR, QUANTA_FONT, RIGHTMOST, RIGHTWARD, TOPMOST, UPWARD, VERTICAL_SCROLL, VERTICAL_SCROLL_MASK, VERTICAL_SCROLLBAR, VERTICAL_SCROLLBAR_MASK
 
Fields inherited from class net.rim.device.api.ui.Field
EDITABLE, EDITABLE_MASK, FIELD_BOTTOM, FIELD_HALIGN_MASK, FIELD_HCENTER, FIELD_LEFT, FIELD_RIGHT, FIELD_TOP, FIELD_VALIGN_MASK, FIELD_VCENTER, FOCUSABLE, FOCUSABLE_MASK, HIGHLIGHT_FOCUS, HIGHLIGHT_SELECT, NON_FOCUSABLE, READONLY, USE_ALL_HEIGHT, USE_ALL_WIDTH
 
Constructor Summary
DialogFieldManager()
          Constructs a dialog field manager.
DialogFieldManager(long style)
          Constructs a dialog field manager with provided style.
 
Method Summary
 void addCustomField(Field f)
          Adds a user field to this manager.
 void deleteCustomField(Field field)
          Deletes a user field from this manager.
 Field getCustomField(int index)
          Retrieves one of this manager's user fields.
 Manager getCustomManager()
          Retrieves the manager for this manager's user field area.
protected  int moveFocus(int amount, int status, int time)
          Overrides Field.moveFocus.
 void setIcon(BitmapField icon)
          Adds or removes this manager's icon.
 void setMessage(RichTextField label)
          Sets this manager's title.
protected  void sublayout(int width, int height)
          Lays out this manager's contents.
 
Methods inherited from class net.rim.device.api.ui.Manager
add, delete, deleteAll, deleteRange, getField, getFieldAtLocation, getFieldCount, getFieldWithFocus, getFieldWithFocusIndex, getFocusRect, getHorizontalScroll, getLeafFieldWithFocus, getVerticalScroll, getVirtualHeight, getVirtualWidth, getVisibleHeight, getVisibleWidth, insert, invalidate, invalidate, isDirty, isDownArrowShown, isFocusable, isMuddy, isSelecting, isUpArrowShown, isValidLayout, keyChar, keyControl, keyDown, keyRepeat, keyStatus, keyUp, layout, layoutChild, moveFocus, nextFocus, onFocus, onUnfocus, paint, paintChild, setDirty, setFocus, setHorizontalQuantization, setHorizontalScroll, setPositionChild, setScrollListener, setVerticalQuantization, setVerticalScroll, setVirtualExtent, subpaint, trackwheelClick, trackwheelUnclick
 
Methods inherited from class net.rim.device.api.ui.Field
drawFocus, drawHighlightRegion, fieldChangeNotify, focusAdd, focusRemove, getChangeListener, getContextMenu, getCookie, getExtent, getFieldStyle, getFocusListener, getFont, getHeight, getIndex, getLeft, getManager, getOriginal, getPreferredHeight, getPreferredWidth, getScreen, getStyle, getTop, getWidth, isEditable, isPasteable, isSelectable, isSelectionCopyable, isSelectionCutable, isSelectionDeleteable, isVisible, makeContextMenu, onVisibilityChange, paste, select, selectionCopy, selectionCut, selectionDelete, setChangeListener, setCookie, setEditable, setExtent, setFocus, setFocusListener, setFont, setMuddy, setPosition, updateLayout
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DialogFieldManager

public DialogFieldManager()
Constructs a dialog field manager.

Use this method to build a dialog field manager with no scrolling style.


DialogFieldManager

public DialogFieldManager(long style)
Constructs a dialog field manager with provided style.

Use this method to build a dialog field manager with the specified scrolling style.

Parameters:
style - Scrolling style for this manager (can be Manager.VERTICAL_SCROLL or Manager.VERTICAL_SCROLLBAR).
Method Detail

addCustomField

public void addCustomField(Field f)
Adds a user field to this manager.

Parameters:
f - Field to add to this manager.
Since:
JDE 3.7.0

deleteCustomField

public void deleteCustomField(Field field)
Deletes a user field from this manager.

Parameters:
field - Field to delete from this manager.
Since:
JDE 3.7.0

getCustomField

public Field getCustomField(int index)
Retrieves one of this manager's user fields.

Parameters:
index - Position of field within this manager's user field list.
Since:
JDE 3.7.0

getCustomManager

public Manager getCustomManager()
Retrieves the manager for this manager's user field area.

This dialog field manager uses another manager to control its user field area; use this method to retrieve that manager.

Returns:
Manager for this manager's user field area.

moveFocus

protected int moveFocus(int amount,
                        int status,
                        int time)
Overrides Field.moveFocus.
Overrides:
moveFocus in class Manager
Since:
JDE 3.7.0

setIcon

public void setIcon(BitmapField icon)
Adds or removes this manager's icon.

Parameters:
icon - Icon to add, or null to remove this manager's icon.
Since:
JDE 3.7.0

setMessage

public void setMessage(RichTextField label)
Sets this manager's title.

Parameters:
label - Formatted string to use as this manager's title.
Since:
JDE 3.7.0

sublayout

protected void sublayout(int width,
                         int height)
Lays out this manager's contents.

This system invokes this method to prompt this manager to lay out its contents. Note that dialog field manager will in turn prompt its user field manager to layout any extra fields in its user field area.

Overrides:
sublayout in class Manager
Parameters:
width - Horizontal space available to this manager.
height - Vertical space available to this manager.
Since:
JDE 3.7.0


Copyright 1999-2002 Research In Motion Limited. 295 Phillip Street, Waterloo, Ontario, Canada, N2L 3W8. All Rights Reserved.
Copyright 1993-2000 Sun Microsystems, Inc. 901 San Antonio Road, Palo Alto, California, 94303, U.S.A. All Rights Reserved.
Java is a trademark or registered trademark of Sun Microsystems, Inc. in the US and other countries.