|
||||||||||
| 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.MainWindow
ewe.ui.mApp
ewe.io.SyncApp
This is a class which does all the "hard" work to get the mobile and desktop sides of an application connected. It allows you to use the EweSync Emulator when developing and testing your application, and then move smoothly to the real EweSync. In order for it to work correctly you must follow these steps.
1. Create a new directory for your application (e.g. MyApp). 2. Create a classes subdirectory within this application (e.g. MyApp/classes) 3. Place all your applications classes and packages within this classes directory. 4. When running the desktop side of your application do: ewe /d ./ myDesktopAppClass 5. When running the mobile side of your application do: ewe /d ./ /r myMobileAppClass
The '/r' option tells the ewe VM to act as if it were running on a mobile pc. You will have to ensure that the mobile and desktop applications do not conflict when running at the same time. Probably best done by keeping the data in different directories.
To synchronize over the Emulator you will have to write a class which inherits from SyncApp and then implement mobileConnected() and desktopConnected(). To run the synch app over the emulator you would run:
ewe /d ./ mySyncApp
Where mySyncApp has inherited from SyncApp. Running this will cause it to automatically run mySyncApp again, but this time with the '/r' option. Once both are running a connection will be made and the mobileConnected() method gets called on the app run with /r and the desktopConnected() gets called on the original app.
Once you are statisfied that the synchronization is working correctly on the desktop, you are ready to move it to the mobile and test the synchronization over a true Desktop-Mobile connection. To do this your mySyncApp class must set the "remoteApp" member in its constructor. This should be set to the full path of the location of the application ewe file on the mobile. This will get called when the sync application starts on the desktop.
Next create your ewe file to hold your application (e.g. MyApp.ewe). Put your ewe file in the application directory on the desktop. Then also put it on the mobile in the directory which you specified as in "remoteApp" described above.
Now, in order to synchronize, you must make sure that your mobile is connected and the true EweSync is running. In order to synchronize you must now run:
ewe mySyncApp MyApp.ewe
This should then connect across the EweSync connection. If there are any problems, an error message box will be displayed.
| Nested Class Summary |
| Nested classes inherited from class ewe.ui.Window |
Window.TaskBarIconInfo |
| Field Summary | |
protected int |
connectTimeout
|
boolean |
isMobile
|
protected String |
remoteApp
|
protected boolean |
remoteAppIsEwe
|
protected String |
remoteParameters
|
protected String |
serviceName
|
boolean |
usingClasses
|
| Fields inherited from class ewe.ui.mApp |
appFrame, checkMonochrome, counterRotated, guiFont, lastEvent, mainApp, mainMethod, monoMode, myGraphics, platform, programArguments, ROTATE_CLOCKWISE, ROTATE_COUNTER_CLOCKWISE, ROTATE_NORMAL, rotated, runClass, runObject, taskbarIcon, taskbarWindow, tickTime, vmOptions, windowFlagsToClear, windowFlagsToSet, windowInitiallyVisible, windowRect, windowTitle |
| Fields inherited from class ewe.ui.MainWindow |
defaultFont |
| 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 | |
SyncApp()
|
|
| Method Summary | |
protected abstract void |
desktopConnected(Socket toMobile)
|
protected abstract void |
mobileConnected(Socket toDesktop)
|
void |
run()
|
| Methods inherited from class ewe.ui.mApp |
action, addFont, cancelTimer, canClose, canExit, changeMonoMode, closeMobileApp, doPaint, fieldChanged, fieldEvent, findFont, findFont, fontsChanged, fullSetup, getFonts, getGraphics, isLocked, onEvent, onStart, requestTick, requestTimer, rotateScreen, runApplet, runApplet, setRect, setRunObject, setup, setupFonts, setupMainWindow, show, showStartMessage, sizeToFit, startup, tryExit |
| Methods inherited from class ewe.ui.MainWindow |
_onTimerTick, _setTimerInterval, addTimer, exit, getFontMetrics, getMainWindow, onExit, removeTimer |
| 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 boolean isMobile
public boolean usingClasses
protected boolean remoteAppIsEwe
protected String remoteApp
protected String remoteParameters
protected int connectTimeout
protected String serviceName
| Constructor Detail |
public SyncApp()
| Method Detail |
public void run()
run in interface Runnablerun in class mAppprotected abstract void mobileConnected(Socket toDesktop)
protected abstract void desktopConnected(Socket toMobile)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||