Examples of ITabItem


Examples of org.eclipse.ui.views.properties.tabbed.ITabItem

    Point result = super.computeSize(hHint, wHint, changed);
    if (widestLabelIndex == -1) {
      String properties_not_available = "Properties are not available.";
      result.x = getTextDimension(properties_not_available).x + INDENT;
    } else {
      ITabItem widestTab = elements[widestLabelIndex].getTabItem();
      int width = getTextDimension(widestTab.getText()).x + INDENT;
      /*
       * To anticipate for the icon placement we should always keep the
       * space available after the label. So when the active tab includes
       * an icon the width of the tab doesn't change.
       */
      if (widestTab.getImage() != null) {
        width = width + 16 + 4;
      }
      if (widestTab.isIndented()) {
        width = width + 10;
      }
      /*
       * Add 10 pixels to the right of the longest string as a margin.
       */
 
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.