Examples of indexOf()


Examples of org.eclipse.swt.custom.CTabFolder.indexOf()

    parent.setLayout(new FillLayout());
    final CTabFolder newContainer = new CTabFolder(parent, SWT.BOTTOM
        | SWT.FLAT);
    newContainer.addSelectionListener(new SelectionAdapter() {
      public void widgetSelected(SelectionEvent e) {
        int newPageIndex = newContainer.indexOf((CTabItem) e.item);
        pageChange(newPageIndex);
      }
    });
    return newContainer;
  }
View Full Code Here

Examples of org.eclipse.swt.widgets.Combo.indexOf()

        if (isNumber(currentAttr)) { //show numeric break types
            breaksCombo.add(Messages.StyleEditor_theme_equalInterval);
            breaksCombo.add(Messages.StyleEditor_theme_quantile);
            breaksCombo.add(Messages.StyleEditor_theme_uniques);
            //breaksCombo.add(Messages.StyleEditor_theme_standardDeviation);
            int index = breaksCombo.indexOf(value);
            if (index > -1) breaksCombo.select(index);
            else breaksCombo.select(1);
        } else { //show categorical break types
            breaksCombo.add(Messages.StyleEditor_theme_uniques);
            int index = breaksCombo.indexOf(value);
View Full Code Here

Examples of org.eclipse.swt.widgets.CoolBar.indexOf()

        //1. Save current size
        CoolBar coolBar = coolItem.getParent();
        boolean isLastOnRow = false;
        int lastIndex = coolBar.getItemCount() - 1;
        int coolItemIndex = coolBar.indexOf(coolItem);
        int[] wrapIndicies = getAdjustedWrapIndices(coolBar.getWrapIndices());
        // Traverse through all wrap indicies backwards
        for (int row = wrapIndicies.length - 1; row >= 0; row--) {
            if (wrapIndicies[row] <= coolItemIndex) {
View Full Code Here

Examples of org.eclipse.swt.widgets.List.indexOf()

      String value = dialog.getValue();
      if (ret == Dialog.OK && value != null) {
        String[] elements = parseString(value);
        for (int i = elements.length - 1; i >= 0; i--) {
          String item = elements[i];
          if (list.indexOf(item) != -1 || item.length() == 0) {
            // item already exists
            continue;
          }
          list.add(elements[i], 0);
        }
View Full Code Here

Examples of org.eclipse.swt.widgets.Menu.indexOf()

      public void widgetSelected(SelectionEvent e) {
        aboutDialog.open();
      }
    });

    MenuItem fetchers = new MenuItem(systemMenu, SWT.NONE, systemMenu.indexOf(prefs) + 1);
    fetchers.setText(Labels.getLabel("menu.tools.fetchers"));
    fetchers.addSelectionListener(new SelectionAdapter() {
      @Override
      public void widgetSelected(SelectionEvent e) {
        selectFetchersDialog.open();
View Full Code Here

Examples of org.eclipse.swt.widgets.Table.indexOf()

      } catch (NoSuchMethodError e) {
        /* Ignore for Pre 3.0 SWT.. */
      }
    }
    if (isSelected())
      table.select(table.indexOf(newItem));
    else
      table.deselect(table.indexOf(newItem));

    newItem.setData("TableRow", item.getData("TableRow"));
  }
View Full Code Here

Examples of org.eclipse.swt.widgets.Tree.indexOf()

      return null;
    }

    /* Item is Root-Leveld */
    Tree tree = fItem.getParent();
    int index = tree.indexOf(fItem);

    if (tree.getItemCount() > index + 1)
      return new WidgetTreeNode(tree.getItem(index + 1), fViewer);

    return null;
View Full Code Here

Examples of org.eclipse.swt.widgets.TreeItem.indexOf()

    TreeItem parent = fItem.getParentItem();

    /* Item is not Root-Leveld */
    if (isSet(parent)) {
      int index = parent.indexOf(fItem);

      if (parent.getItemCount() > index + 1)
        return new WidgetTreeNode(parent.getItem(index + 1), fViewer);

      return null;
View Full Code Here

Examples of org.eclipse.ui.forms.widgets.FormText.indexOf()

        text = text.substring(msgStart,text.length());

        if (emoticons != null) {
          for (IconDef def : emoticons.getIcons()) {
            for (String iconstr : def.text) {
              int index = text.indexOf(iconstr);
              if (index >= 0) {
                StyleRange iconRange = new StyleRange();
                iconRange.start = msgStart + index;
                iconRange.length = iconstr.length();
                Image image = def.getImage();
View Full Code Here

Examples of org.eclipse.wb.internal.core.utils.xml.DocumentElement.indexOf()

    DocumentElement objectElement = object.getCreationSupport().getElement();
    DocumentElement cellElement = getExistingCellElement(object);
    // wrap into "Cell" element
    if (cellElement == null) {
      DocumentElement parentElement = objectElement.getParent();
      int index = parentElement.indexOf(objectElement);
      // prepare "Cell" element
      {
        cellElement = new DocumentElement();
        cellElement.setTag(m_namespace + "Cell");
        parentElement.addChild(cellElement, index);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.