Examples of CTabFolder


Examples of org.eclipse.swt.custom.CTabFolder

   * Returns the number of pages in this multi-page editor.
   *
   * @return the number of pages
   */
  protected int getPageCount() {
    CTabFolder folder = getTabFolder();
    // May not have been created yet, or may have been disposed.
    if (folder != null && !folder.isDisposed()) {
      return folder.getItemCount();
    }
    return 0;
  }
View Full Code Here

Examples of org.eclipse.swt.custom.CTabFolder

    }

    display = Display.getDefault();
    shell = new Shell(display);
    shell.setLayout(new FillLayout());
    tabs = new CTabFolder(shell, SWT.TOP);

    setTitle();
    initializeSystemTray();
    //WindowPosition.load(this);
View Full Code Here

Examples of org.eclipse.swt.custom.CTabFolder

  gc.setBackground(display.getSystemColor(SWT.COLOR_YELLOW));
  gc.fillRectangle(3, 3, 10, 10);
  gc.dispose();
  final Shell shell = new Shell (display);
  shell.setLayout(new GridLayout());
  final CTabFolder folder = new CTabFolder(shell, SWT.BORDER);
  folder.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));
  folder.setSimple(false);
  folder.setUnselectedImageVisible(true);
  folder.setUnselectedCloseVisible(true);
  for (int i = 0; i < 8; i++) {
    CTabItem item = new CTabItem(folder, SWT.CLOSE);
    item.setText("Item "+i);
    item.setImage(image);
    Text text = new Text(folder, SWT.MULTI | SWT.V_SCROLL | SWT.H_SCROLL);
    text.setText("Text for item "+i+"\n\none, two, three\n\nabcdefghijklmnop");
    item.setControl(text);
  }
  folder.setMinimizeVisible(true);
  folder.setMaximizeVisible(true);
  folder.addCTabFolder2Listener(new CTabFolder2Adapter() {
    @Override
    public void minimize(CTabFolderEvent event) {
      folder.setMinimized(true);
      folder.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));
      shell.layout(true);
    }
    @Override
    public void maximize(CTabFolderEvent event) {
      folder.setMaximized(true);
      folder.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
      shell.layout(true);
    }
    @Override
    public void restore(CTabFolderEvent event) {
      folder.setMinimized(false);
      folder.setMaximized(false);
      folder.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));
      shell.layout(true);
    }
  });
  shell.setSize(300, 300);
  shell.open ();
View Full Code Here

Examples of org.eclipse.swt.custom.CTabFolder

  }
 
  public TabPanel(final Shell shell) {
    map_1 = new HashMap<CTabItem, TabItem>();
   
    tabFolder = new CTabFolder(shell, SWT.BORDER);
    tabFolder.setSimple(false);
    tabFolder.setUnselectedImageVisible(false);
    tabFolder.setUnselectedCloseVisible(true);
    tabFolder.setMinimizeVisible(true);
    tabFolder.setMaximizeVisible(true);
View Full Code Here

Examples of org.eclipse.swt.custom.CTabFolder

   
    Composite composite_5 = new Composite(composite_3, SWT.NONE);
    composite_5.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1));
    composite_5.setLayout(new GridLayout(1, false));
   
    final CTabFolder tabFolder_2 = new CTabFolder(composite_5, SWT.BORDER);
    tabFolder_2.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1));
    tabFolder_2.setBounds(0, 0, 156, 125);
    tabFolder_2.setSelectionBackground(Display.getCurrent().getSystemColor(SWT.COLOR_TITLE_INACTIVE_BACKGROUND_GRADIENT));
   
    btnNewButton.addSelectionListener(new SelectionAdapter() {
     
      @Override
      public void widgetSelected(SelectionEvent e) {
        if(channel.getText().length() > 0){
          final String subChannel = channel.getText();
                   
          SubChannel subedChannel = new SubChannel(id, subChannel, tabFolder_2);
          final CTabItem tbtmSubItem = subedChannel.init();
          subChannels.add(subedChannel);
         
          tbtmSubItem.addDisposeListener(new DisposeListener() {
            @Override
            public void widgetDisposed(DisposeEvent e) {
              subChannels.remove(tbtmSubItem);
            }
          });
          tabFolder_2.setSelection(tbtmSubItem);
          channel.setFocus();
        }
      }
    });
   
View Full Code Here

Examples of org.eclipse.swt.custom.CTabFolder

    final SashForm sashForm_1 = new SashForm(composite_2, SWT.VERTICAL);
    sashForm_1.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true,
        1, 1));
    sashForm_1.setLocation(0, 0);

    tabFolder = new CTabFolder(sashForm_1, SWT.BORDER);
    tabFolder.addMouseListener(new MouseAdapter() {
      @Override
      public void mouseDoubleClick(MouseEvent e) {
        if(sashForm_1.getMaximizedControl() != tabFolder){
          sashForm.setMaximizedControl(composite_2);
          sashForm_1.setMaximizedControl(tabFolder);
        }else{
          sashForm.setMaximizedControl(null);
          sashForm_1.setMaximizedControl(null);
        }
      }
    });
    tabFolder.addSelectionListener(new SelectionAdapter() {
      @Override
      public void widgetSelected(SelectionEvent e) {
        if (tabFolder.getSelection() == mainTabItem)
          treeItemSelected(true);
      }
    });
    tabFolder.setSelectionBackground(Display.getCurrent().getSystemColor(
        SWT.COLOR_TITLE_INACTIVE_BACKGROUND_GRADIENT));
    tabFolder.setFocus();
    tabFolder.setLayout(new GridLayout(1, false));

    mainTabItem = new CTabItem(tabFolder, SWT.NONE);
    mainTabItem.setText(i18nFile.getText(I18nFile.REDISDATAEXPLORER));

    initTable(tabFolder);

    tabFolder_1 = new CTabFolder(sashForm_1, SWT.BORDER);
    tabFolder_1.addMouseListener(new MouseAdapter() {
      @Override
      public void mouseDoubleClick(MouseEvent e) {
        if(sashForm_1.getMaximizedControl() != tabFolder_1){
          sashForm.setMaximizedControl(composite_2);
View Full Code Here

Examples of org.eclipse.swt.custom.CTabFolder

        inputCmd.setMenu(menu);
         
      }
    });
   
    tabFolder_2 = new CTabFolder(sashForm3, SWT.BORDER);

    tbtmNewItem_1 = new CTabItem(tabFolder_2, SWT.NONE);
    tbtmNewItem_1.setText(RedisClient.i18nFile.getText(I18nFile.RESULT));

    Composite composite_5 = new Composite(tabFolder_2, SWT.NONE);
View Full Code Here

Examples of org.eclipse.swt.custom.CTabFolder

        FormData data = new FormData();
        data.left = new FormAttachment(0, 0);
        data.right = new FormAttachment(100, 0);
        control.setLayoutData(data);

        this.tabFolder = new CTabFolder(parent, SWT.BORDER | SWT.TOP | SWT.CLOSE);
        this.tabFolder.addSelectionListener(getChangeListener());
        data = new FormData();
        data.left = new FormAttachment(0, 0);
        data.right = new FormAttachment(100, 0);
        data.top = new FormAttachment(control, 0);
View Full Code Here

Examples of org.eclipse.swt.custom.CTabFolder

        }
    }

    public static void createMapcalcConstructsButtons( Composite buttonsComposite, final StyledText text ) {

        final CTabFolder tabFolder = new CTabFolder(buttonsComposite, SWT.TOP);
        tabFolder.setBorderVisible(true);
        tabFolder.setMaximized(true);
        GridData tabGD = new GridData(SWT.CENTER, SWT.FILL, false, true);
        tabFolder.setLayoutData(tabGD);

        HashMap<String, CTabItem> tabsMap = new HashMap<String, CTabItem>();
        Constructs[] values = Constructs.values();
        for( final Constructs construct : values ) {
            String category = construct.category;
            CTabItem tabItem = tabsMap.get(category);
            if (tabItem == null) {
                Composite composite = new Composite(tabFolder, SWT.NONE);
                GridLayout compositeLayout = new GridLayout(2, true);
                composite.setLayout(compositeLayout);
                GridData compositeGD = new GridData(SWT.FILL, SWT.FILL, true, true);
                composite.setLayoutData(compositeGD);
                tabItem = new CTabItem(tabFolder, SWT.NONE);
                tabItem.setText(category);
                tabItem.setControl(composite);
                tabsMap.put(category, tabItem);
            }
            Control control = tabItem.getControl();
            Button constructButton = new Button((Composite) control, SWT.PUSH);
            constructButton.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
            constructButton.setText(construct.name);
            constructButton.setToolTipText(construct.toolTip);
            constructButton.addSelectionListener(new SelectionAdapter(){
                public void widgetSelected( SelectionEvent e ) {
                    insertTextAtCaretPosition(text, construct.construct);
                }
            });
        }
        tabFolder.setSelection(0);
        tabFolder.setSingle(true);
        tabFolder.pack();
    }
View Full Code Here

Examples of org.eclipse.swt.custom.CTabFolder

     * @param parent the composite parent.
     * @param style the tab folder style.
     * @return the tab folder
     */
    public CTabFolder createTabFolder( Composite parent, int style ) {
        CTabFolder tabFolder = new CTabFolder(parent, style);
        return tabFolder;
    }
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.