Package org.eclipse.swt.custom

Examples of org.eclipse.swt.custom.CTabFolder


  /**
   * This method initializes tabFolder
   */
  public void createTabFolder() {
    MainWindow.logger.debug("UI: create tab folder");
    this.tabFolder = new CTabFolder(this.shell, SWT.NONE);
    this.tabFolder.setLayoutData(MainWindow.getGridData());
    this.tabFolder.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
    this.tabFolder.setSimple(false);
    this.tabFolder.setUnselectedImageVisible(false);
    this.tabFolder.setUnselectedCloseVisible(false);
View Full Code Here


      super(parent, style | SWT.CLOSE, index);
    }
   
    @Override
    public TabPane getParent() {
      CTabFolder parent = super.getParent();
     
      if (parent instanceof TabPane) {
        TabPane panel = (TabPane )parent;
        return panel;
      }
View Full Code Here

   
    Object item = vs.getItem();
   
    if (item instanceof CTabItem) {
      CTabItem ti = (CTabItem )item;
      CTabFolder tf = ti.getParent();
      tf.setSelection(ti);
      ti.setFont(Ui.FONT_BOLD);
    }
   
    activeView = view;
  }
View Full Code Here

  public boolean setActiveView(Control view) {
    Object data = view.getData(ITEM);
   
    if (data instanceof CTabItem) {
      CTabItem item = (CTabItem )data;
      CTabFolder folder = item.getParent();
      folder.setSelection(item);
      return true;
    }
   
    return false;
  }
View Full Code Here

    List<Control> views = new ArrayList<Control>();
    Control[] children = centerPanel.getChildren();
   
    for (Control child : children) {
      TabPanel panel = (TabPanel )child;
      CTabFolder folder = panel.getTabFolder();
      CTabItem[] items = folder.getItems();
     
      for (CTabItem item : items) {
        Control control = item.getControl();
        views.add(control);
      }
View Full Code Here

   
    if (item == null) {
      return false;
    }
   
    CTabFolder folder = item.getParent();
    TabPanel panel = (TabPanel )folder.getParent();
   
    if (position.isNegativeDirection()) {
      addBefore(panel, view, refView, title, description, icon);
    } else {
      addAfter(panel, view, refView, title, description, icon);
View Full Code Here

 
  private boolean addSplitView(Control view, Control refView,
    Position position, Extent extent, String title, String description,
    Image icon) {
    CTabItem refItem = (CTabItem )refView.getData(ITEM);
    CTabFolder refFolder = refItem.getParent();
    TabPanel refPanel = (TabPanel )refFolder.getParent();
    Rectangle full = refPanel.getBounds();
    Rectangle old = new Rectangle(full.x, full.y, full.width, full.height);
    Rectangle neo = new Rectangle(full.x, full.y, full.width, full.height);

    int size = position.isVertical() ? full.height : full.width;
View Full Code Here

    return true;
  }
 
  private CTabItem addBefore(TabPanel tab, Control view, Control refView,
    String title, String description, Image icon) {
    CTabFolder folder = tab.getTabFolder();
    CTabItem item = (CTabItem )refView.getData(ITEM);
    int count = folder.getItemCount();
    int index = -1;
   
    if (item != null) {
      index = folder.indexOf(item);
    }
   
    if (index < 0) {
      index = count;
    }
View Full Code Here

    return add(tab, view, title, description, icon, index);
  }
 
  private CTabItem addAfter(TabPanel tab, Control view, Control refView,
    String title, String description, Image icon) {
    CTabFolder folder = tab.getTabFolder();
    CTabItem item = null;
   
    if (refView != null) {
      item = (CTabItem )refView.getData(ITEM);
    }
   
    int count = folder.getItemCount();
    int index = -1;
   
    if (item != null) {
      index = folder.indexOf(item);
    }
   
    if (index < 0) {
      index = count;
    }
View Full Code Here

    return add(tab, view, title, description, icon, index + 1);
  }
 
  private CTabItem add(TabPanel tab, Control view, String title,
    String description, Image icon, int index) {
    CTabFolder folder = tab.getTabFolder();
    int count = folder.getItemCount();
   
    if (index < 0 || index > count) {
      index = count;
    }
   
View Full Code Here

TOP

Related Classes of org.eclipse.swt.custom.CTabFolder

Copyright © 2018 www.massapicom. 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.