|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectewe.ui.ControlBase
ewe.ui.Control
ewe.ui.Container
ewe.ui.Window
ewe.ui.TaskbarWindow
This is a window that you can use to place and react to an icon in the taskbar under Win32. The window will be invisible but can receive mouse press events when the icon is pressed. Override iconPressed() to handle the event (by default it will bring the application to the front).
Note that all icons are specified as Objects and not any kind of Image or IImage. This is because the icon must be a native icon as created by Image.toIcon(Image mask). This method converts an image to a native icon using a mask Image. That mask Image must have been loaded as a monochrome .bmp file otherwise this will not work correctly under Win32.
| Nested Class Summary |
| Nested classes inherited from class ewe.ui.Window |
Window.TaskBarIconInfo |
| Field Summary | |
protected Handle |
animation
|
protected Object |
currentIcon
|
Hashtable |
icons
The icons are stored in here. |
| Fields inherited from class ewe.ui.Window |
_controlEvent, _keyEvent, _penEvent, _sipEvent, canDisplay, closeLock, contents, creationData, currentCursor, downPoint, dragAndDropCursor, dragAndDropData, dragAndDropSource, firstDisplay, inEventThread, inFront, lastWindow, wasPainted |
| Fields inherited from class ewe.ui.Container |
closedFocus, cycleFocus, dontAutoScroll, dontFocusOnChildren |
| Fields inherited from class ewe.ui.Control |
_debug, backGround, beforeRemoved, borderColor, borderStyle, borderWidth, children, columns, constraints, DoPaintMethod, dragging, dragResolution, dragTime, exitKeys, fieldTransfer, font, foreGround, haveNativePaint, height, holdDownPause, holdTick, hotKey, image, lastSelected, listeners, maxHeight, maxWidth, menuState, minHeight, minWidth, modifiers, MyClass, name, next, np, parent, penStatus, popupSound, popupSoundClip, preferredHeight, preferredWidth, prev, prompt, promptControl, rows, ss, standardBorder, standardEdge, startDragResolution, tags, tail, text, toolTip, width, x, y |
| Fields inherited from class ewe.ui.ControlBase |
clipItems, clipObject, clipOwner, curPoint, currentPenEvent, debugControl, debugFlag, DidHoldDown, doubleBuffer, doubleClickTime, firstPress, globalDrawFlat, globalEditable, globalEnabled, globalPalmStyle, globalSmallControls, GotPenDown, PenIsOn, pressPoint, TAG_LAST_USER_DATA, TAG_USER_DATA, TAKE_FIRST_PRESS, unnamed, useNativeTextInput |
| Fields inherited from interface ewe.fx.ISurface |
IMAGE_SURFACE, PRINTERJOB_SURFACE, WINDOW_SURFACE |
| 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 |
| Fields inherited from interface ewe.fx.ImageRefresher |
KEEP_VISIBLE |
| Constructor Summary | |
TaskbarWindow(String title)
Create a new TaskbarWindow with a specific title. |
|
TaskbarWindow(String title,
Dimension imageSizeIfNotSupported,
int textLengthIfNotSupported)
This creates a new TaskbarWindow, but if Taskbar icons are not supported, then a window will be displayed that will display the icon and tip. |
|
TaskbarWindow(String title,
Object icon,
String tip)
Create a TaskbarWindow with a specific icon and tip. |
|
TaskbarWindow(String title,
String pathOfImageFile,
String pathOfImageMask,
String tip)
This creates a TaskbarWindow, which then immediately shows the specified icon and tip. |
|
| Method Summary | |
boolean |
addIcon(String name,
Object icon)
|
boolean |
addIcon(String name,
String pathOfImageFile,
String pathOfImageMask)
|
Handle |
animate(String iconsAndTimes,
String tip)
Animate the icon on the taskbar. |
boolean |
clearIcon()
|
boolean |
close()
This closes the window and destroys the native Window component. |
Object |
getIcon()
Get an object representing the of the icon and tip currently displayed. |
static void |
main(String[] args)
|
void |
restoreIcon(Object was)
Restore the icon according to the value that was returned by getIcon(). |
boolean |
setIcon(String name)
|
boolean |
setIconAndTip(String name,
String tip)
|
boolean |
setTip(String tip)
|
void |
stopAnimation()
|
static boolean |
supportsTaskbar()
Call this to find out if the current platform supports showing an icon in the Taskbar. |
| Methods inherited from class ewe.ui.Container |
_paintChildren, add, addDirectly, containerHasFocus, dismantle, dismantle, doHotKey, findChild, focusFirst, focusFirst, focusOnContainer, focusOnData, getChildren, getChildrenBackwards, getFirstFocus, getNextKeyFocus, gotFocus, lostFocus, remove, removeAll, repaintDataNow, scrollToVisible, takeFocus, takePromptControl |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode |
| Field Detail |
public Hashtable icons
protected Object currentIcon
protected Handle animation
| Constructor Detail |
public TaskbarWindow(String title)
public TaskbarWindow(String title,
Dimension imageSizeIfNotSupported,
int textLengthIfNotSupported)
public TaskbarWindow(String title,
String pathOfImageFile,
String pathOfImageMask,
String tip)
title - The title for the window. This will not be displayed since it is invisible.pathOfImageFile - image file (must be a ".bmp")pathOfImageMask - image mask (must be a monochrome ".bmp")tip - An optional tip to display.
public TaskbarWindow(String title,
Object icon,
String tip)
title - The title to display.icon - The icon as returned by Image.toIcon(Image mask).tip - A tip to display along with the icon.| Method Detail |
public static boolean supportsTaskbar()
public boolean close()
Window
close in class Window
public boolean addIcon(String name,
String pathOfImageFile,
String pathOfImageMask)
public boolean addIcon(String name,
Object icon)
public Object getIcon()
public void restoreIcon(Object was)
was - The value returned by getIcon().public boolean setIcon(String name)
public boolean setTip(String tip)
public boolean setIconAndTip(String name,
String tip)
public boolean clearIcon()
public void stopAnimation()
public Handle animate(String iconsAndTimes,
String tip)
iconsAndTimes - Concatenation of icon names and pause times in milliseconds, separated by '|' characters. e.g.
"icon1|250|icon2|500|icon3|100"
public static void main(String[] args)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||