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

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

本文整理了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

  1. boolean setScrollWidth () {
  2. return setScrollWidth (items, true);
  3. }

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

  1. public void setRedraw (boolean redraw) {
  2. checkWidget ();
  3. super.setRedraw (redraw);
  4. if (redraw && drawCount == 0) {
  5. /* Resize the item array to match the item count */
  6. if (items.length > 4 && items.length - itemCount > 3) {
  7. int length = Math.max (4, (itemCount + 3) / 4 * 4);
  8. TableItem [] newItems = new TableItem [length];
  9. System.arraycopy (items, 0, newItems, 0, itemCount);
  10. items = newItems;
  11. }
  12. setScrollWidth ();
  13. }
  14. }

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

  1. void drawRect(long /*int*/ id, long /*int*/ sel, NSRect rect) {
  2. fixScrollWidth = false;
  3. super.drawRect(id, sel, rect);
  4. if (isDisposed ()) return;
  5. if (fixScrollWidth) {
  6. fixScrollWidth = false;
  7. if (setScrollWidth (items, true)) view.setNeedsDisplay(true);
  8. }
  9. }

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

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

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

  1. /**
  2. * Sets the height of the area which would be used to
  3. * display <em>one</em> of the items in the table.
  4. *
  5. * @param itemHeight the height of one item
  6. *
  7. * @exception SWTException <ul>
  8. * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
  9. * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
  10. * </ul>
  11. *
  12. * @since 3.2
  13. */
  14. /*public*/ void setItemHeight (int itemHeight) {
  15. checkWidget ();
  16. if (itemHeight < -1) error (SWT.ERROR_INVALID_ARGUMENT);
  17. this.itemHeight = itemHeight;
  18. setItemHeight (true);
  19. setScrollWidth (null, true);
  20. }

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

  1. void setFont (NSFont font) {
  2. super.setFont (font);
  3. setItemHeight (null, font, !hooks (SWT.MeasureItem));
  4. view.setNeedsDisplay (true);
  5. clearCachedWidth (items);
  6. setScrollWidth (items, true);
  7. }

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

  1. /**
  2. * Clears all the items in the receiver. The text, icon and other
  3. * attributes of the items are set to their default values. If the
  4. * table was created with the <code>SWT.VIRTUAL</code> style, these
  5. * attributes are requested again as needed.
  6. *
  7. * @exception SWTException <ul>
  8. * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
  9. * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
  10. * </ul>
  11. *
  12. * @see SWT#VIRTUAL
  13. * @see SWT#SetData
  14. *
  15. * @since 3.0
  16. */
  17. public void clearAll () {
  18. checkWidget ();
  19. for (int i=0; i<itemCount; i++) {
  20. TableItem item = items [i];
  21. if (item != null) {
  22. item.clear ();
  23. }
  24. }
  25. if (currentItem == null && isDrawing ()) view.setNeedsDisplay(true);
  26. setScrollWidth (items, true);
  27. }

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

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

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

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

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

  1. boolean checkData (TableItem item, int index, boolean redraw) {
  2. if ((style & SWT.VIRTUAL) == 0) return true;
  3. if (!item.cached) {
  4. item.cached = true;
  5. Event event = new Event ();
  6. event.item = item;
  7. event.index = index;
  8. currentItem = item;
  9. sendEvent (SWT.SetData, event);
  10. //widget could be disposed at this point
  11. currentItem = null;
  12. if (isDisposed () || item.isDisposed ()) return false;
  13. if (redraw) {
  14. if (!setScrollWidth (item, false)) {
  15. item.redraw ();
  16. }
  17. }
  18. }
  19. return true;
  20. }

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

  1. boolean checkData (TableItem item, int index) {
  2. if (item.cached) return true;
  3. if ((style & SWT.VIRTUAL) != 0) {
  4. item.cached = true;
  5. Event event = new Event ();
  6. event.item = item;
  7. event.index = indexOf (item);
  8. currentItem = item;
  9. sendEvent (SWT.SetData, event);
  10. //widget could be disposed at this point
  11. currentItem = null;
  12. if (isDisposed () || item.isDisposed ()) return false;
  13. if (!setScrollWidth (item)) item.redraw (-1);
  14. }
  15. return true;
  16. }

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

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

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

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

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

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

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

  1. parent.setScrollWidth (this, false);

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

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

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

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

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

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

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

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

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

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

相关文章

Table类方法