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

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

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

Table.sendEvent介绍

暂无

代码示例

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

boolean checkData (TableItem item, int index, boolean redraw) {
  if ((style & SWT.VIRTUAL) == 0) return true;
  if (!item.cached) {
    item.cached = true;
    Event event = new Event ();
    event.item = item;
    event.index = index;
    currentItem = item;
    sendEvent (SWT.SetData, event);
    //widget could be disposed at this point
    currentItem = null;
    if (isDisposed () || item.isDisposed ()) return false;
    if (redraw) {
      if (!setScrollWidth (item, false)) {
        item.redraw ();
      }
    }
  }
  return true;
}

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

boolean checkData (TableItem item, int index) {
  if (item.cached) return true;
  if ((style & SWT.VIRTUAL) != 0) {
    item.cached = true;
    Event event = new Event ();
    event.item = item;
    event.index = indexOf (item);
    currentItem = item;
    sendEvent (SWT.SetData, event);
    //widget could be disposed at this point
    currentItem = null;
    if (isDisposed () || item.isDisposed ()) return false;
    if (!setScrollWidth (item)) item.redraw (-1);
  }
  return true;
}

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

boolean checkData (TableItem item) {
  if (item.cached) return true;
  if ((style & SWT.VIRTUAL) != 0) {
    item.cached = true;
    Event event = new Event ();
    event.item = item;
    event.index = indexOf (item);
    int mask = OS.G_SIGNAL_MATCH_DATA | OS.G_SIGNAL_MATCH_ID;
    int signal_id = OS.g_signal_lookup (OS.row_changed, OS.gtk_tree_model_get_type ());
    OS.g_signal_handlers_block_matched (modelHandle, mask, signal_id, 0, 0, 0, handle);
    currentItem = item;
    sendEvent (SWT.SetData, event);
    //widget could be disposed at this point
    currentItem = null;
    if (isDisposed ()) return false;
    OS.g_signal_handlers_unblock_matched (modelHandle, mask, signal_id, 0, 0, 0, handle);
    if (item.isDisposed ()) return false;
  }
  return true;
}

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

boolean checkData (TableItem item) {
  if (item.cached) return true;
  if ((style & SWT.VIRTUAL) != 0) {
    item.cached = true;
    Event event = new Event ();
    event.item = item;
    event.index = indexOf (item);
    int mask = OS.G_SIGNAL_MATCH_DATA | OS.G_SIGNAL_MATCH_ID;
    int signal_id = OS.g_signal_lookup (OS.row_changed, OS.gtk_tree_model_get_type ());
    OS.g_signal_handlers_block_matched (modelHandle, mask, signal_id, 0, 0, 0, handle);
    currentItem = item;
    sendEvent (SWT.SetData, event);
    //widget could be disposed at this point
    currentItem = null;
    if (isDisposed ()) return false;
    OS.g_signal_handlers_unblock_matched (modelHandle, mask, signal_id, 0, 0, 0, handle);
    if (item.isDisposed ()) return false;
  }
  return true;
}

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

boolean checkData (TableItem item) {
  if (item.cached) return true;
  if ((style & SWT.VIRTUAL) != 0) {
    item.cached = true;
    Event event = new Event ();
    event.item = item;
    event.index = indexOf (item);
    int mask = OS.G_SIGNAL_MATCH_DATA | OS.G_SIGNAL_MATCH_ID;
    int signal_id = OS.g_signal_lookup (OS.row_changed, OS.gtk_tree_model_get_type ());
    OS.g_signal_handlers_block_matched (modelHandle, mask, signal_id, 0, 0, 0, handle);
    currentItem = item;
    sendEvent (SWT.SetData, event);
    //widget could be disposed at this point
    currentItem = null;
    if (isDisposed ()) return false;
    OS.g_signal_handlers_unblock_matched (modelHandle, mask, signal_id, 0, 0, 0, handle);
    if (item.isDisposed ()) return false;
  }
  return true;
}

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

event.height = itemHeight;
if (isSelected && ((style & SWT.HIDE_SELECTION) == 0 || hasFocus())) event.detail |= SWT.SELECTED;
sendEvent (SWT.MeasureItem, event);
gc.dispose ();
if (!isDisposed () && !item.isDisposed ()) {

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

Event sendPaintItemEvent (TableItem item, NMTTCUSTOMDRAW nmcd, int column, RECT itemRect) {
  int nSavedDC = OS.SaveDC (nmcd.hdc);
  RECT insetRect = toolTipInset (itemRect);
  OS.SetWindowOrgEx (nmcd.hdc, insetRect.left, insetRect.top, null);
  GCData data = new GCData ();
  data.device = display;
  data.font = item.getFont (column);
  data.foreground = OS.GetTextColor (nmcd.hdc);
  data.background = OS.GetBkColor (nmcd.hdc);
  data.uiState = (int)/*64*/OS.SendMessage (handle, OS.WM_QUERYUISTATE, 0, 0);
  GC gc = GC.win32_new (nmcd.hdc, data);
  Event event = new Event ();
  event.item = item;
  event.index = column;
  event.gc = gc;
  event.detail |= SWT.FOREGROUND;
  event.setBoundsInPixels(new Rectangle(itemRect.left, itemRect.top, itemRect.right - itemRect.left, itemRect.bottom - itemRect.top));
  //gc.setClipping (cellRect.left, cellRect.top, cellWidth, cellHeight);
  sendEvent (SWT.PaintItem, event);
  event.gc = null;
  gc.dispose ();
  OS.RestoreDC (nmcd.hdc, nSavedDC);
  return event;
}

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

Event sendEraseItemEvent (TableItem item, NMTTCUSTOMDRAW nmcd, int column, RECT cellRect) {
  int nSavedDC = OS.SaveDC (nmcd.hdc);
  RECT insetRect = toolTipInset (cellRect);
  OS.SetWindowOrgEx (nmcd.hdc, insetRect.left, insetRect.top, null);
  GCData data = new GCData ();
  data.device = display;
  data.foreground = OS.GetTextColor (nmcd.hdc);
  data.background = OS.GetBkColor (nmcd.hdc);
  data.font = item.getFont (column);
  data.uiState = (int)/*64*/OS.SendMessage (handle, OS.WM_QUERYUISTATE, 0, 0);
  GC gc = GC.win32_new (nmcd.hdc, data);
  Event event = new Event ();
  event.item = item;
  event.index = column;
  event.gc = gc;
  event.detail |= SWT.FOREGROUND;
  event.setBoundsInPixels(new Rectangle(cellRect.left, cellRect.top, cellRect.right - cellRect.left, cellRect.bottom - cellRect.top));
  //gc.setClipping (event.x, event.y, event.width, event.height);
  sendEvent (SWT.EraseItem, event);
  event.gc = null;
  //int newTextClr = data.foreground;
  gc.dispose ();
  OS.RestoreDC (nmcd.hdc, nSavedDC);
  return event;
}

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

event.height = height;
if (rowSelected && ((parent.style & SWT.HIDE_SELECTION) == 0 || parent.hasFocus())) event.detail |= SWT.SELECTED;
parent.sendEvent (SWT.MeasureItem, event);
if (height < event.height) {
  widget.setRowHeight (event.height);

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

wasResized = false;
setResizeChildren (false);
sendEvent (SWT.Resize);
if (isDisposed ()) return;
if (layout != null) {

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

sendEvent (SWT.MeasureItem, event);
event.gc = null;
gc.dispose ();

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

event.setBounds (DPIUtil.autoScaleDown (eventRect));
if (isSelected) event.detail = SWT.SELECTED;
sendEvent (SWT.MeasureItem, event);
gc.dispose ();
Rectangle rect = DPIUtil.autoScaleUp (event.getBounds ());

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

event.setBounds (DPIUtil.autoScaleDown (eventRect));
if (isSelected) event.detail = SWT.SELECTED;
sendEvent (SWT.MeasureItem, event);
gc.dispose ();
Rectangle rect = DPIUtil.autoScaleUp (event.getBounds ());

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

event.setBounds (DPIUtil.autoScaleDown (eventRect));
if (isSelected) event.detail = SWT.SELECTED;
sendEvent (SWT.MeasureItem, event);
gc.dispose ();
Rectangle rect = DPIUtil.autoScaleUp (event.getBounds ());

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

event.gc = gc;
event.setBoundsInPixels(new Rectangle(ps.left, ps.top, ps.right - ps.left, ps.bottom - ps.top));
sendEvent (SWT.Paint, event);

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

event.width = (int)cellRect.width;
event.height = (int)cellRect.height;
sendEvent (SWT.EraseItem, event);
if (!event.doit) {
  drawForeground = drawBackground = drawSelection = false; 
event.width = contentWidth;
event.height = itemHeight;
sendEvent (SWT.PaintItem, event);
gc.dispose ();

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

int cellHeight = cellRect.bottom - cellRect.top;
gc.setClipping (DPIUtil.autoScaleDown(new Rectangle (cellRect.left, cellRect.top, cellWidth, cellHeight)));
sendEvent (SWT.PaintItem, event);
if (data.focusDrawn) focusRect = null;
event.gc = null;

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

event.setBoundsInPixels (boundsInPixels);
gc.setClipping (DPIUtil.autoScaleDown(boundsInPixels));
sendEvent (SWT.EraseItem, event);
event.gc = null;
int clrSelectionText = data.foreground;

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

Rectangle eventRect = new Rectangle (rect.x, rect.y, rect.width, rect.height);
event.setBounds (DPIUtil.autoScaleDown (eventRect));
sendEvent (SWT.EraseItem, event);
drawForeground = null;
drawState = event.doit ? event.detail : 0;
event.setBounds (DPIUtil.autoScaleDown (eventRect));
event.detail = drawState;
sendEvent (SWT.PaintItem, event);
gc.dispose();

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

Rectangle eventRect = new Rectangle (rect.x, rect.y, rect.width, rect.height);
event.setBounds (DPIUtil.autoScaleDown (eventRect));
sendEvent (SWT.EraseItem, event);
drawForeground = null;
drawState = event.doit ? event.detail : 0;
event.setBounds (DPIUtil.autoScaleDown (eventRect));
event.detail = drawState;
sendEvent (SWT.PaintItem, event);
gc.dispose();

相关文章

Table类方法