|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
totalcross.lang.Objecttotalcross.ui.gfx.GfxSurface
totalcross.ui.Control
totalcross.ui.Container
totalcross.ui.Window
totalcross.ui.MainWindow
totalcross.io.sync.Conduit
public abstract class Conduit
This class allows you to automatically synchronize files between your device and the desktop. Currently it supports only WinCE and PalmOS devices, and desktops with Windows 2000+. It is also required that you have installed the synchronization software provided by the device manufacturer. (Refer to the TotalCross Companion for more details)
This is the conduit's MainWindow. Two methods will be called at different times:
| Field Summary | |
|---|---|
protected String |
conduitName
|
int |
syncTarget
Defines the target platform for synchronization. |
protected String |
targetApplicationId
|
protected String |
targetAppPath
|
static int |
TARGETING_ALL
|
static int |
TARGETING_PALMOS
|
static int |
TARGETING_WINCE
|
| Fields inherited from class totalcross.ui.MainWindow |
|---|
timers |
| Fields inherited from class totalcross.ui.Container |
|---|
alwaysEraseBackground, BORDER_LOWERED, BORDER_NONE, BORDER_RAISED, BORDER_SIMPLE, children, controlFound, finishedStart, ignoreOnAddAgain, ignoreOnRemove, insets, lastH, lastScreenWidth, lastW, nextTransitionEffect, started, tabOrder, tail, TRANSITION_CLOSE, TRANSITION_NONE, TRANSITION_OPEN, transitionEffect |
| Fields inherited from class totalcross.ui.Control |
|---|
AFTER, appId, appObj, asContainer, asWindow, backColor, BEFORE, BOTTOM, BOTTOM_OF, CENTER, CENTER_OF, clearValueInt, clearValueStr, enabled, enableUpdateScreen, FILL, FIT, fm, fmH, focusHandler, focusLess, focusOnPenDown, focusTraversable, font, foreColor, height, isHighlighting, KEEP, LEFT, onEventFirst, parent, PREFERRED, RANGE, repositionAllowed, RIGHT, RIGHT_OF, SAME, setFont, setH, setRel, setW, setX, setY, TOP, transparentBackground, uiCE, uiFlat, uiPalm, uiVista, visible, width, WILL_RESIZE, x, y |
| Constructor Summary | |
|---|---|
Conduit(String conduitName,
String targetApplicationId,
String targetAppPath,
byte style)
Creates a conduit with a title and a border. |
|
| Method Summary | |
|---|---|
protected abstract void |
doConfig()
Called when the user wants to configure this conduit. |
protected abstract void |
doSync()
Called when the synchronization is started. |
void |
initUI()
A commandline parameter must be passed in order to invoke actions on this conduit: /r{target platform} register conduit. |
static boolean |
isSyncingEnabled()
Returns wether the conduit is enabled or not. |
static void |
log(String text)
When synchronizing PalmOS devices, logs the given text on the HotSync log. |
void |
onEvent(Event e)
Called to process key, pen, control and other posted events. |
protected void |
onRegister()
Called when the conduit is registered. |
protected void |
onUnregister()
Called when the conduit is unregistered. |
static void |
setConduitRect(int x,
int y,
int w,
int h,
boolean config)
Sets the conduit's position and size when it is opened. |
static void |
setSyncingEnabled(boolean enable)
Enables or disables the conduit execution. |
static void |
yield()
This method lets the conduit manager take a breath. |
| Methods inherited from class totalcross.ui.MainWindow |
|---|
_onTimerTick, addTimer, addTimer, appEnding, appStarting, exit, getCommandLine, getDefaultFont, getMainWindow, minimize, onExit, onMinimize, onRestore, removeTimer, restore, setDefaultFont, setRect, setUIStyle |
| Methods inherited from class totalcross.ui.Container |
|---|
add, add, add, add, add, broadcastEvent, clear, findChild, findNearestChild, findNextFocusControl, getChildren, getFocusableControls, getInsets, incLastX, incLastY, onAddAgain, onColorsChanged, onPaint, onRemove, paintChildren, remove, removeAll, setEnabled, setHighlighting, setInsets, swapToTopmostWindow |
| Methods inherited from class totalcross.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface totalcross.MainClass |
|---|
_postEvent |
| Field Detail |
|---|
public static final int TARGETING_WINCE
public static final int TARGETING_PALMOS
public static final int TARGETING_ALL
public int syncTarget
TARGETING_WINCE,
TARGETING_PALMOS,
TARGETING_ALLprotected String conduitName
protected String targetApplicationId
protected String targetAppPath
| Constructor Detail |
|---|
public Conduit(String conduitName,
String targetApplicationId,
String targetAppPath,
byte style)
| Method Detail |
|---|
public final void initUI()
initUI in class Containerpublic void onEvent(Event e)
Control
onEvent in class Controle - the event to processEvent,
KeyEvent,
PenEventpublic static void log(String text)
public static void yield()
protected abstract void doSync()
protected abstract void doConfig()
public static void setSyncingEnabled(boolean enable)
Note that disabling a conduit is NOT the same as unregistering.
public static boolean isSyncingEnabled()
public static void setConduitRect(int x,
int y,
int w,
int h,
boolean config)
setConduitRect(-2,-2,320,320,false);
x - Absolute position on screen, or -1 to use default, or -2 to center.y - Absolute position on screen, or -1 to use default, or -2 to center.w - The width of the window (usually 240 or 320)h - The height of the window (usually 320)config - If true, you are passing the bounds for when the config is being called; if false, is the bounds used when synchronizing.protected void onRegister()
protected void onUnregister()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||