本文整理汇总了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);
}
});
}
}
示例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]);
}
示例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();
}
}
示例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));
}
}
示例5: getType
import com.google.gwt.event.shared.GwtEvent; //导入依赖的package包/类
public static GwtEvent.Type<Handler> getType()
{
return TYPE;
}
示例6: getAssociatedType
import com.google.gwt.event.shared.GwtEvent; //导入依赖的package包/类
@Override
public GwtEvent.Type<Handler> getAssociatedType()
{
return AuthRefreshSuccessEvent.getType();
}
示例7: getAssociatedType
import com.google.gwt.event.shared.GwtEvent; //导入依赖的package包/类
@Override
public GwtEvent.Type<Handler> getAssociatedType()
{
return AuthErrorEvent.getType();
}
示例8: getAssociatedType
import com.google.gwt.event.shared.GwtEvent; //导入依赖的package包/类
@Override
public GwtEvent.Type<Handler> getAssociatedType()
{
return BeforeAuthLogoutEvent.getType();
}
示例9: getAssociatedType
import com.google.gwt.event.shared.GwtEvent; //导入依赖的package包/类
@Override
public GwtEvent.Type<Handler> getAssociatedType()
{
return AuthSuccessEvent.getType();
}
示例10: getAssociatedType
import com.google.gwt.event.shared.GwtEvent; //导入依赖的package包/类
@Override
public GwtEvent.Type<Handler> getAssociatedType()
{
return AuthRefreshErrorEvent.getType();
}
示例11: getAssociatedType
import com.google.gwt.event.shared.GwtEvent; //导入依赖的package包/类
@Override
public GwtEvent.Type<Handler> getAssociatedType()
{
return TokenExpiredEvent.getType();
}
示例12: getAssociatedType
import com.google.gwt.event.shared.GwtEvent; //导入依赖的package包/类
@Override
public com.google.gwt.event.shared.GwtEvent.Type<CommandSendHandler> getAssociatedType() {
return TYPE;
}
示例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);
}
示例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);
}
}
示例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);
}