org.eclipse.swt.widgets.Event.<init>()方法的使用及代码示例

x33g5p2x  于2022-01-19 转载在 其他  
字(5.7k)|赞(0)|评价(0)|浏览(96)

本文整理了Java中org.eclipse.swt.widgets.Event.<init>()方法的一些代码示例,展示了Event.<init>()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Event.<init>()方法的具体详情如下:
包路径:org.eclipse.swt.widgets.Event
类名称:Event
方法名:<init>

Event.<init>介绍

暂无

代码示例

代码示例来源:origin: pentaho/pentaho-kettle

@Override
 public void keyPressed( KeyEvent e ) {
  if ( e.character == SWT.CR ) {
   wLaunch.notifyListeners( SWT.Selection, new Event() );
  }
 }
} );

代码示例来源:origin: pentaho/pentaho-kettle

public void setModified() {
  for ( int i = 0; i < modListeners.size(); i++ ) {
   ModifyListener lsMod = modListeners.get( i );
   if ( lsMod != null ) {
    Event e = new Event();
    e.widget = this;
    lsMod.modifyText( new ModifyEvent( e ) );
   }
  }
 }
}

代码示例来源:origin: pentaho/pentaho-kettle

private void setModified() {
 if ( lsMod != null ) {
  Event e = new Event();
  e.widget = this;
  lsMod.modifyText( new ModifyEvent( e ) );
 }
}

代码示例来源:origin: pentaho/pentaho-kettle

/**
 * Inform the content listener that content changed.
 *
 * @param rownr
 * @param colnr
 * @param textData
 */
private void fireContentChangedListener( int rownr, int colnr, String textData ) {
 if ( lsContent != null ) {
  Event event = new Event();
  event.data = textData;
  event.widget = table;
  event.x = rownr;
  event.y = colnr;
  lsContent.modifyText( new ModifyEvent( event ) );
 }
}

代码示例来源:origin: pentaho/pentaho-kettle

public void setSelectedIndex( int index ) {
  for ( Control control : radioGroup.getChildren() ) {
   ( (Button) control ).setSelection( false );
  }
  ( (Button) radioGroup.getChildren()[ index ] ).setSelection( true );
  radioGroup.getChildren()[index].notifyListeners( SWT.Selection, new Event() );
 }
}

代码示例来源:origin: pentaho/pentaho-kettle

Event resizeEvent = new Event();
resizeEvent.widget = table;
resizeEvent.type = SWT.Resize;

代码示例来源:origin: pentaho/pentaho-kettle

Event e = new Event();
e.widget = this;
e.x = colnr;

代码示例来源:origin: org.eclipse.platform/org.eclipse.ui.workbench.texteditor

private void doFireSelectionChanged(Point selection) {
  Event event= new Event();
  event.x= selection.x;
  event.y= selection.y;
  fTextWidget.notifyListeners(SWT.Selection, event);
}

代码示例来源:origin: org.eclipse.rap/org.eclipse.rap.rwt

public static Event newEvent( Widget widget, int eventType ) {
 Event event = new Event();
 event.type = eventType;
 event.widget = widget;
 event.display = widget.getDisplay();
 return event;
}

代码示例来源:origin: org.eclipse.rap/org.eclipse.rap.rwt

private static boolean sendShowListEvent( CTabFolder folder ) {
 Event event = new Event();
 Rectangle chevronRect = getChevronBounds( folder );
 event.x = chevronRect.x;
 event.y = chevronRect.y;
 event.height = chevronRect.height;
 event.width = chevronRect.width;
 event.doit = true;
 folder.notifyListeners( EventTypes.CTAB_FOLDER_SHOW_LIST, event );
 return event.doit;
}

代码示例来源:origin: org.eclipse/org.eclipse.jdt.ui

protected void updateCheckBox(Button curr) {
  super.updateCheckBox(curr);
  Event event= new Event();
  event.type= SWT.Selection;
  event.display= curr.getDisplay();
  event.widget= curr;
  curr.notifyListeners(SWT.Selection, event);
}

代码示例来源:origin: org.eclipse.platform/org.eclipse.jface

private void openDialogHelp() {
    if (pageContainer == null)
      return;
    for(Control currentControl = pageContainer; currentControl != null; currentControl = currentControl.getParent()) {
      if (currentControl.isListening(SWT.Help)) {
        currentControl.notifyListeners(SWT.Help, new Event());
        break;
      }
    }
  }
});

代码示例来源:origin: org.eclipse.rap/org.eclipse.rap.rwt

private void processNextColumnsMoveEvent() {
 int[] columnsOrder = parent.getColumnOrder();
 boolean found = false;
 for( int i = 0; i < columnsOrder.length; i++ ) {
  TableColumn column = parent.getColumn( columnsOrder[ i ] );
  if( column == this ) {
   found = true;
  } else if( found ) {
   column.notifyListeners( SWT.Move, new Event() );
  }
 }
}

代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.swt.win32.win32.x86

void onSelection(Event e) {
  Event event = new Event();
  TableItem tableItem = (TableItem)e.item;
  TableTreeItem item = getItem(tableItem);
  event.item = item;

  if (e.type == SWT.Selection && e.detail == SWT.CHECK && item != null) {
    event.detail = SWT.CHECK;
    item.checked = tableItem.getChecked();
  }
  notifyListeners(e.type, event);
}
/**

代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.swt.win32.win32.x86

boolean sendDragEvent (int button, int stateMask, int x, int y) {
  Event event = new Event ();
  event.button = button;
  event.setLocationInPixels(x, y);
  event.stateMask = stateMask;
  postEvent (SWT.DragDetect, event);
  if (isDisposed ()) return false;
  return event.doit;
}

代码示例来源:origin: org.eclipse.xtext/org.eclipse.xtext.junit4

protected void pressKey(XtextEditor editor, char c) throws Exception {
  StyledText textWidget = editor.getInternalSourceViewer().getTextWidget();
  Event e = new Event();
  e.character = c;
  e.type = SWT.KeyDown;
  e.doit = true;
  //XXX Hack!
  if (c == SWT.ESC) {
    e.keyCode = 27;
  }
  textWidget.notifyListeners(SWT.KeyDown, e);
}

代码示例来源:origin: org.eclipse.rap/org.eclipse.rap.rwt

static Event createMenuDetectEvent( JsonObject properties ) {
 Event event = new Event();
 event.x = properties.get( EVENT_PARAM_X ).asInt();
 event.y = properties.get( EVENT_PARAM_Y ).asInt();
 return event;
}

代码示例来源:origin: org.eclipse.platform/org.eclipse.ui.forms

private void notifySelectionChanged() {
  Event event = new Event();
  event.widget = this;
  event.display = this.getDisplay();
  event.type = SWT.Selection;
  notifyListeners(SWT.Selection, event);
  // A listener could have caused the widget to be disposed
  if (!isDisposed()) {
    getAccessible().selectionChanged();
  }
}

代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.swt.win32.win32.x86

void expandItem (TableTreeItem item) {
  if (item == null) return;
  expandItem(item.parentItem);
  if (!item.getVisible()) item.setVisible(true);
  if ( !item.expanded && item.items.length > 0) {
    item.setExpanded(true);
    Event event = new Event();
    event.item = item;
    notifyListeners(SWT.Expand, event);
  }
}
@Override

代码示例来源:origin: org.eclipse.rap/org.eclipse.rap.rwt

protected static Event createSelectionEvent( int eventType, JsonObject properties ) {
 Event event = new Event();
 event.type = eventType;
 event.stateMask = readStateMask( properties );
 event.detail = readDetail( properties );
 event.text = readText( properties );
 event.button = readButton( properties );
 event.setBounds( readBounds( properties ) );
 return event;
}

相关文章