Exemplo n.º 1
0
  public void initialize() {
    customSqlBox.setSize("50em", "5em");
    quickReferenceLink.addClickListener(this);
    showHideControlsLink.addClickListener(this);

    filterList = new WidgetList<TestFilterWidget>(filterFactory);
    Panel titlePanel = new HorizontalPanel();
    titlePanel.add(getFieldLabel("Test attributes:"));
    titlePanel.add(
        new HTML(
            "&nbsp;<a href=\""
                + WIKI_URL
                + "#attribute_filtering\" "
                + "target=\"_blank\">[?]</a>"));
    Panel attributeFilters = new VerticalPanel();
    attributeFilters.setStyleName("box");
    attributeFilters.add(titlePanel);
    attributeFilters.add(filterList);

    Panel commonFilterPanel = new VerticalPanel();
    commonFilterPanel.add(customSqlBox);
    commonFilterPanel.add(attributeFilters);
    commonFilterPanel.add(showInvalid);
    RootPanel.get("common_filters").add(commonFilterPanel);
    RootPanel.get("common_quick_reference").add(quickReferenceLink);
    RootPanel.get("common_show_hide_controls").add(showHideControlsLink);
    generateQuickReferencePopup();
  }
Exemplo n.º 2
0
 private void handleShowHideControlsClick() {
   boolean areControlsVisible = showHideControlsLink.getText().equals(SHOW_CONTROLS);
   allControlsPanel.setVisible(areControlsVisible);
   showHideControlsLink.setText(areControlsVisible ? HIDE_CONTROLS : SHOW_CONTROLS);
   for (CommonPanelListener listener : listeners) {
     listener.onSetControlsVisible(areControlsVisible);
   }
 }
Exemplo n.º 3
0
 private void handleQuickReferenceClick() {
   if (isQuickReferenceShowing()) {
     quickReferencePopup.hide();
     quickReferenceLink.setText(SHOW_QUICK_REFERENCE);
   } else {
     quickReferencePopup.setPopupPositionAndShow(this);
     quickReferenceLink.setText(HIDE_QUICK_REFERENCE);
   }
 }
Exemplo n.º 4
0
    protected void setupPanel(List<TextBox> textBoxes) {
      Panel panel = new HorizontalPanel();

      includeOrExclude.addItem("Include");
      includeOrExclude.addItem("Exclude");
      panel.add(includeOrExclude);

      for (TextBox textBox : textBoxes) {
        panel.add(new Label(textBox.getName()));
        panel.add(textBox);
      }

      SimpleHyperlink deleteLink = new SimpleHyperlink("[X]");
      deleteLink.addClickListener(this);
      panel.add(deleteLink);

      initWidget(panel);
    }
Exemplo n.º 5
0
 private boolean isQuickReferenceShowing() {
   return quickReferenceLink.getText().equals(HIDE_QUICK_REFERENCE);
 }