Example usage for com.google.gwt.user.client.ui Label getText

List of usage examples for com.google.gwt.user.client.ui Label getText

Introduction

In this page you can find the example usage for com.google.gwt.user.client.ui Label getText.

Prototype

public String getText() 

Source Link

Usage

From source file:com.novartis.pcs.ontology.webapp.client.view.AddSynonymPopup.java

License:Apache License

private void addDialogWidgets() {
    VerticalPanel dialogVPanel = new VerticalPanel();
    HorizontalPanel buttonsHPanel = new HorizontalPanel();
    Button cancelButton = new Button("Cancel");

    cancelButton.addClickHandler(new ClickHandler() {
        public void onClick(ClickEvent event) {
            synonymField.setValue(null);
            synonymError.setText(null);//  w ww .j  av a  2 s .c  om
            typeDropBox.setSelectedIndex(typeDropBox.getItemCount() - 1);
            sourceDropBox.setSelectedIndex(0);
            referenceIdField.setEnabled(false);
            referenceIdField.setValue(null);
            addButton.setEnabled(false);
            dialogBox.hide();
        }
    });

    buttonsHPanel.add(addButton);
    buttonsHPanel.add(cancelButton);
    buttonsHPanel.addStyleName("dialog-buttons");

    dialogVPanel.setVerticalAlignment(HasVerticalAlignment.ALIGN_MIDDLE);
    dialogVPanel.setHorizontalAlignment(VerticalPanel.ALIGN_LEFT);
    dialogVPanel.add(new Label("Synonym:"));
    dialogVPanel.add(synonymField);
    dialogVPanel.add(synonymError);
    dialogVPanel.add(new Label("Type:"));
    dialogVPanel.add(typeDropBox);
    dialogVPanel.add(typeError);
    dialogVPanel.add(new Label("Source:"));
    dialogVPanel.add(sourceDropBox);
    dialogVPanel.add(sourceError);
    dialogVPanel.add(new Label("Reference Id:"));
    dialogVPanel.add(referenceIdField);
    dialogVPanel.add(referenceIdError);
    dialogVPanel.add(buttonsHPanel);
    dialogVPanel.setCellHorizontalAlignment(buttonsHPanel, VerticalPanel.ALIGN_CENTER);

    for (Widget widget : dialogVPanel) {
        if (widget instanceof Label) {
            Label label = (Label) widget;
            if (label.getText().length() != 0) {
                label.addStyleName("dialog-label");
            } else {
                label.addStyleName("dialog-error");
            }
        }
    }

    dialogBox.setWidget(dialogVPanel);
}

From source file:com.novartis.pcs.ontology.webapp.client.view.CreateChildTermPopup.java

License:Apache License

private void addDialogWidgets() {
    VerticalPanel dialogVPanel = new VerticalPanel();
    HorizontalPanel buttonsHPanel = new HorizontalPanel();
    HorizontalPanel relshipTypeHPanel = new HorizontalPanel();
    Button cancelButton = new Button("Cancel");

    TextColumn<ControlledVocabularyTerm> synonymTypeColumn = new TextColumn<ControlledVocabularyTerm>() {
        @Override//from   w  w w .  jav  a 2s  .c  o  m
        public String getValue(ControlledVocabularyTerm term) {
            return synonymType != null ? synonymType.toString() : Synonym.Type.RELATED.toString();
        }
    };

    cancelButton.addClickHandler(new ClickHandler() {
        public void onClick(ClickEvent event) {
            nameField.setValue(null);
            nameError.setText(null);
            definitionField.setValue(null);
            urlField.setValue(null);
            urlError.setText(null);
            commentsField.setValue(null);
            sourceDropBox.setSelectedIndex(0);
            referenceIdField.setEnabled(false);
            referenceIdField.setValue(null);
            synonymError.setText(null);
            createButton.setEnabled(false);

            dialogBox.hide();
        }
    });

    relshipTypeHPanel.add(typeDropBox);
    relshipTypeHPanel.add(parentTermLabel);
    parentTermLabel.getElement().getStyle().setMarginLeft(12, Unit.PX);
    parentTermLabel.getElement().getStyle().setVerticalAlign(VerticalAlign.MIDDLE);
    parentTermLabel.getElement().getStyle().setFontWeight(FontWeight.BOLD);

    buttonsHPanel.add(createButton);
    buttonsHPanel.add(cancelButton);
    buttonsHPanel.addStyleName("dialog-buttons");

    dialogVPanel.setHorizontalAlignment(VerticalPanel.ALIGN_LEFT);
    dialogVPanel.add(new Label("Name:"));
    dialogVPanel.add(nameField);
    dialogVPanel.add(nameError);
    dialogVPanel.add(new Label("Definition:"));
    dialogVPanel.add(definitionField);
    dialogVPanel.add(definitionError);
    dialogVPanel.add(new Label("URL:"));
    dialogVPanel.add(urlField);
    dialogVPanel.add(urlError);
    dialogVPanel.add(new Label("Comments:"));
    dialogVPanel.add(commentsField);
    dialogVPanel.add(commentsError);
    dialogVPanel.add(new Label("Source:"));
    dialogVPanel.add(sourceDropBox);
    dialogVPanel.add(sourceError);
    dialogVPanel.add(new Label("Reference Id:"));
    dialogVPanel.add(referenceIdField);
    dialogVPanel.add(referenceIdError);

    synonymTable.setWidth("100%");
    synonymTable.addStyleName("gwt-CellTable");
    synonymTable.setKeyboardSelectionPolicy(KeyboardSelectionPolicy.DISABLED);
    synonymTable
            .setSelectionModel(new NoSelectionModel<ControlledVocabularyTerm>(synonymTable.getKeyProvider()));

    synonymTable.addColumn(new NameColumn(), "Synonym");
    synonymTable.addColumn(synonymTypeColumn, "Type");
    synonymTable.addColumn(new SourceColumn(), "Source");
    dialogVPanel.add(synonymTable);
    dialogVPanel.add(synonymError);

    dialogVPanel.add(new Label("Relationship:"));
    //dialogVPanel.add(typeDropBox);
    dialogVPanel.add(relshipTypeHPanel);
    dialogVPanel.add(typeError);

    dialogVPanel.add(buttonsHPanel);
    dialogVPanel.setCellHorizontalAlignment(buttonsHPanel, VerticalPanel.ALIGN_CENTER);

    for (Widget widget : dialogVPanel) {
        if (widget instanceof Label) {
            Label label = (Label) widget;
            if (label.getText().length() != 0) {
                label.addStyleName("dialog-label");
            } else {
                label.addStyleName("dialog-error");
            }
        }
    }

    dialogBox.setWidget(dialogVPanel);
}

From source file:com.novartis.pcs.ontology.webapp.client.view.EditTermPopup.java

License:Apache License

private void addDialogWidgets() {
    VerticalPanel dialogVPanel = new VerticalPanel();
    HorizontalPanel buttonsHPanel = new HorizontalPanel();
    Button cancelButton = new Button("Cancel");

    cancelButton.addClickHandler(new ClickHandler() {
        public void onClick(ClickEvent event) {
            dialogBox.hide();//from  ww w  .  ja v a 2 s  .  co  m
        }
    });

    buttonsHPanel.add(updateButton);
    buttonsHPanel.add(cancelButton);
    buttonsHPanel.addStyleName("dialog-buttons");

    dialogVPanel.setHorizontalAlignment(VerticalPanel.ALIGN_LEFT);
    dialogVPanel.add(new Label("Definition:"));
    dialogVPanel.add(definitionField);
    dialogVPanel.add(definitionError);
    dialogVPanel.add(new Label("URL:"));
    dialogVPanel.add(urlField);
    dialogVPanel.add(urlError);
    dialogVPanel.add(new Label("Comments:"));
    dialogVPanel.add(commentsField);
    dialogVPanel.add(commentsError);

    dialogVPanel.add(buttonsHPanel);
    dialogVPanel.setCellHorizontalAlignment(buttonsHPanel, VerticalPanel.ALIGN_CENTER);

    for (Widget widget : dialogVPanel) {
        if (widget instanceof Label) {
            Label label = (Label) widget;
            if (label.getText().length() != 0) {
                label.addStyleName("dialog-label");
            } else {
                label.addStyleName("dialog-error");
            }
        }
    }

    dialogBox.setWidget(dialogVPanel);
}

From source file:com.qualogy.qafe.gwt.client.component.QPagingScrollTable.java

License:Apache License

private boolean isColumnHeadersChanged() {
    final DataGridColumnGVO[] dataGridColumns = source.getColumns();

    // Number of columns has been changed, so the columnHeaders
    if (getHeaderTable().getColumnCount() != dataGridColumns.length) {
        return true;
    }//w w w . j a v a 2s.  c  om

    // Fill map with columnNames for faster processing
    final Map<String, String> map = new HashMap<String, String>();
    for (int i = 0; i < dataGridColumns.length; i++) {
        final DataGridColumnGVO dataGridColumn = dataGridColumns[i];
        if (dataGridColumn != null) {
            String displayName = dataGridColumn.getDisplayname();
            if (displayName == null) {
                displayName = dataGridColumn.getFieldName();
            }
            if (displayName != null) {
                map.put(displayName, null);
            }
        }
    }

    // Check existence of all columnNames
    final Iterator<Widget> itrWidget = getHeaderTable().iterator();
    while (itrWidget.hasNext()) {
        final Widget widget = itrWidget.next();
        if (widget instanceof Label) {
            final Label label = (Label) widget;
            if (!map.containsKey(label.getText())) {
                return true;
            }
        }
    }
    return false;
}

From source file:com.sun.labs.aura.dbbrowser.client.shell.ShellUI.java

License:Open Source License

protected Label addToHistory(String cmd) {
    ////  ww w . j  a v  a2 s. c om
    // Make a link that runs the command and add it to the top of the
    // panel
    Label cmdLabel = new Label(cmd);
    cmdLabel.setStylePrimaryName("shell-cmdLabel");
    cmdLabel.addClickListener(new ClickListener() {
        public void onClick(Widget sender) {
            Label clicked = (Label) sender;
            String text = clicked.getText();
            cmdInput.setText(text);
            cmdInput.selectAll();
            sendCommand(clicked, text);
        }
    });
    history.insert(cmdLabel, 0);
    return cmdLabel;
}

From source file:com.webwoz.wizard.client.wizardlayouts.DefaultWizardScreen.java

License:Apache License

private void buildLayout() {

    // hide popups
    editUtterancesPopup.hide();//from w w w .jav  a 2 s  .c o m
    editTabsPopup.hide();
    printReportPopup.hide();
    editDomainDataPopup.hide();
    editSlotPopUp.hide();
    addSlotPopUp.hide();
    editFreeTextPopUp.hide();

    // load user
    loadUser();

    // status
    signalPanel.clear();
    loggedInHtml.setHTML("<div><strong>Logged out</strong></div>");
    statusHtml.setHTML("");
    signalPanel.add(loggedInHtml);
    signalPanel.add(statusHtml);
    signalPanel.setWidth("220px");

    // edit panel
    editPanel.clear();
    editPanel.add(semLabel);
    semLabel.setStyleName("labelVertical");
    semLabel.addStyleName("strong");
    editPanel.add(semKeyTextBox);
    semKeyTextBox.setWidth("100px");
    semKeyTextBox.setStyleName("text");

    editPanel.add(textLabel);
    textLabel.setStyleName("labelVertical");
    textLabel.addStyleName("strong");
    editPanel.add(textTextArea);
    textTextArea.setCharacterWidth(110);
    textTextArea.setVisibleLines(3);
    textTextArea.setStyleName("text");

    editPanel.add(audioLabel);
    audioLabel.setStyleName("labelVertical");
    audioLabel.addStyleName("strong");
    editPanel.add(audioFileTextBox);
    audioFileTextBox.setWidth("400px");
    audioFileTextBox.setStyleName("text");

    editPanel.add(mmLabel);
    mmLabel.setStyleName("labelVertical");
    mmLabel.addStyleName("strong");
    editPanel.add(mmFileTextBox);
    mmFileTextBox.setWidth("400px");
    mmFileTextBox.setStyleName("text");

    editPanel.add(translationLabel);
    translationLabel.setStyleName("labelVertical");
    translationLabel.addStyleName("strong");
    editPanel.add(translTextArea);
    translTextArea.setCharacterWidth(110);
    translTextArea.setVisibleLines(3);
    translTextArea.setStyleName("text");

    editPanel.add(translationAudioLabel);
    translationAudioLabel.setStyleName("labelVertical");
    translationAudioLabel.addStyleName("strong");
    editPanel.add(translAudioFileTextBox);
    translAudioFileTextBox.setWidth("400px");
    translAudioFileTextBox.setStyleName("text");

    editPanel.add(translationMMLabel);
    translationMMLabel.setStyleName("labelVertical");
    translationMMLabel.addStyleName("strong");
    editPanel.add(translMMFileTextBox);
    translMMFileTextBox.setWidth("400px");
    translMMFileTextBox.setStyleName("text");

    editPanel.add(tabLabel);
    tabLabel.setStyleName("labelVertical");
    tabLabel.addStyleName("strong");
    editPanel.add(editTabUttList);
    editTabUttList.setStyleName("list");

    editPanel.add(rankLabel);
    rankLabel.setStyleName("labelVertical");
    editPanel.add(rankTextBox);
    rankTextBox.setWidth("30px");
    rankTextBox.setStyleName("text");
    // for the moment set invisible
    rankLabel.setVisible(false);
    rankTextBox.setVisible(false);

    changeUttEditButton.setStyleName("buttonHorizontal");
    addUttEditButton.setStyleName("buttonHorizontal");
    cancelUttEditButton.setStyleName("buttonHorizontal");
    deleteUttEditButton.setStyleName("buttonHorizontal");

    editButtonsPanel.clear();
    editButtonsPanel.add(deleteUttEditButton);
    editButtonsPanel.add(changeUttEditButton);
    editButtonsPanel.add(addUttEditButton);
    editButtonsPanel.add(cancelUttEditButton);
    editPanel.add(editButtonsPanel);
    editPanel.setStyleName("editPanel");
    editPanel.setHeight("500px");
    editPanel.setWidth("810px");

    // edit tabs panel error
    editTabsErrorLabel.setStyleName("error");

    // edit domain data panel
    editDomainDataPanel.clear();
    editDomainDataPanel.add(semDomainLabel);
    semDomainLabel.setStyleName("labelVertical");
    semDomainLabel.addStyleName("strong");
    editDomainDataPanel.add(semKeyDomainTextBox);
    semKeyDomainTextBox.setWidth("100px");
    semKeyDomainTextBox.setStyleName("text");

    editDomainDataPanel.add(textDomainLabel);
    textDomainLabel.setStyleName("labelVertical");
    textDomainLabel.addStyleName("strong");
    editDomainDataPanel.add(textDomainTextArea);
    textDomainTextArea.setCharacterWidth(110);
    textDomainTextArea.setVisibleLines(3);
    textDomainTextArea.setStyleName("text");

    editDomainDataPanel.add(audioDomainLabel);
    audioDomainLabel.setStyleName("labelVertical");
    audioDomainLabel.addStyleName("strong");
    editDomainDataPanel.add(audioFileDomainTextBox);
    audioFileDomainTextBox.setWidth("400px");
    audioFileDomainTextBox.setStyleName("text");

    editDomainDataPanel.add(mmDomainLabel);
    mmDomainLabel.setStyleName("labelVertical");
    mmDomainLabel.addStyleName("strong");
    editDomainDataPanel.add(mmFileDomainTextBox);
    mmFileDomainTextBox.setWidth("400px");
    mmFileDomainTextBox.setStyleName("text");

    editDomainDataPanel.add(translationDomainLabel);
    translationDomainLabel.setStyleName("labelVertical");
    translationDomainLabel.addStyleName("strong");
    editDomainDataPanel.add(translDomainTextArea);
    translDomainTextArea.setCharacterWidth(110);
    translDomainTextArea.setVisibleLines(3);
    translDomainTextArea.setStyleName("text");

    editDomainDataPanel.add(translationDomainAudioLabel);
    translationDomainAudioLabel.setStyleName("labelVertical");
    translationDomainAudioLabel.addStyleName("strong");
    editDomainDataPanel.add(translAudioFileDomainTextBox);
    translAudioFileDomainTextBox.setWidth("400px");
    translAudioFileDomainTextBox.setStyleName("text");

    editDomainDataPanel.add(translationDomainMMLabel);
    translationDomainMMLabel.setStyleName("labelVertical");
    translationDomainMMLabel.addStyleName("strong");
    editDomainDataPanel.add(translMMFileDomainTextBox);
    translMMFileDomainTextBox.setWidth("400px");
    translMMFileDomainTextBox.setStyleName("text");

    editDomainFilterPanel.setStyleName("editDomainFilterPanel");
    editDomainFilterPanel.addStyleName("strong");
    editDomainDataPanel.add(editDomainFilterPanel);
    changeUttDomainEditButton.setStyleName("buttonHorizontal");
    addUttDomainEditButton.setStyleName("buttonHorizontal");
    cancelUttDomainEditButton.setStyleName("buttonHorizontal");
    deleteUttDomainEditButton.setStyleName("buttonHorizontal");

    editDomainButtonsPanel.clear();
    editDomainButtonsPanel.add(deleteUttDomainEditButton);
    editDomainButtonsPanel.add(changeUttDomainEditButton);
    editDomainButtonsPanel.add(addUttDomainEditButton);
    editDomainButtonsPanel.add(cancelUttDomainEditButton);
    editDomainDataPanel.add(editDomainButtonsPanel);
    editDomainDataPanel.setStyleName("editPanel");
    editDomainDataPanel.setHeight("500px");
    editDomainDataPanel.setWidth("810px");

    // edit slots
    editFilterPanel.clear();
    editFilterPanel.add(editFilterTextBox);
    editFilterSaveButton.setStyleName("button");
    editFilterDeleteButton.setStyleName("button");
    editFilterPanel.add(editFilterSaveButton);
    editFilterPanel.add(editFilterDeleteButton);
    cancelEditSlotPopUpButton.setStyleName("cancelEditSlotPopUpButton");
    editFilterPanel.setStyleName("editFilterPanel");

    editSlotPopUpPanel.clear();
    editSlotPopUpPanel.add(editFilterPanel);
    editFilterSlotValues.setStyleName("editFilterSlotValues");
    editSlotPopUpPanel.add(editFilterSlotValues);
    editSlotPopUpPanel.add(editFilterSlotCollectionPanel);

    editFilterAddSlotPanel.clear();
    editFilterAddSlotPanel.add(editFilterAddSlotTextBox);
    editFilterAddSlotButton.setStyleName("button");
    editFilterAddSlotPanel.add(editFilterAddSlotButton);
    editFilterAddSlotPanel.setStyleName("editFilterSlotValues");
    errorDeleteSlotValueLabel.setStyleName("errorSlot");

    editSlotPopUpPanel.add(errorDeleteSlotValueLabel);
    editSlotPopUpPanel.add(editFilterAddSlotPanel);
    editSlotPopUpPanel.add(cancelEditSlotPopUpButton);

    // add slots
    addFilterPanel.clear();
    addFilterPanel.add(addFilterTextBox);
    addFilterPanel.add(addFilterLabel);
    addFilterLabel.setStyleName("labelLeft");
    addFilterLabel.addStyleName("strong");
    addFilterPanel.setStyleName("editFilterPanel");

    addFilterSlotCollection.clear();
    addFilterSlotCollection.setStyleName("addFilterSlotCollection");
    addFilterSlotCollection.add(addFiltersStandardSlotPanel);

    addFiltersStandardSlotPanel.clear();
    addFiltersStandardSlotPanel.add(standardFilterValueTextBox);
    standardFilterValueTextBox.setText("Default-");
    standardFilterValueLabel.setStyleName("labelLeft");
    standardFilterValueLabel.addStyleName("strong");
    addFiltersStandardSlotPanel.add(standardFilterValueLabel);
    standardFilterValueExpLabel.setStyleName("standardFilterValueExpLabel");
    addFilterSlotCollection.add(standardFilterValueExpLabel);

    addFilterValuePanel.clear();
    addFilterValuePanel.setStyleName("addFilterSlotCollection");
    addFilterValuePanel.add(addFilterValueTextBox);
    addFilterValuePanel.add(addFilterValueButton);
    addFilterValueButton.setStyleName("button");

    addFilterButtons.clear();
    addFilterButtons.setStyleName("addFilterButtons");
    addFilterSaveButton.setStyleName("button");
    addFilterButtons.add(addFilterSaveButton);
    cancelAddSlotPopUpButton.setStyleName("button");
    addFilterButtons.add(cancelAddSlotPopUpButton);

    addSlotPopUpPanel.clear();
    addSlotPopUpPanel.add(addFilterPanel);
    addSlotPopUpPanel.add(addFilterSlotCollection);
    addSlotPopUpPanel.add(addFilterValuePanel);
    // for now keep it invisible
    // addFilterValuePanel.setVisible(false);
    addSlotPopUpPanel.add(addFilterButtons);

    // define size recoveryPanel
    recoveryHeadingLabel.setText("Frequently Used Utterances:");
    recoveryHeadingLabel.setStyleName("recoveryHeading");
    recoveryPanel.setStyleName("recoveryPanel");
    recoveryScrollPanel.clear();
    recoveryScrollPanel.setWidth("310px");
    recoveryScrollPanel.add(recoveryUtterancePanel);

    // experiment Notes
    experimentNotesPanel.clear();

    experimentNotesContainer.clear();
    experimentNotesContainer.setHeight("150px");
    experimentNotesContainer.setWidth("250px");
    experimentNotesContainer.setStyleName("experimentNotesContainer");
    experimentNotesContainer.add(experimentNotesCollection);

    experimentNotesCollection.setStyleName("experimentNotesPanel");

    experimentNotesPanel.add(experimentNotesContainer);
    experimentNotesPanel.add(saveNotesButton);
    saveNotesButton.setStyleName("saveNotesbutton");
    experimentNotesPanel.setStyleName("experimentNotesPanel");

    // domain Data
    domainDataResponseScrollPanel.clear();
    domainDataResponseScrollPanel.add(domainDataResponsePanel);
    domainDataResponseScrollPanel.setStyleName("domainDataPanel");
    domainDataResponseScrollPanel.setHeight("90px");
    domainDataResponseScrollPanel.setWidth("800px");

    domainDataSlotScrollPanel.clear();
    domainDataSlotScrollPanel.add(domainDataSlotCollectionPanel);
    domainDataSlotCollectionPanel.setStyleName("domainDataSlotPanel");
    domainDataSlotScrollPanel.setHeight("90px");
    domainDataSlotScrollPanel.setWidth("800px");

    domainDataFreeTextScrollPanel.clear();
    domainDataFreeTextScrollPanel.add(freeTextElementsCollectionPanel);
    domainDataFreeTextScrollPanel.setStyleName("domainDataPanel");
    domainDataFreeTextScrollPanel.setHeight("90px");
    domainDataFreeTextScrollPanel.setWidth("800px");

    // wizard correction
    wizardCorrectionScrollPanel.clear();
    wizardCorrectionScrollPanel.add(wizardCorrectionPanel);
    wizardCorrectionScrollPanel.setStyleName("domainDataPanel");
    wizardCorrectionScrollPanel.setHeight("357px");
    wizardCorrectionScrollPanel.setWidth("806px");

    // n-best list
    nBestListScrollPanel.clear();
    nBestListScrollPanel.add(nBestListPanel);
    nBestListScrollPanel.setStyleName("domainDataPanel");
    nBestListScrollPanel.setHeight("357px");
    nBestListScrollPanel.setWidth("806px");

    // free text field
    shoutBoxTexatArea.setCharacterWidth(100);
    shoutBoxTexatArea.setVisibleLines(5);
    shoutPanel.clear();
    shoutPanel.add(shoutBoxTexatArea);
    shoutPanel.add(sendFreeTextButton);
    sendFreeTextButton.setStyleName("button");
    shoutPanel.setStyleName("domainDataPanel");
    shoutBoxTexatArea.setText("");
    freeTextPanel.clear();
    freeTextPanel.add(shoutPanel);
    freeTextPanel.setHeight("90px");
    freeTextPanel.setWidth("806px");

    domainDataTabPanel.setWidth("825px");
    domainDataTabPanel.setHeight("140px");
    domainDataTabPanel.setStyleName("domainData");
    domainDataTabPanel.clear();
    domainDataTabPanel.add(domainDataResponseScrollPanel, "Domain Data");
    domainDataTabPanel.add(domainDataSlotScrollPanel, "Filter");
    domainDataTabPanel.add(freeTextPanel, "Free Text");

    domainDataTabPanel.selectTab(0);
    // turn off visibilty at the beginning
    domainDataTabPanel.setVisible(false);

    userPanel.clear();
    userPanel.add(startEditButton);
    startEditButton.setStyleName("button");
    userPanel.add(endEditButton);
    endEditButton.setStyleName("button");
    endEditButton.setVisible(false);
    user.setStyleName("user");
    userPanel.add(user);
    userPanel.add(userList);
    userList.setStyleName("list");
    userPanel.add(signalPanel);
    userPanel.setStyleName("userPanel");
    openReportButton.setStyleName("showReportButton");
    endExperimentMarkerButton.setStyleName("showReportButton");
    userPanel.add(openReportButton);
    userPanel.add(endExperimentMarkerButton);
    processingButton.setStyleName("processingButton");

    editHeadingButtonsPanel.clear();
    editHeadingButtonsPanel.add(addUttButton);
    addUttButton.setStyleName("button");
    editHeadingButtonsPanel.add(editTabsButton);
    editTabsButton.setStyleName("button");
    editHeadingButtonsPanel.add(addDomainDataButton);
    addDomainDataButton.setStyleName("button");
    editHeadingButtonsPanel.add(addFilterButton);
    addFilterButton.setStyleName("button");
    editHeadingButtonsPanel.setVisible(false);
    editHeadingButtonsPanel.setStyleName("editHeadingPanel");

    // history
    historyPanel.clear();
    historyPanel.setStyleName("historyPanel");
    historyPanel.add(historyHeadingLabel);
    historyHeadingLabel.setStyleName("historyHeading");
    historyPanel.add(historyUtterancesScrollPanel);
    historyUtterancesScrollPanel.setWidth("800px");
    historyUtterancesScrollPanel.setHeight("65px");
    historyUtterancesPanel.setWidth("750px");
    historyUtterancesPanel.setStyleName("historyUtterancesPanel");

    // report panel
    reportContentHeadingPanel.clear();
    reportContentHeadingPanel.add(reportHeadingTable);
    reportContentHeadingPanel.setStyleName("reportContentScrollPanel");
    reportContentHeadingPanel.setWidth("880px");
    reportContentScrollPanel.add(reportTable);
    reportContentScrollPanel.setStyleName("reportContentScrollPanel");
    reportContentScrollPanel.setWidth("880px");
    reportContentScrollPanel.setHeight("450px");
    reportPanel.clear();
    reportPanel.add(reportContentHeadingPanel);
    reportPanel.add(reportContentScrollPanel);
    reportPanel.add(reportButtonsPanel);

    reportButtonsPanel.clear();
    reportButtonsPanel.setStyleName("reportButtons");
    printReportButton.setStyleName("button");
    reportButtonsPanel.add(printReportButton);
    exportReportButton.setStyleName("button");
    reportButtonsPanel.add(exportReportButton);
    closeReportButton.setStyleName("button");
    reportButtonsPanel.add(closeReportButton);
    reportPanel.setWidth("900px");
    reportPanel.setHeight("500px");

    // free text panel
    preparedFreeTextPanel.clear();
    preparedFreeTextPanel.add(preparedFreeTextSemKeyLabel);
    preparedFreeTextPanel.add(preparedFreeTextShortTextBox);
    preparedFreeTextPanel.add(preparedFreeTextLabel);
    preparedFreeTextPanel.add(preparedFreeTextTextArea);
    preparedFreeTextTextArea.setText("");
    preparedFreeTextShortTextBox.setText("");
    preparedFreeTextTextArea.setCharacterWidth(50);
    preparedFreeTextTextArea.setVisibleLines(5);
    preparedFreeTextButtonsPanel.clear();
    preparedFreeTextButtonsPanel.add(addFreeTextButton);
    preparedFreeTextButtonsPanel.add(deleteFreeTextButton);
    preparedFreeTextButtonsPanel.add(editFreeTextButton);
    preparedFreeTextButtonsPanel.add(closeFreeTextButton);
    preparedFreeTextPanel.add(preparedFreeTextButtonsPanel);
    addFreeTextButton.setStyleName("button");
    deleteFreeTextButton.setStyleName("button");
    editFreeTextButton.setStyleName("button");
    closeFreeTextButton.setStyleName("button");
    preparedFreeTextSemKeyLabel.setStyleName("labelVertical");
    preparedFreeTextSemKeyLabel.addStyleName("strong");
    preparedFreeTextLabel.setStyleName("labelVertical");
    preparedFreeTextLabel.addStyleName("strong");
    preparedFreeTextPanel.setStyleName("preparedFreeTextPanel");
    editFreeTextPanel.clear();
    editFreeTextPanel.add(preparedFreeTextPanel);

    // add to Layout
    leftPanel.clear();
    leftPanel.add(historyPanel);
    leftPanel.add(editHeadingButtonsPanel);
    leftPanel.add(domainDataTabPanel);
    leftPanel.add(dialogueStructurePanel);

    recoveryPanel.clear();
    recoveryPanel.add(recoveryHeadingLabel);
    recoveryPanel.add(processingButton);
    recoveryPanel.add(recoveryScrollPanel);
    experimentNotesHeading.setStyleName("experimentNotesHeading");
    experimentNotesHeading.setWidth("100px");

    rightPanel.clear();
    rightPanel.add(recoveryPanel);

    notesHeadingPanel.add(experimentNotesHeading);
    notesHeadingPanel.add(exportNotesButton);
    exportNotesButton.setStyleName("experimentNotesHeadingButton");
    notesHeadingPanel.setStyleName("notesHeadingPanel");

    rightPanel.add(notesHeadingPanel);
    rightPanel.add(experimentNotesPanel);

    horLayoutPanel.clear();
    horLayoutPanel.add(leftPanel);
    horLayoutPanel.add(rightPanel);

    layoutPanel.clear();
    layoutPanel.add(userPanel);
    layoutPanel.add(horLayoutPanel);

    // handler
    processingButton.addClickHandler(new ClickHandler() {
        public void onClick(ClickEvent event) {
            statusUpdate = false;
            getTimeStamp();
        }
    });

    startEditButton.addClickHandler(new ClickHandler() {
        public void onClick(ClickEvent event) {
            // turn status update off
            statusUpdate = false;

            reloadFreeText = true;

            endEditButton.setVisible(true);
            startEditButton.setVisible(false);
            editHeadingButtonsPanel.setVisible(true);

            sendFreeTextButton.setVisible(false);

            // standard response utterances
            for (int i = 0; i < countUtt; i++) {
                uttPanel[i].setStyleName("utteranceEdit");
                uttPanel[i].getWidget(0).setVisible(false);
                uttPanel[i].getWidget(1).setVisible(true);
                uttPanel[i].getWidget(2).setVisible(false);
                uttPanel[i].getWidget(4).setVisible(true);
                uttPanel[i].getWidget(5).setVisible(true);
            }
            // domain data
            for (int i = 0; i < countDomainUtt; i++) {
                domainUttPanel[i].setStyleName("utteranceEdit");
                domainUttPanel[i].getWidget(1).setVisible(false);
                domainUttPanel[i].getWidget(2).setVisible(true);
            }
            // free text elements
            if (domainDataFreeTextPanels != null) {
                for (int i = 0; i < domainDataFreeTextPanels.length; i++) {
                    domainDataFreeTextPanels[i].setStyleName("utteranceEdit");
                    domainDataFreeTextPanels[i].getWidget(0).setVisible(false);
                    domainDataFreeTextPanels[i].getWidget(1).setVisible(true);
                }
            }
            // slots
            if (domainDataSlotEditButtons != null) {
                for (int i = 0; i < domainDataSlotEditButtons.length; i++) {
                    domainDataSlotEditButtons[i].setVisible(true);
                }
            }
        }
    });

    endEditButton.addClickHandler(new ClickHandler() {
        public void onClick(ClickEvent event) {
            // turn on status information
            statusUpdate = true;
            reloadMode = 0;
            reload = true;
            reloadFreeText = false;

            endEditButton.setVisible(false);
            startEditButton.setVisible(true);
            editHeadingButtonsPanel.setVisible(false);

            sendFreeTextButton.setVisible(true);

            // standard response utterances
            for (int i = 0; i < countUtt; i++) {
                uttPanel[i].setStyleName("utterance");
                uttPanel[i].getWidget(0).setVisible(true);
                uttPanel[i].getWidget(1).setVisible(false);
                uttPanel[i].getWidget(2).setVisible(true);
                uttPanel[i].getWidget(4).setVisible(false);
                uttPanel[i].getWidget(5).setVisible(false);

            }
            // domain data

            for (int i = 0; i < countDomainUtt; i++) {
                domainUttPanel[i].setStyleName("utterance");
                domainUttPanel[i].getWidget(1).setVisible(true);
                domainUttPanel[i].getWidget(2).setVisible(false);
            }
            // free text
            if (domainDataFreeTextPanels != null) {
                for (int i = 0; i < domainDataFreeTextPanels.length; i++) {
                    domainDataFreeTextPanels[i].setStyleName("utterance");
                    domainDataFreeTextPanels[i].getWidget(0).setVisible(true);
                    domainDataFreeTextPanels[i].getWidget(1).setVisible(false);
                }
            }
            // slots
            if (domainDataSlotEditButtons != null) {
                for (int i = 0; i < domainDataSlotEditButtons.length; i++) {
                    domainDataSlotEditButtons[i].setVisible(false);
                }
            }
        }
    });

    cancelUttEditButton.addClickHandler(new ClickHandler() {
        public void onClick(ClickEvent event) {
            editUtterancesPopup.hide();
        }
    });

    changeUttEditButton.addClickHandler(new ClickHandler() {
        public void onClick(ClickEvent event) {

            // clean from hivens
            semKey = clearHiven(semKeyTextBox.getText());
            rank = clearHiven(rankTextBox.getText());
            text = clearHiven(textTextArea.getText());
            audio = clearHiven(audioFileTextBox.getText());
            mm = clearHiven(mmFileTextBox.getText());
            transtext = clearHiven(translTextArea.getText());
            transaudio = clearHiven(translAudioFileTextBox.getText());
            transmm = clearHiven(translMMFileTextBox.getText());

            selectedTab = dialogueStructurePanel.getTabBar().getSelectedTab();

            String sql = "Update recording set semkey = '" + semKey + "', section = "
                    + editTabUttList.getSelectedIndex() + ", rank = " + rank + ", origtext = '" + text
                    + "', origaudiofile = '" + audio + "', origmmfile = '" + mm + "', transtext = '" + transtext
                    + "', transaudiofile = '" + transaudio + "', transmmfile = '" + transmm + "' where id = "
                    + editUtt;
            changeUtt(sql, 1);
            editUtterancesPopup.hide();
        }
    });

    changeUttDomainEditButton.addClickHandler(new ClickHandler() {
        public void onClick(ClickEvent event) {

            semKey = clearHiven(semKeyDomainTextBox.getText());
            text = clearHiven(textDomainTextArea.getText());
            audio = clearHiven(audioFileDomainTextBox.getText());
            mm = clearHiven(mmFileDomainTextBox.getText());
            transtext = clearHiven(translDomainTextArea.getText());
            transaudio = clearHiven(translAudioFileDomainTextBox.getText());
            transmm = clearHiven(translMMFileDomainTextBox.getText());

            selectedDomainTab = domainDataTabPanel.getTabBar().getSelectedTab();

            String sql1 = "Update domaindata set semkey = '" + semKey + "', origtext = '" + text
                    + "', origaudiofile = '" + audio + "', origmmfile = '" + mm + "', transtext = '" + transtext
                    + "', transaudiofile = '" + transaudio + "', transmmfile = '" + transmm + "' where id = "
                    + editDomainUtt + "; ";

            // build sql to update the different filter
            String sql2 = "";
            if (slotsExist) {
                for (int i = 0; i < filterHeadingLabel.length; i++) {
                    sql2 = sql2
                            + "update domaindataslot inner join slot on domaindataslot.slotid = slot.id set slotid = "
                            + filterList[i].getValue(filterList[i].getSelectedIndex()) + " where name = '"
                            + filterHeadingLabel[i].getText() + "' and dataid = " + editDomainUtt + "; ";
                }
            }

            // Merge the sql statements
            String sql = sql1 + sql2;
            changeUtt(sql, 1);
            editDomainDataPopup.hide();
        }
    });

    editFilterSaveButton.addClickHandler(new ClickHandler() {
        public void onClick(ClickEvent event) {

            newFilter = clearHiven(editFilterTextBox.getText());

            selectedDomainTab = domainDataTabPanel.getTabBar().getSelectedTab();

            String sql = "Update Slot set name = '" + newFilter + "' where name = '" + editSlot
                    + "' and expid = " + expId + ";";
            changeUtt(sql, 4);
        }
    });

    editFilterDeleteButton.addClickHandler(new ClickHandler() {
        public void onClick(ClickEvent event) {

            selectedDomainTab = domainDataTabPanel.getTabBar().getSelectedTab();

            String sql = "Delete domaindataslot from domaindataslot inner join slot where slot.id = domaindataslot.slotid and slot.name = '"
                    + editSlot + "' and slot.expid = " + expId + "; ";
            sql = sql + "Delete from slot where name = '" + editSlot + "' and expid = " + expId + ";";
            changeUtt(sql, 1);
            editSlotPopUp.hide();
        }
    });

    deleteUttEditButton.addClickHandler(new ClickHandler() {
        public void onClick(ClickEvent event) {

            selectedTab = dialogueStructurePanel.getTabBar().getSelectedTab();

            String sql = "Delete from recording where id = " + editUtt;
            changeUtt(sql, 1);
            editUtterancesPopup.hide();
        }
    });

    deleteUttDomainEditButton.addClickHandler(new ClickHandler() {
        public void onClick(ClickEvent event) {

            selectedDomainTab = domainDataTabPanel.getTabBar().getSelectedTab();

            String sql = "Delete from domaindata where id = " + editDomainUtt + "; ";
            sql = sql + "Delete from domaindataslot where dataid = " + editDomainUtt + ";";
            changeUtt(sql, 1);
            editDomainDataPopup.hide();
        }
    });

    addFilterValueButton.addClickHandler(new ClickHandler() {
        public void onClick(ClickEvent event) {

            selectedDomainTab = domainDataTabPanel.getTabBar().getSelectedTab();

            addFilterSlot();
            addFilterValueTextBox.setText("");
        }
    });

    addUttEditButton.addClickHandler(new ClickHandler() {
        public void onClick(ClickEvent event) {

            semKey = clearHiven(semKeyTextBox.getText());
            rank = clearHiven(rankTextBox.getText());
            text = clearHiven(textTextArea.getText());
            audio = clearHiven(audioFileTextBox.getText());
            mm = clearHiven(mmFileTextBox.getText());
            transtext = clearHiven(translTextArea.getText());
            transaudio = clearHiven(translAudioFileTextBox.getText());
            transmm = clearHiven(translMMFileTextBox.getText());

            selectedTab = dialogueStructurePanel.getTabBar().getSelectedTab();

            String sql = "Insert into recording (expid, semkey, section, rank, origtext, origaudiofile, origmmfile, transtext, transaudiofile, transmmfile) values ("
                    + expId + ", '" + semKey + "', " + editTabUttList.getSelectedIndex() + ", " + rank + ", '"
                    + text + "', '" + audio + "', '" + mm + "', '" + transtext + "', '" + transaudio + "', '"
                    + transmm + "')";

            editUtterancesPopup.hide();
            changeUtt(sql, 1);
        }
    });

    deleteFreeTextButton.addClickHandler(new ClickHandler() {
        public void onClick(ClickEvent event) {
            String sql = "Delete from freetext where id = " + currentFreeTextElement;
            selectedDomainTab = domainDataTabPanel.getTabBar().getSelectedTab();
            reloadMode = 1;
            changeFreeText(sql, 1);
            editFreeTextPopUp.hide();
        }
    });

    editFreeTextButton.addClickHandler(new ClickHandler() {
        public void onClick(ClickEvent event) {
            String sql = "Update freetext set text = '" + preparedFreeTextTextArea.getText() + "', semkey = '"
                    + preparedFreeTextShortTextBox.getText() + "' where id =" + currentFreeTextElement;
            selectedDomainTab = domainDataTabPanel.getTabBar().getSelectedTab();
            reloadMode = 1;
            changeFreeText(sql, 1);
        }
    });

    addUttDomainEditButton.addClickHandler(new ClickHandler() {
        public void onClick(ClickEvent event) {

            // clear hivens
            semKey = clearHiven(semKeyDomainTextBox.getText());
            text = clearHiven(textDomainTextArea.getText());
            audio = clearHiven(audioFileDomainTextBox.getText());
            mm = clearHiven(mmFileDomainTextBox.getText());
            transtext = clearHiven(translDomainTextArea.getText());
            transaudio = clearHiven(translAudioFileDomainTextBox.getText());
            transmm = clearHiven(translMMFileDomainTextBox.getText());

            selectedDomainTab = domainDataTabPanel.getTabBar().getSelectedTab();

            String sql = "Insert into domaindata (expid, semkey, section, rank, origtext, origaudiofile, origmmfile, transtext, transaudiofile, transmmfile) values ("
                    + expId + ", '" + semKey + "', " + 1 + ", " + 1 + ", '" + text + "', '" + audio + "', '"
                    + mm + "', '" + transtext + "', '" + transaudio + "', '" + transmm + "')";

            changeUtt(sql, 3);
        }
    });

    editFilterAddSlotButton.addClickHandler(new ClickHandler() {
        public void onClick(ClickEvent event) {
            getFilterRank();
        }
    });

    addUttButton.addClickHandler(new ClickHandler() {
        public void onClick(ClickEvent event) {

            selectedTab = dialogueStructurePanel.getTabBar().getSelectedTab();

            editTabUttList.setSelectedIndex(selectedTab + 1);

            editButtonsPanel.setStyleName("addButtons");
            addUttEditButton.setVisible(true);
            deleteUttEditButton.setVisible(false);
            changeUttEditButton.setVisible(false);
            semKeyTextBox.setText("");
            textTextArea.setText("");
            audioFileTextBox.setText("");
            mmFileTextBox.setText("");
            translTextArea.setText("");
            translAudioFileTextBox.setText("");
            translMMFileTextBox.setText("");
            rankTextBox.setText("1");
            editUtterancesPopup.show();
            editUtterancesPopup.center();
        }
    });

    addDomainDataButton.addClickHandler(new ClickHandler() {
        public void onClick(ClickEvent event) {

            editDomainButtonsPanel.setStyleName("addButtons");
            addUttDomainEditButton.setVisible(true);
            deleteUttDomainEditButton.setVisible(false);
            changeUttDomainEditButton.setVisible(false);

            semKeyDomainTextBox.setText("");
            textDomainTextArea.setText("");
            audioFileDomainTextBox.setText("");
            mmFileDomainTextBox.setText("");
            translDomainTextArea.setText("");
            translAudioFileDomainTextBox.setText("");
            translMMFileDomainTextBox.setText("");

            if (filterList != null) {
                for (int i = 0; i < filterList.length; i++) {
                    filterList[i].setItemSelected(0, true);
                }
            }

            editDomainDataPopup.show();
            editDomainDataPopup.center();

        }
    });

    editTabsButton.addClickHandler(new ClickHandler() {
        public void onClick(ClickEvent event) {
            editTabsErrorLabel.setText("");
            editTabsPopup.show();
            editTabsPopup.center();
        }
    });

    addPreparedFreeTextElementsButton.addClickHandler(new ClickHandler() {
        public void onClick(ClickEvent event) {
            preparedFreeTextTextArea.setText("");
            preparedFreeTextShortTextBox.setText("");
            addFreeTextButton.setVisible(true);
            editFreeTextButton.setVisible(false);
            deleteFreeTextButton.setVisible(false);
            editFreeTextPopUp.show();
            editFreeTextPopUp.center();
            preparedFreeTextButtonsPanel.setStyleName("addPreparedText");
            selectedTab = 2;
        }

    });

    closeFreeTextButton.addClickHandler(new ClickHandler() {
        public void onClick(ClickEvent event) {
            editFreeTextPopUp.hide();
        }
    });

    addFreeTextButton.addClickHandler(new ClickHandler() {
        public void onClick(ClickEvent event) {
            String semkey = clearHiven(preparedFreeTextShortTextBox.getText());
            String freeText = clearHiven(preparedFreeTextTextArea.getText());
            String sql = "Insert into freetext (expid, semkey, text) values (" + expId + ", '" + semkey + "', '"
                    + freeText + "');";
            changeFreeText(sql, 1);
            editFreeTextPopUp.hide();
        }

    });

    addTabEditButton.addClickHandler(new ClickHandler() {
        public void onClick(ClickEvent event) {
            if (!addTabTextBox.getText().equals("")) {

                tabName = clearHiven(addTabTextBox.getText());
                tabInst = clearHiven(intructionTextArea.getText());

                String sql = "Insert into tab (tabname, notes, exp, rank) values ('" + tabName + "', \""
                        + tabInst + "\", " + expId + "," + countTab + ")";
                changeUtt(sql, 1);
                addTabTextBox.setText("");
                intructionTextArea.setText("");
            }

        }
    });

    cancelTabEditButton.addClickHandler(new ClickHandler() {
        public void onClick(ClickEvent event) {
            editTabsPopup.hide();
        }
    });

    cancelUttDomainEditButton.addClickHandler(new ClickHandler() {
        public void onClick(ClickEvent event) {
            editDomainDataPopup.hide();
        }
    });

    cancelEditSlotPopUpButton.addClickHandler(new ClickHandler() {
        public void onClick(ClickEvent event) {
            errorDeleteSlotValueLabel.setText("");
            editFilterAddSlotTextBox.setText("");
            editSlotPopUp.hide();
        }
    });

    cancelAddSlotPopUpButton.addClickHandler(new ClickHandler() {
        public void onClick(ClickEvent event) {
            addSlotPopUp.hide();
            addFilterValueTextBox.setText("");
        }
    });

    addFilterButton.addClickHandler(new ClickHandler() {
        public void onClick(ClickEvent event) {
            addFilterTextBox.setText("Default Filter");
            standardFilterValueTextBox.setText(defaultSlotValue);
            addFilterSlotCollection.clear();
            addFilterSlotCollection.add(addFiltersStandardSlotPanel);
            addFilterSlotCollection.add(standardFilterValueExpLabel);
            addSlotPopUp.show();
            addSlotPopUp.center();
        }
    });

    saveNotesButton.addClickHandler(new ClickHandler() {
        public void onClick(ClickEvent event) {
            getNotesTime();
        }
    });

    experimentNotesTextArea.addKeyPressHandler(new KeyPressHandler() {
        public void onKeyPress(KeyPressEvent event) {
            if (event.getCharCode() == KeyCodes.KEY_ENTER) {
                getNotesTime();
            }
        }

    });

    openReportButton.addClickHandler(new ClickHandler() {
        public void onClick(ClickEvent event) {
            printReport();
        }
    });

    endExperimentMarkerButton.addClickHandler(new ClickHandler() {
        public void onClick(ClickEvent event) {
            endExperiment();
        }
    });

    closeReportButton.addClickHandler(new ClickHandler() {
        public void onClick(ClickEvent event) {
            reportTable.setHTML("");
            printReportPopup.hide();
        }
    });

    printReportButton.addClickHandler(new ClickHandler() {
        public void onClick(ClickEvent event) {
            openPrintView();
        }
    });

    exportReportButton.addClickHandler(new ClickHandler() {
        public void onClick(ClickEvent event) {
            openExport();
        }
    });

    exportNotesButton.addClickHandler(new ClickHandler() {
        public void onClick(ClickEvent event) {
            exportNotes();
        }
    });

    sendFreeTextButton.addClickHandler(new ClickHandler() {
        public void onClick(ClickEvent event) {
            pushOutput(shoutBoxTexatArea.getText(), "3", 0);
            shoutBoxTexatArea.setText("");
        }
    });

    shoutBoxTexatArea.addKeyPressHandler(new KeyPressHandler() {
        public void onKeyPress(KeyPressEvent event) {
            if (event.getCharCode() == KeyCodes.KEY_ENTER) {
                shoutBoxTexatArea.cancelKey();
                pushOutput(shoutBoxTexatArea.getText(), "3", 0);
                shoutBoxTexatArea.setText("");
            }
        }

    });

    userList.addChangeHandler(new ChangeHandler() {
        public void onChange(ChangeEvent event) {
            changeUser();
        }

    });

    // Filter
    addFilterSaveButton.addClickHandler(new ClickHandler() {
        public void onClick(ClickEvent event) {
            String sql = "";
            for (int i = 1; i < (addFilterSlotCollection.getWidgetCount() - 1); i++) {
                HorizontalPanel hp = (HorizontalPanel) addFilterSlotCollection.getWidget(i);
                Label lb = (Label) hp.getWidget(0);

                newFilter = clearHiven(addFilterTextBox.getText());
                newValue = clearHiven(lb.getText());

                sql = sql + "Insert into slot (expid, name, value, type, rank) values (" + expId + ", '"
                        + newFilter + "', '" + newValue + "', " + 1 + ", " + rankEstimation + "); ";
            }

            newFilter = clearHiven(addFilterTextBox.getText());
            newValue = clearHiven(standardFilterValueTextBox.getText());

            sql = sql + "Insert into slot (expid, name, value, type, rank) values (" + expId + ", '" + newFilter
                    + "', '" + newValue + "', " + 1 + ", " + rankEstimation + "); ";
            changeUtt(sql, 6);
            addSlotPopUp.hide();
        }
    });

    // Setup timer to refresh parts of the site automatically.
    setTimer();

}

From source file:custgwttbl.client.CustGwtItem.java

License:Apache License

/**
 * Gets the content of the item For image it is image Url
 * /* w w w. j  a v a 2 s. c o  m*/
 * @return item content
 */
public String getText() {

    String returnText = "";
    if (this.getSpecifier() == CustGwtItem.EDITABLE) {
        TextBox tBox = (TextBox) vPanel.getWidget(0);
        returnText = tBox.getText();
    } else if (this.getSpecifier() == CustGwtItem.NON_EDITABLE) {
        Label label = (Label) vPanel.getWidget(0);
        returnText = label.getText();
    } else if (this.getSpecifier() == CustGwtItem.NON_EDITABLE_HTML) {
        HTML htmlWid = (HTML) vPanel.getWidget(0);
        returnText = htmlWid.getHTML();
    } else if (this.getSpecifier() == CustGwtItem.IMAGE) {
        if (image != null) {
            returnText = CustGwtUtil.stringNoNull(image.getUrl());
        }
    }
    return returnText;
}

From source file:edu.purdue.pivot.skwiki.client.dnd.PaletteWidget.java

License:Apache License

public PaletteWidget cloneWidget() {
    Widget clone;/*from ww w  . j a  v  a2  s  . c  o  m*/

    // Clone our internal widget
    if (widget instanceof Label) {
        Label label = (Label) widget;
        clone = new Label(label.getText());
    } else if (widget instanceof RadioButton) {
        RadioButton radioButton = (RadioButton) widget;
        clone = new RadioButton(radioButton.getName(), radioButton.getHTML(), true);
    } else if (widget instanceof CheckBox) {
        CheckBox checkBox = (CheckBox) widget;
        clone = new CheckBox(checkBox.getHTML(), true);
    } else if (widget instanceof TextWindow) {
        TextWindow editWindow = (TextWindow) widget;
        clone = new TextWindow();
    } else if (widget instanceof CanvasWindow) {
        CanvasWindow editWindow = (CanvasWindow) widget;
        clone = new CanvasWindow();
    } else {
        throw new IllegalStateException("Unhandled Widget class " + widget.getClass().getName());
    }

    // Copy a few obvious common widget properties
    clone.setStyleName(widget.getStyleName());
    clone.setTitle(widget.getTitle());

    // Wrap the cloned widget in a new PaletteWidget instance
    return new PaletteWidget(clone);
}

From source file:eolus.client.EntityManager.java

License:EUPL

public static Object get(String name) {
    int rows = em.getRowCount();
    int i = 0;//w w  w  . ja v  a2s.  c  o  m
    for (; i < rows; i++)
        if (em.getText(i, 0).equals(name))
            break;
    if (i == rows)
        return null;
    Widget w = em.getWidget(i, 1);
    if (w instanceof Label) {
        Label l = (Label) w;
        return l.getText();
    }
    return null;
}

From source file:net.officefloor.tutorial.gwtapp.client.GwtAppEntryPoint.java

License:Open Source License

@Override
public void onModuleLoad() {

    // Provide the time label
    RootPanel panel = RootPanel.get("timer");
    final Label label = new Label("0");
    panel.add(label);//  w w w. j  ava2 s  . c  o  m

    // Increment time each second
    Timer timer = new Timer() {
        @Override
        public void run() {
            long time = Long.parseLong(label.getText());
            time++;
            label.setText(String.valueOf(time));
        }
    };
    timer.scheduleRepeating(1000);
}