Java 类com.google.gwt.event.dom.client.HasClickHandlers 实例源码

项目:unitimes    文件:WebTable.java   
public LockCell(boolean check, String text, String ariaLabel) {
    super(null);
    if (CONSTANTS.listOfClassesUseLockIcon()) {
        iCheck = new AriaToggleButton(RESOURCES.locked(), RESOURCES.unlocked());
    } else {
        iCheck = new AriaCheckBox();
    }
    if (text != null)
        ((HasText)iCheck).setText(text);
    iCheck.setValue(check);
    ((HasClickHandlers)iCheck).addClickHandler(new ClickHandler() {
        public void onClick(ClickEvent event) {
            event.stopPropagation();
        }
    });
    if (ariaLabel != null) setAriaLabel(ariaLabel);
}
项目:firefly    文件:BasicPagingImageGrid.java   
public void add(Widget widget) {
    if (widget instanceof HasClickHandlers && clickHandler!=null) {
        ((HasClickHandlers) widget).addClickHandler(clickHandler);
    }
    if (widget instanceof HasDoubleClickHandlers && doubleClickHandler!=null) {
        ((HasDoubleClickHandlers) widget).addDoubleClickHandler(doubleClickHandler);
    }
    if (widget instanceof HasErrorHandlers && errorHandler!=null) {
        ((HasErrorHandlers) widget).addErrorHandler(errorHandler);
    }
    if (widget instanceof HasMouseOutHandlers && mouseOutHandler!=null) {
        ((HasMouseOutHandlers) widget).addMouseOutHandler(mouseOutHandler);
    }
    if (widget instanceof HasMouseOverHandlers && mouseOverHandler!=null) {
        ((HasMouseOverHandlers) widget).addMouseOverHandler(mouseOverHandler);
    }
    flowpanel.add(widget);
}
项目:unitime    文件:WebTable.java   
public LockCell(boolean check, String text, String ariaLabel) {
    super(null);
    if (CONSTANTS.listOfClassesUseLockIcon()) {
        iCheck = new AriaToggleButton(RESOURCES.locked(), RESOURCES.unlocked());
    } else {
        iCheck = new AriaCheckBox();
    }
    if (text != null)
        ((HasText)iCheck).setText(text);
    iCheck.setValue(check);
    ((HasClickHandlers)iCheck).addClickHandler(new ClickHandler() {
        public void onClick(ClickEvent event) {
            event.stopPropagation();
        }
    });
    if (ariaLabel != null) setAriaLabel(ariaLabel);
}
项目:google-apis-explorer    文件:FullView.java   
/**
 * Display the specified service entries in the container provided, while applying the tags
 * generated by the tag processor.
 */
private void populateServiceEntries(Iterable<ServiceDefinition> services,
    EntryAggregatorView toPopulate,
    Set<TagProcessor> tagProcessors) {

  for (final ServiceDefinition service : services) {
    String iconUrl = service.getIcons().getIcon16Url();
    String displayName = NameHelper.generateDisplayTitle(service.getTitle(), service.getName());

    Set<DescriptionTag> tags = Sets.newHashSet();
    for (TagProcessor processor : tagProcessors) {
      tags.addAll(processor.process(service));
    }

    HasClickHandlers rowHandle = toPopulate.addEntry(new ServiceEntry(
        iconUrl, displayName, service.getVersion(), service.getDescription(), tags));
    rowHandle.addClickHandler(new ClickHandler() {
      @Override
      public void onClick(ClickEvent event) {
        presenter.handleClickService(service);
      }
    });
  }
}
项目:google-apis-explorer    文件:FullView.java   
/**
 * Display the spcified history items in the aggregator specified.
 *
 * @param prefix Prefix that should be prepended to the history item URL when an item is clicked,
 *        changes based on whether this was a search result or the history item list.
 * @param historyItems Items which to render and display in the aggregator,
 * @param aggregator Aggregator that will display rendered history items.
 */
private void populateHistoryItems(
    final String prefix, Iterable<HistoryItem> historyItems, EntryAggregatorView aggregator) {

  for (final HistoryItem item : historyItems) {
    ApiRequest request = item.getRequest();
    HasClickHandlers rowHandler = aggregator.addEntry(new HistoryEntry(request.getMethod()
        .getId(), request.getHttpMethod().toString() + " " + request.getRequestPath(), item
        .getEndTime()));
    rowHandler.addClickHandler(new ClickHandler() {
      @Override
      public void onClick(ClickEvent event) {
        presenter.handleClickHistoryItem(prefix, item);
      }
    });
  }
}
项目:x-cure-chat    文件:ChooseAvatarDialogUI.java   
private Widget initAvatarPanel( final int index, final PresetAvatarImages.AvatarDescriptor descriptor ){
    Widget avatarWidget;

    //Initialize the avatar image
    final String avatarURLBase = ServerSideAccessManager.getPresetAvatarImagesBase();
    Image image = new Image( avatarURLBase + descriptor.relativeURL );
    image.setStyleName( CommonResourcesContainer.AVATAR_IMAGE_CHOICE_DEFAULT_STYLE );
    image.setTitle( titlesI18N.clickToChooseToolTip() );

    //Sort out what the avatar widget is.
    if( descriptor.price > 0 ) {
        //If there is a price tag then the avatar is a special object
        FocusPanel focusPanel = new FocusPanel();
        VerticalPanel verticalPanel = new VerticalPanel();
        verticalPanel.setHorizontalAlignment( HasHorizontalAlignment.ALIGN_CENTER );
        verticalPanel.setVerticalAlignment( HasVerticalAlignment.ALIGN_BOTTOM );
        verticalPanel.add( image );
        verticalPanel.add( new PriceTagWidget( null, descriptor.price, false, true ));
        focusPanel.add( verticalPanel );
        avatarWidget = focusPanel;
    } else {
        //If there is no price then the avatar is the image widget itself
        avatarWidget = image;
    }

    //Add the floading style and the click handler
    avatarWidget.addStyleName( CommonResourcesContainer.AVATAR_IMAGE_IN_LIST_STYLE );
    ((HasClickHandlers) avatarWidget).addClickHandler( new ClickHandler() {
        public void onClick(ClickEvent e) {
            if( isChooseEnabled ) {
                //Initiate the avatar selection, do the RPC call
                doChooseAvatarServerCall( index );
            }
            //Just in case stop the event here
            e.preventDefault(); e.stopPropagation();
        }
    });

    return (Widget) avatarWidget;
}
项目:mvp4g-examples    文件:ProductListView.java   
public HasClickHandlers[] addProduct( String product, int row ) {

        Image l1 = new Image( "images/display.png" );
        Image l2 = new Image( "images/edit.png" );
        Image l3 = new Image( "images/delete.png" );

        HasClickHandlers[] handlers = new HasClickHandlers[] { l1, l2, l3 };

        table.setText( row + 1, 0, product );
        table.setWidget( row + 1, 1, l1 );
        table.setWidget( row + 1, 2, l2 );
        table.setWidget( row + 1, 3, l3 );

        return handlers;
    }
项目:google-apis-explorer    文件:FullView.java   
/**
 * Add an aggregator line for the particular method specified. When clicked, append the prefix
 * specified and then the method identifier to the current URL.
 */
private void populateMethodEntry(final ApiMethod method, @Nullable String serviceTitle,
    final String prefix, EntryAggregatorView aggregator) {

  HasClickHandlers rowHandler = aggregator.addEntry(
      new MethodEntry(method.getId(), serviceTitle, method.getDescription()));
  rowHandler.addClickHandler(new ClickHandler() {
    @Override
    public void onClick(ClickEvent arg0) {
      presenter.handleClickMethod(prefix, method);
    }
  });
}
项目:gwt-bean-validators    文件:AbstractBeanValidationEditorDriver.java   
@Override
public final void setSubmitButton(final Widget psubmitButton) {
  this.submitButton = psubmitButton;
  if (this.submitButton instanceof HasClickHandlers) {
    ((HasClickHandlers) this.submitButton)
        .addClickHandler(pevent -> AbstractBeanValidationEditorDriver.this.tryToSubmitFrom());
  }
}
项目:EasyML    文件:JobDescPopupPanel.java   
public HasClickHandlers getSubmitBtn() {
    return submitBtn;
}
项目:sandbox-frame    文件:ProjectViewImpl.java   
@Override
public HasClickHandlers getSourceButton() {
    return getSourceButton;
}
项目:sandbox-frame    文件:ProjectViewImpl.java   
@Override
public HasClickHandlers getBinaryButton() {
    return getBinaryButton;
}
项目:sandbox-frame    文件:BaseViewImpl.java   
@Override
public HasClickHandlers getBackButton() {
    return backButton;
}
项目:sandbox-frame    文件:ChangeKaaHostViewImpl.java   
@Override
public HasClickHandlers getChangeKaaHostButton() {
    return changeKaaHostButton;
}
项目:sandbox-frame    文件:ChangeKaaHostViewImpl.java   
@Override
public HasClickHandlers getGetLogsButton() {
    return getLogsButton;
}
项目:sandbox-frame    文件:ChangeKaaHostViewImpl.java   
public HasClickHandlers getChangeLogLevelButton() {
    return changeLogLevelButton;
}
项目:mvp4g-examples    文件:MainView.java   
public HasClickHandlers getStartButton() {
  return start;
}
项目:mvp4g-examples    文件:TopBarView.java   
public HasClickHandlers getShowDealButton() {
    return showDeal;
}
项目:mvp4g-examples    文件:TopBarView.java   
public HasClickHandlers getShowProductButton() {
    return showProduct;
}
项目:mvp4g-examples    文件:AccountView.java   
public HasClickHandlers getShowCart() {
    return showCart;
}
项目:mvp4g-examples    文件:LoginView.java   
public HasClickHandlers getLoginButton() {
    return login;
}
项目:mvp4g-examples    文件:AbstractProductView.java   
public HasClickHandlers getLeftButton() {
    return leftButton;
}
项目:mvp4g-examples    文件:AbstractProductView.java   
public HasClickHandlers getRightButton() {
    return rightButton;
}
项目:mvp4g-examples    文件:ProductListView.java   
public HasClickHandlers getCreateButton() {
    return createButton;
}
项目:mvp4g-examples    文件:ProductListView.java   
@Override
public HasClickHandlers getCompanyButton() {
    return companyButton;
}
项目:mvp4g-examples    文件:ProductListView.java   
@Override
public HasClickHandlers getInfoButton() {
    return infoButton;
}
项目:mvp4g-examples    文件:ProductListView.java   
@Override
public HasClickHandlers getPassiveInfoButton() {
    return passiveInfoButton;
}
项目:mvp4g-examples    文件:InfoReceiverView.java   
@Override
public HasClickHandlers getClose() {
    return close;
}
项目:mvp4g-examples    文件:MainView.java   
public HasClickHandlers getCompanyMenu() {
    return c;
}
项目:mvp4g-examples    文件:MainView.java   
public HasClickHandlers getProductMenu() {
    return p;
}
项目:mvp4g-examples    文件:MainView.java   
public HasClickHandlers getClearHistoryButton() {
    return clearHistory;
}
项目:mvp4g-examples    文件:MainView.java   
public HasClickHandlers getHasBeenThere() {
    return hasBeenThere;
}
项目:mvp4g-examples    文件:MainView.java   
@Override
public HasClickHandlers getBroadcastInfo() {
    return broadcastInfo;
}
项目:mvp4g-examples    文件:MainView.java   
@Override
public HasClickHandlers getShowStatus() {
    return showStatus;
}
项目:mvp4g-examples    文件:MainView.java   
@Override
public HasClickHandlers getActivateStatus() {
    return activateStatus;
}
项目:mvp4g-examples    文件:CompanyListView.java   
public HasClickHandlers getCreateButton() {
    return createButton;
}
项目:mvp4g-examples    文件:AbstractCompanyView.java   
public HasClickHandlers getLeftButton() {
    return leftButton;
}
项目:mvp4g-examples    文件:AbstractCompanyView.java   
public HasClickHandlers getRightButton() {
    return rightButton;
}
项目:mvp4g-examples    文件:AbstractCompanyView.java   
public HasClickHandlers getSelectNameButton() {
    return selectButton;
}
项目:mvp4g-examples    文件:CompanyNameSelectorView.java   
public HasClickHandlers getSelectButton() {
    return select;
}