public class Application extends Window implements Runnable
Window.SurfaceEventFilter
Modifier and Type | Field and Description |
---|---|
static Font |
guiFont |
static long |
lastKeyPress
This was the time of the last GUI event.
|
static Application |
mainApp |
static String |
mainTitle |
bufferFullWindow, canDisplay, containing, contents, creationData, defaultWindowIcon, dontResizeWindowWithFrame, dragAndDropCursor, dragAndDropData, dragAndDropSource, firstDisplay, forceVisibleOnToFront, inFront, openWindows, penHandler, surface
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
FLAG_ACCEPTS_DROPPED_FILES, FLAG_ALWAYS_ENABLED, FLAG_ALWAYS_ON_TOP, FLAG_CAN_MAXIMIZE, FLAG_CAN_MINIMIZE, FLAG_CAN_RESIZE, FLAG_DONT_CLEAR_BACKGROUND, FLAG_FOR_SIZE_NO_CLOSE_BUTTON, FLAG_FOR_SIZE_NO_TITLE, FLAG_FULL_SCREEN, FLAG_HAS_CLOSE_BUTTON, FLAG_HAS_TASKBAR_ENTRY, FLAG_HAS_TITLE, FLAG_IS_DEFAULT_SIZE, FLAG_IS_DEFAULT_SURFACE, FLAG_IS_ICONIZED, FLAG_IS_MODAL, FLAG_IS_NOT_DEFAULT_SURFACE, FLAG_IS_VISIBLE, FLAG_MAXIMIZE, FLAG_MAXIMIZE_ON_PDA, FLAG_MINIMIZE, FLAG_SHOW_SIP_BUTTON, FLAG_VISIBLE_ON_TO_FRONT, GUI_FLAG_DONT_REPAINT_ON_RESIZE, GUI_FLAG_HAS_TASKBAR, GUI_FLAG_REPAINT_FULL_CONTROL, GUI_FLAG_REVERSE_OK_CANCEL, SPECIAL_MOUSE_MOVE, SPECIAL_MOUSE_RELEASE_CAPTURE, SPECIAL_MOUSE_RESIZE, STATE_ACCEPT_DROPPED_FILES, STATE_FULL_SCREEN, STATE_MAXIMIZED, STATE_MINIMIZED, STATE_NORMAL, STATE_REJECT_DROPPED_FILES, STATE_RESTORE, STATE_TO_FRONT, STATE_UNKNOWN
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
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
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 |
---|
Application() |
Modifier and Type | Method and Description |
---|---|
static void |
addFont(Font font,
String name)
Add a Font to the application font library.
|
static void |
changeAllFonts(FontChange fc) |
static void |
changeFont(FontChange fc,
String names)
Change one of the fonts.
|
static void |
changeUIFont(FontChange fc) |
static void |
exit(int retValue)
This will be called by mobileWindowEvent() if a Close message is sent by the OS and the
application is running on a mobile device.
|
static Font |
findFont(String name)
Find a font in the application Font library.
|
static Font |
findFont(String name,
boolean doDefault)
Find a font in the application Font library.
|
static void |
fontsChanged()
Call this method to alert the application that fonts have been changed other than through setFont().
|
static String |
getDefaultWindowTitle()
This is used by WindowSurface to get the default window title.
|
static Hashtable |
getFontChanges() |
static Iterator |
getFonts()
Get an Iterator for all the entries in the fonts hashtable.
|
static Dimension |
getKnownScreenSize() |
static FontMetrics |
getUserFont(String savedFontSpecs,
Font baseFont,
boolean doSetup) |
static void |
initializeLibrary(PropertyList initializeParameters)
This is used to initialize the Eve Java library and GUI system if it is being used as part of a
separate non-Eve application.
|
void |
run()
This is used to shutdown the application.
|
static String |
saveFontSpecs(Font userSelectedFont) |
static void |
setApplicationHandler(IApplicationHandler appHandler) |
static void |
startApplication(String[] args)
Call this as the first line of your Gui Application's main() method.
|
acceptDroppedFiles, addOverlay, addSurfaceEventFilter, applicationToFront, beginDragAndDrop, beginDragAndDrop, cancelCursorBlink, cancelPenPress, captureAppKeys, checkSipCoverage, clearQueuedMoves, clearWindowFlags, close, contentsAdded, create, create, create, dispatchPenEvent, enterNativeDialog, exitNativeDialog, getActiveWindow, getContainingWindow, getEventInterceptors, getFlagsForSize, getFontMetrics, getInfo, getInfo, getSurface, getWindowFlags, getWindowRect, getWindowSurface, handleSIPEvent, handleSurfaceEvent, handleWindowEvents, handleWindowEvents, hasBeenPainted, hasFloatingControls, hasPendingEvents, inCurrentEventThread, inEventThread, inNativeInput, isCreated, isCurrentEventThread, isVisible, minimizeApplication, mobileWindowEvent, nextMouseIsMove, onEvent, penDragToMove, queueEvent, removeOverlay, removeSurfaceEventFilter, removeTip, requestCursorBlink, resetCursor, resizeTo, sendSIPToChildren, setCursor, setCursorFor, setState, setTitle, setVisible, setWindowFlags, setWindowRect, showWait, showWait, shutdown, shutdownAll, supportsMultiple, textInput, tipIsDisplayed, toFront, transferPenPress, tryWindow, undoSipChanges, waitForResize, waitForResize, waitUntilPainted
add, addDirectly, completeAddPopupControl, containerHasFocus, dismantle, dismantle, doHotKey, doPaint, findChild, findChild, focusFirst, focusFirst, focusOnContainer, focusOnData, getChildren, getFirstFocus, getNextKeyFocus, gotFocus, grayOut, hide, lostFocus, make, relayout, remove, removeAll, removePopupControl, repaintDataNow, reShow, scrollToVisible, setHidden, startAddPopupControl, takeFocus, takePromptControl, unhide
acceptsData, activate, addListener, amOnTopFrame, applyFontChange, baseOnPenEvent, bufferGraphics, bufferGraphics, bufferGraphics, bufferGraphics, bufferGraphics, cache, calculatedSizes, calculateSizes, calculateTextSize, calculateTextSize, calculateTextSize, cancelHoldDown, 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, doBorder, doMenu, dontAcceptDrop, doPaintChildren, doPaintData, doPaintData, doShowMenu, dragged, draw, draw, draw, exitEntry, fillBackground, fillBackgroundNotInFrame, findTagInParents, fontChanged, formClosing, 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, 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, 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, onControlEvent, 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, 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, setText, setTextSize, setTiledBackgroundImage, setToolTip, showHoldDownIndicator, shown, simulateClickOn, simulateKeyPresses, simulateKeyType, standardOnKeyEvent, startDragAndDrop, startDragAndDrop, startDragging, stopDragging, takeData, takeFromClipboard, testInWindowThread, ticked, 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
public static String mainTitle
public static Application mainApp
public static Font guiFont
public static long lastKeyPress
public static void setApplicationHandler(IApplicationHandler appHandler)
public static String getDefaultWindowTitle()
public static void exit(int retValue)
targetWindow
- The window that received the CLOSE event.flags
- This will have the Window.FLAG_CLOSE_BY_USER bit set if the system knows for
certain that the user pressed a system button to generate the Window.CLOSE event. This is only true
for the 'OK' button under Windows CE. It is not possible to tell the difference between the user pressing
an 'X' button and the system generating a CLOSE message.public static void changeFont(FontChange fc, String names)
fc
- a FontChange object.names
- a comma separated list of names.public static void changeUIFont(FontChange fc)
public static void changeAllFonts(FontChange fc)
public static void fontsChanged()
public static void addFont(Font font, String name)
font
- The Font to add.name
- The name of the Font. Important font names include "gui", "system", "fixed", "text", "small" and "big"public static Font findFont(String name)
name
- The name of the Font to look for. Important font names include "gui", "system", "fixed", "text", "small" and "big"public static Hashtable getFontChanges()
public static Font findFont(String name, boolean doDefault)
name
- The name of the Font to look for. Important font names include "gui", "system", "fixed", "text", "small" and "big"doDefault
- If this is true and no font is found for the name, the "system" font is returned.
If it is false and no font is found for the name, null will be returned.public static Iterator getFonts()
public void run()
public static void initializeLibrary(PropertyList initializeParameters)
public static void startApplication(String[] args)
args
- the args as presented to main().public static Dimension getKnownScreenSize()
public static FontMetrics getUserFont(String savedFontSpecs, Font baseFont, boolean doSetup)