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

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

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

Table.setScrollWidth介绍

暂无

代码示例

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

boolean setScrollWidth () {
  return setScrollWidth (items, true);
}

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

public void setRedraw (boolean redraw) {
  checkWidget ();
  super.setRedraw (redraw);
  if (redraw && drawCount == 0) {
     /* Resize the item array to match the item count */
    if (items.length > 4 && items.length - itemCount > 3) {
      int length = Math.max (4, (itemCount + 3) / 4 * 4);
      TableItem [] newItems = new TableItem [length];
      System.arraycopy (items, 0, newItems, 0, itemCount);
      items = newItems;
    }
    setScrollWidth ();
  }
}

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

void drawRect(long /*int*/ id, long /*int*/ sel, NSRect rect) {
  fixScrollWidth = false;
  super.drawRect(id, sel, rect);
  if (isDisposed ()) return;
  if (fixScrollWidth) {
    fixScrollWidth = false;
    if (setScrollWidth (items, true)) view.setNeedsDisplay(true);
  }
}

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

if (index == 0) parent.setScrollWidth (this);
redraw (index);

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

/**
 * Sets the height of the area which would be used to
 * display <em>one</em> of the items in the table.
 *
 * @param itemHeight the height of one item
 *
 * @exception SWTException <ul>
 *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
 *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
 * </ul>
 *
 * @since 3.2
 */
/*public*/ void setItemHeight (int itemHeight) {
  checkWidget ();
  if (itemHeight < -1) error (SWT.ERROR_INVALID_ARGUMENT);
  this.itemHeight = itemHeight;
  setItemHeight (true);
  setScrollWidth (null, true);
}

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

void setFont (NSFont font) {
  super.setFont (font);
  setItemHeight (null, font, !hooks (SWT.MeasureItem));
  view.setNeedsDisplay (true);
  clearCachedWidth (items);
  setScrollWidth (items, true);
}

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

/**
 * Clears all the items in the receiver. The text, icon and other
 * attributes of the items are set to their default values. If the
 * table was created with the <code>SWT.VIRTUAL</code> style, these
 * attributes are requested again as needed.
 *
 * @exception SWTException <ul>
 *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
 *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
 * </ul>
 * 
 * @see SWT#VIRTUAL
 * @see SWT#SetData
 * 
 * @since 3.0
 */
public void clearAll () {
  checkWidget ();
  for (int i=0; i<itemCount; i++) {
    TableItem item = items [i];
    if (item != null) {
      item.clear ();
    }
  }
  if (currentItem == null && isDrawing ()) view.setNeedsDisplay(true);
  setScrollWidth (items, true);
}

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

parent.setScrollWidth (this, false);
redraw ();

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

if (currentItem != item) item.clear ();
if (currentItem == null) item.redraw (-1);
setScrollWidth (item);

代码示例来源: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.swt.cocoa.macosx/x86_64

if (index == 0) parent.setScrollWidth (this);	
redraw (index);

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

if (index == 0) parent.setScrollWidth (this, false);
boolean drawText = (image == null && oldImage != null) || (image != null && oldImage == null);
redraw (index, drawText, true);

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

if (columnCount == 0 && columnIndex == 0) {
  item.width = event.width;
  if (setScrollWidth (item)) {
    widget.setNeedsDisplay(true);

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

parent.setScrollWidth (this, false);

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

if (count == 0) setScrollWidth (item, false);

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

parent.setScrollWidth (this, false);
redraw ();

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

OS.SendMessage (handle, OS.LVM_REDRAWITEMS, index, index);
setScrollWidth (item, false);

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

OS.SetWindowLong (handle, OS.GWL_STYLE, bits & ~OS.LVS_OWNERDRAWFIXED);
setScrollWidth (null, true);
if (topIndex != 0) {
  setTopIndex (topIndex);

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

if (columnCount == 0) {
  OS.SendMessage (handle, OS.LVM_SETCOLUMNWIDTH, 0, 0);
  setScrollWidth (null, false);

相关文章

微信公众号

最新文章

更多

Table类方法