本文整理汇总了Java中com.google.gwt.event.shared.GwtEvent.Type.equals方法的典型用法代码示例。如果您正苦于以下问题:Java Type.equals方法的具体用法?Java Type.equals怎么用?Java Type.equals使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.google.gwt.event.shared.GwtEvent.Type
的用法示例。
在下文中一共展示了Type.equals方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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++;
}
}
示例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);
}
}
}
示例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++;
}
}
示例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);
}
}
}
示例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++;
}
}
示例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);
}
}
}