Ejemplo n.º 1
0
def use(scr=None, remote=False, fromWith=False):
    global SCREEN
    if remote or fromWith:
        theGlobals = inspect.currentframe().f_back.f_back.f_globals
    else:
        theGlobals = inspect.currentframe().f_back.f_globals
    global remoteScreen
    if remoteScreen:
        remoteScreen.close()
        remoteScreen = None
    if not scr:
        newScreen = JScreen()
    else:
        newScreen = scr
    if (newScreen.isValid()):
        SCREEN = newScreen
        Debug.log(3,
                  "Jython: use as default region: " + SCREEN.toStringShort())
        globals()['SIKULISAVED'] = _exposeAllMethods(
            SCREEN,
            globals().get('SIKULISAVED'), theGlobals, None)
        #Debug.log(3, "Jython: after _exposeAllMethods");
        theGlobals['SCREEN'] = SCREEN
        if remote:
            remoteScreen = SCREEN
    return SCREEN
Ejemplo n.º 2
0
 def __init__(self, id=None):
     if id != None:
         r = JScreen.getBounds(id)
     else:
         r = JScreen().getBounds()
     (x, y, w, h) = (int(r.getX()), int(r.getY()), \
                     int(r.getWidth()), int(r.getHeight()))
     Region.__init__(self, x, y, w, h)
Ejemplo n.º 3
0
def use(scr=None, remote=False):
    global SCREEN
    if remote:
        theGlobals = inspect.currentframe().f_back.f_back.f_globals
    else:
        theGlobals = inspect.currentframe().f_back.f_globals
    global remoteScreen
    if remoteScreen:
        remoteScreen.close()
        remoteScreen = None
    if not scr:
        SCREEN = JScreen()
    else:
        SCREEN = scr
    Debug.log(
        3, "Jython: requested to use as default region: " +
        SCREEN.toStringShort())
    globals()['SIKULISAVED'] = _exposeAllMethods(SCREEN,
                                                 globals().get('SIKULISAVED'),
                                                 theGlobals, None)
    theGlobals['SCREEN'] = SCREEN
    if remote:
        remoteScreen = SCREEN
    return SCREEN