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


Java GwtEvent類代碼示例

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


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

示例1: onKeyDown

import com.google.gwt.event.shared.GwtEvent; //導入依賴的package包/類
@Override
public void onKeyDown(final KeyDownEvent event) {

	if (event.getNativeKeyCode() == keyCode) {				
		actionButton.fireEvent( new GwtEvent<ClickHandler>() {
	        @Override
	        public com.google.gwt.event.shared.GwtEvent.Type<ClickHandler> getAssociatedType() {
	        	return ClickEvent.getType();
	        }
	        @Override
	        protected void dispatch(final ClickHandler handler) {
	            handler.onClick(null);
	        }
	   });
	}
}
 
開發者ID:geowe,項目名稱:sig-seguimiento-vehiculos,代碼行數:17,代碼來源:KeyShortcutHandler.java

示例2: testSelectionEvent

import com.google.gwt.event.shared.GwtEvent; //導入依賴的package包/類
public void testSelectionEvent() {
    MaterialNavSection widget = new MaterialNavSection();

    final boolean[] isSelectionEventFired = {false};
    widget.addSelectionHandler(selectionEvent -> isSelectionEventFired[0] = true);
    widget.fireEvent(new GwtEvent<SelectionHandler<?>>() {
        @Override
        public Type<SelectionHandler<?>> getAssociatedType() {
            return SelectionEvent.getType();
        }

        @Override
        protected void dispatch(SelectionHandler eventHandler) {
            eventHandler.onSelection(null);
        }
    });

    assertTrue(isSelectionEventFired[0]);
}
 
開發者ID:GwtMaterialDesign,項目名稱:gwt-material,代碼行數:20,代碼來源:MaterialNavSectionTest.java

示例3: itemStateChanged

import com.google.gwt.event.shared.GwtEvent; //導入依賴的package包/類
public void itemStateChanged(GwtEvent e) {
    Object src = e.getSource();
    int i;
    boolean changed = false;
    for (i = 0; i != einfocount; i++) {
	EditInfo ei = einfos[i];
	if (ei.choice == src || ei.checkbox == src || ei.button == src) {
	    
	    // if we're pressing a button, make sure to apply changes first
	    if (ei.button == src)
		apply();
	    
	    elm.setEditValue(i, ei);
	    if (ei.newDialog)
		changed = true;
	    cframe.needAnalyze();
	}
    }
    if (changed) {
	clearDialog();
	buildDialog();
    }
}
 
開發者ID:sharpie7,項目名稱:circuitjs1,代碼行數:24,代碼來源:EditDialog.java

示例4: fireEvent

import com.google.gwt.event.shared.GwtEvent; //導入依賴的package包/類
public void fireEvent(GwtEvent<?> event) {
    if (event.getAssociatedType().equals(RowCountChangeEvent.getType())) {
        rowCountHandlers.forEach((h) -> h.onRowCountChange((RowCountChangeEvent) event));
    } else if (event.getAssociatedType().equals(RangeChangeEvent.getType())) {
        rangeHandlers.forEach((h) -> h.onRangeChange((RangeChangeEvent) event));
    }
}
 
開發者ID:kiegroup,項目名稱:optashift-employee-rostering,代碼行數:8,代碼來源:TwoDayViewPager.java

示例5: getType

import com.google.gwt.event.shared.GwtEvent; //導入依賴的package包/類
public static GwtEvent.Type<Handler> getType()
{
  return TYPE;
}
 
開發者ID:realityforge,項目名稱:gwt-keycloak,代碼行數:5,代碼來源:AuthRefreshSuccessEvent.java

示例6: getAssociatedType

import com.google.gwt.event.shared.GwtEvent; //導入依賴的package包/類
@Override
public GwtEvent.Type<Handler> getAssociatedType()
{
  return AuthRefreshSuccessEvent.getType();
}
 
開發者ID:realityforge,項目名稱:gwt-keycloak,代碼行數:6,代碼來源:AuthRefreshSuccessEvent.java

示例7: getAssociatedType

import com.google.gwt.event.shared.GwtEvent; //導入依賴的package包/類
@Override
public GwtEvent.Type<Handler> getAssociatedType()
{
  return AuthErrorEvent.getType();
}
 
開發者ID:realityforge,項目名稱:gwt-keycloak,代碼行數:6,代碼來源:AuthErrorEvent.java

示例8: getAssociatedType

import com.google.gwt.event.shared.GwtEvent; //導入依賴的package包/類
@Override
public GwtEvent.Type<Handler> getAssociatedType()
{
  return BeforeAuthLogoutEvent.getType();
}
 
開發者ID:realityforge,項目名稱:gwt-keycloak,代碼行數:6,代碼來源:BeforeAuthLogoutEvent.java

示例9: getAssociatedType

import com.google.gwt.event.shared.GwtEvent; //導入依賴的package包/類
@Override
public GwtEvent.Type<Handler> getAssociatedType()
{
  return AuthSuccessEvent.getType();
}
 
開發者ID:realityforge,項目名稱:gwt-keycloak,代碼行數:6,代碼來源:AuthSuccessEvent.java

示例10: getAssociatedType

import com.google.gwt.event.shared.GwtEvent; //導入依賴的package包/類
@Override
public GwtEvent.Type<Handler> getAssociatedType()
{
  return AuthRefreshErrorEvent.getType();
}
 
開發者ID:realityforge,項目名稱:gwt-keycloak,代碼行數:6,代碼來源:AuthRefreshErrorEvent.java

示例11: getAssociatedType

import com.google.gwt.event.shared.GwtEvent; //導入依賴的package包/類
@Override
public GwtEvent.Type<Handler> getAssociatedType()
{
  return TokenExpiredEvent.getType();
}
 
開發者ID:realityforge,項目名稱:gwt-keycloak,代碼行數:6,代碼來源:TokenExpiredEvent.java

示例12: getAssociatedType

import com.google.gwt.event.shared.GwtEvent; //導入依賴的package包/類
@Override
public com.google.gwt.event.shared.GwtEvent.Type<CommandSendHandler> getAssociatedType() {
	return TYPE;
}
 
開發者ID:openremote,項目名稱:WebConsole,代碼行數:5,代碼來源:CommandSendEvent.java

示例13: removeStaleEvents

import com.google.gwt.event.shared.GwtEvent; //導入依賴的package包/類
private void removeStaleEvents(List<GwtEvent> pendingRPCEvents, Type type) {
    List<GwtEvent> remove = new ArrayList<GwtEvent>();
    for (Iterator eIt = pendingRPCEvents.iterator(); eIt.hasNext();) {
        GwtEvent gwtEvent = (GwtEvent) eIt.next();
        if ( gwtEvent.getAssociatedType().equals(type) ) {
            remove.add(gwtEvent);
        }
    }
    pendingRPCEvents.removeAll(remove);
}
 
開發者ID:NOAA-PMEL,項目名稱:LAS,代碼行數:11,代碼來源:RPCManager.java

示例14: removeGetCategoriesEvent

import com.google.gwt.event.shared.GwtEvent; //導入依賴的package包/類
private void removeGetCategoriesEvent(String catid, String dsid) {
    List<GwtEvent> remove = new ArrayList<GwtEvent>();
    for (Iterator eIt = pendingRPCEvents.iterator(); eIt.hasNext();) {
        GwtEvent gwtEvent = (GwtEvent) eIt.next();
        if ( gwtEvent.getAssociatedType().equals(GetCategoriesEvent.TYPE) ) {
            GetCategoriesEvent e = (GetCategoriesEvent) gwtEvent;
            if ( e.getCatid().equals(catid) && e.getDsid().equals(dsid) ) {
                remove.add(gwtEvent);
            }
        }
        pendingRPCEvents.remove(remove);
    }
}
 
開發者ID:NOAA-PMEL,項目名稱:LAS,代碼行數:14,代碼來源:RPCManager.java

示例15: removeConfigSerialableEvent

import com.google.gwt.event.shared.GwtEvent; //導入依賴的package包/類
private void removeConfigSerialableEvent(String dsid, String varid) {
    List<GwtEvent> remove = new ArrayList<GwtEvent>();
    for (Iterator eIt = pendingRPCEvents.iterator(); eIt.hasNext();) {
        GwtEvent gwtEvent = (GwtEvent) eIt.next();
        if ( gwtEvent.getAssociatedType().equals(GetConfigEvent.TYPE) ) {
            GetConfigEvent e = (GetConfigEvent) gwtEvent;
            if ( e.getDsid().equals(dsid) && e.getVarid().equals(varid) ) {
                remove.add(gwtEvent);
            }
        }
    }
    pendingRPCEvents.remove(remove);
}
 
開發者ID:NOAA-PMEL,項目名稱:LAS,代碼行數:14,代碼來源:RPCManager.java


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