Package com.google.gwt.user.client.ui

Examples of com.google.gwt.user.client.ui.FlexTable


    html_1.setStylePrimaryName("h1");
    verticalPanel.add(html_1);   
    verticalPanel.add(decPanel);   
    final VerticalPanel verticalPanelInner = new VerticalPanel();
    decPanel.add(verticalPanelInner);
    final FlexTable flexTable = new FlexTable();
    verticalPanelInner.add(flexTable);
    flexTable.setCellSpacing(5);
    flexTable.setCellPadding(5);

    final ListBox listBox = new ListBox();
    listBox.addItem(c.Nothing(),"0");
    listBox.addItem(c.Error(),"1");
    listBox.addItem(c.Warning(),"2");
    listBox.addItem(c.Output(),"3");
    listBox.addItem(c.Detail(),"4");   
    listBox.addItem(c.Debug(),"5"); // give up extra space between 4 and 9 for coding convenience here.

    listBox.setVisibleItemCount(1);
//    flexTable.setWidget(0, 1, listBox);
    listBox.addChangeListener(new ChangeListener() {
      public void onChange(final Widget sender) {
        GenClient.setVerbosity(Integer.parseInt( listBox.getValue( listBox.getSelectedIndex() )));
        GenClient.showOutput("verbosity now: " + GenClient.getVerbosity() );       
        icingShadow.setVerbosityToDebug(GenClient.isVerbosityDebug());
        GenClient.showOutput("visibilityStatusArea: " + GenClient.isVerbosityDebug());
      }
    });
    listBox.setSelectedIndex(GenClient.getVerbosity());
    flexTable.setWidget(optionVerbosityIdx, 1, listBox);
   
   
    final Label verbosityLabel = new Label(c.Verbosity());
    flexTable.setWidget(optionVerbosityIdx, 0, verbosityLabel);
  }
View Full Code Here


        DecoratedTabPanel tabPanel = new DecoratedTabPanel();
        // tabPanel.setWidth(iCing.widthMenu+"px"); // free is more elegant.
        tabPanel.setAnimationEnabled(true);
        verticalPanel.add(tabPanel);

        final FlexTable cingTable = new FlexTable();
        cingTable.setTitle(c.CING());
        tabPanel.add(cingTable, c.CING(), true);
        final FlexTable wiTable = new FlexTable();
        wiTable.setTitle("What If");
        tabPanel.add(wiTable, "What If", true);

        noneWiCheckBox = new CheckBox();
        wiTable.setWidget(rowIdxWiNone, 0, noneWiCheckBox);
        wiTable.getCellFormatter().setHorizontalAlignment(rowIdxWiNone, 0, HasHorizontalAlignment.ALIGN_CENTER);
        wiTable.getFlexCellFormatter().setColSpan(rowIdxWiNone, 0, 5);
        noneWiCheckBox.setText(c.none());
        ramaTextBoxBad = new TextBox();
        wiTable.setWidget(rowIdxWiRama, 2, ramaTextBoxBad);
        wiTable.getCellFormatter().setHorizontalAlignment(rowIdxWiRama, 2, HasHorizontalAlignment.ALIGN_CENTER);
        ramaTextBoxBad.setStyleName("red");
        ramaTextBoxBad.setText(CRV_WI_BAD_RAMCHK);
        ramaTextBoxBad.setWidth("3em");
        ramaTextBoxPoor = new TextBox();
        wiTable.setWidget(rowIdxWiRama, 3, ramaTextBoxPoor);
        wiTable.getCellFormatter().setHorizontalAlignment(rowIdxWiRama, 3, HasHorizontalAlignment.ALIGN_CENTER);
        ramaTextBoxPoor.setStyleName("orange");
        ramaTextBoxPoor.setText(CRV_WI_POOR_RAMCHK);
        ramaTextBoxPoor.setWidth("3em");

        bbTextBoxBad = new TextBox();
        wiTable.setWidget(rowIdxWiBb, 2, bbTextBoxBad);
        wiTable.getCellFormatter().setHorizontalAlignment(rowIdxWiBb, 2, HasHorizontalAlignment.ALIGN_RIGHT);
        bbTextBoxBad.setText(CRV_WI_BAD_BBCCHK);
        bbTextBoxBad.setStyleName("red");
        bbTextBoxBad.setWidth("3em");

        bbTextBoxPoor = new TextBox();
        wiTable.setWidget(rowIdxWiBb, 3, bbTextBoxPoor);
        wiTable.getCellFormatter().setHorizontalAlignment(rowIdxWiBb, 3, HasHorizontalAlignment.ALIGN_CENTER);
        bbTextBoxPoor.setText(CRV_WI_POOR_BBCCHK);
        bbTextBoxPoor.setStyleName("orange");
        bbTextBoxPoor.setWidth("3em");

        ramachandranPlotCheckBox = new CheckBox();
        wiTable.setWidget(rowIdxWiRama, 0, ramachandranPlotCheckBox);
        ramachandranPlotCheckBox.setChecked(true);
        ramachandranPlotCheckBox.setText("Ramachandran " + c.plot());
        ramachandranPlotCheckBox.addClickListener(new ClickListener() {
            public void onClick(final Widget sender) {
                Utils.setEnabledAllInColumnsButFirst(wiTable, rowIdxWiRama, ramachandranPlotCheckBox.isChecked());
            }
        });

        janinPlotCheckBox = new CheckBox();
        wiTable.setWidget(rowIdxWiJanin, 0, janinPlotCheckBox);
        janinPlotCheckBox.setChecked(true);
        janinPlotCheckBox.setText("Janin " + c.plot());
        janinPlotCheckBox.addClickListener(new ClickListener() {
            public void onClick(final Widget sender) {
                Utils.setEnabledAllInColumnsButFirst(wiTable, rowIdxWiJanin, janinPlotCheckBox.isChecked());
            }
        });

        janinTextBoxBad = new TextBox();
        wiTable.setWidget(rowIdxWiJanin, 2, janinTextBoxBad);
        wiTable.getCellFormatter().setHorizontalAlignment(rowIdxWiJanin, 2, HasHorizontalAlignment.ALIGN_CENTER);
        janinTextBoxBad.setText(CRV_WI_BAD_C12CHK);
        janinTextBoxBad.setStyleName("red");
        janinTextBoxBad.setWidth("3em");

        final Label residueSigmas22Label = new Label(c.residue_sigma() + " [-2,2]");
        wiTable.setWidget(rowIdxWiRama, 4, residueSigmas22Label);

        final Label occurancesInDbLabel = new Label(c.occurrences_in() + " [0-80]");
        wiTable.setWidget(rowIdxWiBb, 4, occurancesInDbLabel);

        backboneNormalityCheckBox = new CheckBox();
        wiTable.setWidget(rowIdxWiBb, 0, backboneNormalityCheckBox);
        backboneNormalityCheckBox.setChecked(false);
        backboneNormalityCheckBox.setText(c.Backbone_norm());
        backboneNormalityCheckBox.addClickListener(new ClickListener() {
            public void onClick(final Widget sender) {
                Utils.setEnabledAllInColumnsButFirst(wiTable, rowIdxWiBb, backboneNormalityCheckBox.isChecked());
            }
        });
        // Disable the boxes markup.
        Utils.setEnabledAllInColumnsButFirst(wiTable, rowIdxWiBb, backboneNormalityCheckBox.isChecked());
//        backboneNormalityCheckBox.fireEvent(event) this would enable the

        janinTextBoxPoor = new TextBox();
        wiTable.setWidget(rowIdxWiJanin, 3, janinTextBoxPoor);
        wiTable.getCellFormatter().setHorizontalAlignment(3, 3, HasHorizontalAlignment.ALIGN_CENTER);
        janinTextBoxPoor.setStyleName("orange");
        janinTextBoxPoor.setText(CRV_WI_POOR_C12CHK);
        janinTextBoxPoor.setWidth("3em");

        final Label residueSigmas22Label_1 = new Label(c.residue_sigma() + " [-2,2]");
        wiTable.setWidget(rowIdxWiJanin, 4, residueSigmas22Label_1);

        final FlexTable pcTable = new FlexTable();
        pcTable.setTitle("ProcheckNMR/Aqua");
        tabPanel.add(pcTable, "ProcheckNMR/Aqua", true);

        nonePcCheckBox = new CheckBox();
        pcTable.setWidget(rowIdxPcNone, 0, nonePcCheckBox);
        pcTable.getCellFormatter().setHorizontalAlignment(rowIdxPcNone, 0, HasHorizontalAlignment.ALIGN_CENTER);
        pcTable.getFlexCellFormatter().setColSpan(rowIdxPcNone, 0, 4);

        // PC G factor row
        textBoxGfactorPoor = new TextBox();
        pcTable.setWidget(rowIdxPcGfactor, 2, textBoxGfactorPoor);
        textBoxGfactorPoor.setStyleName("orange");
        textBoxGfactorPoor.setText(CRV_PC_POOR_GF);
        textBoxGfactorPoor.setWidth("3em");
        textBoxGfactorBad = new TextBox();
        pcTable.setWidget(rowIdxPcGfactor, 1, textBoxGfactorBad);
        pcTable.getCellFormatter().setHorizontalAlignment(rowIdxPcGfactor, 3, HasHorizontalAlignment.ALIGN_LEFT);
        textBoxGfactorBad.setStylePrimaryName("red");
        textBoxGfactorBad.setText(CRV_PC_BAD_GF);
        textBoxGfactorBad.setWidth("3em");
        @SuppressWarnings("unused")
        final Label gFactorLimitsLabel = new Label("[-99,99]");
        // pcTable.setWidget(rowIdxPcGfactor, 3, gFactorLimitsLabel);
        includeIntraresidualContactsCheckBox = new CheckBox();
        pcTable.setWidget(rowIdxPcIntra, 0, includeIntraresidualContactsCheckBox);
        includeIntraresidualContactsCheckBox.setChecked(true);
        includeIntraresidualContactsCheckBox.setText(c.Include_intra());

        noeCompletenessCheckBox = new CheckBox();
        pcTable.setWidget(rowIdxPcComple, 0, noeCompletenessCheckBox);
        noeCompletenessCheckBox.setChecked(true);
        noeCompletenessCheckBox.setText(c.NOE_completen() + " " + c.per_residue());
        noeCompletenessCheckBox.addClickListener(new ClickListener() {
            public void onClick(final Widget sender) {
                Utils.setEnabledAllInColumnsButFirst(pcTable, rowIdxPcComple, noeCompletenessCheckBox.isChecked());
            }
        });
        gFactorCheckBox = new CheckBox();
        pcTable.setWidget(rowIdxPcGfactor, 0, gFactorCheckBox);
        gFactorCheckBox.setChecked(true);
        gFactorCheckBox.setText(c.gFactor());
        gFactorCheckBox.addClickListener(new ClickListener() {
            public void onClick(final Widget sender) {
                Utils.setEnabledAllInColumnsButFirst(pcTable, rowIdxPcGfactor, gFactorCheckBox.isChecked());
            }
        });

        textBoxComplBad = new TextBox();
        pcTable.setWidget(rowIdxPcComple, 1, textBoxComplBad);
        textBoxComplBad.setVisibleLength(3);
        textBoxComplBad.setMaxLength(3);
        textBoxComplBad.setStyleName("red");
        textBoxComplBad.setText(CRV_AQUA_COMPL_BAD);
        textBoxComplBad.setWidth("3em");

        textBoxComplPoor = new TextBox();
        pcTable.setWidget(rowIdxPcComple, 2, textBoxComplPoor);
        textBoxComplPoor.setVisibleLength(3);
        textBoxComplPoor.setStyleName("orange");
        textBoxComplPoor.setText(CRV_AQUA_COMPL_POOR);
        textBoxComplPoor.setWidth("3em");
        final Label per0100Label = new Label("[0,100%]");
        pcTable.setWidget(rowIdxPcComple, 3, per0100Label);

        listBoxObs = new ListBox();
        pcTable.setWidget(rowIdxPcObserv, 1, listBoxObs);
        pcTable.getFlexCellFormatter().setColSpan(rowIdxPcObserv, 1, 2);

        listBoxObs.addItem(c.Standard());
        listBoxObs.addItem(c.Standard_no());
        listBoxObs.addItem(c.Standard_all());
        listBoxObs.addItem(c.Only_amides_a());
        listBoxObs.addItem(c.Only_amides());
        listBoxObs.addItem(c.All_theoretic());
        listBoxObs.addItem(c.All_non_hydro());
        listBoxObs.setWidth("6em");
        final Label observableAtomSetLabel = new Label(c.Observable_at());
        pcTable.setWidget(rowIdxPcObserv, 0, observableAtomSetLabel);
        nonePcCheckBox.setText(c.none());
        pcTable.removeRow(rowIdxPcComple); // deleting bottom up.
        pcTable.removeRow(rowIdxPcObserv); // TODO: enable when Wattos is run.
        pcTable.removeRow(rowIdxPcIntra);

        checkBoxOmega = new CheckBox();
        cingTable.setWidget(rowIdxCingOmega, 0, checkBoxOmega);
        checkBoxOmega.setEnabled(true);
        checkBoxOmega.setChecked(true);
View Full Code Here

   * @param isVersionsTable
   */
  public OntologyTable(IQuickInfo quickInfo, boolean isVersionsTable) {
    super(quickInfo, isVersionsTable);
   
    flexPanel = new FlexTable();
    flexPanel.setWidth("100%");
    flexPanel.setBorderWidth(1);
    flexPanel.setCellPadding(3);
    flexPanel.setStylePrimaryName("OntologyTable");
   
View Full Code Here

    final int lim = GWT.isScript() ? 100 : 5;
    final int numTrials = 4;
    final double trialTimes[] = new double[numTrials];
   
    if (benchTable == null) {
      benchTable = new FlexTable();
      RootPanel.get().add(benchTable);
    }
   
    benchTable.clear();
    benchTable.getFlexCellFormatter().setColSpan(0, 0, 2);
View Full Code Here

    // Make a spacer
    HorizontalPanel hp3 = new HorizontalPanel();
    hp3.add(new Label(" "));
    hp3.setSize("1em", "1em");

    handlerTable = new FlexTable();
    clearListenerTable();

    vp.add(map);
    vp.add(hp1);
    vp.add(hp2);
View Full Code Here

  }

  private Widget buildControlPanel() {
    VerticalPanel outerPanel = new VerticalPanel();
    DecoratorPanel tableWrapper = new DecoratorPanel();
    FlexTable resultTable = new FlexTable();

    numDigitsListBox.addItem("1,000", "1000");
    numDigitsListBox.addItem("5,000", "5000");
    numDigitsListBox.addItem("10,000", "10000");
    numDigitsListBox.addItem("20,000", "20000");
View Full Code Here

    final HorizontalPanel m_labelsPanel;

    public LegendItem(String color, final SeriesHandler handler,
        String label) {
      FlexTable table = new FlexTable();

      HTML colorBand = new HTML("<div style=\"width: 100%; height: "
          + COLOR_BAND_HEIGHT + "; background-color: " + color
          + ";\"></div>");
      table.setWidget(0, 0, colorBand);
      table.getFlexCellFormatter().setColSpan(0, 0, 2);

      final CheckBox checkBox = new CheckBox();
      checkBox.setChecked(true);
      checkBox.addClickListener(new ClickListener() {
        public void onClick(Widget sender) {
          handler.setVisible(checkBox.isChecked());
          m_plot.redraw();
        }
      });
      table.setWidget(1, 0, checkBox);
      table.getCellFormatter().setHorizontalAlignment(1, 0,
          HasHorizontalAlignment.ALIGN_LEFT);

      m_labelsPanel = new HorizontalPanel();
      m_labelsPanel.add(new Label(label));
      table.setWidget(1, 1, m_labelsPanel);
      table.getCellFormatter().setHorizontalAlignment(1, 1,
          HasHorizontalAlignment.ALIGN_CENTER);

      initWidget(table);

    }
View Full Code Here

  }

  /* -------------------------- Helper Methods -- */
  private Widget createUi() {
    FlexTable mainPanel = new FlexTable();
    mainPanel.setWidget(0, 0, m_windowPlot);
    mainPanel.setWidget(1, 0, m_overviewPlot);
    m_overviewPlot.setHeight(m_overviewHeight);
    return mainPanel;
  }
View Full Code Here

    /**
     * This will show the constraint editor - allowing field constraints to be
     * nested etc.
     */
    private Widget compositeFieldConstraintEditor( final CompositeFieldConstraint constraint ) {
        FlexTable t = new FlexTable();
        String desc = null;

        ClickHandler click = new ClickHandler() {

            public void onClick( ClickEvent event ) {
                popupCreator.showPatternPopupForComposite( (Widget) event.getSource(),
                                                           constraint );
            }
        };

        if ( constraint.getCompositeJunctionType().equals( CompositeFieldConstraint.COMPOSITE_TYPE_AND ) ) {
            desc = Constants.INSTANCE.AllOf() + ":";
        } else {
            desc = Constants.INSTANCE.AnyOf() + ":";
        }

        t.setWidget( 0,
                     0,
                     new ClickableLabel( desc,
                                         click,
                                         !this.readOnly ) );
        t.getFlexCellFormatter().setColSpan( 0,
                                             0,
                                             2 );

        FieldConstraint[] nested = constraint.getConstraints();
        DirtyableFlexTable inner = new DirtyableFlexTable();
        if ( nested != null ) {
            for ( int i = 0; i < nested.length; i++ ) {
                this.renderFieldConstraint( inner,
                                            i,
                                            nested[ i ],
                                            constraint,
                                            true,
                                            0 );
                //add in remove icon here...
                final int currentRow = i;
                Image clear = GuidedRuleEditorImages508.INSTANCE.DeleteItemSmall();
                clear.setTitle( Constants.INSTANCE.RemoveThisNestedRestriction() );
                clear.addClickHandler( new ClickHandler() {

                    public void onClick( ClickEvent event ) {
                        if ( Window.confirm( Constants.INSTANCE.RemoveThisItemFromNestedConstraint() ) ) {
                            setModified( true );
                            constraint.removeConstraint( currentRow );
                            getModeller().refreshWidget();
                        }
                    }
                } );
                if ( !this.readOnly ) {
                    //This used to be 5 and Connectives were not rendered
                    inner.setWidget( i,
                                     6,
                                     clear );
                }
            }
        }

        t.setWidget( 1,
                     1,
                     inner );
        t.setWidget( 1,
                     0,
                     new HTML( "&nbsp;&nbsp;&nbsp;&nbsp;" ) );
        return t;
    }
View Full Code Here

  private TextBox accessionText = new TextBox();
  private Button downloadButton = new Button("Download");
 
  public FetchDataWidget() {
    VerticalPanel panel = new VerticalPanel();
    FlexTable table = new FlexTable();
    table.setText(0, 0, "CIK");   
    table.setWidget(0, 1, cikText);
    table.setText(1, 0, "Accession number");
    table.setWidget(1, 1, accessionText);
    panel.add(table);
    panel.add(downloadButton);
   
    initWidget(panel);
  }
View Full Code Here

TOP

Related Classes of com.google.gwt.user.client.ui.FlexTable

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.