Package org.eclipse.swt.custom

Examples of org.eclipse.swt.custom.CTabFolder


 
  private CTabFolder tabPane;
  private Display display = MainWindow.display;
 
  public InstanceConfigTabPane(Composite parent, TomcatInstance instance) {
    tabPane = new CTabFolder(parent, SWT.BORDER);
    tabPane.setBorderVisible(true);
    GridData data = new GridData(GridData.FILL_BOTH);
    tabPane.setLayoutData(data);
   
    new TomcatConfigTab(tabPane, display, instance);
View Full Code Here


  private CTabFolder tabPane;
  private Display display = MainWindow.display;
  private Map<String, CTabItem> openedInstances =new HashMap<String, CTabItem>();
 
  public InstanceTabPane(Composite parent) {
    tabPane = new CTabFolder(parent, SWT.BORDER);
    tabPane.setBorderVisible(true);
    tabPane.setLayoutData(new GridData(GridData.FILL_BOTH));
    tabPane.setSimple(false);
   
    // Close Tab Listener
View Full Code Here

    private void showOrHideTabFolder()
    {
        Composite container = getContainer();
        if ( container instanceof CTabFolder )
        {
            CTabFolder folder = ( CTabFolder ) container;
            if ( getPageCount() == 1 )
            {
                folder.setTabHeight( 0 );
            }
            else
            {
                folder.setTabHeight( -1 );
            }
            folder.layout( true, true );
        }
    }
View Full Code Here

        GridData fillGridData = new GridData();
        fillGridData.grabExcessHorizontalSpace = true;
        fillGridData.horizontalAlignment = GridData.FILL;
        tabPanel.setLayoutData(fillGridData);

        CTabFolder tabFolder = new CTabFolder(tabPanel, SWT.BORDER);
        tabFolder.setLayout(new GridLayout());
        tabFolder.setLayoutData(fillGridData);

        CTabItem columnTab = new CTabItem(tabFolder, SWT.NONE);
        columnTab.setText(Messages.getString("ColumnStyleEditorDialog.column")); //$NON-NLS-1$
        columnTab.setImage(GUIHelper.getImage("column")); //$NON-NLS-1$
        columnTab.setControl(createColumnPanel(tabFolder));
View Full Code Here

                }
            }

        });

        tabFolder = new CTabFolder(shell, SWT.BORDER);
        tabFolder.setLayoutData(new GridData(GridData.FILL_BOTH));

        shell.open();

        while (!shell.isDisposed()) {
View Full Code Here

 
  public void showSettingsDialog( final JRoster caller ) {
    final Shell shell = new Shell( SWT.DIALOG_TRIM );
    shell.setText( "Settings - Javwer" );
    shell.setLayout( new GridLayout( 2, false ) );
    CTabFolder tabFolder = new CTabFolder( shell, SWT.TOP | SWT.BORDER | SWT.FLAT);
    tabFolder.setLayoutData( new GridData( SWT.LEFT, SWT.CENTER, true, true, 2, 1 ) );
   
    //Startup
    CTabItem item = new CTabItem( tabFolder, SWT.NONE );
    item.setText( "Startup" );
    Composite composite = new Composite( tabFolder, SWT.NONE );
View Full Code Here

  private void createGUI() {
    shell.setText( "Javwer - Chat" );
    shell.setSize( 500, 300 );
    shell.setLayout( new FillLayout() );
    chatTabFolder = new CTabFolder( shell, SWT.BOTTOM | SWT.CLOSE | SWT.BORDER | SWT.FLAT);
    shell.open();
  }
View Full Code Here

    /**
     * {@inheritDoc}
     */
    public void createPartControl( Composite parent )
    {
        tabFolder = new CTabFolder( parent, SWT.BOTTOM );

        ocdTab = new CTabItem( tabFolder, SWT.NONE );
        ocdTab.setText( "Object Classes" );
        ocdTab.setImage( BrowserUIPlugin.getDefault().getImage( BrowserUIConstants.IMG_OCD ) );
        ocdPage = new ObjectClassDescriptionPage( this );
View Full Code Here

  public void createPartControl(Composite parent) {
    this.parent = parent;

    parent.setLayout(new FillLayout());

    tabFolder = new CTabFolder(parent, SWT.BORDER);

    try {
      createTabItems();
    } catch (PartInitException e) {
      Activator.getLogger().error("Failed to create tabs: "+ e, e);
View Full Code Here

      ComplexUnionPropertyDescriptor complexProperty) {

    Class<?> basePropertyType = complexProperty.getPropertyType();

    //final CTabFolder bar = new CTabFolder(parent, SWT.TITLE | SWT.BORDER);
    final CTabFolder bar = new CTabFolder(parent, SWT.BORDER);
    // section.setTitle(labelText);
    bar.setToolTipText(tooltip);
    final UnionTypeValue[] valueTypes = complexProperty.getValueTypes();
    final Object[] values = new Object[valueTypes.length];

    bar.addSelectionListener(new SelectionListener() {
      @Override
      public void widgetSelected(SelectionEvent e) {
        int idx = bar.getSelectionIndex();
        if (idx >= 0 && idx < valueTypes.length) {
          // lets update the model with the value for this tab
          node.setPropertyValue(id, values[idx]);
        }
      }
      @Override
      public void widgetDefaultSelected(SelectionEvent e) {
      }
    });

    Object value = node.getPropertyValue(id);
    int selectIdx = -1;
    int idx = 0;
    for (UnionTypeValue valueType : valueTypes) {
      Composite composite = new Composite(bar, SWT.NONE);
      composite.setLayout(new GridLayout(2, false));

      CTabItem item = new CTabItem(bar, SWT.BORDER);
      item.setText(valueType.getId());
      item.setControl(composite);

      Class<?> complexType = valueType.getValueType();
      Object tabValue;
      if (complexType.isInstance(value)) {
        selectIdx = idx;
        tabValue = value;
      }
      else {
        tabValue = ObjectHelper.newInstance(complexType);
      }
      values[idx++] = tabValue;
      bindNestedComplexProperties(toolkit, mmng, complexProperty, complexType, composite, tabValue);
      composite.layout(true, true);
    }
    if (selectIdx >= 0) {
      bar.setSelection(selectIdx);
    }
    bar.layout(true, true);
    return bar;
  }
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.