Esempio n. 1
0
    def __init__(self, **kwargs):
        """ Creates an empty horizontal split panel.
        """

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

        if kwargs.has_key('Element'):
            element = kwargs.pop('Element')
        else:
            element = DOM.createDiv()
        SplitPanel.__init__(self, element,
                            DOM.createDiv(),
                            self.preventBoxStyles(DOM.createDiv()),
                            self.preventBoxStyles(DOM.createDiv()),
                            **kwargs)

        self.container = self.preventBoxStyles(DOM.createDiv())

        self.buildDOM()

        self.impl = ImplHorizontalSplitPanel(self)

        # By default the panel will fill its parent vertically and horizontally.
        # The horizontal case is covered by the fact that the top level div is
        # block display.
        self.setHeight("100%")

        self.lastSplitPosition = "50%"
        self.initialLeftWidth = 0
        self.initialThumbPos = 0
Esempio n. 2
0
    def __init__(self, **kwargs):
        """ Creates an empty vertical split panel.
        """
        if not kwargs.has_key('StyleName'): kwargs['StyleName']="gwt-VerticalSplitPanel"
        if kwargs.has_key('Element'):
            element = kwargs.pop('Element')
        else:
            element = DOM.createDiv()
        SplitPanel.__init__(self, element,
                            DOM.createDiv(),
                            self.preventBoxStyles(DOM.createDiv()),
                            self.preventBoxStyles(DOM.createDiv()),
                            **kwargs)

        self.container = self.preventBoxStyles(DOM.createDiv())
        self.buildDOM()

        self.impl = ImplVerticalSplitPanel(self)

        self.setSplitPosition("50%")

        # Captures the height of the top container when drag resizing starts.
        self.initialTopHeight = 0

        # Captures the offset of a user's mouse pointer during drag resizing.
        self.initialThumbPos = 0

        self.lastSplitPosition = ""
Esempio n. 3
0
    def __init__(self, **kwargs):
        """ Creates an empty vertical split panel.
        """
        if not kwargs.has_key('StyleName'):
            kwargs['StyleName'] = "gwt-VerticalSplitPanel"
        if kwargs.has_key('Element'):
            element = kwargs.pop('Element')
        else:
            element = DOM.createDiv()
        SplitPanel.__init__(self, element, DOM.createDiv(),
                            self.preventBoxStyles(DOM.createDiv()),
                            self.preventBoxStyles(DOM.createDiv()), **kwargs)

        self.container = self.preventBoxStyles(DOM.createDiv())
        self.buildDOM()

        self.impl = ImplVerticalSplitPanel(self)

        self.setSplitPosition("50%")

        # Captures the height of the top container when drag resizing starts.
        self.initialTopHeight = 0

        # Captures the offset of a user's mouse pointer during drag resizing.
        self.initialThumbPos = 0

        self.lastSplitPosition = ""