當前位置: 首頁>>代碼示例>>Java>>正文


Java HasClickHandlers類代碼示例

本文整理匯總了Java中com.google.gwt.event.dom.client.HasClickHandlers的典型用法代碼示例。如果您正苦於以下問題:Java HasClickHandlers類的具體用法?Java HasClickHandlers怎麽用?Java HasClickHandlers使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


HasClickHandlers類屬於com.google.gwt.event.dom.client包,在下文中一共展示了HasClickHandlers類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: LockCell

import com.google.gwt.event.dom.client.HasClickHandlers; //導入依賴的package包/類
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);
}
 
開發者ID:Jenner4S,項目名稱:unitimes,代碼行數:18,代碼來源:WebTable.java

示例2: add

import com.google.gwt.event.dom.client.HasClickHandlers; //導入依賴的package包/類
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);
}
 
開發者ID:lsst,項目名稱:firefly,代碼行數:19,代碼來源:BasicPagingImageGrid.java

示例3: populateServiceEntries

import com.google.gwt.event.dom.client.HasClickHandlers; //導入依賴的package包/類
/**
 * 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);
      }
    });
  }
}
 
開發者ID:showlowtech,項目名稱:google-apis-explorer,代碼行數:28,代碼來源:FullView.java

示例4: populateHistoryItems

import com.google.gwt.event.dom.client.HasClickHandlers; //導入依賴的package包/類
/**
 * 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);
      }
    });
  }
}
 
開發者ID:showlowtech,項目名稱:google-apis-explorer,代碼行數:25,代碼來源:FullView.java

示例5: initAvatarPanel

import com.google.gwt.event.dom.client.HasClickHandlers; //導入依賴的package包/類
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;
}
 
開發者ID:ivan-zapreev,項目名稱:x-cure-chat,代碼行數:41,代碼來源:ChooseAvatarDialogUI.java

示例6: addProduct

import com.google.gwt.event.dom.client.HasClickHandlers; //導入依賴的package包/類
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;
	}
 
開發者ID:mvp4g,項目名稱:mvp4g-examples,代碼行數:16,代碼來源:ProductListView.java

示例7: populateMethodEntry

import com.google.gwt.event.dom.client.HasClickHandlers; //導入依賴的package包/類
/**
 * 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);
    }
  });
}
 
開發者ID:showlowtech,項目名稱:google-apis-explorer,代碼行數:17,代碼來源:FullView.java

示例8: setSubmitButton

import com.google.gwt.event.dom.client.HasClickHandlers; //導入依賴的package包/類
@Override
public final void setSubmitButton(final Widget psubmitButton) {
  this.submitButton = psubmitButton;
  if (this.submitButton instanceof HasClickHandlers) {
    ((HasClickHandlers) this.submitButton)
        .addClickHandler(pevent -> AbstractBeanValidationEditorDriver.this.tryToSubmitFrom());
  }
}
 
開發者ID:ManfredTremmel,項目名稱:gwt-bean-validators,代碼行數:9,代碼來源:AbstractBeanValidationEditorDriver.java

示例9: getSubmitBtn

import com.google.gwt.event.dom.client.HasClickHandlers; //導入依賴的package包/類
public HasClickHandlers getSubmitBtn() {
	return submitBtn;
}
 
開發者ID:ICT-BDA,項目名稱:EasyML,代碼行數:4,代碼來源:JobDescPopupPanel.java

示例10: getSourceButton

import com.google.gwt.event.dom.client.HasClickHandlers; //導入依賴的package包/類
@Override
public HasClickHandlers getSourceButton() {
    return getSourceButton;
}
 
開發者ID:kaaproject,項目名稱:sandbox-frame,代碼行數:5,代碼來源:ProjectViewImpl.java

示例11: getBinaryButton

import com.google.gwt.event.dom.client.HasClickHandlers; //導入依賴的package包/類
@Override
public HasClickHandlers getBinaryButton() {
    return getBinaryButton;
}
 
開發者ID:kaaproject,項目名稱:sandbox-frame,代碼行數:5,代碼來源:ProjectViewImpl.java

示例12: getBackButton

import com.google.gwt.event.dom.client.HasClickHandlers; //導入依賴的package包/類
@Override
public HasClickHandlers getBackButton() {
    return backButton;
}
 
開發者ID:kaaproject,項目名稱:sandbox-frame,代碼行數:5,代碼來源:BaseViewImpl.java

示例13: getChangeKaaHostButton

import com.google.gwt.event.dom.client.HasClickHandlers; //導入依賴的package包/類
@Override
public HasClickHandlers getChangeKaaHostButton() {
    return changeKaaHostButton;
}
 
開發者ID:kaaproject,項目名稱:sandbox-frame,代碼行數:5,代碼來源:ChangeKaaHostViewImpl.java

示例14: getGetLogsButton

import com.google.gwt.event.dom.client.HasClickHandlers; //導入依賴的package包/類
@Override
public HasClickHandlers getGetLogsButton() {
    return getLogsButton;
}
 
開發者ID:kaaproject,項目名稱:sandbox-frame,代碼行數:5,代碼來源:ChangeKaaHostViewImpl.java

示例15: getChangeLogLevelButton

import com.google.gwt.event.dom.client.HasClickHandlers; //導入依賴的package包/類
public HasClickHandlers getChangeLogLevelButton() {
    return changeLogLevelButton;
}
 
開發者ID:kaaproject,項目名稱:sandbox-frame,代碼行數:4,代碼來源:ChangeKaaHostViewImpl.java


注:本文中的com.google.gwt.event.dom.client.HasClickHandlers類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。