|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectewe.ui.Gui
| Field Summary | |
static int |
BIG_SCREEN
A possible flag for screenIs. |
static int |
CENTER_FRAME
|
static int |
DESKTOP_HEIGHT
A possible flag for screenIs. |
static int |
DESKTOP_SCREEN
A possible flag for screenIs. |
static int |
DESKTOP_WIDTH
A possible flag for screenIs. |
static boolean |
dontPaintNextFrame
|
static int |
FILL_FRAME
|
static int |
FILL_HEIGHT
This should not be OR'ed with FILL_WIDTH. |
static int |
FILL_WIDTH
This should not be OR'ed with FILL_HEIGHT. |
static int |
FLASH_BEEP
An option for flashMessage. |
static Rect |
fullScreen
|
static boolean |
hasKeyboard
|
static boolean |
hasMousePointer
|
static boolean |
hasPen
|
protected static Vector |
inFocus
|
static boolean |
isPDA
|
static boolean |
isSmartPhone
|
static int |
LONG_SCREEN
A possible flag for screenIs. |
static int |
NEW_WINDOW
|
static boolean |
noHotLabels
By default, this is set to: !hasKeyboard || isSmartPhone || isPDA |
static boolean |
NullParentFrameToMainApp
If you show/exec a Frame with a null parent frame then if NullParentFrameToMainApp is true, it will use the main frame of the mApp of the program. |
static int |
PDA_SCREEN
A possible flag for screenIs. |
static int |
PUTTING_POPUP
|
static Rect |
rp
|
static Rect |
screenSize
This is the size of the user's screen, but will not be set until the screenIs() method is called. |
static boolean |
sendFrameOnTopEvents
Set this true if you wish to send FrameEvent.NOT_ON_TOP and FrameEvent.NOW_ON_TOP events. |
static int |
STYLE_3D
Used with setStyle. |
static int |
STYLE_ETCHED
Used with setStyle. |
static int |
STYLE_PALM
Used with setStyle. |
static int |
STYLE_SOFT
Used with setStyle. |
static int |
WIDE_SCREEN
A possible flag for screenIs. |
| Fields inherited from interface ewe.ui.UIConstants |
BDR_DOTTED, BDR_INNER, BDR_NOBORDER, BDR_OUTER, BDR_OUTLINE, BDR_RAISEDINNER, BDR_RAISEDOUTER, BDR_SUNKENINNER, BDR_SUNKENOUTER, 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 |
| Fields inherited from interface ewe.ui.CellConstants |
BORDER, BOTTOM, CELLFLAG, CELLMASK, CENTER, CONTROLMASK, DONTCHANGE, DONTFILL, DONTSTRETCH, EAST, FILL, FIXEDSIZE, GROW, HCENTER, HCONTRACT, HEXPAND, HFILL, HGROW, HSHRINK, HSTRETCH, INITIALLY_CLOSED, INITIALLY_MINIMIZED, INITIALLY_PREFERRED_SIZE, INSETS, LEFT, MAXIMUMSIZE, MINIMUMSIZE, NORTH, NORTHEAST, NORTHWEST, PREFERREDSIZE, RECT, RIGHT, SHRINK, SOUTH, SOUTHEAST, SOUTHWEST, SPAN, STRETCH, TEXTSIZE, TOP, VCENTER, VCONTRACT, VEXPAND, VFILL, VGROW, VSHRINK, VSTRETCH, WEST |
| Fields inherited from interface ewe.ui.ControlConstants |
All, AlwaysEnabled, AlwaysRecalculateSizes, ByDeferredMouse, ByDeferredPen, ByFrameChange, ByKeyboard, ByMouse, ByPen, ByRequest, CalculatedSizes, Disabled, DisablePopupMenu, DisplayOnly, Down, DrawFlat, Flag, ForceResize, HasData, Invisible, KeepImage, KeepSIP, Left, MakeMenuAtLeastAsWide, Maximize, Minimize, MouseSensitive, NoFocus, NotAnEditor, NotEditable, PaintDataOnly, PaintOutsideOnly, PenTransparent, PreferredSizeOnly, Right, SendUpKeyEvents, SendUpPenEvents, ShowSIP, ShrinkToNothing, SmallControl, SpecialBackground, TakeControlEvents, TakesKeyFocus, Transparent, Up, WantDrag, WantHoldDown |
| Constructor Summary | |
Gui()
|
|
| Method Summary | |
static void |
captureControl(Control ct,
Graphics dest,
Rect dim)
|
static Point |
centerText(FontMetrics fm,
String st,
int width,
int height)
|
protected static Container |
checkParent(Container parent,
int options)
|
static boolean |
closePopups(Control window)
Close all Frames denoted as popup frames in the Window containing the control. |
static boolean |
closePopups(Control window,
int why,
int flags)
|
static int |
decodeAlignment(String specs)
|
static int |
decodeAnchor(String specs)
|
protected static void |
doExecFrame(Frame f,
Container parent,
int options)
|
static void |
execFrame(Frame f,
Container parent)
|
static void |
execFrame(Frame f,
Container parent,
int options)
This will add the frame to the container and call a make() on it. |
static int |
fixShowOptions(Container parent,
int options)
|
static void |
flashMessage(String message,
Control parent)
|
static void |
flashMessage(String message,
int timeInMillis,
Control parent,
int flash_options)
|
static void |
flashMessageOff(Object message)
Remove the short message as displayed by flashMessageOn(). |
static Object |
flashMessageOn(String message,
Control parent)
Display a short message on the screen, and keep it on the screen until flashMessageOff() is called. |
static Control |
focusedControl()
|
static void |
frameOnTop(Control c)
|
static Rect |
getAppRect(Control ct)
|
static Rect |
getAppRect(Control ct,
Rect dest)
This gets the rect of the control relative to the top left of the controls containing window. |
static Rect |
getAverageSize(FontMetrics fm,
int rows,
int columns,
int xGap,
int yGap)
|
static Graphics |
getGraphics(Window window)
This gets a Graphics object for a window. |
static int |
getGuiFlags()
|
static char |
getHotKeyFrom(String text)
Given text in the format "Text$hotkey" this returns the hotkey character. |
static Frame |
getPopupMenuParentFrame(Control c)
This returns the parent frame for a control's popup menu. |
static Point |
getPosInParent(Control c,
Container parent)
|
static Dimension |
getPreferredDialogSize()
|
static Rect |
getRectInWindow(Control ct,
Rect dest,
boolean onlyIfVisible)
This gets the rect of the control relative to the top left of the controls containing window. |
static Rect |
getRectInWindow(Control ct,
Rect dest,
boolean onlyIfVisible,
Point actualPosition)
This gets the rect of the control relative to the top left of the controls containing window. |
static Rect |
getSize(FontMetrics fm,
String[] lines,
int xGap,
int yGap)
|
static Rect |
getSize(FontMetrics fm,
String st,
int xGap,
int yGap)
|
static StyleManager |
getStyleManager()
Return the current pluggable look and feel style manager. |
static String |
getTextFrom(String text)
Given text in the format "Text$hotkey" this returns the text string without the hotkey character. |
static void |
hideFrame(Frame f)
|
static boolean |
iconize(Control c,
IImage image,
boolean leaveText,
FontMetrics fm)
This will iconize a button/control that has its text already set. |
static boolean |
iconize(Control c,
String image,
Object maskOrColor,
boolean leaveText,
FontMetrics fm)
This will iconize a button/control that has its text already set. |
static boolean |
isWindowFrame(Frame f)
This returns true if the Frame is the main frame of a window. |
static String |
makeHot(String label)
Convert a '$' formatted hotkey into a "true" hotkey encoded String. |
static String |
makeHot(String label,
int hotKey)
Convert a string with a hotkey to be a "true" hotkey encoded String which, when displayed by a Graphics object, will have its hotkey underlined. |
static void |
moveFrameTo(Frame f,
Rect where)
|
static boolean |
pressedOutsideTopFrame(Control onWho,
Point whereOnWho)
|
static void |
refreshScreen(Control c)
|
static void |
refreshScreen(Window w)
|
static void |
refreshScreen(Window w,
Rect area)
|
static void |
refreshTopFrame(Control who)
|
static void |
relayoutFrameAndWindow(Frame f,
boolean overrideMaximize)
This method does a relayout and resize on a Frame and its containing Window (if the Frame contained within a native Window). |
static void |
removeFrom(Container c,
Control ctrl)
|
static boolean |
requestPaint(Control who)
|
static SavedScreen |
saveScreen(Window w,
Rect area,
boolean doCapture)
|
static boolean |
screenIs(int flags)
Check if the user screen is of a certain type. |
static void |
screenResized(int width,
int height)
|
static void |
setAllParentFrame(Frame f)
Set the system to believe that multiple windows are not possible and that all new Frames should be shown in the specified Frame. |
static void |
setAppFormTitle(Form form,
String title)
This will setup an the title bar on a Form if the main ewe window does not have a title and a close button. |
static void |
setFormTitle(Window w,
Form form,
String title)
This will setup an the title bar on a Form if the main ewe window does not have a title and a close button. |
static void |
setNoMultipleWindows()
This forces the system to act as if multiple windows are not supported. |
static void |
setOKCancel(Form f)
This will set the OK/Cancel of a form to be either in the title bar (for mobile devices) or on the bottom for desktop devices. |
static void |
setStyle(int style)
Set the style of Controls within an application. |
static boolean |
setStyleManager(StyleManager manager)
Set a pluggable look and feel style manager for the GUI components. |
protected static Container |
setupNewWindow(Frame f,
Container parent,
boolean modal)
|
static void |
showFrame(Frame f,
Container parent)
|
static void |
showFrame(Frame f,
Container parent,
int options)
This will add the frame to the container and call a make() on it. |
static void |
takeFocus(Control c,
int how)
This tells the Gui to assign focus to a particular control. |
static Frame |
topFrame(Control who)
|
static Rect |
visibleWindowClientArea(Control who)
This returns the area on the Window of the control that is not obscured by the SIP. |
static Frame |
windowFrame(Control who)
This returns the very top frame in a window. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, toString |
| Field Detail |
public static boolean NullParentFrameToMainApp
public static Rect fullScreen
public static boolean sendFrameOnTopEvents
public static final int CENTER_FRAME
public static final int FILL_FRAME
public static final int FILL_WIDTH
public static final int FILL_HEIGHT
public static final int NEW_WINDOW
public static final int PUTTING_POPUP
public static boolean dontPaintNextFrame
protected static Vector inFocus
public static Rect screenSize
Rect s = (Rect)Window.getGuiInfo(Window.INFO_SCREEN_RECT,null,new Rect(),0);
public static final int BIG_SCREEN
public static final int WIDE_SCREEN
public static final int LONG_SCREEN
public static final int DESKTOP_SCREEN
public static final int DESKTOP_WIDTH
public static final int DESKTOP_HEIGHT
public static final int PDA_SCREEN
public static Rect rp
public static final int STYLE_ETCHED
public static final int STYLE_3D
public static final int STYLE_SOFT
public static final int STYLE_PALM
public static boolean hasMousePointer
public static boolean hasPen
public static boolean hasKeyboard
public static boolean isSmartPhone
public static boolean isPDA
public static boolean noHotLabels
but you can change it as you wish.
public static final int FLASH_BEEP
| Constructor Detail |
public Gui()
| Method Detail |
public static Rect getSize(FontMetrics fm,
String st,
int xGap,
int yGap)
public static Rect getSize(FontMetrics fm,
String[] lines,
int xGap,
int yGap)
public static Rect getAverageSize(FontMetrics fm,
int rows,
int columns,
int xGap,
int yGap)
public static Point centerText(FontMetrics fm,
String st,
int width,
int height)
public static Frame topFrame(Control who)
public static Frame windowFrame(Control who)
public static Rect visibleWindowClientArea(Control who)
public static void frameOnTop(Control c)
public static Control focusedControl()
protected static void doExecFrame(Frame f,
Container parent,
int options)
public static void hideFrame(Frame f)
public static SavedScreen saveScreen(Window w,
Rect area,
boolean doCapture)
public static Rect getRectInWindow(Control ct,
Rect dest,
boolean onlyIfVisible)
public static Rect getRectInWindow(Control ct,
Rect dest,
boolean onlyIfVisible,
Point actualPosition)
public static Rect getAppRect(Control ct,
Rect dest)
public static Rect getAppRect(Control ct)
public static void captureControl(Control ct,
Graphics dest,
Rect dim)
public static void removeFrom(Container c,
Control ctrl)
public static boolean pressedOutsideTopFrame(Control onWho,
Point whereOnWho)
protected static Container setupNewWindow(Frame f,
Container parent,
boolean modal)
public static void setNoMultipleWindows()
public static Frame getPopupMenuParentFrame(Control c)
public static void setAllParentFrame(Frame f)
public static boolean closePopups(Control window)
window - Either the window or a Control within the window.
public static boolean closePopups(Control window,
int why,
int flags)
protected static Container checkParent(Container parent,
int options)
public static void execFrame(Frame f,
Container parent,
int options)
public static int fixShowOptions(Container parent,
int options)
public static void showFrame(Frame f,
Container parent,
int options)
public static void execFrame(Frame f,
Container parent)
public static void showFrame(Frame f,
Container parent)
public static Point getPosInParent(Control c,
Container parent)
public static void takeFocus(Control c,
int how)
c - The control to receive the focus, or null to remove the focus altogether.how - Should be Control.ByRequest for a programmatic focus change. But it can also be:
Control.ByKeyboard, Control.ByMouse, Control.ByPen (same as ByMouse), Control.ByFrameChange.
public static void moveFrameTo(Frame f,
Rect where)
public static void refreshScreen(Window w)
public static void refreshScreen(Window w,
Rect area)
public static void refreshScreen(Control c)
public static void screenResized(int width,
int height)
public static void setAppFormTitle(Form form,
String title)
public static void setFormTitle(Window w,
Form form,
String title)
public static void setOKCancel(Form f)
public static boolean iconize(Control c,
String image,
Object maskOrColor,
boolean leaveText,
FontMetrics fm)
public static boolean iconize(Control c,
IImage image,
boolean leaveText,
FontMetrics fm)
public static boolean isWindowFrame(Frame f)
public static Dimension getPreferredDialogSize()
public static boolean screenIs(int flags)
flags - One of the XXX_SCREEN or DESKTOP_XXX constants.
public static boolean requestPaint(Control who)
public static void refreshTopFrame(Control who)
public static final void setStyle(int style)
style - STYLE_ETCHED or STYLE_3Dpublic static final char getHotKeyFrom(String text)
text - The text for the control with the included hotkey.
public static final String getTextFrom(String text)
text - The text for the control with the included hotkey.
public static final String makeHot(String label,
int hotKey)
label - The pure String.hotKey - The hotkey (if any) to apply to the String.
public static final String makeHot(String label)
label - The '$' formatted hotkey.
public static Graphics getGraphics(Window window)
public static boolean setStyleManager(StyleManager manager)
manager - The StyleManager to use.
UnsupportedOperationException - if a pluggable look and feel style manager is not supported
on this VM.public static StyleManager getStyleManager()
public static int decodeAnchor(String specs)
public static int decodeAlignment(String specs)
public static int getGuiFlags()
public static void relayoutFrameAndWindow(Frame f,
boolean overrideMaximize)
f - The Frame to relayout - which usually is obtained by calling getFrame() on a Form
or other control.overrideMaximize - if this is true then the relayout will occur even if the Window
is in a maximized or minimized state.
public static Object flashMessageOn(String message,
Control parent)
message - A single-line message to display.parent - The parent Control.
public static void flashMessageOff(Object message)
message - The object returned by flashMessageOn().
public static void flashMessage(String message,
Control parent)
public static void flashMessage(String message,
int timeInMillis,
Control parent,
int flash_options)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||