org.eclipse.swt.widgets.TableColumn.sendEvent()方法的使用及代码示例

x33g5p2x  于2022-01-29 转载在 其他  
字(5.0k)|赞(0)|评价(0)|浏览(110)

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

TableColumn.sendEvent介绍

暂无

代码示例

代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.s390x

@Override
long /*int*/ gtk_size_allocate (long /*int*/ widget, long /*int*/ allocation) {
  useFixedWidth = false;
  GtkAllocation widgetAllocation = new GtkAllocation ();
  OS.gtk_widget_get_allocation (widget, widgetAllocation);
  int x = widgetAllocation.x;
  int width = widgetAllocation.width;
  if (x != lastX) {
    lastX = x;
    sendEvent (SWT.Move);
  }
  if (width != lastWidth) {
    lastWidth = width;
    sendEvent (SWT.Resize);
  }
  return 0;
}

代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.ppc

@Override
int /*long*/ gtk_size_allocate (int /*long*/ widget, int /*long*/ allocation) {
  useFixedWidth = false;
  GtkAllocation widgetAllocation = new GtkAllocation ();
  OS.gtk_widget_get_allocation (widget, widgetAllocation);
  int x = widgetAllocation.x;
  int width = widgetAllocation.width;
  if (x != lastX) {
    lastX = x;
    sendEvent (SWT.Move);
  }
  if (width != lastWidth) {
    lastWidth = width;
    sendEvent (SWT.Resize);
  }
  return 0;
}

代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.aix.ppc

@Override
int /*long*/ gtk_size_allocate (int /*long*/ widget, int /*long*/ allocation) {
  useFixedWidth = false;
  GtkAllocation widgetAllocation = new GtkAllocation ();
  OS.gtk_widget_get_allocation (widget, widgetAllocation);
  int x = widgetAllocation.x;
  int width = widgetAllocation.width;
  if (x != lastX) {
    lastX = x;
    sendEvent (SWT.Move);
  }
  if (width != lastWidth) {
    lastWidth = width;
    sendEvent (SWT.Resize);
  }
  return 0;
}

代码示例来源:origin: org.eclipse.swt.cocoa.macosx/x86_64

for (int j = 0; j < columnCount; j++) {
  if (columns[j].nsColumn.id == columnId) {
    columns [j].sendEvent (SWT.Move);
    break;

代码示例来源:origin: org.eclipse.swt.cocoa.macosx/x86_64

void tableViewColumnDidResize (long /*int*/ id, long /*int*/ sel, long /*int*/ aNotification) {
  NSNotification notification = new NSNotification (aNotification);
  NSDictionary userInfo = notification.userInfo ();
  NSString nsstring = (NSString) new NSString().alloc();
  nsstring = nsstring.initWithString("NSTableColumn"); //$NON-NLS-1$
  id columnId = userInfo.valueForKey (nsstring);
  nsstring.release();
  TableColumn column = getColumn (columnId);
  if (column == null) return; /* either CHECK column or firstColumn in 0-column Table */

  column.sendEvent (SWT.Resize);
  if (isDisposed ()) return;

  NSTableView tableView = (NSTableView)view;
  int index = indexOf (column.nsColumn);
  if (index == -1) return; /* column was disposed in Resize callback */

  NSArray nsColumns = tableView.tableColumns ();
  int columnCount = (int)/*64*/tableView.numberOfColumns ();
  for (int i = index + 1; i < columnCount; i++) {
    columnId = nsColumns.objectAtIndex (i);
    column = getColumn (columnId);
    if (column != null) {
      column.sendEvent (SWT.Move);
      if (isDisposed ()) return;
    }
  }
}

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

newColumns [i].sendEvent (SWT.Move);

代码示例来源:origin: org.eclipse.swt.cocoa.macosx/x86_64

void tableViewColumnDidMove (long /*int*/ id, long /*int*/ sel, long /*int*/ aNotification) {
  NSNotification notification = new NSNotification (aNotification);
  NSDictionary userInfo = notification.userInfo ();
  NSString nsstring = (NSString) new NSString().alloc();
  nsstring = nsstring.initWithString("NSOldColumn"); //$NON-NLS-1$
  id nsOldIndex = userInfo.valueForKey (nsstring); 
  nsstring.release();
  nsstring = (NSString) new NSString().alloc();
  nsstring = nsstring.initWithString("NSNewColumn"); //$NON-NLS-1$
  id nsNewIndex = userInfo.valueForKey (nsstring);
  nsstring.release();
  int oldIndex = new NSNumber (nsOldIndex).intValue ();
  int newIndex = new NSNumber (nsNewIndex).intValue ();
  NSTableView tableView = (NSTableView)view;
  int startIndex = Math.min (oldIndex, newIndex);
  int endIndex = Math.max (oldIndex, newIndex);
  NSArray nsColumns = tableView.tableColumns ();
  for (int i = startIndex; i <= endIndex; i++) {
    id columnId = nsColumns.objectAtIndex (i);
    TableColumn column = getColumn (columnId);
    if (column != null) {
      column.sendEvent (SWT.Move);
      if (isDisposed ()) return;
    }
  }
  headerView.setNeedsDisplay(true);
}

代码示例来源:origin: org.eclipse.swt.cocoa.macosx/x86_64

if (!column.isDisposed ()) {
  if (newX [i] != oldX [i]) {
    column.sendEvent (SWT.Move);

代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.aix.ppc

sendEvent (SWT.Resize);

代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.s390x

sendEvent (SWT.Resize);

代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.ppc

sendEvent (SWT.Resize);

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

if (newRect.left != oldRects [i].left) {
  column.updateToolTip (i);
  column.sendEvent (SWT.Move);

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

if (column != null) {
  column.updateToolTip (phdn.iItem);
  column.sendEvent (SWT.Resize);
  if (isDisposed ()) return LRESULT.ZERO;
    if (moved && !nextColumn.isDisposed ()) {
      nextColumn.updateToolTip (order [i]);
      nextColumn.sendEvent (SWT.Move);

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

if (oldWidth != newWidth) {
  updateToolTip (index);
  sendEvent (SWT.Resize);
  if (isDisposed ()) return;
  boolean moved = false;
    if (moved && !column.isDisposed ()) {
      column.updateToolTip (order [i]);
      column.sendEvent (SWT.Move);

相关文章