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);