HMultilineEntry

Overview | Package | Class | Use | Tree | Deprecated | Index | Help

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.havi.ui
Class HMultilineEntry

    java.lang.Object
      java.awt.Component
          org.havi.ui.HComponent
              org.havi.ui.HVisible
                  org.havi.ui.HSinglelineEntry
                      org.havi.ui.HMultilineEntry

All Implemented Interfaces:
  ImageObserver, Serializable, TestOpacity, HKeyboardInputPreferred, HMatteLayer, HNavigable, HNavigationInputPreferred, HState, HTextValue

    public class HMultilineEntry

extends HSinglelineEntry

The `HMultilineEntry` is a user interface component used to receive multiple lines of alphanumeric entry from the user.

A call to the inherited method `setDefaultLook(HSinglelineEntry)` shall behave the same as a call to `HSinglelineEntry.setDefaultLook(org.havi.ui.HSinglelineEntryLook)`.

The parameters to the constructors are as follows, in cases where parameters are not used, then the constructor should use the default values.

### Default parameter values exposed in the constructors

Parameter | Description | Default value | Set method | Get method
--- | --- | --- | --- | ---
x | x-coordinate of top left hand corner of this component in pixels, relative to its parent container (subject to layout management). | --- | java.awt.Component#setBounds | java.awt.Component#getBounds
y | y-coordinate of top left hand corner of this component in pixels, relative to its parent container (subject to layout management). | --- | java.awt.Component#setBounds | java.awt.Component#getBounds
width | width of this component in pixels (subject to layout management). | --- | java.awt.Component#setBounds | java.awt.Component#getBounds
height | height of this component in pixels (subject to layout management). | --- | java.awt.Component#setBounds | java.awt.Component#getBounds
text | The text within this `HMultilineEntry`, to be used as the displayed and editable content for all states. | null | `HVisible.setTextContent(java.lang.String, int)` | `HVisible.getTextContent(int)`
maxChars | The maximum number of characters allowed in this `HMultilineEntry`. | 16 characters | `HSinglelineEntry.setMaxChars(int)` | `HSinglelineEntry.getMaxChars()`
font | The font to be used for this component. | --- | `java.awt.Component#setFont`. | `java.awt.Component#getFont`.
color | The color to be used for this component. | --- | `java.awt.Component#setForeground`. | `java.awt.Component#getForeground`.

### Default parameter values not exposed in the constructors

Description | Default value | Set method | Get method
--- | --- | --- | ---
Associated matte (`HMatte`). | none (i.e. getMatte() returns `null`) | `setMatte` | `getMatte`
The text layout manager responsible for text formatting. | An `HDefaultTextLayoutManager` object. | `HVisible.setTextLayoutManager(org.havi.ui.HTextLayoutManager)` | `HVisible.getTextLayoutManager()`
The background painting mode | `HVisible.NO_BACKGROUND_FILL` | `HVisible.setBackgroundMode(int)` | `HVisible.getBackgroundMode()`
The default preferred size | not set (i.e. NO_DEFAULT_SIZE) unless specified by `width` and `height` parameters | `HVisible.setDefaultSize(java.awt.Dimension)` | `HVisible.getDefaultSize()`
The horizontal content alignment | `HVisible.HALIGN_CENTER` | `HVisible.setHorizontalAlignment(int)` | `HVisible.getHorizontalAlignment()`
The vertical content alignment | `HVisible.VALIGN_CENTER` | `HVisible.setVerticalAlignment(int)` | `HVisible.getVerticalAlignment()`
The content scaling mode | `HVisible.RESIZE_NONE` | `HVisible.setResizeMode(int)` | `HVisible.getResizeMode()`
The border mode | `true` | `HVisible.setBordersEnabled(boolean)` | `HVisible.getBordersEnabled()`
Caret position | At the end of the current text string | `HSinglelineEntry.setCaretCharPosition(int)` | `HSinglelineEntry.getCaretCharPosition()`
Input type | `HKeyboardInputPreferred.INPUT_ANY` | `HSinglelineEntry.setType(int)` | `HSinglelineEntry.getType()`
Customized input range | null | `HSinglelineEntry.setValidInput(char[])` | `HSinglelineEntry.getValidInput()`
Password protection (the echo character) | Zero (ASCII NUL), i.e. not password protected. | `HSinglelineEntry.setEchoChar(char)` | `HSinglelineEntry.getEchoChar()` and `HSinglelineEntry.echoCharIsSet()`
The default "look" for this class. | A platform specific `HMultilineEntryLook` | `HMultilineEntry.setDefaultLook` | `HMultilineEntry.getDefaultLook`
The "look" for this object. | The `HMultilineEntryLook` returned from HMultilineEntry.getDefaultLook when this object was created. | `HMultilineEntry.setLook` | `HMultilineEntry.getLook`
The gain focus sound. | null | `setGainFocusSound` | `getGainFocusSound`
The lose focus sound. | null | `setLoseFocusSound` | `getLoseFocusSound`

See Also:
  Serialized Form

Field Summary

Fields inherited from class org.havi.ui.HVisible
`ADJUSTMENT_VALUE_CHANGE, ANIMATE_CONTENT_CHANGE, ANIMATION_POSITION_CHANGE, BACKGROUND_FILL, BORDER_CHANGE, CARET_POSITION_CHANGE, CONTENT_CHANGE, ECHO_CHAR_CHANGE, EDIT_MODE_CHANGE, FIRST_CHANGE, GRAPHIC_CONTENT_CHANGE, HALIGN_CENTER, HALIGN_JUSTIFY, HALIGN_LEFT, HALIGN_RIGHT, ITEM_VALUE_CHANGE, LAST_CHANGE, LIST_CONTENT_CHANGE, LIST_ICONSIZE_CHANGE, LIST_LABELSIZE_CHANGE, LIST_MULTISELECTION_CHANGE, LIST_SCROLLPOSITION_CHANGE, LIST_SELECTION_CHANGE, MIN_MAX_CHANGE, NO_BACKGROUND_FILL, NO_DEFAULT_HEIGHT, NO_DEFAULT_SIZE, NO_DEFAULT_WIDTH, ORIENTATION_CHANGE, REPEAT_COUNT_CHANGE, RESIZE_ARBITRARY, RESIZE_NONE, RESIZE_PRESERVE_ASPECT, SIZE_CHANGE, STATE_CHANGE, TEXT_CONTENT_CHANGE, TEXT_VALUE_CHANGE, THUMB_OFFSETS_CHANGE, UNKNOWN_CHANGE, VALIGN_BOTTOM, VALIGN_CENTER, VALIGN_JUSTIFY, VALIGN_TOP`

Fields inherited from class java.awt.Component
`BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT`

Fields inherited from interface org.havi.ui.HKeyboardInputPreferred
`INPUT_ALPHA, INPUT_ANY, INPUT_CUSTOMIZED, INPUT_NUMERIC`

Fields inherited from interface org.havi.ui.HState
`ACTIONED_FOCUSED_STATE, ACTIONED_STATE, ACTIONED_STATE_BIT, ALL_STATES, DISABLED_ACTIONED_FOCUSED_STATE, DISABLED_ACTIONED_STATE, DISABLED_FOCUSED_STATE, DISABLED_STATE, DISABLED_STATE_BIT, FIRST_STATE, FOCUSED_STATE, FOCUSED_STATE_BIT, LAST_STATE, NORMAL_STATE`

Fields inherited from interface java.awt.image.ImageObserver
`ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH`

Constructor Summary
`HMultilineEntry()` Creates an `HMultilineEntry` object.
`HMultilineEntry(int maxChars)` Creates an `HMultilineEntry` object.
`HMultilineEntry(int x, int y, int width, int height, int maxChars)` Creates an `HMultilineEntry` object.
`HMultilineEntry(String text, int maxChars, Font font, Color color)` Creates an `HMultilineEntry` object.
`HMultilineEntry(String text, int x, int y, int width, int height, int maxChars, Font font, Color color)` Creates an `HMultilineEntry` object.

Method Summary
`void` | `caretNextLine()` Move the caret to the same column position on the next line.
`void` | `caretPreviousLine()` Move the caret to the same column position on the previous line.
`static HSinglelineEntryLook` | `getDefaultLook()` Returns the currently set default look for `HMultilineEntry` components.
`static void` | `setDefaultLook(HMultilineEntryLook look)` Sets the default look for further `HMultilineEntry` Components.
`void` | `setLook(HLook hlook)` Sets the `HLook` for this component.

Methods inherited from class org.havi.ui.HSinglelineEntry
`addHFocusListener, addHKeyListener, addHTextListener, caretNextCharacter, caretPreviousCharacter, deleteNextChar, deletePreviousChar, echoCharIsSet, getCaretCharPosition, getEchoChar, getEditMode, getGainFocusSound, getLoseFocusSound, getMaxChars, getMove, getNavigationKeys, getTextContent, getType, getValidInput, insertChar, isSelected, processHFocusEvent, processHKeyEvent, processHTextEvent, removeHFocusListener, removeHKeyListener, removeHTextListener, setCaretCharPosition, setDefaultLook, setEchoChar, setEditMode, setFocusTraversal, setGainFocusSound, setLoseFocusSound, setMaxChars, setMove, setTextContent, setType, setValidInput`

Methods inherited from class org.havi.ui.HVisible
`getAnimateContent, getBackgroundMode, getBordersEnabled, getContent, getDefaultSize, getGraphicContent, getHorizontalAlignment, getInteractionState, getLook, getLookData, getMaximumSize, getMinimumSize, getPreferredSize, getResizeMode, getTextLayoutManager, getVerticalAlignment, isFocusTraversable, isOpaque, paint, setAnimateContent, setBackgroundMode, setBordersEnabled, setContent, setDefaultSize, setEnabled, setGraphicContent, setHorizontalAlignment, setLookData, setResizeMode, setTextLayoutManager, setVerticalAlignment, update`

Methods inherited from class org.havi.ui.HComponent
`getMatte, isDoubleBuffered, isEnabled, setMatte`

Methods inherited from class java.awt.Component
`addComponentListener, addFocusListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, addNotify, addPropertyChangeListener, areFocusTraversalKeysSet, checkImage, checkImage, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, dispatchEvent, doLayout, enableInputMethods, getAlignmentX, getAlignmentY, getBackground, getBounds, getBounds, getColorModel, getComponentAt, getComponentAt, getComponentListeners, getCursor, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeys, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPropertyChangeListeners, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, hasFocus, imageUpdate, invalidate, isBackgroundSet, isCursorSet, isDisplayable, isFocusable, isFocusCycleRoot, isFocusOwner, isFontSet, isForegroundSet, isLightweight, isShowing, isValid, isVisible, list, list, list, list, list, paintAll, prepareImage, prepareImage, print, printAll, removeComponentListener, removeFocusListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removeNotify, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocusInWindow, setBackground, setBounds, setBounds, setCursor, setFocusable, setFocusTraversalKeys, setFocusTraversalKeysEnabled, setFont, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, setVisible, toString, transferFocus, transferFocusBackward, transferFocusUpCycle, validate`

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Constructor Detail

### HMultilineEntry

    public HMultilineEntry()

  Creates an `HMultilineEntry` object. See the class description for details of constructor parameters and default values.

### HMultilineEntry

    public HMultilineEntry(String text,
                           int x,
                           int y,
                           int width,
                           int height,
                           int maxChars,
                           Font font,
                           Color color)

  Creates an `HMultilineEntry` object. See the class description for details of constructor parameters and default values.

### HMultilineEntry

    public HMultilineEntry(int x,
                           int y,
                           int width,
                           int height,
                           int maxChars)

  Creates an `HMultilineEntry` object. See the class description for details of constructor parameters and default values.

### HMultilineEntry

    public HMultilineEntry(String text,
                           int maxChars,
                           Font font,
                           Color color)

  Creates an `HMultilineEntry` object. See the class description for details of constructor parameters and default values.

### HMultilineEntry

    public HMultilineEntry(int maxChars)

  Creates an `HMultilineEntry` object. See the class description for details of constructor parameters and default values.

Method Detail

### setDefaultLook

    public static void setDefaultLook(HMultilineEntryLook look)

  Sets the default look for further `HMultilineEntry` Components.

  Parameters:
    `look` - The look that will be used by default when creating a new `HMultilineEntry` component. Note that this parameter may be null, in which case newly created components shall not draw themselves until a non-null look is set using the `setLook` method.

### getDefaultLook

    public static HSinglelineEntryLook getDefaultLook()

  Returns the currently set default look for `HMultilineEntry` components.

  Returns:
    The `HMultilineEntryLook` that is used by default when creating a new `HMultilineEntry` component, cast to an `HSinglelineEntryLook`.

### setLook

    public void setLook(HLook hlook)
                 throws HInvalidLookException

  Sets the `HLook` for this component.

  Overrides:
    `setLook` in class `HSinglelineEntry`
  Parameters:
    `hlook` - The `HLook` that is to be used for this component.
  Throws:
    `HInvalidLookException` - If the Look is not an `HMultilineEntryLook`.

### caretNextLine

    public void caretNextLine()

  Move the caret to the same column position on the next line. If the caret would be past the end of the text on the line the new caret position will be at the end of the line.

### caretPreviousLine

    public void caretPreviousLine()

  Move the caret to the same column position on the previous line. If the caret would be past the end of the text on the line the new caret position will be at the end of the line.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD