public abstract class AbstractDialog
extends java.lang.Object
implements com.softwareag.mobile.runtime.nui.nUIEventListener
AbstractDialog
acts as a super class for all generated alert
dialogs and popup menus. It provides the open()
and close()
methods as well as the default event listener implementation. To open/close
the dialog call:
AbstractDialog dialog = ...; dialog.open();The default behavior can be changed by overriding the
IDialogDelegate.onDialogButtonPressed(AbstractDialog, int)
method
from a specific view controller or delegate implementation. The passed
AbstractDialog
represents the current instance. The integer
value corresponds to the button id, the user entered in the outline editor.
This id, stored in the Constants interface, can be used to determine
different behaviors for different buttons, e.g.:
public void onDialogButtonPressed(final AbstractDialog dialog, final int id) { switch (id) { case Constants.BUTTON_1: // ... break; case Constants.BUTTON_2: // ... break; } }
bottom, center, centre, CREATE, CUSTOM_EVENT_CODE0, EVT_BACK_BUTTON, EVT_COMPLETED_EDIT, EVT_DOUBLE_TAP, EVT_GAIN_FOCUS, EVT_LONG_PRESS, EVT_LOSE_FOCUS, EVT_ON_ADDITION, EVT_PICKER_CANCEL, EVT_PICKER_OK, EVT_POST_EDIT, EVT_PRE_EDIT, EVT_SWIPE_LEFT, EVT_SWIPE_RIGHT, EVT_TIMER_COMPLETE, EVT_TRANSITION_FROM_COMPLETE, EVT_TRIGGER, EVT_TRIGGER_HTTP_FAIL, EVT_TRIGGER_HTTP_SUCCESS, GESTURE_DOUBLE_TAP, GESTURE_LONG_PRESS, GESTURE_NONE, GESTURE_SWIPE, left, MAX_DY_FOR_SWIPE, MIN_DX_FOR_SWIPE, MIN_SCROLL_START_THRESHOLD, NO_YES, OFF_ON, POINTER_STATE_DRAGGED, POINTER_STATE_PRESSED, POINTER_STATE_PRESSED_AND_RELEASED, POINTER_STATE_RELEASED, REMOVE, right, size_absolute, size_huge, size_large, size_medium, size_relative, size_small, size_tiny, style_bold, style_default, style_italic, TEXT_DIRECTION_LTR, TEXT_DIRECTION_RTL, top
Constructor and Description |
---|
AbstractDialog(IDialogDelegate delegate)
Creates a new AbstractDialog by passing an IDialogDelegate.
|
Modifier and Type | Method and Description |
---|---|
void |
close() |
boolean |
nUIEventCallback(com.softwareag.mobile.runtime.nui.nUIObject object,
int eventType) |
void |
open() |
public AbstractDialog(IDialogDelegate delegate)