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

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

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

ToolBar._getItems介绍

暂无

代码示例

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

/**
 * Returns an array of <code>ToolItem</code>s which are the items
 * in the receiver.
 * <p>
 * Note: This is not the actual structure used by the receiver
 * to maintain its list of items, so modifying the array will
 * not affect the receiver.
 * </p>
 *
 * @return the items in the receiver
 *
 * @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>
 */
public ToolItem [] getItems () {
  checkWidget();
  return _getItems ();
}

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

/**
 * Returns an array of <code>ToolItem</code>s which are the items
 * in the receiver.
 * <p>
 * Note: This is not the actual structure used by the receiver
 * to maintain its list of items, so modifying the array will
 * not affect the receiver.
 * </p>
 *
 * @return the items in the receiver
 *
 * @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>
 */
public ToolItem [] getItems () {
  checkWidget();
  return _getItems ();
}

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

/**
 * Returns an array of <code>ToolItem</code>s which are the items
 * in the receiver.
 * <p>
 * Note: This is not the actual structure used by the receiver
 * to maintain its list of items, so modifying the array will
 * not affect the receiver.
 * </p>
 *
 * @return the items in the receiver
 *
 * @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>
 */
public ToolItem [] getItems () {
  checkWidget ();
  return _getItems ();
}

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

/**
 * Returns an array of <code>ToolItem</code>s which are the items
 * in the receiver.
 * <p>
 * Note: This is not the actual structure used by the receiver
 * to maintain its list of items, so modifying the array will
 * not affect the receiver.
 * </p>
 *
 * @return the items in the receiver
 *
 * @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>
 */
public ToolItem [] getItems () {
  checkWidget();
  return _getItems ();
}

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

@Override
void reskinChildren (int flags) {
  ToolItem[] items = _getItems();
  if (items != null) {
    for (int i=0; i<items.length; i++) {
      ToolItem item = items [i];
      if (item != null) item.reskin (flags);
    }
  }
  super.reskinChildren (flags);
}

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

@Override
void setOrientation (boolean create) {
  super.setOrientation (create);
  ToolItem [] items = _getItems ();
  for (int i = 0; i < items.length; i++) {
    items[i].setOrientation (create);
  }
}

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

@Override
void setOrientation (boolean create) {
  super.setOrientation (create);
  ToolItem [] items = _getItems ();
  for (int i = 0; i < items.length; i++) {
    items[i].setOrientation (create);
  }
}

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

@Override
void setOrientation (boolean create) {
  super.setOrientation (create);
  ToolItem [] items = _getItems ();
  for (int i = 0; i < items.length; i++) {
    items[i].setOrientation (create);
  }
}

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

@Override
boolean updateTextDirection(int textDirection) {
  if (super.updateTextDirection(textDirection)) {
    ToolItem [] items = _getItems ();
    int i = items.length;
    while (i-- > 0) {
      items[i].updateTextDirection(style & SWT.FLIP_TEXT_DIRECTION);
    }
    return true;
  }
  return false;
}

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

@Override
void reskinChildren (int flags) {
  ToolItem[] items = _getItems();
  if (items != null) {
    for (int i=0; i<items.length; i++) {
      ToolItem item = items [i];
      if (item != null) item.reskin (flags);
    }
  }
  super.reskinChildren (flags);
}

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

@Override
void reskinChildren (int flags) {
  ToolItem[] items = _getItems();
  if (items != null) {
    for (int i=0; i<items.length; i++) {
      ToolItem item = items [i];
      if (item != null) item.reskin (flags);
    }
  }
  super.reskinChildren (flags);
}

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

@Override
Widget computeTabGroup () {
  ToolItem [] items = _getItems ();
  if (tabItemList == null) {
    int i = 0;
    while (i < items.length && items [i].control == null) i++;
    if (i == items.length) return super.computeTabGroup ();
  }
  int index = indexOf(currentFocusItem);
  if (index == -1) index = items.length - 1;
  while (index >= 0) {
    ToolItem item = items [index];
    if (item.isTabGroup ()) return item;
    index--;
  }
  return super.computeTabGroup ();
}

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

@Override
Widget [] computeTabList () {
  ToolItem [] items = _getItems ();
  if (tabItemList == null) {
    int i = 0;
    while (i < items.length && items [i].control == null) i++;
    if (i == items.length) return super.computeTabList ();
  }
  Widget result [] = {};
  if (!isTabGroup () || !isEnabled () || !isVisible ()) return result;
  ToolItem [] list = tabList != null ? _getTabItemList () : items;
  for (int i=0; i<list.length; i++) {
    ToolItem child = list [i];
    Widget  [] childList = child.computeTabList ();
    if (childList.length != 0) {
      Widget [] newResult = new Widget [result.length + childList.length];
      System.arraycopy (result, 0, newResult, 0, result.length);
      System.arraycopy (childList, 0, newResult, result.length, childList.length);
      result = newResult;
    }
  }
  if (result.length == 0) result = new Widget [] {this};
  return result;
}

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

@Override
Widget computeTabGroup () {
  ToolItem [] items = _getItems ();
  if (tabItemList == null) {
    int i = 0;
    while (i < items.length && items [i].control == null) i++;
    if (i == items.length) return super.computeTabGroup ();
  }
  int index = indexOf(currentFocusItem);
  if (index == -1) index = items.length - 1;
  while (index >= 0) {
    ToolItem item = items [index];
    if (item.isTabGroup ()) return item;
    index--;
  }
  return super.computeTabGroup ();
}

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

@Override
Widget [] computeTabList () {
  ToolItem [] items = _getItems ();
  if (tabItemList == null) {
    int i = 0;
    while (i < items.length && items [i].control == null) i++;
    if (i == items.length) return super.computeTabList ();
  }
  Widget result [] = {};
  if (!isTabGroup () || !isEnabled () || !isVisible ()) return result;
  ToolItem [] list = tabList != null ? _getTabItemList () : items;
  for (int i=0; i<list.length; i++) {
    ToolItem child = list [i];
    Widget  [] childList = child.computeTabList ();
    if (childList.length != 0) {
      Widget [] newResult = new Widget [result.length + childList.length];
      System.arraycopy (result, 0, newResult, 0, result.length);
      System.arraycopy (childList, 0, newResult, result.length, childList.length);
      result = newResult;
    }
  }
  if (result.length == 0) result = new Widget [] {this};
  return result;
}

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

@Override
Widget computeTabGroup () {
  ToolItem [] items = _getItems ();
  if (tabItemList == null) {
    int i = 0;
    while (i < items.length && items [i].control == null) i++;
    if (i == items.length) return super.computeTabGroup ();
  }
  int index = (int)/*64*/OS.SendMessage (handle, OS.TB_GETHOTITEM, 0, 0);
  if (index == -1) index = lastHotId;
  while (index >= 0) {
    ToolItem item = items [index];
    if (item.isTabGroup ()) return item;
    index--;
  }
  return super.computeTabGroup ();
}

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

@Override
Widget computeTabGroup () {
  ToolItem [] items = _getItems ();
  if (tabItemList == null) {
    int i = 0;
    while (i < items.length && items [i].control == null) i++;
    if (i == items.length) return super.computeTabGroup ();
  }
  int index = indexOf(currentFocusItem);
  if (index == -1) index = items.length - 1;
  while (index >= 0) {
    ToolItem item = items [index];
    if (item.isTabGroup ()) return item;
    index--;
  }
  return super.computeTabGroup ();
}

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

@Override
Widget [] computeTabList () {
  ToolItem [] items = _getItems ();
  if (tabItemList == null) {
    int i = 0;
    while (i < items.length && items [i].control == null) i++;
    if (i == items.length) return super.computeTabList ();
  }
  Widget result [] = {};
  if (!isTabGroup () || !isEnabled () || !isVisible ()) return result;
  ToolItem [] list = tabList != null ? _getTabItemList () : items;
  for (int i=0; i<list.length; i++) {
    ToolItem child = list [i];
    Widget  [] childList = child.computeTabList ();
    if (childList.length != 0) {
      Widget [] newResult = new Widget [result.length + childList.length];
      System.arraycopy (result, 0, newResult, 0, result.length);
      System.arraycopy (childList, 0, newResult, result.length, childList.length);
      result = newResult;
    }
  }
  if (result.length == 0) result = new Widget [] {this};
  return result;
}

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

@Override
Widget [] computeTabList () {
  ToolItem [] items = _getItems ();
  if (tabItemList == null) {
    int i = 0;
    while (i < items.length && items [i].control == null) i++;
    if (i == items.length) return super.computeTabList ();
  }
  Widget result [] = {};
  if (!isTabGroup () || !isEnabled () || !isVisible ()) return result;
  ToolItem [] list = tabList != null ? _getTabItemList () : items;
  for (int i=0; i<list.length; i++) {
    ToolItem child = list [i];
    Widget  [] childList = child.computeTabList ();
    if (childList.length != 0) {
      Widget [] newResult = new Widget [result.length + childList.length];
      System.arraycopy (result, 0, newResult, 0, result.length);
      System.arraycopy (childList, 0, newResult, result.length, childList.length);
      result = newResult;
    }
  }
  if (result.length == 0) result = new Widget [] {this};
  return result;
}

相关文章

ToolBar类方法