public class Window extends Container implements WindowConstants
Modifier and Type | Class and Description |
---|---|
static interface |
Window.SurfaceEventFilter |
Modifier and Type | Field and Description |
---|---|
static boolean |
bufferFullWindow |
boolean |
canDisplay |
protected Window |
containing |
Frame |
contents |
WindowCreationData |
creationData |
static Object |
defaultWindowIcon
Set this to be a defaultWindowIcon if you wish.
|
static boolean |
dontResizeWindowWithFrame |
static int |
dragAndDropCursor |
static Object |
dragAndDropData |
static Object |
dragAndDropSource |
boolean |
firstDisplay |
boolean |
forceVisibleOnToFront
If this is true then if toFront() is called on the window, and it
happens to be in an invisible state, then the window will be
faced to be visible.
|
protected static Window |
inFront |
protected static Vector |
openWindows |
eve.ui.PenHandler |
penHandler |
protected WindowSurface |
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
Modifier and Type | Method and Description |
---|---|
void |
acceptDroppedFiles(boolean accept)
Use this to enable or disable the accepting of dropped files.
|
void |
addOverlay(IOverlay overlay,
boolean toBottom) |
void |
addSurfaceEventFilter(Window.SurfaceEventFilter filter,
boolean toBottom) |
static boolean |
applicationToFront()
This will attempt to bring the topmost window of the application to the front.
|
boolean |
beginDragAndDrop(Control source,
Object data,
boolean isMultiple,
boolean isCopy)
This is called by a control to start a drag and drop operation.
|
boolean |
beginDragAndDrop(Control source,
Object data,
int dragCursor)
This is called by a control to start a drag and drop operation.
|
static void |
cancelCursorBlink(Control c) |
void |
cancelPenPress() |
static int |
captureAppKeys(int options)
This will capture the WindowCE special App keys (the non-cursor buttons generally
found on the bottom).
|
Rect |
checkSipCoverage(Control who)
This returns null if the control is not covered by the SIP.
|
static void |
clearQueuedMoves() |
int |
clearWindowFlags(int flags)
Clear specified window flags.
|
boolean |
close()
This closes the window and destroys the native Window component.
|
void |
contentsAdded() |
boolean |
create(Rect location,
String title,
int flagsToSet,
int flagsToClear,
Object extra)
This creates the native window associated with this Window object.
|
boolean |
create(WindowCreationData wcd) |
boolean |
create(WindowSurface alreadyCreated) |
void |
dispatchPenEvent(PenEvent ev)
Send a pen event.
|
static void |
enterNativeDialog() |
static void |
exitNativeDialog() |
static Window |
getActiveWindow()
This returns the currently active window.
|
Window |
getContainingWindow()
If this Window is contained in another Window, this will return the containing Window.
|
static EventDispatcher |
getEventInterceptors() |
int |
getFlagsForSize(int requestedWidth,
int requestedHeight,
int flagsToSet,
int flagsToClear) |
FontMetrics |
getFontMetrics(Font font)
Returns the font metrics for a given font.
|
Object |
getInfo(int infoCode,
Object parameters) |
Object |
getInfo(int infoCode,
Object parameters,
Object dest,
int options) |
ISurface |
getSurface() |
int |
getWindowFlags()
Return the Window flags for this window.
|
Rect |
getWindowRect(Rect dest,
boolean clientArea)
Get the window's full or client Rect.
|
WindowSurface |
getWindowSurface() |
protected void |
handleSIPEvent(SurfaceSIPEvent ev)
This is the default SIP handler method, but you should not override
to customize SIP handling.
|
protected void |
handleSurfaceEvent(Event ev) |
static void |
handleWindowEvents()
This calls handleWindowEvents(int minTime, int maxTime)
with a min time of 100ms an a maxTime of 1 second.
|
static void |
handleWindowEvents(int minTime,
int maxTime)
Put the current Thread to sleep to allow window events to be handled.
|
boolean |
hasBeenPainted()
Returns true if the Window has received its paint event yet.
|
boolean |
hasFloatingControls() |
boolean |
hasPendingEvents() |
boolean |
inCurrentEventThread() |
static boolean |
inEventThread() |
static boolean |
inNativeInput()
This returns whether the system is within a native input or native dialog.
|
boolean |
isCreated()
This returns true if the Window has been created (its native component has been created)
and has not been closed.
|
boolean |
isCurrentEventThread(Thread t) |
boolean |
isVisible()
Return if the Window is visible.
|
static void |
minimizeApplication()
Minimize all windows in the application.
|
protected void |
mobileWindowEvent(int type,
int key,
int x,
int y,
int modifiers,
long timeStamp) |
static boolean |
nextMouseIsMove() |
void |
onEvent(Event ev)
This gets called when WindowSurface events are generated by the underlying window surface.
|
static void |
penDragToMove() |
void |
queueEvent(Event ev)
Queue an Event to the Window at the front of the Queue.
|
void |
removeOverlay(IOverlay overlay) |
void |
removeSurfaceEventFilter(Window.SurfaceEventFilter filter) |
void |
removeTip() |
static Object |
requestCursorBlink(Control c,
long howLong)
Only one control per Window will get this timer.
|
static void |
resetCursor() |
void |
resizeTo(int newWidth,
int newHeight)
This is called to change the width and height values.
|
protected void |
sendSIPToChildren(SurfaceSIPEvent ev)
This is called from within handleSIPEvent() and it calls
onEvent(ev) on the topmost Frame in this Window.
|
void |
setCursor(int type)
Set the cursor for this window.
|
void |
setCursorFor(Control c,
int cursor) |
void |
setState(int state)
Set window state bits.
|
void |
setTitle(String title) |
void |
setVisible(boolean visible)
Set the visibility state of the window.
|
int |
setWindowFlags(int flags)
Set specified window flags.
|
boolean |
setWindowRect(Rect where,
boolean clientArea)
Set the window full or client rectangle.
|
Closes |
showWait() |
void |
showWait(boolean showOrHide)
Show or hide the wait cursor for this window.
|
protected void |
shutdown()
This is called either before the window is closed or before the application exits.
|
protected void |
shutdownAll() |
static boolean |
supportsMultiple() |
boolean |
textInput(TextInputParameters tip)
This starts a native text input for a control.
|
boolean |
tipIsDisplayed()
Returns true if a tooltip is displayed in the current window.
|
boolean |
toFront()
Bring the window to the front.
|
void |
transferPenPress(PenEvent ev,
Control toWho,
int dx,
int dy) |
protected Window |
tryWindow(Window win,
int x,
int y,
Point where) |
protected boolean |
undoSipChanges(boolean repaint) |
boolean |
waitForResize()
Wait for the the window to get the resize event for 1 second.
|
boolean |
waitForResize(int howLong)
Wait for the the window to get the resize event for the specified number
of milliseconds.
|
boolean |
waitUntilPainted(int timeOut)
Wait until the Window receives its first Paint message.
|
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 boolean bufferFullWindow
public static boolean dontResizeWindowWithFrame
public static Object defaultWindowIcon
protected WindowSurface surface
protected static Vector openWindows
protected Window containing
public boolean canDisplay
public boolean firstDisplay
public WindowCreationData creationData
public Frame contents
public boolean forceVisibleOnToFront
protected static Window inFront
public static Object dragAndDropData
public static Object dragAndDropSource
public static int dragAndDropCursor
public eve.ui.PenHandler penHandler
public boolean hasFloatingControls()
public boolean hasPendingEvents()
public static Object requestCursorBlink(Control c, long howLong)
public static void cancelCursorBlink(Control c)
public boolean isCurrentEventThread(Thread t)
public boolean inCurrentEventThread()
public static boolean inEventThread()
public static boolean supportsMultiple()
public boolean close()
protected void shutdown()
protected void shutdownAll()
public boolean isCreated()
public Window getContainingWindow()
public int getWindowFlags()
public boolean toFront()
public static void minimizeApplication()
public static boolean applicationToFront()
public static Window getActiveWindow()
public Rect getWindowRect(Rect dest, boolean clientArea)
dest
- a destination RectclientArea
- if this is true then the client Rect will be returned. The X and Y
coordinates in the Client rect represent the offset into the whole Rect that the
client area is in.public boolean setWindowRect(Rect where, boolean clientArea)
where
- the new Rect for the Window or client area.clientArea
- if this is true then the client Area will be placed in the specified
position in the parent and the Window will be placed and sized so that its client
area is as specified.public int setWindowFlags(int flags)
public int clearWindowFlags(int flags)
public void setTitle(String title)
public int getFlagsForSize(int requestedWidth, int requestedHeight, int flagsToSet, int flagsToClear)
public void setState(int state)
state
- one of the STATE_XXX values.public WindowSurface getWindowSurface()
public void setVisible(boolean visible)
visible
- true to make the window visible, false to make it invisible.public boolean isVisible()
public void showWait(boolean showOrHide)
showOrHide
- true to show the wait, false to hide it. For
every call with showOrHide true there must be a corresponding call
with showOrHide false in order to restore the cursor to normal.public Closes showWait()
public void setCursor(int type)
public ISurface getSurface()
public boolean beginDragAndDrop(Control source, Object data, int dragCursor)
public boolean beginDragAndDrop(Control source, Object data, boolean isMultiple, boolean isCopy)
public void addOverlay(IOverlay overlay, boolean toBottom)
public void removeOverlay(IOverlay overlay)
protected void sendSIPToChildren(SurfaceSIPEvent ev)
ev
- the SurfaceSIPEvent received.protected void handleSIPEvent(SurfaceSIPEvent ev)
ev
- the SurfaceSIPEvent received.protected void mobileWindowEvent(int type, int key, int x, int y, int modifiers, long timeStamp)
public boolean waitForResize(int howLong)
public boolean waitForResize()
public static void penDragToMove()
public static void resetCursor()
public void cancelPenPress()
cancelPenPress
in class Control
public void removeTip()
public boolean tipIsDisplayed()
Control
tipIsDisplayed
in class Control
public void setCursorFor(Control c, int cursor)
public static EventDispatcher getEventInterceptors()
public void dispatchPenEvent(PenEvent ev)
ev
- public FontMetrics getFontMetrics(Font font)
getFontMetrics
in class Control
public boolean waitUntilPainted(int timeOut)
timeOut
- The length of time in milliseconds to wait.public boolean hasBeenPainted()
public void resizeTo(int newWidth, int newHeight)
Control
public void queueEvent(Event ev)
ev
- the Event to deliver.public static void handleWindowEvents()
public static void handleWindowEvents(int minTime, int maxTime)
minTime
- the minimum time to wait.maxTime
- the maximum time to wait.public void contentsAdded()
public void addSurfaceEventFilter(Window.SurfaceEventFilter filter, boolean toBottom)
public void removeSurfaceEventFilter(Window.SurfaceEventFilter filter)
protected void handleSurfaceEvent(Event ev)
public void onEvent(Event ev)
public boolean create(WindowSurface alreadyCreated)
public boolean create(WindowCreationData wcd)
public boolean create(Rect location, String title, int flagsToSet, int flagsToClear, Object extra)
public static int captureAppKeys(int options)
options
- A value of 1 causes WinCE to capture the keys. A value of 0 cause WinCE to
release the keys.public static void clearQueuedMoves()
public static boolean nextMouseIsMove()
public static boolean inNativeInput()
public boolean textInput(TextInputParameters tip) throws NoSuchMethodError
tip
- the TextInputParameters to use.NoSuchMethodError
- if native text input is not possible at all.public static void enterNativeDialog()
public static void exitNativeDialog()
protected boolean undoSipChanges(boolean repaint)
public Rect checkSipCoverage(Control who)
public void acceptDroppedFiles(boolean accept)
accept
- true to enable, false to disable.