public class Form extends FormBase implements HasProperties
You would hardly use this control - usually you would use a higher version of this, such as a Form.
Modifier and Type | Class and Description |
---|---|
static interface |
Form.FormMaker
A FormMaker is attached to a Form using addFormMaker().
|
static class |
Form.ToolsOrSoftKey |
static interface |
Form.ValidateBeforeExit |
Modifier and Type | Field and Description |
---|---|
boolean |
acceptsDroppedFiles |
Control |
apply |
Control |
back |
protected Vector |
buttons
The buttons to be displayed at the bottom of the Form (if any) are stored here.
|
static int |
BUTTONS_TO_SOFT_KEY_FIRST_BUTTON_SEPARATE |
static int |
BUTTONS_TO_SOFT_KEY_MENU_ALWAYS |
static int |
BUTTONS_TO_SOFT_KEY_USE_FIRST_SOFT_KEY |
CellPanel |
buttonsPanel
This is the panel that will contain any of the special buttons you add.
|
int |
buttonsPerRow
Set this to be greater than zero to limit the number of buttons displayed at the bottom of the Form.
|
Control |
cancel |
static int |
CLOSING_FLAG |
Control |
deflt |
boolean |
dismantleOnClose |
boolean |
dontAddSIPFiller
Set this true to supress the automatic addition of a SIP filler to the Form.
|
boolean |
exitButtonDefined
This is set true when doButtons() is called to add close buttons to the
form.
|
static int |
EXITING_FLAG |
boolean |
exitSystemOnClose |
int |
exitValue |
protected Vector |
fieldHandlers |
Control |
firstFocus
Use this to explicitly set the Control that will receive the focus
first when the window for this Form is shown.
|
protected FormFrame |
formFrame
The Frame the Form is currently displayed in.
|
float |
frameAlpha |
Handle |
handle
This can be used to monitor the shown state of the Form.
|
boolean |
hasTitle |
boolean |
hasTopBar |
boolean |
hideSoftKeyBarIfNotFound
On systems that use the SoftKeyBar - if a control becomes active but there
is no assigned keybar for the control (and there is no default one for the
Form) then normally whatever keybar was there before remains unchanged.
|
boolean |
inheritSoftKeys
Set this true if the Form should display the Soft keys of its child form.
|
boolean |
isAutoScrolling |
protected boolean |
isMainAppletForm |
boolean |
keepFrame |
long |
minimumShowTime
This is the minimum length of time in milliseconds that the form should be shown
before a call to close() will actually close the Form.
|
boolean |
moveable |
Control |
no |
boolean |
noBorder |
Control |
ok |
protected PropertyList |
pl
The properties of the Form.
|
Control |
reset |
boolean |
resizable |
boolean |
resizeOnSIP |
boolean |
shadowed |
static int |
SHOWN_FLAG |
protected long |
shownTime
This is value of System.currentTimeMillis()
when the Form was first shown.
|
protected Hashtable |
softkeyBars |
String |
title |
Control |
titleCancel
If this is set to a control then this control will appear to the right of the
title bar.
|
CellPanel |
titleControls
Use this to add controls to the title bar of the form.
|
Control |
titleOK
If this is set to a control then this control will appear to the right of the
title bar.
|
CellPanel |
topControls
Use this to add controls to the top of the form, below the
title bar.
|
static String |
WINDOW_TITLE_DONT_CHANGE |
int |
windowFlagsToClear
These are flags that you want to clear for any new Window being created to display this Form.
|
int |
windowFlagsToSet
These are flags that you want to set for any new Window being created to display this Form.
|
Object |
windowIcon
Set this to be an ImageData or (better) a DeviceIcon (created by Device.createIcon())
|
String |
windowTitle
If this is not null, then the window that the Form is displayed in will have its title
set to this value regardless of whether it is the top level form or not.
|
Control |
yes |
BACKB, CANCELB, checkIcon, close, cross, crossIcon, DEFCANCELB, DEFOKB, EXIT_IDBACK, EXIT_IDCANCEL, EXIT_IDNO, EXIT_IDOK, EXIT_IDYES, IDBACK, IDCANCEL, IDNO, IDOK, IDYES, MBB, MBNONE, MBOK, MBOKCANCEL, MBYESNO, MBYESNOCANCEL, NOB, OKB, stop, tick, tools, YESB
autoSpan, layout, mySplitter, nextSplitter, quickRecalculate
all, calculated, childListeners, defaultAddToMeCellConstraints, defaultTags, equalHeights, equalWidths, grid, lastAdded, layoutManager, made, noInsets, stretchFirstColumn, stretchFirstRow, stretchLastColumn, stretchLastRow, titleGap
isFullScrollClient, origin, scrollPercent, virtualSize
closedFocus, cycleFocus, dontAutoScroll, dontFocusOnChildren, FIND_FOR_MOUSE_PRESS, takeNextFocus
backGround, beforeRemoved, borderColor, borderStyle, borderWidth, children, columns, constraints, curFont, debugModify, debugRepaintNow, disabledBackground, dragging, dragResolution, dragTime, exitKeys, fieldTransfer, font, fontChange, fontFrom, foreGround, height, holdDownPause, holdTick, hotKey, image, lastSelected, listeners, lockPaint, maxHeight, maxWidth, menuState, minHeight, minWidth, modifiers, name, next, parent, penStatus, preferredHeight, preferredWidth, prev, prompt, promptControl, rows, ss, startDragResolution, tags, tail, text, toolTip, width, x, y
clipItems, clipObject, clipOwner, debugControl, debugFlag, doubleBuffer, doubleClickTime, doubleSizedFontHeight, firstPress, globalEditable, globalEnabled, PEN_STATUS_DID_HOLD_DOWN, PEN_STATUS_GOT_PEN_DOWN, PEN_STATUS_PEN_IS_ON, pressPoint, TAG_BOOLEAN_KEEP_BELOW_SIP, TAG_HOVER_TIME_INT, TAG_LAST_USER_DATA, TAG_USER_DATA, TAKE_FIRST_PRESS, unnamed
ALWAYS_STRETCHABLE, BOTTOM, CELLFLAG, CELLMASK, CENTER, CONTROLMASK, DONTCHANGE, DONTFILL, DONTSTRETCH, EAST, FILL, GROW, HCENTER, HCONTRACT, HEXPAND, HFILL, HGROW, HSHRINK, HSTRETCH, INITIALLY_CLOSED, INITIALLY_HIDDEN, INITIALLY_MINIMIZED, INITIALLY_PREFERRED_SIZE, INSETS, LEFT, MAXIMUMSIZE, MINIMUMSIZE, NORTH, NORTHEAST, NORTHWEST, PREFERREDSIZE, RECT, RIGHT, SHRINK, SOUTH, SOUTHEAST, SOUTHWEST, SPAN, STRETCH, TAG_BACKGROUND_IMAGE, TAG_BUSY_DISPLAY, TAG_COLORS, TAG_CONTROL_PAINTER, TAG_EXPOSE_GROUP, TAG_FIXEDSIZE, TAG_GRAY_BACKGROUND, TAG_HIDE_CONTROL_OBJECT, TAG_HIDE_PARENT, TAG_INNER_TEXT_INSETS, TAG_INPUT_STACK_PARENT, TAG_INSETS, TAG_MAKE_VISIBLE, TAG_MAXIMUMSIZE, TAG_MINIMUMSIZE, TAG_PAINT_CONTROL_LIST, TAG_PREFERRED_TEXT_SIZE, TAG_PREFERRED_TEXT_SIZE_HEIGHT, TAG_PREFERRED_TEXT_SIZE_WIDTH, TAG_PREFERREDSIZE, TAG_RECT, TAG_SHADOW_INSETS, TAG_SPAN, TAG_SWIPER, TAG_TEMPORARY_ERROR, TAG_TEXT_INSETS, TAG_TEXTSIZE, TEXTSIZE, TOP, VCENTER, VCONTRACT, VEXPAND, VFILL, VGROW, VSHRINK, VSTRETCH, WEST
GoHigher, GoLower, Horizontal, OPTION_INDICATOR_ONLY, PageHigher, PageLower, ScrollHigher, ScrollLower, TrackTo, Vertical
BDR_DOTTED, BDR_INNER, BDR_NOBORDER, BDR_OUTER, BDR_OUTLINE, BDR_RAISEDINNER, BDR_RAISEDOUTER, BDR_SUNKENINNER, BDR_SUNKENOUTER, BF_ABUT_ANY, BF_ABUT_BOTTOM, BF_ABUT_LEFT, BF_ABUT_RIGHT, BF_ABUT_TOP, BF_BOTTOM, BF_BOTTOMLEFT, BF_BOTTOMRIGHT, BF_BUTTON, BF_DIAGONAL, BF_DIAGONAL_ENDBOTTOMLEFT, BF_DIAGONAL_ENDBOTTOMRIGHT, BF_DIAGONAL_ENDTOPLEFT, BF_DIAGONAL_ENDTOPRIGHT, BF_EXACT, BF_FLAT, BF_LEFT, BF_MIDDLE, BF_MONO, BF_PALM, BF_RECT, BF_RIGHT, BF_SOFT, BF_SQUARE, BF_TOP, BF_TOPLEFT, BF_TOPRIGHT, EDGE_BUMP, EDGE_ETCHED, EDGE_RAISED, EDGE_SUNKEN
All, AlwaysEnabled, AlwaysRecalculateSizes, ByDeferredMouse, ByDeferredPen, ByFrameChange, ByKeyboard, ByMouse, ByPen, ByRequest, CalculatedSizes, ContainerDontPaintChildren, Disabled, DisablePopupMenu, DisplayOnly, DontBuffer, Down, DrawFlat, Flag, ForceResize, HasData, Invisible, KeepImage, KeepSIP, Left, MakeMenuAtLeastAsWide, Maximize, Minimize, ModifiersInheritedFromWindow, MouseSensitive, NoFocus, NotAnEditor, NotEditable, PaintDataOnly, PaintOutsideOnly, PenTransparent, PreferredSizeOnly, Right, SendUpUIEvents, ShowSIP, ShrinkToNothing, SmallControl, TakeChildUIEvents, TakeControlEvents, TakesKeyFocus, Transparent, Up, WantDrag, WantHoldDown
KEEP_VISIBLE
Constructor and Description |
---|
Form() |
Modifier and Type | Method and Description |
---|---|
boolean |
_getSetField(String fieldName,
Wrapper wrapper,
boolean isGet)
A special method used by FieldTransfer to transfer data to and from controls and properties.
|
void |
addButton(Control b)
This is used to add custom buttons to the bottom of the Form.
|
void |
addFieldHandler(FieldHandler handler) |
void |
addFormMaker(Form.FormMaker maker) |
CellPanel[] |
addSIPAdjustment()
On a PocketPC (or simulated PocketPC) or other device,
this method puts in a SIP filler at the bottom of the Form that will expand
automatically when the SIP appears, thereby pushing all other Controls out
of the way of the SIP.
|
Control[] |
addTabbedPanel(boolean useExpandingTabs)
A very useful method for creating a Form with a tabbed panel.
|
CellPanel[] |
addToolbar()
A very useful method for creating a Form with a toolbar or menubar.
|
Container |
addTools(Container toolsHolder,
String name) |
Container |
addToolsFor(Control target,
Container toolsHolder,
String name) |
void |
addValidateBeforeExit(Form.ValidateBeforeExit validator) |
void |
addValidateBeforeExit(Form otherForm) |
Menu |
buttonsToMenu(Vector buttons,
Menu destination)
Add a Vector of Button objects to a Menu.
|
boolean |
buttonsToSoftKeyBar(Container buttons,
String menuName,
int options)
Add a container which contains Button objects to the SoftKeyBar.
|
boolean |
buttonsToSoftKeyBar(Vector buttons,
String menuName,
int options)
Add a Vector of Button objects to the SoftKeyBar.
|
static void |
cancelWait()
This cancels the display of the wait Cursor IF it was requested.
|
protected boolean |
canExit(int exitCode)
This is called by the exit() method to see if the form can be
closed.
|
protected void |
checkButtons()
This is called before the Form is displayed to setup the buttons as requested by doButtons().
|
boolean |
checkCanExit(int exitCode)
This call validateBeforeExit() AND canExit().
|
void |
close(int exitCode)
This closes the form unconditionally and sets the exitValue to be exitCode.
|
void |
closeAll(int exitCode)
If this Form is embedded within another Form, then this will close
the topmost Form.
|
Handle |
closeForTransfer()
This closes the Form but does not set the handle to a stopped state, instead it returns
the still running handle.
|
Handle |
closeForTransfer(boolean dismantle,
boolean showWait)
This closes the Form but does not set the handle to a stopped state, instead it returns
the still running handle.
|
static void |
continueWait()
This requests that a wait Cursor be shown IF it was shown before the last
Form was displayed - otherwise it has no effect. continueWait() is called
automatically when a MessageBox exits.
|
MenuItem |
createMenuItem(Button button)
Return a MenuItem that will be used as a proxy for a specific buton.
|
MenuItem |
createMenuItem(String label,
String action,
IImage icon) |
MenuItem |
createMenuItem(String label,
String action,
String iconName) |
SIPFiller |
createSipFiller(Panel addTo)
Create and return a SIPFiller for the Form - or return null
if one was alredy created.
|
Window |
createWindow()
This creates a new Window for the Form on request (when being shown).
|
void |
defaultTitleTo(String newTitle)
This will set the title of the Form if it has not already been set.
|
void |
dismantle(Control stopAt) |
void |
doButtons(int which)
This is used to add a row of buttons at the bottom of the form, using
The value of "which" can be the logical OR of any of the pre-defined
button values (e.g.
|
protected FormFrame |
doShowExec(Frame parent,
boolean modal,
int options)
All show()/exec()/execute() methods eventually call this method.
|
boolean |
enableScrolling(boolean horizontally,
boolean vertically)
If a ScrollablePanel has been setup in the Editor, and the property "MainScrollBarPanel" has
been added to the PropertyList of this Editor, then this will either enable or disable the
scrolling of the scrollbar in different directions.
|
FormFrame |
exec()
This displays the Form modally in a new Window.
|
Handle |
exec(boolean dismantleOnClose)
Display the Form modally in a new Window and return the Handle that can be used to monitor the Form's open
state using waitUntilClosed().
|
FormFrame |
exec(Frame parent,
int options)
This displays the Form modally within an already displayed parent Frame.
|
FormFrame |
exec(Handle transferredHandle)
This is used to exec a Form using the Handle from another Form (usually got
from closeForTransfer()).
|
FormFrame |
exec(Handle transferredHandle,
Frame parent,
int options)
This is used to exec a Form using the Handle from another Form (usually got
from closeForTransfer()).
|
int |
execute()
This displays the Form modally in a new Window and waits for the Form to close.
|
int |
execute(Frame parent) |
int |
execute(Frame parent,
int options)
This displays the Form modally within an already displayed parent Frame and then waits for
the Form to close.
|
boolean |
exit(int exitCode)
This will call the canExit() method and if it returns true, it will
close the form.
|
void |
filesDropped(String[] fileNames)
Deprecated.
Don't use this, instead - have your control implement IAcceptsDroppedFiles.
|
void |
fixWindowTitle()
Use this to update the Window title for the Form (if you change the Form's
title or Form's windowTitle).
|
protected void |
formClosing()
This is called to indicate that the Form is about to close and it causes a FormEvent.CLOSED event to be posted.
|
static void |
formMain(String formClass,
String[] args)
Used by the VM to execute a Form directly from the command line.
|
void |
fromFields()
This transfers all data from fields to the on-screen controls by calling toControls() on all the FieldHandler objects added to this Form, and then
calling fromFields() on all Forms that are descendants of this Form.
|
static void |
fromFields(Control c)
If the supplied Control is a Container then this calls fromFields() on all Forms that
are descendants of the Control.
|
void |
fullScreenOnPDA()
Prepare a Form for display at full screen on a PDA.
|
static Vector |
gatherButtons(Container buttons,
Vector destination) |
static Object |
getAncestorProperty(Control child,
Class propertyType) |
Control |
getButton(String text)
Used to create a new Button for the Form.
|
IFileSaver |
getFileSaver()
This will return the Saver associated with the Form if one was assigned.
|
FormFrame |
getFormFrame(int options)
This is called when the Form is about to be displayed.
|
static Form |
getFormWithProperty(Control child,
Class propertyType) |
PropertyList |
getProperties()
Get the PropertyList object associated with this object.
|
Object |
getProperty(Class ofType) |
SoftKeyBar |
getSoftKeyBarFor(Control c)
Get the SoftKeyBar for a particular Control or the default SoftKeyBar.
|
Form |
getTopmostForm() |
boolean |
handleAction(ControlEvent ev)
Handle a ControlEvent that is of type PRESSED and for which the "action" field is
not null.
|
boolean |
handleAction(String action)
Handle an action type event.
|
boolean |
hasExitButton()
Tests if the Form has an exit button defined for it.
|
void |
make(boolean reMake)
This is used to "make" the control before being displayed.
|
Control |
makeButtonForForm(String text,
IImage icon,
int hotkey) |
Control |
makeButtonForForm(String text,
String iconName,
int hotkey) |
Control |
makeDefaultButton(int whichButton,
boolean useText)
Create and return the default OK or Cancel button.
|
Control |
makeDefaultButton(int whichButton,
String textToUse)
Create and return the default OK or Cancel button.
|
protected FormFrame |
makeFrame(int options)
This is used to actually create the frame for the form.
|
MenuItem |
makeMenuItemForForm(String label,
String action,
IImage icon) |
MenuItem |
makeMenuItemForForm(String label,
String action,
String iconName) |
void |
makeSmall()
Normally an Editor will call maximizeOnPDA() when created.
|
void |
makeSmallOnBigScreen()
This calls makeSmall() only if the Screen size in relation to the Font is determined
to be not a PDA screen AND there are no Soft Keys.
|
SoftKeyBar |
makeSoftKeys()
Create a SoftKeyBar that applies to the entire Form and return it for
you to set the keys in it.
|
SoftKeyBar |
makeSoftKeys(boolean canOverlay)
Create a SoftKeyBar that applies to the entire Form and return it for
you to set the keys in it.
|
SoftKeyBar |
makeSoftKeys(Object left,
String leftLabel,
Object right,
String rightLabel)
Create a SoftKeyBar that applies to the entire Form and set the left
and right key functions.
|
void |
maximizeOnPDA()
Set the Form to show maximized on a PDA/mobile device.
|
void |
menuItemSelected(MenuItem selected) |
boolean |
modifyForSmartPhone()
This modifies the setup for the Form to be one suitable to run full screen on a SmartPhone
compatible IF the application actually is running on a SmartPhone device.
|
void |
onControlEvent(ControlEvent ev)
Make sure you call super.onControlEvent() if you override
this method.
|
void |
onDataChangeEvent(DataChangeEvent ev) |
void |
onEvent(Event ev) |
void |
onSoftKey(int whichKey,
String action,
MenuItem selected)
The default onEvent for a Form will call this method
if a SoftKeyEvent is sent to the Form.
|
void |
onSoftKey(SoftKeyEvent se)
This method is called on a SoftKeyEvent.
|
boolean |
placeCancelOnLeft() |
void |
removeSoftKeyBarFor(Control c)
Remove the SoftKeyBar for a particular Control or the default SoftKeyBar.
|
Form |
setAsMainAppletForm() |
void |
setAsShown() |
void |
setBelowButtonBar(ButtonBar bb) |
void |
setBelowButtonBars(ButtonBar left,
ButtonBar right) |
void |
setDefaultSize(int width,
int height)
This first calls willBeMaximized() and if that returns true, then no size adjustment is made to this Form.
|
void |
setExitHandle(Handle h)
If this method is called then the exit() method does not close any Window or remove any UI elements.
|
void |
setFileSaver(IFileSaver fs,
boolean checkOnExit)
This saves the FileSaver as a property called "FileSaver" in the Form's property list and
sets up the saver as a listener for DataChangeEvents.
|
void |
setMainScrollBarPanel(ScrollablePanel mainScroller)
Use this to indicate to the Form the ScrollablePanel that is considered
the "MainScrollBarPanel" for the Form.
|
void |
setNoTitleBar()
Changes all necessary flags so that any new Window/Frame opened by
this Form has no top title bar.
|
void |
setSoftKeyBarFor(Control c,
SoftKeyBar bar)
Set the SoftKeyBar for a particular Control or the default SoftKeyBar.
|
void |
setSoftKeyBarForAll(Vector controls,
SoftKeyBar bar)
Set the SoftKeyBar for a particular set of Controls.
|
protected void |
setupFrame(Frame f,
int options) |
Frame |
show()
This displays the Form non-modally in a new Window.
|
Frame |
show(Frame parent,
int options)
This displays the Form non-modally within an already displayed parent Frame.
|
void |
showButtons() |
protected void |
showExecCalled()
This is called when the Form is being displayed by show or exec().
|
void |
shown()
This is called when a Control is shown in a Window.
|
static void |
showWait()
This displays a wait cursor until the next Form is shown.
|
static void |
showWait(Window win)
This displays a wait cursor until the next Form is shown.
|
void |
startRunning() |
static void |
stopFormHandle(Handle h,
int retCode)
This can be used to stop the Handle of a Form to indicate that it should be considered
closed.
|
ButtonBar |
takeButtons()
Take any buttons added to the button Vector via doButtons() or addButton()
and put them in a new ButtonBar.
|
Panel |
takeButtons(Panel dest)
Take any buttons added to the button Vector via doButtons() or addButton()
and put them in the destination Panel (or a new ButtonBar).
|
Vector |
takeButtons(Vector dest)
Take any buttons added to the button Vector via doButtons() or addButton()
and put them in the destination Vector (or a new Vector).
|
void |
toFields()
This transfers all data from on-screen controls to their associated fields by calling fromControls() on all the FieldHandler objects added to this Form, and then
calling toFields() on all Forms that are descendants of this Form.
|
static void |
toFields(Control c)
If the supplied Control is a Container then this calls toFields() on all Forms that
are descendants of the Control.
|
boolean |
toolsOnBottom()
Returns true if tools are best added to the bottom of Forms on this platform.
|
boolean |
validateBeforeExit(int exitCode) |
int |
waitUntilClosed()
This waits indefinitely for the form to close and returns the exitValue.
|
static int |
waitUntilClosed(Handle h)
Use this to wait on the Handle of a Form, without keeping a reference to the Form.
|
static int |
waitUntilClosed(Handle h,
TimeOut t)
Use this to wait on the Handle of a Form, without keeping a reference to the Form.
|
boolean |
waitUntilShown(int timeOut)
Call this ONLY after a show() call.
|
boolean |
willBeMaximized()
If maximizeOnPDA() or fullScreenOnPDA() was called and the current platform is a PDA
then this returns true.
|
getCross, getParentObject, getParentObject, getSizedImage, getTick, getToolsIcon, setParentObject
calculateSizes, getFloatingControls, getSubControls, hasFloatingControls, makeLayoutGrid, relayoutMe, removeAll, reShow, resize, resizeTo
add, addChildListener, addDirectly, addLast, addLast, addLast, addNext, addNext, addNext, addNext, calculatedSizes, doBorder, endRow, getControlTag, getPreferredSize, insertRow, isEmpty, layout, remove, removeChildListener, sendToChildListeners, setAsBelowSip, setText
canGo, canScreenScroll, checkScrolls, doScroll, fixOrigin, getActual, getBuffer, getCurrent, getDisplayedSize, getMyHeight, getMySize, getMyWidth, getPercent, getScrollablePanel, getScrollClient, getVisible, getVisibleArea, needScrollBar, onScroll, onSetOrigin, reduceClip, scroll, scroll, scrollToVisible, setOrigin, updateScrollServer
add, completeAddPopupControl, containerHasFocus, dismantle, doHotKey, doPaint, findChild, findChild, focusFirst, focusFirst, focusOnContainer, focusOnData, getChildren, getFirstFocus, getNextKeyFocus, gotFocus, grayOut, hide, lostFocus, relayout, removePopupControl, repaintDataNow, setHidden, startAddPopupControl, takeFocus, takePromptControl, unhide
acceptsData, activate, addListener, amOnTopFrame, applyFontChange, baseOnPenEvent, bufferGraphics, bufferGraphics, bufferGraphics, bufferGraphics, bufferGraphics, cache, calculateTextSize, calculateTextSize, calculateTextSize, cancelHoldDown, cancelPenPress, canEdit, change, changeDimension, changeTag, checkClipboardOperations, checkExitKey, checkMenu, checkMenuKey, checkModifiers, checkParentInterceptsUIEvent, checkPenTransparent, childrenPainted, clearTag, clipboardToString, clipboardTransfer, closeMenu, contains, contains, createNewMenu, dataAccepted, dataBeingRemoved, dataDraggedOff, dataDraggedOver, dataDraggedOver, dataDroppedOn, dataTransferCancelled, deactivate, defaultTo, deferInWindowThread, doAction, doActionKey, doBackground, doMenu, dontAcceptDrop, doPaintChildren, doPaintData, doPaintData, doShowMenu, dragged, draw, draw, draw, exitEntry, fillBackground, fillBackgroundNotInFrame, findTagInParents, fontChanged, free, fromClipboard, fromField, fromField, getAllDescendants, getAllSubControls, getAncestor, getAncestor, getAncestorProperty, getBackground, getCached, getCachedChildren, getCachedDim, getCachedDim, getCachedRect, getCachedRect, getCachedSubControls, getChildAnchor, getChildren, getChildrenBackwards, getClipboardMenu, getClipObject, getContentsInsets, getContentsInsets, getContentsRect, getDataToCopy, getDataToDragAndDrop, getDim, getDisplayText, getDragAndDropContext, getFieldTransfer, getFont, getFontMetrics, getFontMetrics, getFontMetricsForSizeCalculations, getForeground, getFrame, getFrameOrContainer, getGraphics, getGraphics, getHeight, getHideParent, getImage, getLastSelected, getLocation, getLock, getMaximumSize, getMenu, getMinimumSize, getModifiedBorderFlags, getModifiers, getNext, getPaintParameters, getParent, getParent, getParent, getParentOrListener, getPasswordCharacter, getPosInFrame, getPosInFrame, getPosInParent, getPosInParent, getPreferredSize, getPreferredSizeByParent, getPreferredTextSize, getPrompt, getPromptText, getRect, getRect, getServer, getSize, getSizes, getSubControls, getTag, getText, getToolTip, getWidth, getWindow, getWindowGraphics, hasModifier, hasPopupFormAttached, hasTag, hide, inheritModifiers, insetToContents, interceptChildUIEvent, isChildOf, isDirectChildOfWindow, isHidden, isModal, isOnMe, isOnMe, isOnMe, isSomeonesHotKey, makeFrameTopMost, makeHot, makeHot, makeInvisible, makeVisible, markAsTemporaryError, menuIsActive, menuStateChanged, modify, modifyAll, modifyAll, modifyFlags, mouseHover, newEventThread, notifyAction, notifyDataChange, notifyDataChange, notifyMenuItemSelected, notifyStructureChanged, onKeyEvent, onLabelPenEvent, onPenEvent, paintBackground, paintWithControlPainter, pauseEventThread, penClicked, penDoubleClicked, penHeld, penPressed, penReleased, penRightReleased, popupBeep, popupMenuClosed, popupMenuEvent, popupMenuEvent, postEvent, postInWindowThread, postUIEvent, putInside, queueKeyEvent, queuePenEvent, readLock, recalculatePreferredSize, redisplay, refresh, releaseBufferedGraphics, removed, removeListener, repaint, repaint, repaintInWindowThread, repaintInWindowThread, repaintNow, repaintNow, repaintNow, repaintNow, requestPaint, requestResizeTo, resetAllCachedProperties, resetCachedProperties, resetRect, restore, restoreBorderModifiers, restoreFlags, resumeEventThread, scrollAndRepaint, sendToListeners, set, setAllFonts, setBackgroundImage, setBorder, setBorderModifiers, setCell, setChildAnchor, setClipObject, setControl, setCursor, setFieldTransfer, setFixedSize, setFont, setFontChange, setFreeDragging, setHidden, setHiddenParent, setHotKey, setHotKey, setLocation, setMaximumSize, setMenu, setMinimumSize, setPreferredSize, setPreferredTextSize, setPreferredTextSize, setPromptControl, setRect, setRect, setScaledBackgroundImage, setServer, setShadow, setSwiping, setTag, setTags, setTextSize, setTiledBackgroundImage, setToolTip, showHoldDownIndicator, simulateClickOn, simulateKeyPresses, simulateKeyType, standardOnKeyEvent, startDragAndDrop, startDragAndDrop, startDragging, stopDragging, takeData, takeFromClipboard, testInWindowThread, ticked, tipIsDisplayed, toClipboard, toField, toField, toIDString, toString, toTextData, transferPenPress, transferPenPress, tryDragAndDrop, tryGetGraphics, tryNext, tryStartMenu, unhide, unlock, updateData, updateDCDuringDD, updateFrom, updateTo, verifyWantDrag, verifyWantHoldDown, waitEventThread, willAcceptDrop, willShowFrame, windowHasFloatingControls, writeLock
doubleSizeIt, getGuiTextHeight, isDoubleSized, isDoubleSizedFont, loadImage, tryLoadImage
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getServer, setServer
public boolean acceptsDroppedFiles
protected PropertyList pl
public boolean inheritSoftKeys
public boolean resizable
public boolean moveable
public boolean hasTitle
public boolean resizeOnSIP
public boolean keepFrame
public boolean noBorder
public boolean hasTopBar
public boolean exitSystemOnClose
public boolean isAutoScrolling
public boolean shadowed
public boolean hideSoftKeyBarIfNotFound
public boolean dontAddSIPFiller
public Handle handle
public Control yes
public Control no
public Control cancel
public Control ok
public Control apply
public Control reset
public Control deflt
public Control back
public Object windowIcon
public int buttonsPerRow
public Control titleOK
public Control titleCancel
protected Vector buttons
public CellPanel topControls
public CellPanel titleControls
public CellPanel buttonsPanel
public static final String WINDOW_TITLE_DONT_CHANGE
public String windowTitle
public boolean exitButtonDefined
public int windowFlagsToSet
public int windowFlagsToClear
public static int BUTTONS_TO_SOFT_KEY_FIRST_BUTTON_SEPARATE
public static int BUTTONS_TO_SOFT_KEY_MENU_ALWAYS
public static int BUTTONS_TO_SOFT_KEY_USE_FIRST_SOFT_KEY
public Control firstFocus
public String title
public boolean dismantleOnClose
protected FormFrame formFrame
public int exitValue
public float frameAlpha
public static final int SHOWN_FLAG
public static final int EXITING_FLAG
public static final int CLOSING_FLAG
public long minimumShowTime
protected long shownTime
protected boolean isMainAppletForm
protected Hashtable softkeyBars
protected Vector fieldHandlers
public void addFormMaker(Form.FormMaker maker)
public PropertyList getProperties()
HasProperties
getProperties
in interface HasProperties
public boolean _getSetField(String fieldName, Wrapper wrapper, boolean isGet)
public void setDefaultSize(int width, int height)
width
- height
- public void setNoTitleBar()
public boolean willBeMaximized()
public void maximizeOnPDA()
public void fullScreenOnPDA()
public void makeSmall()
public void makeSmallOnBigScreen()
public Window createWindow()
public boolean hasExitButton()
public MenuItem makeMenuItemForForm(String label, String action, String iconName)
public Control makeDefaultButton(int whichButton, String textToUse)
whichButton
- one of OKB, DEFOKB, CANCELB, or DEFCANCELB.textToUse
- the text to use with the button, or null to use the icon only.public Control makeDefaultButton(int whichButton, boolean useText)
whichButton
- one of OKB, DEFOKB, CANCELB, or DEFCANCELB.useText
- true to use the standard OK/Cancel lables, false to use the icon only.public boolean modifyForSmartPhone()
Setup the title and other Form options before calling this method.
public boolean placeCancelOnLeft()
public void doButtons(int which)
public void addButton(Control b)
public Control getButton(String text)
public boolean buttonsToSoftKeyBar(Container buttons, String menuName, int options)
public Menu buttonsToMenu(Vector buttons, Menu destination)
public boolean buttonsToSoftKeyBar(Vector buttons, String menuName, int options)
public void showButtons()
protected void checkButtons()
public void make(boolean reMake)
Container
public void setBelowButtonBar(ButtonBar bb)
public void setMainScrollBarPanel(ScrollablePanel mainScroller)
mainScroller
- the MainScrollBarPanel for the Form.public boolean enableScrolling(boolean horizontally, boolean vertically)
horizontally
- true to enable the scrolling horizontally, false to disable it.vertically
- true to enable the scrolling vertically, false to disable it.public static void showWait()
public static void showWait(Window win)
public static void continueWait()
public static void cancelWait()
public FormFrame getFormFrame(int options)
protected FormFrame makeFrame(int options)
protected void setupFrame(Frame f, int options)
public void fixWindowTitle()
protected void showExecCalled()
protected FormFrame doShowExec(Frame parent, boolean modal, int options)
parent
- The parent Frame (may be null).modal
- true if the Form is to be displayed modally.options
- one of the Gui.XXX_FRAME options along with the Gui.NEW_WINDOW option.public void close(int exitCode)
public boolean waitUntilShown(int timeOut)
public void setAsShown()
public void shown()
Control
protected void formClosing()
formClosing
in class Control
protected boolean canExit(int exitCode)
public void addValidateBeforeExit(Form otherForm)
public void addValidateBeforeExit(Form.ValidateBeforeExit validator)
public boolean validateBeforeExit(int exitCode)
public boolean checkCanExit(int exitCode)
exitCode
- the exit code.public void setExitHandle(Handle h)
h
- the Handle to stop when the Form exits.public void startRunning()
public boolean exit(int exitCode)
public final int execute(Frame parent, int options)
parent
- The parent Frame for the Form. A null parent will indicate that a new Window
should be created.options
- this should be one of:
public final int execute(Frame parent)
public final FormFrame exec(Frame parent, int options)
parent
- The parent Frame for the Form. A null parent will indicate that a new Window
should be created.options
- this should be one of:
public FormFrame exec(Handle transferredHandle)
transferredHandle
- The Handle to use for this Form.public FormFrame exec(Handle transferredHandle, Frame parent, int options)
transferredHandle
- The Handle to use for this Form.parent
- The parent Frame to exec() this Form in.options
- this should be one of:
public final int execute()
public Form setAsMainAppletForm()
public final FormFrame exec()
public final int waitUntilClosed() throws IllegalStateException
IllegalStateException
- if the Form has no handle (i.e. has not been opened).public static final int waitUntilClosed(Handle h, TimeOut t) throws InterruptedException, TimedOutException
h
- The handle of the Form (from the "handle" variable).t
- A TimeOut to wait form.InterruptedException
- If the Thread was interrupted.TimedOutException
- If the TimeOut expired.public static final int waitUntilClosed(Handle h)
h
- The handle of the Form (from the "handle" variable).public Handle closeForTransfer(boolean dismantle, boolean showWait)
You can override this method to return null, in which case this Form is NOT closed and if stopOriginalForm() Transferring the handle to another Form is done using the exec(Handle) method or exec(Handle,Parent,int) method.
dismantle
- dismantle this Form after closing.showWait
- call the showWait() method to display a wait cursor until the next Form is
displayed.public Handle closeForTransfer()
Transferring the handle to another Form is done using the exec(Handle) method or exec(Handle,Parent,int) method.
This Form will be dismantled after closing and the wait cursor will be displayed until the new Form is displayed.
public final Frame show()
public final Frame show(Frame parent, int options)
parent
- The parent Frame for the Form. A null parent will indicate that a new Window
should be created.options
- this should be one of:
public static void stopFormHandle(Handle h, int retCode)
h
- The Handle of the open Form.retCode
- The exit code the Form should report. If the retCode
is IDCANCEL then the Aborted flag is also set otherwise the Success
flag is set.public SoftKeyBar makeSoftKeys(Object left, String leftLabel, Object right, String rightLabel)
public SoftKeyBar makeSoftKeys()
public SoftKeyBar makeSoftKeys(boolean canOverlay)
canOverlay
- if this is true and the SoftKeyBar is being newly created by
this method call, then the new SoftKeyBar will have the ALLOW_ALL_OVERLAYS options
set, which allows it to be merged with higher or lower SoftKeyBars. If it is false
OR if the SoftKeyBar was already made, then this will have no effect.public void setSoftKeyBarFor(Control c, SoftKeyBar bar)
c
- the particular Control or null to set the default SoftKeyBar.bar
- The SoftKeyBar to use.public void setSoftKeyBarForAll(Vector controls, SoftKeyBar bar)
controls
- a Vector holding a set of Controls.bar
- The SoftKeyBar to use for each of the Controls.public SoftKeyBar getSoftKeyBarFor(Control c)
c
- the particular Control or null to get the default SoftKeyBar.public void removeSoftKeyBarFor(Control c)
c
- the particular Control or null to remove the default SoftKeyBar.public void onControlEvent(ControlEvent ev)
onControlEvent
in class Control
public boolean handleAction(String action)
action
- the action value.public boolean handleAction(ControlEvent ev)
ev
- The Control Event.public void menuItemSelected(MenuItem selected)
public void onSoftKey(int whichKey, String action, MenuItem selected)
whichKey
- the SoftKey that was pressed, either 1 or 2.action
- the action associated with the key or menu item.selected
- if a MenuItem was selected, this will be the selected item.public void onSoftKey(SoftKeyEvent se)
se
- the SoftKeyEvent.public void addFieldHandler(FieldHandler handler)
public void fromFields()
public void toFields()
public static final void toFields(Control c)
public static final void fromFields(Control c)
public void onDataChangeEvent(DataChangeEvent ev)
public void filesDropped(String[] fileNames)
fileNames
- the list of fileNames dropped.public MenuItem createMenuItem(Button button)
public IFileSaver getFileSaver()
public void setFileSaver(IFileSaver fs, boolean checkOnExit)
public Form getTopmostForm()
public void closeAll(int exitCode)
public SIPFiller createSipFiller(Panel addTo)
addTo
- the container within the Form to add the SIP filler. If
this is null it is not added to any container and you must add the SIP filler with the constraints:
addLast(sipFiller).setCell(HSTRETCH).setPreferredSize(10,0);
public Control[] addTabbedPanel(boolean useExpandingTabs)
useExpandingTabs
- set this true if you wish for the created tabbed panel to be the autoexpanding type.public CellPanel[] addSIPAdjustment()
Unlike addToolBar() and addTabbedPanel() this method is conditional and will only add a SIP filler on a PocketPC device - on all other devices or platforms this method has no effect and returns null.
public CellPanel[] addToolbar()
public boolean toolsOnBottom()
public void defaultTitleTo(String newTitle)
public Handle exec(boolean dismantleOnClose)
dismantleOnClose
- The state to set the dismantleOnClose flag.public Vector takeButtons(Vector dest)
dest
- an optional destination Vector. If null a new one will be created.public Panel takeButtons(Panel dest)
dest
- an optional destination Pane. If null a ButtonBar will be created.public ButtonBar takeButtons()
public static void formMain(String formClass, String[] args)
formClass
- the name of the Form class.args
- the other arguments on the command line.