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

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

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

ToolBar.relayout介绍

暂无

代码示例

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

  1. void resized () {
  2. super.resized ();
  3. relayout ();
  4. }

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

  1. @Override
  2. public void dispose () {
  3. if (isDisposed ()) return;
  4. ToolBar parent = this.parent;
  5. super.dispose ();
  6. parent.relayout ();
  7. }

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

  1. void setWidthInPixels (int width) {
  2. checkWidget();
  3. if ((style & SWT.SEPARATOR) == 0) return;
  4. if (width < 0) return;
  5. resizeHandle(width, (parent.style & SWT.VERTICAL) != 0 ? 6 : 15);
  6. parent.relayout ();
  7. }

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

  1. @Override
  2. void createWidget (int index) {
  3. super.createWidget (index);
  4. showWidget (index);
  5. parent.relayout ();
  6. }

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

  1. void setWidthInPixels (int width) {
  2. checkWidget();
  3. if ((style & SWT.SEPARATOR) == 0) return;
  4. if (width < 0) return;
  5. resizeHandle(width, (parent.style & SWT.VERTICAL) != 0 ? 6 : 15);
  6. parent.relayout ();
  7. }

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

  1. @Override
  2. void createWidget (int index) {
  3. super.createWidget (index);
  4. showWidget (index);
  5. parent.relayout ();
  6. }

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

  1. @Override
  2. public void dispose () {
  3. if (isDisposed ()) return;
  4. ToolBar parent = this.parent;
  5. super.dispose ();
  6. parent.relayout ();
  7. }

代码示例来源: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) relayout();
  5. }

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

  1. @Override
  2. public void dispose () {
  3. if (isDisposed ()) return;
  4. ToolBar parent = this.parent;
  5. super.dispose ();
  6. parent.relayout ();
  7. }

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

  1. void setWidthInPixels (int width) {
  2. checkWidget();
  3. if ((style & SWT.SEPARATOR) == 0) return;
  4. if (width < 0) return;
  5. resizeHandle(width, (parent.style & SWT.VERTICAL) != 0 ? 6 : 15);
  6. parent.relayout ();
  7. }

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

  1. @Override
  2. void createWidget (int index) {
  3. super.createWidget (index);
  4. showWidget (index);
  5. parent.relayout ();
  6. }

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

  1. void destroyItem (ToolItem item) {
  2. int index = 0;
  3. while (index < itemCount) {
  4. if (items [index] == item) break;
  5. index++;
  6. }
  7. if (index == itemCount) return;
  8. if (item == lastFocus) lastFocus = null;
  9. System.arraycopy (items, index + 1, items, index, --itemCount - index);
  10. items [itemCount] = null;
  11. if (nsToolbar != null) {
  12. nsToolbar.removeItemAtIndex(index);
  13. } else {
  14. item.view.removeFromSuperview();
  15. }
  16. relayout ();
  17. }

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

  1. @Override
  2. int setBounds (int x, int y, int width, int height, boolean move, boolean resize) {
  3. OS.gtk_toolbar_set_show_arrow (handle, false);
  4. int result = super.setBounds (x, y, width, height, move, resize);
  5. if ((result & RESIZED) != 0) relayout ();
  6. if ((style & SWT.WRAP) != 0) OS.gtk_toolbar_set_show_arrow (handle, true);
  7. return result;
  8. }

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

  1. @Override
  2. void setFontDescription (int /*long*/ font) {
  3. super.setFontDescription (font);
  4. ToolItem [] items = getItems ();
  5. for (int i = 0; i < items.length; i++) {
  6. items[i].setFontDescription (font);
  7. }
  8. relayout ();
  9. }

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

  1. @Override
  2. int setBounds (int x, int y, int width, int height, boolean move, boolean resize) {
  3. OS.gtk_toolbar_set_show_arrow (handle, false);
  4. int result = super.setBounds (x, y, width, height, move, resize);
  5. if ((result & RESIZED) != 0) relayout ();
  6. if ((style & SWT.WRAP) != 0) OS.gtk_toolbar_set_show_arrow (handle, true);
  7. return result;
  8. }

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

  1. @Override
  2. void setFontDescription (long /*int*/ font) {
  3. super.setFontDescription (font);
  4. ToolItem [] items = getItems ();
  5. for (int i = 0; i < items.length; i++) {
  6. items[i].setFontDescription (font);
  7. }
  8. relayout ();
  9. }

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

  1. @Override
  2. int setBounds (int x, int y, int width, int height, boolean move, boolean resize) {
  3. OS.gtk_toolbar_set_show_arrow (handle, false);
  4. int result = super.setBounds (x, y, width, height, move, resize);
  5. if ((result & RESIZED) != 0) relayout ();
  6. if ((style & SWT.WRAP) != 0) OS.gtk_toolbar_set_show_arrow (handle, true);
  7. return result;
  8. }

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

  1. @Override
  2. void setFontDescription (int /*long*/ font) {
  3. super.setFontDescription (font);
  4. ToolItem [] items = getItems ();
  5. for (int i = 0; i < items.length; i++) {
  6. items[i].setFontDescription (font);
  7. }
  8. relayout ();
  9. }

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

  1. void createItem (ToolItem item, int index) {
  2. if (!(0 <= index && index <= itemCount)) error (SWT.ERROR_INVALID_RANGE);
  3. if (itemCount == items.length) {
  4. ToolItem [] newItems = new ToolItem [itemCount + 4];
  5. System.arraycopy (items, 0, newItems, 0, items.length);
  6. items = newItems;
  7. }
  8. item.createWidget();
  9. System.arraycopy (items, index, items, index + 1, itemCount++ - index);
  10. items [index] = item;
  11. if (nsToolbar != null) {
  12. nsToolbar.insertItemWithItemIdentifier(item.getItemID(), index);
  13. } else {
  14. view.addSubview(item.view);
  15. }
  16. relayout ();
  17. }

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

  1. /**
  2. * Sets the control that is used to fill the bounds of
  3. * the item when the item is a <code>SEPARATOR</code>.
  4. *
  5. * @param control the new control
  6. *
  7. * @exception IllegalArgumentException <ul>
  8. * <li>ERROR_INVALID_ARGUMENT - if the control has been disposed</li>
  9. * <li>ERROR_INVALID_PARENT - if the control is not in the same widget tree</li>
  10. * </ul>
  11. * @exception SWTException <ul>
  12. * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
  13. * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
  14. * </ul>
  15. */
  16. public void setControl (Control control) {
  17. checkWidget ();
  18. if (control != null) {
  19. if (control.isDisposed()) error (SWT.ERROR_INVALID_ARGUMENT);
  20. if (control.parent != parent) error (SWT.ERROR_INVALID_PARENT);
  21. }
  22. if ((style & SWT.SEPARATOR) == 0) return;
  23. if (this.control == control) return;
  24. this.control = control;
  25. parent.relayout ();
  26. }

相关文章

ToolBar类方法