示例#1
0
    def __init__ (self, **kwargs):
        ZillaWindow.__init__(self, kwargs)
        DialogBox.__init__(self, kwargs)
        self.dockPanel = DockPanel()
        self.dockPanel.setSpacing(4)

        self.setText ("Logowanie")

        hpanel1 = HorizontalPanel()
        
        login = TextBox()
        login.setText("Login")
        #hpanel1.add(login)

        passwd = TextBox()
        passwd.setText("Hasło")

        self.dockPanel.add(login, DockPanel.NORTH)
        self.dockPanel.add(passwd, DockPanel.NORTH)

        #hpanel1.add(passwd)

        #self.add(hpanel1)

        self.add(login)
        self.add(passwd)
示例#2
0
文件: Popups.py 项目: brodybits/pyjs
 def __init__(self, baseURL):
     DialogBox.__init__(self, glass=True)
     self.setText("Sample DialogBox with embedded Frame")
     
     iframe = Frame(baseURL + "rembrandt/LaMarcheNocturne.html")
     closeButton = Button("Close", self)
     msg = HTML("<center>This is an example of a standard dialog box component.<br>  You can put pretty much anything you like into it,<br>such as the following IFRAME:</center>", True)
     
     dock = DockPanel()
     dock.setSpacing(4)
     
     dock.add(closeButton, DockPanel.SOUTH)
     dock.add(msg, DockPanel.NORTH)
     dock.add(iframe, DockPanel.CENTER)
     
     dock.setCellHorizontalAlignment(closeButton, HasAlignment.ALIGN_RIGHT)
     dock.setCellWidth(iframe, "100%")
     dock.setWidth("100%")
     iframe.setWidth("36em")
     iframe.setHeight("20em")
     self.setWidget(dock)
     
     # Work around for IE/MSHTML Issue 511
     self.initURL = iframe.getUrl()
     self.iframe = iframe
示例#3
0
    def __init__(self, left=50, top=50):
        DialogBox.__init__(self, modal=False)

        self.setPopupPosition(left, top)
        self.setText("Preferences")
        ftable = FlexTable()
        ftableFormatter = ftable.getFlexCellFormatter()
        row = 0

        try:
            self.fileLocation = getCookie("fileLocation")
        except:
            self.fileLocation = None

        row += 1
        ftable.setWidget(row, 0,
                         Label("Sheet loaded on startup", wordWrap=False))
        self.fileLocationInput = TextBox()
        self.fileLocationInput.addChangeListener(self.checkValid)
        self.fileLocationInput.addKeyboardListener(self)
        self.fileLocationInput.setVisibleLength(30)
        self.fileLocationInput.setText(self.fileLocation)
        ftable.setWidget(row, 1, self.fileLocationInput)

        row += 1
        hpanel = HorizontalPanel()
        self.saveBtn = Button("Save", self.onSave)
        self.saveBtn.setEnabled(False)
        hpanel.add(self.saveBtn)
        self.cancelBtn = Button("Cancel", self.onCancel)
        hpanel.add(self.cancelBtn)
        ftable.setWidget(row, 0, hpanel)
        ftableFormatter.setColSpan(row, 0, 2)

        self.setWidget(ftable)
示例#4
0
    def __init__(self, left = 50, top = 50):
        DialogBox.__init__(self, modal = False)

        self.setPopupPosition(left, top)
        self.setText("Preferences")
        ftable = FlexTable()
        ftableFormatter = ftable.getFlexCellFormatter()
        row = 0

        try:
            self.fileLocation = getCookie("fileLocation")
        except:
            self.fileLocation = None

        row += 1
        ftable.setWidget(row, 0, Label("Sheet loaded on startup", wordWrap=False))
        self.fileLocationInput = TextBox()
        self.fileLocationInput.addChangeListener(self.checkValid)
        self.fileLocationInput.addKeyboardListener(self)
        self.fileLocationInput.setVisibleLength(30)
        self.fileLocationInput.setText(self.fileLocation)
        ftable.setWidget(row, 1, self.fileLocationInput)

        row += 1
        hpanel = HorizontalPanel()
        self.saveBtn = Button("Save", self.onSave)
        self.saveBtn.setEnabled(False)
        hpanel.add(self.saveBtn)
        self.cancelBtn = Button("Cancel", self.onCancel)
        hpanel.add(self.cancelBtn)
        ftable.setWidget(row, 0, hpanel)
        ftableFormatter.setColSpan(row, 0, 2)

        self.setWidget(ftable)
示例#5
0
文件: main.py 项目: antialize/djudge
    def __init__(self, app):
        DialogBox.__init__(self)
        self.app = app
        self.table=FlexTable()
        self.table.setText(0, 0, "Please enter username and password")
        self.table.getFlexCellFormatter().setColSpan(0, 0, 2)
        self.table.setText(1, 0, "Username")
        self.handle = TextBox()
        h = getCookie('handle')
        self.handle.setText(h)
        self.table.setWidget(1, 1, self.handle)
        self.table.setText(2, 0, "Password")
        self.pwd = PasswordTextBox()
        self.table.setWidget(2, 1, self.pwd)

        self.table.setHTML(3,0,"")
        self.table.getFlexCellFormatter().setColSpan(3, 0, 2)        
        h = HorizontalPanel()
        self.table.setWidget(4,0, h)
        self.table.getFlexCellFormatter().setColSpan(4, 0, 2)
        h.add(Button("Ok", getattr(self, "onOk")))
        h.add(Button("Cancel", getattr(self, "onClose")))
        h.setSpacing(4)
        self.setHTML("<b>Login</b>")
        self.setWidget(self.table)
        left = (Window.getClientWidth() - 200) / 2
        top = (Window.getClientHeight() - 100) / 2
        self.setPopupPosition(left,top)
示例#6
0
    def __init__(self, left=50, top=50):
        try:
            DialogBox.__init__(self, modal=False)

            self.setPopupPosition(left, top)
            self.dockPanel = DockPanel()
            self.dockPanel.setSpacing(4)
            self.setText("Help Contents")
            self.setWidth('80%')

            msg = HTML(
                """\
<h2>Introduction</h2>

This application can be used to maintain a timesheet.

<p/>
On startup, it tries to open the last opened timesheet.

<p/>
There are two modes: Edit and Summary (see menu). In edit mode the user can enter/modify his timescheet. There's some inteligence built in. The 'From' is filled in automatically when the previous line has a 'To'. The 'To' can be filled in as time span, or as end-time. The 'Project' is mandatory (as the 'From' and 'To' are). The user can walk around with the cursor keys.


<h2>Opening and saving sheets</h2>
The sheet can be loaded and saved from a local file. There might be some issues with Firefox, which might refuse access to the document in an iframe.

<br/>
""", True)
            self.dockPanel.add(msg, DockPanel.CENTER)
            self.closeBtn = Button("Close", self)
            self.dockPanel.add(self.closeBtn, DockPanel.SOUTH)

            self.setWidget(self.dockPanel)
        except:
            raise
示例#7
0
    def __init__(self, baseURL):
        DialogBox.__init__(self, glass=True)
        self.setText("Sample DialogBox with embedded Frame")

        iframe = Frame(baseURL + "rembrandt/LaMarcheNocturne.html")
        closeButton = Button("Close", self)
        msg = HTML(
            "<center>This is an example of a standard dialog box component.<br>  You can put pretty much anything you like into it,<br>such as the following IFRAME:</center>",
            True)

        dock = DockPanel()
        dock.setSpacing(4)

        dock.add(closeButton, DockPanel.SOUTH)
        dock.add(msg, DockPanel.NORTH)
        dock.add(iframe, DockPanel.CENTER)

        dock.setCellHorizontalAlignment(closeButton, HasAlignment.ALIGN_RIGHT)
        dock.setCellWidth(iframe, "100%")
        dock.setWidth("100%")
        iframe.setWidth("36em")
        iframe.setHeight("20em")
        self.setWidget(dock)

        # Work around for IE/MSHTML Issue 511
        self.initURL = iframe.getUrl()
        self.iframe = iframe
示例#8
0
    def __init__(self, left = 50, top = 50):
        try:
            DialogBox.__init__(self, modal = False)

            self.setPopupPosition(left, top)
            self.dockPanel = DockPanel()
            self.dockPanel.setSpacing(4)
            self.setText("Help Contents")
            self.setWidth('80%')

            msg = HTML("""\
<h2>Introduction</h2>

This application can be used to maintain a timesheet.

<p/>
On startup, it tries to open the last opened timesheet.

<p/>
There are two modes: Edit and Summary (see menu). In edit mode the user can enter/modify his timescheet. There's some inteligence built in. The 'From' is filled in automatically when the previous line has a 'To'. The 'To' can be filled in as time span, or as end-time. The 'Project' is mandatory (as the 'From' and 'To' are). The user can walk around with the cursor keys.


<h2>Opening and saving sheets</h2>
The sheet can be loaded and saved from a local file. There might be some issues with Firefox, which might refuse access to the document in an iframe.

<br/>
""", True)
            self.dockPanel.add(msg, DockPanel.CENTER)
            self.closeBtn = Button("Close", self)
            self.dockPanel.add(self.closeBtn, DockPanel.SOUTH)

            self.setWidget(self.dockPanel)
        except:
            raise
示例#9
0
    def __init__(self, **kwargs):
        ZillaWindow.__init__(self, kwargs)
        DialogBox.__init__(self, kwargs)
        self.dockPanel = DockPanel()
        self.dockPanel.setSpacing(4)

        self.setText("Logowanie")

        hpanel1 = HorizontalPanel()

        login = TextBox()
        login.setText("Login")
        #hpanel1.add(login)

        passwd = TextBox()
        passwd.setText("Hasło")

        self.dockPanel.add(login, DockPanel.NORTH)
        self.dockPanel.add(passwd, DockPanel.NORTH)

        #hpanel1.add(passwd)

        #self.add(hpanel1)

        self.add(login)
        self.add(passwd)
示例#10
0
 def __init__(self, title, okClick=None, cancelClick=None, options=-1, hasBackground=True):
     DialogBox.__init__(self, autoHide=False, modal=hasBackground, centered=True, StyleName='dialog')
     KeyboardHandler.__init__(self)
     self.addKeyboardListener(self)#n�o funciona fora do input
     self.title = title
     self.okClick = okClick
     self.cancelClick = cancelClick
     self.options = options
     self.hasBackground = hasBackground
     self.center = VerticalPanel(StyleName='dialog_center')
     self.draw()
示例#11
0
文件: HTMLDialog.py 项目: Afey/pyjs
    def __init__(self, name, html):
        DialogBox.__init__(self)
        self.setText(name)

        closeButton = Button("Close", self)

        htp = HTMLPanel(html)
        self.sp = ScrollPanel(htp)

        dock = DockPanel()
        dock.setSpacing(4)

        dock.add(closeButton, DockPanel.SOUTH)
        dock.add(self.sp, DockPanel.CENTER)

        dock.setCellHorizontalAlignment(closeButton, HasAlignment.ALIGN_RIGHT)
        dock.setCellWidth(self.sp, "100%")
        dock.setWidth("100%")
        self.setWidget(dock)
示例#12
0
    def __init__(self, name, html):
        DialogBox.__init__(self)
        self.setText(name)

        closeButton = Button("Close", self)

        htp = HTMLPanel(html)
        self.sp = ScrollPanel(htp)

        dock = DockPanel()
        dock.setSpacing(4)

        dock.add(closeButton, DockPanel.SOUTH)
        dock.add(self.sp, DockPanel.CENTER)

        dock.setCellHorizontalAlignment(closeButton, HasAlignment.ALIGN_RIGHT)
        dock.setCellWidth(self.sp, "100%")
        dock.setWidth("100%")
        self.setWidget(dock)
示例#13
0
    def __init__(self, left = 50, top = 50):
        try:
            DialogBox.__init__(self, modal = False)

            self.setPopupPosition(left, top)
            self.dockPanel = DockPanel()
            self.dockPanel.setSpacing(4)
            self.setText("About")

            msg = HTML("""\
This is an example application, which uses PureMVC<br/>
<br/>
""", True)
            self.dockPanel.add(msg, DockPanel.CENTER)
            self.closeBtn = Button("Close", self)
            self.dockPanel.add(self.closeBtn, DockPanel.SOUTH)

            self.setWidget(self.dockPanel)
        except:
            raise
示例#14
0
    def __init__(self, left=50, top=50):
        try:
            DialogBox.__init__(self, modal=False)

            self.setPopupPosition(left, top)
            self.dockPanel = DockPanel()
            self.dockPanel.setSpacing(4)
            self.setText("About")

            msg = HTML(
                """\
This is an example application, which uses PureMVC<br/>
<br/>
""", True)
            self.dockPanel.add(msg, DockPanel.CENTER)
            self.closeBtn = Button("Close", self)
            self.dockPanel.add(self.closeBtn, DockPanel.SOUTH)

            self.setWidget(self.dockPanel)
        except:
            raise
示例#15
0
    def __init__(self, url):
        DialogBox.__init__(self)
        self.setText("Upload Files")
        
        iframe = Frame(url)
        closeButton = Button("Close", self)
        msg = HTML("<center>Upload files, here.  Please avoid spaces in file names.<br />(rename the file before uploading)</center>", True)

        dock = DockPanel()
        dock.setSpacing(4)
        
        dock.add(closeButton, DockPanel.SOUTH)
        dock.add(msg, DockPanel.NORTH)
        dock.add(iframe, DockPanel.CENTER)
        
        dock.setCellHorizontalAlignment(closeButton, HasAlignment.ALIGN_RIGHT)
        dock.setCellWidth(iframe, "100%")
        dock.setWidth("100%")
        iframe.setWidth("800px")
        iframe.setHeight("600px")
        self.setWidget(dock)
示例#16
0
    def __init__(self, url):
        DialogBox.__init__(self)
        self.setText("Upload Files")

        iframe = Frame(url)
        closeButton = Button("Close", self)
        msg = HTML(
            "<center>Upload files, here.  Please avoid spaces in file names.<br />(rename the file before uploading)</center>",
            True)

        dock = DockPanel()
        dock.setSpacing(4)

        dock.add(closeButton, DockPanel.SOUTH)
        dock.add(msg, DockPanel.NORTH)
        dock.add(iframe, DockPanel.CENTER)

        dock.setCellHorizontalAlignment(closeButton, HasAlignment.ALIGN_RIGHT)
        dock.setCellWidth(iframe, "100%")
        dock.setWidth("100%")
        iframe.setWidth("800px")
        iframe.setHeight("600px")
        self.setWidget(dock)
示例#17
0
    def __init__(self):

        DialogBox.__init__(self)

        # Use this opportunity to set the dialog's caption.
        self.setText("About the Mail Sample")

        # Create a DockPanel to contain the 'about' label and the 'OK' button.
        outer = DockPanel()
        outer.setSpacing(4)

        outer.add(Image(AboutDialog.LOGO_IMAGE), DockPanel.WEST)

        # Create the 'OK' button, along with a listener that hides the dialog
        # when the button is clicked. Adding it to the 'south' position within
        # the dock causes it to be placed at the bottom.
        buttonPanel = HorizontalPanel()
        buttonPanel.setHorizontalAlignment(HasAlignment.ALIGN_RIGHT)
        buttonPanel.add(Button("Close", self))
        outer.add(buttonPanel, DockPanel.SOUTH)

        # Create the 'about' label. Placing it in the 'rest' position within the
        # dock causes it to take up any remaining space after the 'OK' button
        # has been laid out.

        textplain = "This sample application demonstrates the construction "
        textplain += "of a complex user interface using pyjamas' built-in widgets.  Have a look "
        textplain += "at the code to see how easy it is to build your own apps!"
        text = HTML(textplain)
        text.setStyleName("mail-AboutText")
        outer.add(text, DockPanel.CENTER)

        # Add a bit of spacing and margin to the dock to keep the components from
        # being placed too closely together.
        outer.setSpacing(8)

        self.setWidget(outer)
示例#18
0
文件: AboutDialog.py 项目: Afey/pyjs
  def __init__(self):

      DialogBox.__init__(self)

      # Use this opportunity to set the dialog's caption.
      self.setText("About the Mail Sample")

      # Create a DockPanel to contain the 'about' label and the 'OK' button.
      outer = DockPanel()
      outer.setSpacing(4)

      outer.add(Image(AboutDialog.LOGO_IMAGE), DockPanel.WEST)

      # Create the 'OK' button, along with a listener that hides the dialog
      # when the button is clicked. Adding it to the 'south' position within
      # the dock causes it to be placed at the bottom.
      buttonPanel = HorizontalPanel()
      buttonPanel.setHorizontalAlignment(HasAlignment.ALIGN_RIGHT)
      buttonPanel.add(Button("Close", self))
      outer.add(buttonPanel, DockPanel.SOUTH)

      # Create the 'about' label. Placing it in the 'rest' position within the
      # dock causes it to take up any remaining space after the 'OK' button
      # has been laid out.

      textplain =  "This sample application demonstrates the construction "
      textplain += "of a complex user interface using pyjamas' built-in widgets.  Have a look "
      textplain += "at the code to see how easy it is to build your own apps!"
      text = HTML(textplain)
      text.setStyleName("mail-AboutText")
      outer.add(text, DockPanel.CENTER)

      # Add a bit of spacing and margin to the dock to keep the components from
      # being placed too closely together.
      outer.setSpacing(8)

      self.setWidget(outer)
示例#19
0
    def __init__(self, left=50, top=50, fileLocation=None):
        global has_getAsText
        try:
            DialogBox.__init__(self, modal=False)
            self.filename = None
            self.data = None

            self.setPopupPosition(left, top)
            self.dockPanel = DockPanel()
            self.dockPanel.setSpacing(4)
            self.setText("File Open")

            if not fileLocation is None:
                msg = HTML("Loading file...", True)
                self.dockPanel.add(msg, DockPanel.NORTH)
                location = fileLocation
                if fileLocation.find("://") < 0:
                    base = Window.getLocation().getHref()
                    if base.find('/') >= 0:
                        sep = '/'
                    else:
                        sep = '\\'
                    base = sep.join(base.split(sep)[:-1]) + sep
                    location = base + fileLocation
                self.iframe = Frame(location)
                self.dockPanel.add(self.iframe, DockPanel.CENTER)
            else:
                msg = HTML("Choose a file", True)

                self.browseFile = FileUpload()
                elem = self.browseFile.getElement()
                if False and has_getAsText and hasattr(elem, 'files'):
                    self.iframe = None
                    self.files = elem.files
                    self.dockPanel.add(self.browseFile, DockPanel.CENTER)
                else:
                    self.browseFile = None
                    self.files = None
                    base = '' + doc().location
                    if base.find('/') >= 0:
                        sep = '/'
                    else:
                        sep = '\\'
                    if not base.lower()[:5] == "file:":
                        base = "file:///C:/"
                        msg = HTML(
                            "You'll have to place the application on a local file system, otherwise the browser forbids access.",
                            True)
                    else:
                        base = sep.join(base.split(sep)[:-1]) + sep
                    self.iframe = Frame(base)
                    self.dockPanel.add(self.iframe, DockPanel.CENTER)
                self.dockPanel.add(msg, DockPanel.NORTH)

            if self.iframe:
                self.iframe.setWidth("36em")
            hpanel = HorizontalPanel()
            self.openBtn = Button("Open", self.onClickOpen)
            hpanel.add(self.openBtn)
            self.cancelBtn = Button("Cancel", self.onClickCancel)
            hpanel.add(self.cancelBtn)
            self.dockPanel.add(hpanel, DockPanel.SOUTH)

            self.setWidget(self.dockPanel)
        except:
            raise
示例#20
0
    def __init__(self, left = 50, top = 50, fileLocation = None):
        global has_getAsText
        try:
            DialogBox.__init__(self, modal = False)
            self.filename = None
            self.data = None

            self.setPopupPosition(left, top)
            self.dockPanel = DockPanel()
            self.dockPanel.setSpacing(4)
            self.setText("File Open")

            if not fileLocation is None:
                msg = HTML("Loading file...", True)
                self.dockPanel.add(msg, DockPanel.NORTH)
                location =  fileLocation
                if fileLocation.find("://") < 0:
                    base = Window.getLocation().getHref()
                    if base.find('/') >= 0:
                        sep = '/'
                    else:
                        sep = '\\'
                    base = sep.join(base.split(sep)[:-1]) + sep
                    location = base + fileLocation
                self.iframe = Frame(location)
                self.dockPanel.add(self.iframe, DockPanel.CENTER)
            else:
                msg = HTML("Choose a file", True)

                self.browseFile = FileUpload()
                elem = self.browseFile.getElement()
                if False and has_getAsText and hasattr(elem, 'files'):
                    self.iframe = None
                    self.files = elem.files
                    self.dockPanel.add(self.browseFile, DockPanel.CENTER)
                else:
                    self.browseFile = None
                    self.files = None
                    base = '' + doc().location
                    if base.find('/') >= 0:
                        sep = '/'
                    else:
                        sep = '\\'
                    if not base.lower()[:5] == "file:":
                        base = "file:///C:/"
                        msg = HTML("You'll have to place the application on a local file system, otherwise the browser forbids access.", True)
                    else:
                        base = sep.join(base.split(sep)[:-1]) + sep
                    self.iframe = Frame(base)
                    self.dockPanel.add(self.iframe, DockPanel.CENTER)
                self.dockPanel.add(msg, DockPanel.NORTH)

            if self.iframe:
                self.iframe.setWidth("36em")
            hpanel = HorizontalPanel()
            self.openBtn = Button("Open", self.onClickOpen)
            hpanel.add(self.openBtn)
            self.cancelBtn = Button("Cancel", self.onClickCancel)
            hpanel.add(self.cancelBtn)
            self.dockPanel.add(hpanel, DockPanel.SOUTH)

            self.setWidget(self.dockPanel)
        except:
            raise
示例#21
0
    def __init__(self, chart):
        """ DialogBox CSS Style self.settings used with this example for reference:

        Note: These simplified CSS styles make the dialog's title bar behave a
        little quirkily in IE6 when dragging. For more sophisticated CSS that
        fixes this problem (and also provides a more professional look) see the
        CSS tab of the DialogBox example in the GWT <a href="xxx"> Showcase of
        Features</a> (I just didn't want to copy 5 pages of obscure DialogBox
        CSS into what is after all a Client-side GChart example).

        .gwt-DialogBox .Caption {
            font-size: 18
            color: #eef
            background: #00f repeat-x 0px -2003px
            padding: 4px 4px 4px 8px
            cursor: default
            border-bottom: 2px solid #008
            border-top: 3px solid #448


        .gwt-DialogBox .dialogContent {
            border: 1px solid #008
            background: #ddd
            padding: 3px


        """
        DialogBox.__init__(self, autoHide=True, modal=True)
        self.chart = chart
        self.isFirstTime = True
        mainPanel = VerticalPanel()
        propertyForm = FlexTable()
        commandBar = DockPanel()
        sliceSwitcher = HorizontalPanel()
        self.prevSlice = Button("&lt;Prev Slice", self)
        self.nextSlice = Button("Next Slice&gt;", self)
        self.closeButton = Button("Close", self)

        self.chart.colorSelector.addChangeListener(self)
        self.chart.sliceSizeSelector.addChangeListener(self)
        self.chart.shadingSelector.addChangeListener(self)

        #self.prevSlice.addClickListener(self)
        #self.nextSlice.addClickListener(self)
        #self.closeButton.addClickListener(self)

        # slice properties table (slice color, shading and size)
        propertyForm.setSize(3, 2)
        propertyForm.setText(  0, 0, "Color:")
        propertyForm.setWidget(0, 1, self.chart.colorSelector)
        propertyForm.setText(  1, 0, "Shading Pattern:")
        propertyForm.setWidget(1, 1, self.chart.shadingSelector)
        propertyForm.setText(  2, 0, "Slice Size:")
        propertyForm.setWidget(2, 1, self.chart.sliceSizeSelector)
        # add additional properties here, if desired

        # buttons for changing the selected slice from the form
        sliceSwitcher.add(self.prevSlice)
        sliceSwitcher.add(self.nextSlice)

        commandBar.add(sliceSwitcher, DockPanel.WEST)
        commandBar.add(self.closeButton, DockPanel.EAST)
        commandBar.setCellHorizontalAlignment(self.closeButton,
                        HasHorizontalAlignment.ALIGN_RIGHT)
        commandBar.setWidth("100%"); # pushes close button to right edge

        # create main form and place it in DialogBox
        mainPanel.add(propertyForm)
        mainPanel.add(commandBar)
        self.setWidget(mainPanel); # add the DialogBox' single, defining, widget
示例#22
0
    def __init__(self, chart):
        """ DialogBox CSS Style self.settings used with this example for reference:

        Note: These simplified CSS styles make the dialog's title bar behave a
        little quirkily in IE6 when dragging. For more sophisticated CSS that
        fixes this problem (and also provides a more professional look) see the
        CSS tab of the DialogBox example in the GWT <a href="xxx"> Showcase of
        Features</a> (I just didn't want to copy 5 pages of obscure DialogBox
        CSS into what is after all a Client-side GChart example).

        .gwt-DialogBox .Caption {
            font-size: 18
            color: #eef
            background: #00f repeat-x 0px -2003px
            padding: 4px 4px 4px 8px
            cursor: default
            border-bottom: 2px solid #008
            border-top: 3px solid #448


        .gwt-DialogBox .dialogContent {
            border: 1px solid #008
            background: #ddd
            padding: 3px


        """
        DialogBox.__init__(self, autoHide=True, modal=True)
        self.chart = chart
        self.isFirstTime = True
        mainPanel = VerticalPanel()
        propertyForm = FlexTable()
        commandBar = DockPanel()
        sliceSwitcher = HorizontalPanel()
        self.prevSlice = Button("&lt;Prev Slice", self)
        self.nextSlice = Button("Next Slice&gt;", self)
        self.closeButton = Button("Close", self)

        self.chart.colorSelector.addChangeListener(self)
        self.chart.sliceSizeSelector.addChangeListener(self)
        self.chart.shadingSelector.addChangeListener(self)

        #self.prevSlice.addClickListener(self)
        #self.nextSlice.addClickListener(self)
        #self.closeButton.addClickListener(self)

        # slice properties table (slice color, shading and size)
        propertyForm.setSize(3, 2)
        propertyForm.setText(0, 0, "Color:")
        propertyForm.setWidget(0, 1, self.chart.colorSelector)
        propertyForm.setText(1, 0, "Shading Pattern:")
        propertyForm.setWidget(1, 1, self.chart.shadingSelector)
        propertyForm.setText(2, 0, "Slice Size:")
        propertyForm.setWidget(2, 1, self.chart.sliceSizeSelector)
        # add additional properties here, if desired

        # buttons for changing the selected slice from the form
        sliceSwitcher.add(self.prevSlice)
        sliceSwitcher.add(self.nextSlice)

        commandBar.add(sliceSwitcher, DockPanel.WEST)
        commandBar.add(self.closeButton, DockPanel.EAST)
        commandBar.setCellHorizontalAlignment(
            self.closeButton, HasHorizontalAlignment.ALIGN_RIGHT)
        commandBar.setWidth("100%")
        # pushes close button to right edge

        # create main form and place it in DialogBox
        mainPanel.add(propertyForm)
        mainPanel.add(commandBar)
        self.setWidget(mainPanel)