Package net.mygwt.ui.client.event

Examples of net.mygwt.ui.client.event.Listener


   * @param tree the underlying tree widget
   */
  public TreeViewer(Tree tree) {
    this.tree = tree;
    hookWidget(tree);
    tree.addListener(Events.BeforeExpand, new Listener() {
      public void handleEvent(BaseEvent be) {
        TreeItem item = (TreeItem) be.widget;
        Object loaded = item.getData("loaded");
        if (loaded == null) {
          be.doit = false;
View Full Code Here


    return elems;
  }

  protected void hookWidget(Component widget) {
    super.hookWidget(widget);
    widget.addListener(Events.CheckChange, new Listener() {

      public void handleEvent(BaseEvent be) {
        fireCheckStateChanged(be);
      }
    });
View Full Code Here

  }

  protected void onShowContextMenu(int x, int y) {
    if (fireEvent(Events.ContextMenu)) {

      contextMenu.addListener(Events.Hide, new Listener() {
        public void handleEvent(BaseEvent be) {
          contextMenu.removeListener(Events.Hide, this);
          onHideContextMenu();
        }
View Full Code Here

  /**
   * Creates a new change text box.
   */
  public KeyPressTextBox() {
    task = new DelayedTask(new Listener() {
      public void handleEvent(BaseEvent be) {
        onChange();
        setFocus(true);
      }
    });
View Full Code Here

   *
   * @param style the style information
   */
  public Shadow(int style) {
    this.style = style;
    listener = new Listener() {

      public void handleEvent(BaseEvent be) {
        switch (be.type) {
          case Events.Resize:
            sync(component.getBounds());
View Full Code Here

   */
  protected abstract List getSelectedFromWidget();

  protected void hookWidget(Component widget) {
    final ISelectionProvider provider = this;
    widget.addListener(Events.SelectionChange, new Listener() {
      public void handleEvent(BaseEvent be) {
        SelectionChangedEvent se = new SelectionChangedEvent(provider, getSelection());
        fireSelectionChanged(se);
      }
    });
View Full Code Here

    this.resizeWidget = resizeWidget;
    this.resizeElem = resizeWidget.getElement();

    final Widget fSplitBar = this;

    listener = new Listener() {
      public void handleEvent(BaseEvent be) {
        switch (be.type) {
          case Events.Attach:
            RootPanel.get().add(fSplitBar);
            updateHandle();
            break;
          case Events.Detach:
            RootPanel.get().remove(fSplitBar);
            break;
          case Events.Resize:
            updateHandle();
            break;
        }
      }
    };

    resizeWidget.addListener(Events.Attach, listener);
    resizeWidget.addListener(Events.Detach, listener);
    resizeWidget.addListener(Events.Resize, listener);

    setElement(DOM.createDiv());

    if (style == Style.SOUTH || style == Style.NORTH) {
      setStyleName("my-hsplitbar");
    } else {
      setStyleName("my-vsplitbar");
    }
    MyDOM.setStyleAttribute(getElement(), "position", "absolute");

    draggable = new Draggable(this);
    draggable.proxyStyle = "my-splitbar-proxy";

    Listener dragListener = new Listener() {
      public void handleEvent(BaseEvent be) {
        if (be.type == Events.DragStart) {
          onStartDrag(be);
        }
        if (be.type == Events.DragEnd) {
View Full Code Here

    final Widget fWidget = this;
    Timer t = new Timer() {
      public void run() {
        FXStyle fx = new FXStyle(getElement());
        fx.addListener(Events.EffectComplete, new Listener() {
          public void handleEvent(BaseEvent be) {
            slots.set(level, null);
            RootPanel.get().remove(fWidget);
          }
        });
View Full Code Here

TOP

Related Classes of net.mygwt.ui.client.event.Listener

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.