当前位置: 首页>>代码示例>>Java>>正文


Java Type类代码示例

本文整理汇总了Java中com.google.gwt.event.shared.GwtEvent.Type的典型用法代码示例。如果您正苦于以下问题:Java Type类的具体用法?Java Type怎么用?Java Type使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


Type类属于com.google.gwt.event.shared.GwtEvent包,在下文中一共展示了Type类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: addHandler

import com.google.gwt.event.shared.GwtEvent.Type; //导入依赖的package包/类
@Override
protected <H extends EventHandler> void addHandler(Type<H> type) {
	// checks which kind of handler has been added
	if (type.equals(AnimationCompleteEvent.TYPE)) {
		// checks if property exist
		if (!has(Property.onComplete)) {
			// sets the java script code to get the event
			registerNativeCompleteHandler(getJavaScriptObject());
		}
		// increments amount of handlers
		onCompleteHandlers++;
	} else if (type.equals(AnimationProgressEvent.TYPE)) {
		// checks if property exist
		if (!has(Property.onProgress)) {
			// sets the java script code to get the event
			registerNativeProgressHandler(getJavaScriptObject());
		}
		// increments amount of handlers
		onProgressHandlers++;
	}
}
 
开发者ID:pepstock-org,项目名称:Charba,代码行数:22,代码来源:Animation.java

示例2: removeHandler

import com.google.gwt.event.shared.GwtEvent.Type; //导入依赖的package包/类
@Override
protected <H extends EventHandler> void removeHandler(Type<H> type) {
	// checks which kind of handler has been removed
	if (type.equals(AnimationCompleteEvent.TYPE)) {
		// decrements amount of handlers
		onCompleteHandlers--;
		// if zero, no handler
		if (onCompleteHandlers == 0) {
			// therefore remove property
			remove(Property.onComplete);
		}
	} else if (type.equals(AnimationProgressEvent.TYPE)) {
		// decrements amount of handlers
		onProgressHandlers--;
		// if zero, no handler
		if (onProgressHandlers == 0) {
			// therefore remove property
			remove(Property.onProgress);
		}
	}
}
 
开发者ID:pepstock-org,项目名称:Charba,代码行数:22,代码来源:Animation.java

示例3: addHandler

import com.google.gwt.event.shared.GwtEvent.Type; //导入依赖的package包/类
@Override
protected <H extends EventHandler> void addHandler(Type<H> type) {
	// checks if type of added event handler is dataset selection or click
	if (type.equals(ChartClickEvent.TYPE)) {
		// if java script property is missing
		if (!has(Property.onClick)) {
			// adds the java script function to catch the event
			registerNativeClickHandler(getJavaScriptObject());
		}
		// increments amount of handlers
		onClickHandlers++;
	} else if (type.equals(ChartHoverEvent.TYPE)) {
		// if java script property is missing
		if (!has(Property.onHover)) {
			// adds the java script function to catch the event
			registerNativeHoverHandler(getJavaScriptObject());
		}
		// increments amount of handlers
		onHoverHandlers++;
	}
}
 
开发者ID:pepstock-org,项目名称:Charba,代码行数:22,代码来源:Legend.java

示例4: removeHandler

import com.google.gwt.event.shared.GwtEvent.Type; //导入依赖的package包/类
@Override
protected <H extends EventHandler> void removeHandler(Type<H> type) {
	// checks if type of removed event handler is dataset selection or click
	if (type.equals(DatasetSelectionEvent.TYPE) || type.equals(ChartClickEvent.TYPE)) {
		// decrements the amount of handlers
		onClickHandlers--;
		// if there is not any handler
		if (onClickHandlers == 0) {
			// removes the java script object
			remove(Property.onClick);
		}
	} else if (type.equals(ChartHoverEvent.TYPE)) {
		// decrements the amount of handlers
		onHoverHandlers--;
		// if there is not any handler
		if (onHoverHandlers == 0) {
			// removes the java script object
			remove(Property.onHover);
		}
	}
}
 
开发者ID:pepstock-org,项目名称:Charba,代码行数:22,代码来源:Legend.java

示例5: addHandler

import com.google.gwt.event.shared.GwtEvent.Type; //导入依赖的package包/类
@Override
protected <H extends EventHandler> void addHandler(Type<H> type) {
	// checks if type of added event handler is dataset selection or click
	if (type.equals(DatasetSelectionEvent.TYPE) || type.equals(ChartClickEvent.TYPE)) {
		// if java script property is missing
		if (!has(Property.onClick)) {
			// adds the java script function to catch the event
			registerNativeClickHandler(getJavaScriptObject());
		}
		// increments amount of handlers
		onClickHandlers++;
	} else if (type.equals(ChartHoverEvent.TYPE)) {
		// if java script property is missing
		if (!has(Property.onHover)) {
			// adds the java script function to catch the event
			registerNativeHoverHandler(getJavaScriptObject());
		}
		// increments amount of handlers
		onHoverHandlers++;
	} else if (type.equals(ChartResizeEvent.TYPE)) {
		// if java script property is missing
		if (!has(Property.onResize)) {
			// adds the java script function to catch the event
			registerNativeResizeHandler(getJavaScriptObject());
		}
		// increments amount of handlers
		onResizeHandlers++;
	}
}
 
开发者ID:pepstock-org,项目名称:Charba,代码行数:30,代码来源:BaseOptions.java

示例6: removeHandler

import com.google.gwt.event.shared.GwtEvent.Type; //导入依赖的package包/类
@Override
protected <H extends EventHandler> void removeHandler(Type<H> type) {
	// checks if type of removed event handler is dataset selection or click
	if (type.equals(DatasetSelectionEvent.TYPE) || type.equals(ChartClickEvent.TYPE)) {
		// decrements the amount of handlers
		onClickHandlers--;
		// if there is not any handler
		if (onClickHandlers == 0) {
			// removes the java script object
			remove(Property.onClick);
		}
	} else if (type.equals(ChartHoverEvent.TYPE)) {
		// decrements the amount of handlers
		onHoverHandlers--;
		// if there is not any handler
		if (onHoverHandlers == 0) {
			// removes the java script object
			remove(Property.onHover);
		}
	} else if (type.equals(ChartResizeEvent.TYPE)) {
		// decrements the amount of handlers
		onResizeHandlers--;
		// if there is not any handler
		if (onResizeHandlers == 0) {
			// removes the java script object
			remove(Property.onResize);
		}
	}
}
 
开发者ID:pepstock-org,项目名称:Charba,代码行数:30,代码来源:BaseOptions.java

示例7: addHandler

import com.google.gwt.event.shared.GwtEvent.Type; //导入依赖的package包/类
@Override
public <H extends EventHandler> HandlerRegistration addHandler(Type<H> type, H handler) {
	// adds handler
	HandlerRegistration registration = super.addHandler(type, handler);
	// if the handler is a chart event handler one
	if (handler instanceof ChartEventHandler) {
		// sends the event
		fireEvent(new AddHandlerEvent(type));
	}
	return registration;
}
 
开发者ID:pepstock-org,项目名称:Charba,代码行数:12,代码来源:ChartHandlerManager.java

示例8: removeHandler

import com.google.gwt.event.shared.GwtEvent.Type; //导入依赖的package包/类
@Override
public <H extends EventHandler> void removeHandler(Type<H> type, H handler) {
	// removes handler
	super.removeHandler(type, handler);
	// if the handler is a chart event handler one
	if (handler instanceof ChartEventHandler) {
		// sends the event
		fireEvent(new RemoveHandlerEvent(type));
	}
}
 
开发者ID:pepstock-org,项目名称:Charba,代码行数:11,代码来源:ChartHandlerManager.java

示例9: removeStaleEvents

import com.google.gwt.event.shared.GwtEvent.Type; //导入依赖的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

示例10: addHandler

import com.google.gwt.event.shared.GwtEvent.Type; //导入依赖的package包/类
public <T extends EventHandler> HandlerRegistration addHandler(Type<T> type,
        T handler) {
    return eventBus.addHandler(type, handler);
}
 
开发者ID:iSergio,项目名称:gwt-cs,代码行数:5,代码来源:ShowcaseEventBusImpl.java

示例11: addHandlerToSource

import com.google.gwt.event.shared.GwtEvent.Type; //导入依赖的package包/类
public <T extends EventHandler> HandlerRegistration addHandlerToSource(
        Type<T> type,
        Object source, T handler) {
    return eventBus.addHandlerToSource(type, source, handler);
}
 
开发者ID:iSergio,项目名称:gwt-olcs,代码行数:6,代码来源:ShowcaseEventBusImpl.java

示例12: addHandler

import com.google.gwt.event.shared.GwtEvent.Type; //导入依赖的package包/类
@Override
public <H extends EventHandler> HandlerRegistration addHandler(H handler, Type<H> type) {
  return handlerManger.addHandler(type, handler);
}
 
开发者ID:consulo,项目名称:consulo,代码行数:5,代码来源:CellTreeNodeView.java

示例13: addHandler

import com.google.gwt.event.shared.GwtEvent.Type; //导入依赖的package包/类
/**
 * Notifies the event provider when a new handler has been added.
 * @param type type of event
 */
protected abstract <H extends EventHandler> void addHandler(Type<H> type);
 
开发者ID:pepstock-org,项目名称:Charba,代码行数:6,代码来源:EventProvider.java

示例14: removeHandler

import com.google.gwt.event.shared.GwtEvent.Type; //导入依赖的package包/类
/**
 * Notifies the event provider when a new handler has been deregistered
 * @param type type of event handler
 */
protected abstract <H extends EventHandler> void removeHandler(Type<H> type);
 
开发者ID:pepstock-org,项目名称:Charba,代码行数:6,代码来源:EventProvider.java

示例15: addHandler

import com.google.gwt.event.shared.GwtEvent.Type; //导入依赖的package包/类
/**
 * Registers the given {@code handler} for the {@code type}.
 * 
 * @param <H>
 *          The event handler type.
 * @param type
 *          The type.
 * @param handler
 *          The handler.
 * @return The {@code HandlerRegistration}.
 */
<H extends EventHandler> HandlerRegistration addHandler(final Type<H> type, final H handler);
 
开发者ID:sigmah-dev,项目名称:sigmah,代码行数:13,代码来源:EventBus.java


注:本文中的com.google.gwt.event.shared.GwtEvent.Type类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。