Package com.google.gwt.topspin.ui.client

Examples of com.google.gwt.topspin.ui.client.ClickListener


    // Add a ButtonDescription entry for the control that will open/close the
    // EventFilterPanel.
    visualization.addButton(new ButtonDescription("Open/Close Filter Panel",
        resources.sluggishnessFiletPanelCss().filterPanelButton(),
        new ClickListener() {
          public void onClick(ClickEvent event) {
            eventFilterPanel.refresh(visualization.getModel());
            toggleFilterPanelVisible();
          }
        }));
View Full Code Here


    final LocalStorage storage = WindowExt.getHostWindow().getLocalStorage();
    String previousManifestValue = storage.getStringItem(applicationUrl);
    symbolManifestUrl.setValue(previousManifestValue);

    // And wire up the save button.
    ClickEvent.addClickListener(saveButton, saveButton, new ClickListener() {
      public void onClick(ClickEvent event) {
        if (null == symbolManifestUrl.getValue()) {
          return;
        }
        storage.setStringItem(applicationUrl, symbolManifestUrl.getValue());
View Full Code Here

    headerElem.appendChild(closeLink);

    this.columnMarker = document.createSpanElement();

    // TODO(jaimeyap): I guess this listener is going to leak.
    ClickEvent.addClickListener(closeLink, closeLink, new ClickListener() {
      public void onClick(ClickEvent event) {
        hide();
      }
    });
View Full Code Here

    getElement().appendChild(sortIndicator);

    // Add a click handler to grab sorting for this column and to
    // toggle the ascending/descending header
    removers.add(ClickEvent.addClickListener(this, getElement(),
        new ClickListener() {
          public void onClick(ClickEvent event) {
            toggleSortability();
          }
        }));
  }
View Full Code Here

      elem.appendChild(rowsBelow);
      updateLabel();

      // hook a click listener to open 10 rows above
      manageEventListener(ClickEvent.addClickListener(this, showAbove,
          new ClickListener() {
            public void onClick(ClickEvent event) {
              expandAbove();
            }
          }));

      // hook a click listener to open 10 rows below
      manageEventListener(ClickEvent.addClickListener(this, showBelow,
          new ClickListener() {
            public void onClick(ClickEvent event) {
              expandBelow();
            }
          }));
View Full Code Here

    recordStopButton = new ToggleButton(controllerContainer, css);
    recordStopButton.setStyleName(css.control() + " " + css.recordStopButton()
        + " " + css.control());
    this.setIsRecording(true);
    recordStopButton.addClickListener(new ClickListener() {
      public void onClick(ClickEvent event) {
        setIsRecordingTitle(recordStopButton.isDown());
        Controller.this.monitor.setIsRecording(recordStopButton.isDown());
      }
    });

    final Button resetButton = new Button(controllerContainer);
    resetButton.setStyleName(css.control() + " " + css.resetButton());
    resetButton.getElement().setAttribute("title", "Discard Data and Reset");
    resetButton.addClickListener(new ClickListener() {
      public void onClick(ClickEvent event) {
        doReset();
      }
    });

    final Button saveButton = new Button(controllerContainer);
    saveButton.setStyleName(css.control() + " " + css.saveButton());
    saveButton.getElement().setAttribute("title", "Save Data to a File");
    saveButton.addClickListener(new ClickListener() {
      public void onClick(ClickEvent event) {
        Controller me = Controller.this;
        saveRecords(getVisitedUrls(), monitor.getVersion(),
            me.dataDispatcher.getTraceCopy());
      }

      // TODO(jaimeyap): Revisit this since it is kinda yucky to be using a
      // view component as a model.
      private JSOArray<String> getVisitedUrls() {
        JSOArray<String> visitedUrls = JSOArray.create();
        int numberVisited = pages.getOptionCount();
        for (int i = 0; i < numberVisited; i++) {
          visitedUrls.push(getPageUrlForIndex(i));
        }
        return visitedUrls;
      }
    });

    infoScreen = new InfoScreen(this, css);

    final Button zoomOutButton = new Button(controllerContainer);
    zoomOutButton.setStyleName(css.control() + " " + css.zoomOutButton());
    zoomOutButton.getElement().setAttribute("title", "Zoom Out");
    zoomOutButton.addClickListener(new ClickListener() {
      public void onClick(ClickEvent event) {
        overviewTimeline.zoom(-2);
      }
    });

    final Button zoomInButton = new Button(controllerContainer);
    zoomInButton.setStyleName(css.control() + " " + css.zoomInButton());
    zoomInButton.getElement().setAttribute("title", "Zoom In");
    zoomInButton.addClickListener(new ClickListener() {
      public void onClick(ClickEvent event) {
        overviewTimeline.zoom(2);
      }
    });

    final Button zoomAllButton = new Button(controllerContainer);
    zoomAllButton.setStyleName(css.control() + " " + css.zoomAllButton());
    zoomAllButton.getElement().setAttribute("title", "Zoom All");
    zoomAllButton.addClickListener(new ClickListener() {
      public void onClick(ClickEvent event) {
        overviewTimeline.zoomAll();
      }
    });

    // TODO(jaimeyap): Is this the best way to do the capability detection?
    if (hasSetProfilingOptionsApi()) {
      final Button settingsButton = new Button(controllerContainer);
      settingsButton.setStyleName(css.control() + " " + css.settingsButton());
      settingsButton.getElement().setAttribute("title", "Set Profiling Options");
      profilingOptions = ProfilingOptionsPanel.create(getElement(),
          settingsButton.getAbsoluteLeft() + 10,
          settingsButton.getOffsetHeight(), dataDispatcher);
      settingsButton.addClickListener(new ClickListener() {
        public void onClick(ClickEvent event) {
          profilingOptions.show();
        }
      });
    }

    pages = new Select(controllerContainer);
    pages.setStyleName(css.control() + " " + css.pageSelect());
    pages.addChangeListener(new ChangeListener() {
      public void onChange(ChangeEvent event) {
        int selected = pages.getSelectedIndex();
        Controller.this.monitor.setStateForPageAtIndex(selected);
        // If we are not selecting the most resent ApplicationState, we should
        // disable the record/stop button
        if (selected != Controller.this.monitor.getNumberOfPagesViewed() - 1) {
          recordStopButton.getElement().setPropertyBoolean("disabled", true);
        } else {
          recordStopButton.getElement().setPropertyBoolean("disabled", false);
        }
      }
    });

    final Button reportButton = new Button(controllerContainer);
    reportButton.setStyleName(css.control() + " " + css.reportButton());
    reportButton.getElement().setAttribute("title",
        "Display the Hintlet Report");
    reportButton.addClickListener(new ClickListener() {
      public void onClick(ClickEvent event) {
        reportDialog.setVisible(true);
      }
    });
View Full Code Here

        }));

    // We want to stop the annoying issue of clicking inside the details view
    // collapsing the expansion.
    manageEventListener(ClickEvent.addClickListener(this, elem,
        new ClickListener() {
          public void onClick(ClickEvent event) {
            event.getNativeEvent().cancelBubble(true);
          }
        }));
View Full Code Here

          defaultSelection = entry;
          entry.getStyle().setMarginTop(
              resources.monitorVisualizationsPanelCss().topPadding(), Unit.PX);
        }

        ClickEvent.addClickListener(entry, entry, new ClickListener() {
          public void onClick(ClickEvent event) {
            selectTab(entry, viz);
          }
        });
View Full Code Here

    elem.appendChild(closeButton);
    elem.appendChild(contentElem);
    animation = new CustomAnimation(elem);
    // sink events
    MouseDownEvent.addMouseDownListener(this, title, this);
    ClickEvent.addClickListener(closeButton, closeButton, new ClickListener() {

      public void onClick(ClickEvent event) {
        hide();
      }
View Full Code Here

      resymbolizedSymbol.setInnerText(sourceSymbol.getSymbolName());
      resymbolizedSymbol.setHref("javascript:;");

      symbolNameCell.appendChild(resymbolizedSymbol);
      listenerManager.manageEventListener(ClickEvent.addClickListener(
          resymbolizedSymbol, resymbolizedSymbol, new ClickListener() {
            public void onClick(ClickEvent event) {
              sourcePresenter.showSource(sourceServer
                  + sourceSymbol.getResourceUrl().getPath(),
                  sourceViewerServer, sourceSymbol.getLineNumber(), 0,
                  sourceSymbol.getAbsoluteFilePath());
View Full Code Here

TOP

Related Classes of com.google.gwt.topspin.ui.client.ClickListener

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.