def __init__(self, **ka):
        ka['StyleName'] = ka.get('StyleName', "gwt-Tree")

        self.root = None
        self.childWidgets = Set()
        self.curSelection = None
        self.focusable = None
        self.focusListeners = []
        self.mouseListeners = []
        self.imageBase = pygwt.getModuleBaseURL()
        self.keyboardListeners = []
        self.listeners = []
        self.lastEventType = ""

        element = ka.pop('Element', None) or DOM.createDiv()
        self.setElement(element)
        DOM.setStyleAttribute(self.getElement(), "position", "relative")
        self.focusable = Focus.createFocusable()
        # Hide focus outline in Mozilla/Webkit/Opera
        DOM.setStyleAttribute(self.focusable, "outline", "0px")
        # Hide focus outline in IE 6/7
        DOM.setElemAttribute(self.focusable, "hideFocus", "true")

        DOM.setStyleAttribute(self.focusable, "fontSize", "0")
        DOM.setStyleAttribute(self.focusable, "position", "absolute")
        DOM.setIntStyleAttribute(self.focusable, "zIndex", -1)
        DOM.appendChild(self.getElement(), self.focusable)

        self.root = RootTreeItem()
        self.root.setTree(self)

        Widget.__init__(self, **ka)

        self.sinkEvents(Event.ONMOUSEDOWN | Event.ONCLICK | Event.KEYEVENTS)
        DOM.sinkEvents(self.focusable, Event.FOCUSEVENTS)
Ejemplo n.º 2
0
    def __init__(self, min_value, max_value, start_value=None, step=None,
                       **kwargs):

        if not kwargs.has_key("StyleName"): kwargs['StyleName'] = "gwt-VerticalSlider"

        if kwargs.has_key('Element'):
            # XXX FIXME: Focus.createFocusable is here for a reason...
            element = kwargs.pop('Element')
        else:
            element = Focus.createFocusable()
        DOM.setStyleAttribute(element, "position", "relative")
        DOM.setStyleAttribute(element, "overflow", "hidden")

        self.handle = DOM.createDiv()
        DOM.appendChild(element, self.handle)

        DOM.setStyleAttribute(self.handle, "border", "1px")
        DOM.setStyleAttribute(self.handle, "width", "100%")
        DOM.setStyleAttribute(self.handle, "height", "10px")
        DOM.setStyleAttribute(self.handle, "backgroundColor", "#808080")

        Control.__init__(self, element, min_value, max_value, start_value, step,
                               **kwargs)

        self.addClickListener(self)
        self.addFocusListener(self)
        self.addMouseListener(self)
Ejemplo n.º 3
0
    def __init__(self, **ka):
        ka['StyleName'] = ka.get('StyleName', "gwt-Tree")

        self.root = None
        self.childWidgets = Set()
        self.curSelection = None
        self.focusable = None
        self.focusListeners = []
        self.mouseListeners = []
        self.imageBase = pygwt.getModuleBaseURL()
        self.keyboardListeners = []
        self.listeners = []
        self.lastEventType = ""

        element = ka.pop('Element', None) or DOM.createDiv()
        self.setElement(element)
        DOM.setStyleAttribute(self.getElement(), "position", "relative")
        self.focusable = Focus.createFocusable()
        # Hide focus outline in Mozilla/Webkit/Opera
        DOM.setStyleAttribute(self.focusable, "outline", "0px")
        # Hide focus outline in IE 6/7
        DOM.setElemAttribute(self.focusable, "hideFocus", "true");

        DOM.setStyleAttribute(self.focusable, "fontSize", "0")
        DOM.setStyleAttribute(self.focusable, "position", "absolute")
        DOM.setIntStyleAttribute(self.focusable, "zIndex", -1)
        DOM.appendChild(self.getElement(), self.focusable)

        self.root = RootTreeItem()
        self.root.setTree(self)

        Widget.__init__(self, **ka)

        self.sinkEvents(Event.ONMOUSEDOWN | Event.ONCLICK | Event.KEYEVENTS)
        DOM.sinkEvents(self.focusable, Event.FOCUSEVENTS)
Ejemplo n.º 4
0
    def __init__(self, min_value, max_value,
                 start_value=None, step=None,
                 **kwargs):

        if not kwargs.has_key("StyleName"):
            kwargs['StyleName'] = "gwt-VerticalSlider"

        if kwargs.has_key('Element'):
            # XXX FIXME: Focus.createFocusable is here for a reason...
            element = kwargs.pop('Element')
        else:
            element = Focus.createFocusable()
        DOM.setStyleAttribute(element, "position", "relative")
        DOM.setStyleAttribute(element, "overflow", "hidden")

        self.handle = DOM.createDiv()
        DOM.appendChild(element, self.handle)

        self.setHandleStyle("1px", "100%", "10px", "#808080")

        # must use DoubleControl; otherwise, this init is = Vertical init,
        # plus a change in the handle style
        # this should be refactored, so that the AreaSlider
        # can be built on VerticalSlider
        DoubleControl.__init__(self, element, min_value, max_value,
                               start_value, step,
                               **kwargs)

        self.addClickListener(self)
        self.addFocusListener(self)
        self.addMouseListener(self)

        #Redefine VDS's styles for handle
        self.setHandleStyle("1px", "10px", "10px", "#808080")
Ejemplo n.º 5
0
    def __init__(self, width=0, height=0):
        Widget.__init__(self)
        self.context = None
        
        self.setElement(DOM.createDiv())
        canvas = DOM.createElement("canvas")
        self.setWidth(width)
        self.setHeight(height)
        
        canvas.width=width
        canvas.height=height
        
        DOM.appendChild(self.getElement(), canvas)
        self.setStyleName("gwt-Canvas")
        
        self.init()
        
        self.context.fillStyle = "black"
        self.context.strokeStyle = "black"

        self.focusable = None
        self.focusable = Focus.createFocusable()
        
        self.focusListeners = []
        self.clickListeners = []
        self.mouseListeners = []
        self.keyboardListeners = []
        
        DOM.appendChild(self.getElement(), self.focusable)
        DOM.sinkEvents(canvas, Event.ONCLICK | Event.MOUSEEVENTS | DOM.getEventsSunk(canvas))
        DOM.sinkEvents(self.focusable, Event.FOCUSEVENTS | Event.KEYEVENTS)
Ejemplo n.º 6
0
    def __init__(self,
                 min_value,
                 max_value,
                 start_value=None,
                 step=None,
                 **kwargs):

        if not kwargs.has_key("StyleName"):
            kwargs['StyleName'] = "gwt-VerticalSlider"

        if kwargs.has_key('Element'):
            # XXX FIXME: Focus.createFocusable is here for a reason...
            element = kwargs.pop('Element')
        else:
            element = Focus.createFocusable()
        DOM.setStyleAttribute(element, "position", "relative")
        DOM.setStyleAttribute(element, "overflow", "hidden")

        self.handle = DOM.createDiv()
        DOM.appendChild(element, self.handle)

        DOM.setStyleAttribute(self.handle, "border", "1px")
        DOM.setStyleAttribute(self.handle, "width", "100%")
        DOM.setStyleAttribute(self.handle, "height", "10px")
        DOM.setStyleAttribute(self.handle, "backgroundColor", "#808080")

        Control.__init__(self, element, min_value, max_value, start_value,
                         step, **kwargs)

        self.addClickListener(self)
        self.addFocusListener(self)
        self.addMouseListener(self)
    def __init__(self,
                 min_value,
                 max_value,
                 start_value=None,
                 step=None,
                 **ka):

        ka["StyleName"] = ka.get('StyleName', "gwt-VerticalSlider")

        # XXX FIXME: Focus.createFocusable is here for a reason...
        element = ka.pop('Element', None) or Focus.createFocusable()
        DOM.setStyleAttribute(element, "position", "relative")
        DOM.setStyleAttribute(element, "overflow", "hidden")

        self.handle = DOM.createDiv()
        DOM.appendChild(element, self.handle)

        self.setHandleStyle("1px", "100%", "10px", "#808080")

        Control.__init__(self, element, min_value, max_value, start_value,
                         step, **ka)

        self.addClickListener(self)
        self.addFocusListener(self)
        self.addMouseListener(self)
Ejemplo n.º 8
0
    def __init__(self, **kwargs):
        """ pass in Widget={the widget} so that Applier will call setWidget.  
        """

        SimplePanel.__init__(self, Focus.createFocusable(), **kwargs)
        FocusHandler.__init__(self)
        KeyboardHandler.__init__(self)
        ClickHandler.__init__(self)
        MouseHandler.__init__(self)
Ejemplo n.º 9
0
    def __init__(self, **kwargs):
        """ pass in Widget={the widget} so that Applier will call setWidget.  
        """

        SimplePanel.__init__(self, Focus.createFocusable(), **kwargs)
        FocusHandler.__init__(self)
        KeyboardHandler.__init__(self)
        ClickHandler.__init__(self)
        MouseHandler.__init__(self)
Ejemplo n.º 10
0
    def __init__(self, child=None):

        SimplePanel.__init__(self, Focus.createFocusable())

        FocusHandler.__init__(self)
        KeyboardHandler.__init__(self)
        ClickHandler.__init__(self)
        MouseHandler.__init__(self)

        if child:
            self.setWidget(child)
Ejemplo n.º 11
0
    def __init__(self,
                 coordX=None,
                 coordY=None,
                 pixelX=None,
                 pixelY=None,
                 **kwargs):
        """
        Creates an SVGCanvas element. Element type is 'svg'

        @param coordX the size of the coordinate space in the x direction
        @param coordY the size of the coordinate space in the y direction
        @param pixelX the CSS width in pixels of the canvas element
        @param pixelY the CSS height in pixels of the canvas element
        """

        # init default coordinates/size
        self.pixelHeight = 150
        self.pixelWidth = 300
        self.coordHeight = self.pixelHeight
        self.coordWidth = self.pixelWidth
        focusable = Focus.createFocusable()
        self.canvas = self._createElementSVG("svg")

        # create an empty defs element
        self.defs = self._createElementSVG("defs")
        # and add it to the canvas
        DOM.appendChild(self.canvas, self.defs)
        # now add canvas to container
        DOM.appendChild(focusable, self.canvas)

        # init base widget (invokes settables)
        FocusWidget.__init__(self, focusable, **kwargs)

        # since the Applier class provides settable access,
        # we only override the dimensions if user actually
        # provided them as keyword args
        if pixelX is not None:
            self.setPixelWidth(pixelX)
        if pixelY is not None:
            self.setPixelHeight(pixelY)
        if coordX is not None:
            self.setCoordWidth(coordX)
        if coordY is not None:
            self.setCoordHeight(coordY)

        # init styles context stack
        self.ctx_stack = []
        # init current context
        self._init_context()

        # insure we clear/init the canvas
        self.clear()
Ejemplo n.º 12
0
    def moveFocus(self, selection):
        focusableWidget = selection.getFocusableWidget()
        if focusableWidget is not None:
            focusableWidget.setFocus(True)
            DOM.scrollIntoView(focusableWidget.getElement())
        else:
            selectedElem = selection.getContentElem()
            containerLeft = self.getAbsoluteLeft()
            containerTop = self.getAbsoluteTop()

            left = DOM.getAbsoluteLeft(selectedElem) - containerLeft
            top = DOM.getAbsoluteTop(selectedElem) - containerTop
            width = DOM.getIntAttribute(selectedElem, "offsetWidth")
            height = DOM.getIntAttribute(selectedElem, "offsetHeight")

            DOM.setIntStyleAttribute(self.focusable, "left", "%spx" % left)
            DOM.setIntStyleAttribute(self.focusable, "top", "%spx" % top)
            DOM.setIntStyleAttribute(self.focusable, "width", "%spx" % width)
            DOM.setIntStyleAttribute(self.focusable, "height", "%spx" % height)

            DOM.scrollIntoView(self.focusable)
            Focus.focus(self.focusable)
Ejemplo n.º 13
0
    def moveFocus(self, selection):
        focusableWidget = selection.getFocusableWidget()
        if focusableWidget is not None:
            focusableWidget.setFocus(True)
            DOM.scrollIntoView(focusableWidget.getElement())
        else:
            selectedElem = selection.getContentElem()
            containerLeft = self.getAbsoluteLeft()
            containerTop = self.getAbsoluteTop()

            left = DOM.getAbsoluteLeft(selectedElem) - containerLeft
            top = DOM.getAbsoluteTop(selectedElem) - containerTop
            width = DOM.getIntAttribute(selectedElem, "offsetWidth")
            height = DOM.getIntAttribute(selectedElem, "offsetHeight")

            DOM.setIntStyleAttribute(self.focusable, "left", left)
            DOM.setIntStyleAttribute(self.focusable, "top", top)
            DOM.setIntStyleAttribute(self.focusable, "width", width)
            DOM.setIntStyleAttribute(self.focusable, "height", height)

            DOM.scrollIntoView(self.focusable)
            Focus.focus(self.focusable)
Ejemplo n.º 14
0
    def __init__(self, coordX=None, coordY=None, pixelX=None, pixelY=None,
                       **kwargs):
        """
        Creates an SVGCanvas element. Element type is 'svg'

        @param coordX the size of the coordinate space in the x direction
        @param coordY the size of the coordinate space in the y direction
        @param pixelX the CSS width in pixels of the canvas element
        @param pixelY the CSS height in pixels of the canvas element
        """

        # init default coordinates/size
        self.pixelHeight = 150
        self.pixelWidth = 300
        self.coordHeight = self.pixelHeight
        self.coordWidth = self.pixelWidth
        focusable = Focus.createFocusable()
        self.canvas = self._createElementSVG("svg")

        # create an empty defs element
        self.defs = self._createElementSVG("defs")
        # and add it to the canvas
        DOM.appendChild(self.canvas, self.defs)
        # now add canvas to container
        DOM.appendChild(focusable, self.canvas)

        # init base widget (invokes settables)
        FocusWidget.__init__(self, focusable, **kwargs)

        # since the Applier class provides settable access,
        # we only override the dimensions if user actually
        # provided them as keyword args
        if pixelX is not None:
            self.setPixelWidth(pixelX)
        if pixelY is not None:
            self.setPixelHeight(pixelY)
        if coordX is not None:
            self.setCoordWidth(coordX)
        if coordY is not None:
            self.setCoordHeight(coordY)

        # init styles context stack
        self.ctx_stack = []
        # init current context
        self._init_context()

        # insure we clear/init the canvas
        self.clear()
Ejemplo n.º 15
0
    def __init__(self, Width=0, Height=0, **kwargs):
        if not kwargs.has_key('StyleName'):
            kwargs['StyleName'] = 'gwt-Canvas'
        kwargs['Width'] = Width
        kwargs['Height'] = Height

        self.context = None
       
        focusable = Focus.createFocusable() 
        self.canvas = DOM.createElement("canvas")
        DOM.appendChild(focusable, self.canvas)
        FocusWidget.__init__(self, focusable, **kwargs)
        
        self.init()
        
        self.context.fillStyle = "black"
        self.context.strokeStyle = "black"
Ejemplo n.º 16
0
    def __init__(self, Width=0, Height=0, **kwargs):
        if not kwargs.has_key('StyleName'):
            kwargs['StyleName'] = 'gwt-Canvas'
        kwargs['Width'] = Width
        kwargs['Height'] = Height

        self.context = None

        focusable = Focus.createFocusable()
        self.canvas = DOM.createElement("canvas")
        DOM.appendChild(focusable, self.canvas)
        FocusWidget.__init__(self, focusable, **kwargs)

        self.init()

        self.context.fillStyle = "black"
        self.context.strokeStyle = "black"
Ejemplo n.º 17
0
    def __init__(self, coordX=300, coordY=150, pixelX=300, pixelY=150,
                       **kwargs):

        """
        * Impl Instance. Compiler should statify all the methods, so we
        * do not end up with duplicate code for each canvas instance.
        """
        self.impl = self.getCanvasImpl()

        self.coordHeight = 0
        self.coordWidth = 0
        focusable = Focus.createFocusable()
        self.canvas = self.impl.createElement()
        DOM.appendChild(focusable, self.canvas)
        FocusWidget.__init__(self, focusable, **kwargs)

        self.setPixelWidth(pixelX)
        self.setPixelHeight(pixelY)
        self.setCoordSize(coordX, coordY)
Ejemplo n.º 18
0
    def __init__(self, p, child, cDelegate, kDelegate) :

        Composite.__init__(self)

        self.clickDelegate = cDelegate
        self.keyDelegate = kDelegate

        self.focusablePanel = SimplePanel(Focus.createFocusable())
        self.focusablePanel.setWidget(child)
        wrapperWidget = p.createTabTextWrapper()
        if wrapperWidget is None:
            self.initWidget(self.focusablePanel)
        else :
            wrapperWidget.setWidget(self.focusablePanel)
            self.initWidget(wrapperWidget)

        if hasattr(child, "addKeyboardListener"):
            child.addKeyboardListener(kDelegate)

        self.sinkEvents(Event.ONCLICK | Event.ONKEYDOWN)
Ejemplo n.º 19
0
    def __init__(self, p, child, cDelegate, kDelegate) :

        Composite.__init__(self)

        self.clickDelegate = cDelegate
        self.keyDelegate = kDelegate

        self.focusablePanel = SimplePanel(Focus.createFocusable())
        self.focusablePanel.setWidget(child)
        wrapperWidget = p.createTabTextWrapper()
        if wrapperWidget is None:
            self.initWidget(self.focusablePanel)
        else :
            wrapperWidget.setWidget(self.focusablePanel)
            self.initWidget(wrapperWidget)

        if hasattr(child, "addKeyboardListener"):
            child.addKeyboardListener(kDelegate)

        self.sinkEvents(Event.ONCLICK | Event.ONKEYDOWN)
Ejemplo n.º 20
0
    def __init__(self, min_value, max_value, start_value=None, step=None,
                       **ka):

        ka["StyleName"] = ka.get('StyleName', "gwt-VerticalSlider")

        # XXX FIXME: Focus.createFocusable is here for a reason...
        element = ka.pop('Element', None) or Focus.createFocusable()
        DOM.setStyleAttribute(element, "position", "relative")
        DOM.setStyleAttribute(element, "overflow", "hidden")

        self.handle = DOM.createDiv()
        DOM.appendChild(element, self.handle)

        self.setHandleStyle("1px", "100%", "10px", "#808080")

        Control.__init__(self, element, min_value, max_value, start_value,
                         step, **ka)

        self.addClickListener(self)
        self.addFocusListener(self)
        self.addMouseListener(self)
Ejemplo n.º 21
0
 def setTabIndex(self, index):
     Focus.setTabIndex(self.focusable, index)
Ejemplo n.º 22
0
 def setFocus(self, focus):
     if focus:
         Focus.focus(self.focusable)
     else:
         Focus.blur(self.focusable)
Ejemplo n.º 23
0
 def setAccessKey(self, key):
     Focus.setAccessKey(self.focusable, key)
Ejemplo n.º 24
0
 def getTabIndex(self):
     return Focus.getTabIndex(self.focusable)
Ejemplo n.º 25
0
 def setFocus(self, focused):
     if focused:
         Focus.focus(self.inputElem)
     else:
         Focus.blur(self.inputElem)
Ejemplo n.º 26
0
 def setTabIndex(self, index):
     Focus.setTabIndex(self.getElement(), index)
Ejemplo n.º 27
0
 def setTabIndex(self, index):
     Focus.setTabIndex(self.inputElem, index)
Ejemplo n.º 28
0
 def setTabIndex(self, index):
     Focus.setTabIndex(self.focusable, index)
Ejemplo n.º 29
0
 def setFocus(self, focus):
     if focus:
         Focus.focus(self.focusable)
     else:
         Focus.blur(self.focusable)
Ejemplo n.º 30
0
 def setAccessKey(self, key):
     Focus.setAccessKey(self.focusable, key)
Ejemplo n.º 31
0
 def getTabIndex(self):
     return Focus.getTabIndex(self.focusable)
Ejemplo n.º 32
0
    def __init__(self, upImageText=None, downImageText=None, listener=None,
                       **kwargs):
        """Constructor for CustomButton."""

        if not kwargs.has_key('StyleName'):
            kwargs['StyleName']=self.STYLENAME_DEFAULT
        if kwargs.has_key('Element'):
            # XXX FIXME: createFocusable is used for a reason...
            element = kwargs.pop('Element')
        else:
            element = Focus.createFocusable()
        ButtonBase.__init__(self, element, **kwargs)

        self.curFace      = None # The button's current face.
        self.curFaceElement = None # No "undefined" anymore
        self.up           = None # Face for up.
        self.down         = None # Face for down.
        self.downHovering = None # Face for downHover.
        self.upHovering   = None # Face for upHover.
        self.upDisabled   = None # Face for upDisabled.
        self.downDisabled = None # Face for downDisabled.
        self.isCapturing = False # If True, this widget is capturing with
                                 # the mouse held down.
        self.isFocusing  = False # If True, widget has focus with space down.
        self.allowClick  = False # Used to decide whether to allow clicks to
                                 # propagate up to the superclass or container
                                 # elements.

        self.setUpFace(self.createFace(None, "up", self.UP))
        #self.getUpFace().setText("Not initialized yet:)")
        #self.setCurrentFace(self.getUpFace())

        # Add a11y role "button"
        # XXX: TODO Accessibility

        # TODO: pyjslib.isinstance
        if downImageText is None and listener is None:
            listener = upImageText
            upImageText = None

        if upImageText and isinstance(upImageText, basestring):
           upText = upImageText
           upImage = None
        else:
           upImage = upImageText
           upText = None

        if downImageText and isinstance(downImageText, basestring):
           downText = downImageText
           downImage = None
        else:
           downImage = downImageText
           downText = None

        #self.getUpFace().setText("Just a test")
        if upImage is not None:
            self.getUpFace().setImage(upImage)
        if upText is not None:
            self.getUpFace().setText(upText)
        if downImage is not None:
            self.getDownFace().setImage(downImage)
        if downText is not None:
            self.getDownFace().setText(downText)

        # set the face DOWN
        #self.setCurrentFace(self.getDownFace())

        # set the face UP
        #self.setCurrentFace(self.getUpFace())

        self.sinkEvents(Event.ONCLICK | Event.MOUSEEVENTS | Event.FOCUSEVENTS
                        | Event.KEYEVENTS)
        if listener is not None:
            self.addClickListener(listener)
Ejemplo n.º 33
0
    def __init__(self, upImageText=None, downImageText=None, listener=None,
                       **kwargs):
        """Constructor for CustomButton."""

        if not kwargs.has_key('StyleName'):
            kwargs['StyleName']=self.STYLENAME_DEFAULT
        if kwargs.has_key('Element'):
            # XXX FIXME: createFocusable is used for a reason...
            element = kwargs.pop('Element')
        else:
            element = Focus.createFocusable()
        ButtonBase.__init__(self, element, **kwargs)

        self.curFace      = None # The button's current face.
        self.curFaceElement = None # No "undefined" anymore
        self.up           = None # Face for up.
        self.down         = None # Face for down.
        self.downHovering = None # Face for downHover.
        self.upHovering   = None # Face for upHover.
        self.upDisabled   = None # Face for upDisabled.
        self.downDisabled = None # Face for downDisabled.
        self.isCapturing = False # If True, this widget is capturing with
                                 # the mouse held down.
        self.isFocusing  = False # If True, widget has focus with space down.
        self.allowClick  = False # Used to decide whether to allow clicks to
                                 # propagate up to the superclass or container
                                 # elements.

        self.setUpFace(self.createFace(None, "up", self.UP))
        #self.getUpFace().setText("Not initialized yet:)")
        #self.setCurrentFace(self.getUpFace())

        # Add a11y role "button"
        # XXX: TODO Accessibility

        # TODO: pyjslib.isinstance
        if downImageText is None and listener is None:
            listener = upImageText
            upImageText = None

        if upImageText and isinstance(upImageText, basestring):
           upText = upImageText
           upImage = None
        else:
           upImage = upImageText
           upText = None

        if downImageText and isinstance(downImageText, basestring):
           downText = downImageText
           downImage = None
        else:
           downImage = downImageText
           downText = None

        #self.getUpFace().setText("Just a test")
        if upImage is not None:
            self.getUpFace().setImage(upImage)
        if upText is not None:
            self.getUpFace().setText(upText)
        if downImage is not None:
            self.getDownFace().setImage(downImage)
        if downText is not None:
            self.getDownFace().setText(downText)

        # set the face DOWN
        #self.setCurrentFace(self.getDownFace())

        # set the face UP
        #self.setCurrentFace(self.getUpFace())

        self.sinkEvents(Event.ONCLICK | Event.MOUSEEVENTS | Event.FOCUSEVENTS
                        | Event.KEYEVENTS)
        if listener is not None:
            self.addClickListener(listener)
Ejemplo n.º 34
0
 def getTabIndex(self):
     return Focus.getTabIndex(self.getElement())
Ejemplo n.º 35
0
 def setFocus(self, focused):
     if (focused):
         Focus.focus(self.focusable)
     else:
         Focus.blur(self.focusable)
Ejemplo n.º 36
0
 def setTabIndex(self, index):
     Focus.setTabIndex(self.inputElem, index)
Ejemplo n.º 37
0
 def setFocus(self, focused):
     if focused:
         Focus.focus(self.inputElem)
     else:
         Focus.blur(self.inputElem)
Ejemplo n.º 38
0
 def getTabIndex(self):
     return Focus.getTabIndex(self.getElement())
Ejemplo n.º 39
0
 def setFocus(self, focused):
     if (focused):
         Focus.focus(self.getElement())
     else:
         Focus.blur(self.getElement())
Ejemplo n.º 40
0
 def setTabIndex(self, index):
     Focus.setTabIndex(self.getElement(), index)