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

WebTable.java 文件源码 项目:unitimes 阅读 19 收藏 0 点赞 0 评论 0
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);
}
BasicPagingImageGrid.java 文件源码 项目:firefly 阅读 22 收藏 0 点赞 0 评论 0
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);
}
WebTable.java 文件源码 项目:unitime 阅读 23 收藏 0 点赞 0 评论 0
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);
}
FullView.java 文件源码 项目:google-apis-explorer 阅读 30 收藏 0 点赞 0 评论 0
/**
 * 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);
      }
    });
  }
}
FullView.java 文件源码 项目:google-apis-explorer 阅读 20 收藏 0 点赞 0 评论 0
/**
 * 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);
      }
    });
  }
}
ChooseAvatarDialogUI.java 文件源码 项目:x-cure-chat 阅读 22 收藏 0 点赞 0 评论 0
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;
}
ProductListView.java 文件源码 项目:mvp4g-examples 阅读 26 收藏 0 点赞 0 评论 0
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;
    }
FullView.java 文件源码 项目:google-apis-explorer 阅读 21 收藏 0 点赞 0 评论 0
/**
 * 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);
    }
  });
}
AbstractBeanValidationEditorDriver.java 文件源码 项目:gwt-bean-validators 阅读 24 收藏 0 点赞 0 评论 0
@Override
public final void setSubmitButton(final Widget psubmitButton) {
  this.submitButton = psubmitButton;
  if (this.submitButton instanceof HasClickHandlers) {
    ((HasClickHandlers) this.submitButton)
        .addClickHandler(pevent -> AbstractBeanValidationEditorDriver.this.tryToSubmitFrom());
  }
}
JobDescPopupPanel.java 文件源码 项目:EasyML 阅读 22 收藏 0 点赞 0 评论 0
public HasClickHandlers getSubmitBtn() {
    return submitBtn;
}
ProjectViewImpl.java 文件源码 项目:sandbox-frame 阅读 36 收藏 0 点赞 0 评论 0
@Override
public HasClickHandlers getSourceButton() {
    return getSourceButton;
}
ProjectViewImpl.java 文件源码 项目:sandbox-frame 阅读 26 收藏 0 点赞 0 评论 0
@Override
public HasClickHandlers getBinaryButton() {
    return getBinaryButton;
}
BaseViewImpl.java 文件源码 项目:sandbox-frame 阅读 24 收藏 0 点赞 0 评论 0
@Override
public HasClickHandlers getBackButton() {
    return backButton;
}
ChangeKaaHostViewImpl.java 文件源码 项目:sandbox-frame 阅读 28 收藏 0 点赞 0 评论 0
@Override
public HasClickHandlers getChangeKaaHostButton() {
    return changeKaaHostButton;
}
ChangeKaaHostViewImpl.java 文件源码 项目:sandbox-frame 阅读 23 收藏 0 点赞 0 评论 0
@Override
public HasClickHandlers getGetLogsButton() {
    return getLogsButton;
}
ChangeKaaHostViewImpl.java 文件源码 项目:sandbox-frame 阅读 23 收藏 0 点赞 0 评论 0
public HasClickHandlers getChangeLogLevelButton() {
    return changeLogLevelButton;
}
MainView.java 文件源码 项目:mvp4g-examples 阅读 21 收藏 0 点赞 0 评论 0
public HasClickHandlers getStartButton() {
  return start;
}
TopBarView.java 文件源码 项目:mvp4g-examples 阅读 24 收藏 0 点赞 0 评论 0
public HasClickHandlers getShowDealButton() {
    return showDeal;
}
TopBarView.java 文件源码 项目:mvp4g-examples 阅读 24 收藏 0 点赞 0 评论 0
public HasClickHandlers getShowProductButton() {
    return showProduct;
}
AccountView.java 文件源码 项目:mvp4g-examples 阅读 26 收藏 0 点赞 0 评论 0
public HasClickHandlers getShowCart() {
    return showCart;
}
LoginView.java 文件源码 项目:mvp4g-examples 阅读 31 收藏 0 点赞 0 评论 0
public HasClickHandlers getLoginButton() {
    return login;
}
AbstractProductView.java 文件源码 项目:mvp4g-examples 阅读 26 收藏 0 点赞 0 评论 0
public HasClickHandlers getLeftButton() {
    return leftButton;
}
AbstractProductView.java 文件源码 项目:mvp4g-examples 阅读 22 收藏 0 点赞 0 评论 0
public HasClickHandlers getRightButton() {
    return rightButton;
}
ProductListView.java 文件源码 项目:mvp4g-examples 阅读 51 收藏 0 点赞 0 评论 0
public HasClickHandlers getCreateButton() {
    return createButton;
}
ProductListView.java 文件源码 项目:mvp4g-examples 阅读 31 收藏 0 点赞 0 评论 0
@Override
public HasClickHandlers getCompanyButton() {
    return companyButton;
}
ProductListView.java 文件源码 项目:mvp4g-examples 阅读 27 收藏 0 点赞 0 评论 0
@Override
public HasClickHandlers getInfoButton() {
    return infoButton;
}
ProductListView.java 文件源码 项目:mvp4g-examples 阅读 24 收藏 0 点赞 0 评论 0
@Override
public HasClickHandlers getPassiveInfoButton() {
    return passiveInfoButton;
}
InfoReceiverView.java 文件源码 项目:mvp4g-examples 阅读 19 收藏 0 点赞 0 评论 0
@Override
public HasClickHandlers getClose() {
    return close;
}
MainView.java 文件源码 项目:mvp4g-examples 阅读 21 收藏 0 点赞 0 评论 0
public HasClickHandlers getCompanyMenu() {
    return c;
}
MainView.java 文件源码 项目:mvp4g-examples 阅读 25 收藏 0 点赞 0 评论 0
public HasClickHandlers getProductMenu() {
    return p;
}


问题


面经


文章

微信
公众号

扫码关注公众号