Package org.eclipse.swt.widgets

Examples of org.eclipse.swt.widgets.Composite


  }

  public Composite configSectionCreate(final Composite parent) {
    GridData gridData;

    Composite cSection = new Composite(parent, SWT.NULL);

    gridData = new GridData(GridData.HORIZONTAL_ALIGN_FILL + GridData.VERTICAL_ALIGN_FILL);
    cSection.setLayoutData(gridData);
    GridLayout advanced_layout = new GridLayout();
    cSection.setLayout(advanced_layout);

    int userMode = COConfigurationManager.getIntParameter("User Mode");
    if (userMode < REQUIRED_MODE) {
      Label label = new Label(cSection, SWT.WRAP);
      gridData = new GridData();
      label.setLayoutData(gridData);

      final String[] modeKeys = { "ConfigView.section.mode.beginner",
          "ConfigView.section.mode.intermediate",
          "ConfigView.section.mode.advanced" };

      String param1, param2;
      if (REQUIRED_MODE < modeKeys.length)
        param1 = MessageText.getString(modeKeys[REQUIRED_MODE]);
      else
        param1 = String.valueOf(REQUIRED_MODE);
         
      if (userMode < modeKeys.length)
        param2 = MessageText.getString(modeKeys[userMode]);
      else
        param2 = String.valueOf(userMode);

      label.setText(MessageText.getString("ConfigView.notAvailableForMode",
          new String[] { param1, param2 } ));

      return cSection;
    }
   
    Group gCrypto = new Group(cSection, SWT.NULL);
    Messages.setLanguageText(gCrypto, CFG_PREFIX + "encrypt.group");
    gridData = new GridData(GridData.FILL_HORIZONTAL);
    gCrypto.setLayoutData(gridData);
    GridLayout layout = new GridLayout();
    layout.numColumns = 2;
    gCrypto.setLayout(layout);
   
    Label lcrypto = new Label(gCrypto, SWT.WRAP);
    Messages.setLanguageText(lcrypto, CFG_PREFIX + "encrypt.info");
    gridData = new GridData(GridData.FILL_HORIZONTAL);
    gridData.horizontalSpan = 2;
    gridData.widthHint = 200// needed for wrap
    lcrypto.setLayoutData(gridData);

    gridData = new GridData();
    gridData.horizontalSpan = 2;
    new LinkLabel(gCrypto, gridData, CFG_PREFIX
        + "encrypt.info.link",
        "http://wiki.vuze.com/w/Avoid_traffic_shaping");
   
    final BooleanParameter require = new BooleanParameter(gCrypto,  "network.transport.encrypted.require", CFG_PREFIX + "require_encrypted_transport");
    gridData = new GridData();
    gridData.horizontalSpan = 2;
    require.setLayoutData(gridData);
   
    String[] encryption_types = { "Plain", "RC4" };
    String dropLabels[] = new String[encryption_types.length];
    String dropValues[] = new String[encryption_types.length];
    for (int i = 0; i < encryption_types.length; i++) {
      dropLabels[i] = encryption_types[i];
      dropValues[i] = encryption_types[i];
    }
   
    Composite cEncryptLevel = new Composite(gCrypto, SWT.NULL);
    gridData = new GridData(GridData.VERTICAL_ALIGN_FILL | GridData.HORIZONTAL_ALIGN_FILL);
    gridData.horizontalSpan = 2;
    cEncryptLevel.setLayoutData(gridData);
    layout = new GridLayout();
    layout.numColumns = 2;
    layout.marginWidth = 0;
    layout.marginHeight = 0;
    cEncryptLevel.setLayout(layout);
   
    Label lmin = new Label(cEncryptLevel, SWT.NULL);
    Messages.setLanguageText(lmin, CFG_PREFIX + "min_encryption_level");
    final StringListParameter min_level = new StringListParameter(cEncryptLevel,  "network.transport.encrypted.min_level", encryption_types[1], dropLabels, dropValues);
   
View Full Code Here


  show()
  {
  wizard.setTitle(MessageText.getString("installPluginsWizard.installMode.title"));
  wizard.setErrorMessage("");
 
  Composite rootPanel = wizard.getPanel();
  GridLayout layout = new GridLayout();
  layout.numColumns = 1;
  rootPanel.setLayout(layout);

  Composite panel = new Composite(rootPanel, SWT.NULL);
  GridData gridData = new GridData(GridData.VERTICAL_ALIGN_CENTER | GridData.FILL_HORIZONTAL);
  panel.setLayoutData(gridData);
  layout = new GridLayout();
  layout.numColumns = 1;
  panel.setLayout(layout);

    // default is shared installation
 
  ((InstallPluginWizard) wizard).shared = true;
View Full Code Here

  public Composite configSectionCreate(final Composite parent) {
    GridData gridData;
    GridLayout layout;

    Composite cSection = new Composite(parent, SWT.NULL);
    gridData = new GridData(GridData.VERTICAL_ALIGN_FILL
        | GridData.HORIZONTAL_ALIGN_FILL);
    cSection.setLayoutData(gridData);
    layout = new GridLayout();
    layout.numColumns = 2;
    cSection.setLayout(layout);

    int userMode = COConfigurationManager.getIntParameter("User Mode");
    if (userMode < REQUIRED_MODE) {
      Label label = new Label(cSection, SWT.WRAP);
      gridData = new GridData();
View Full Code Here

  public final void initialize(Composite composite) {
    tv = initYourTableView();
    if (parentDataSource != null) {
      tv.setParentDataSource(parentDataSource);
    }
    Composite parent = initComposite(composite);
    tv.initialize(parent);
    if (parent != composite) {
      this.composite = composite;
    } else {
      this.composite = tv.getComposite();
View Full Code Here

 
  public void show() {
    wizard.setTitle(MessageText.getString("installPluginsWizard.finish.title"));
    wizard.setErrorMessage("");
   
  Composite rootPanel = wizard.getPanel();
  GridLayout layout = new GridLayout();
  layout.numColumns = 1;
  rootPanel.setLayout(layout);

  Composite panel = new Composite(rootPanel, SWT.NULL);
  GridData gridData = new GridData(GridData.VERTICAL_ALIGN_CENTER | GridData.FILL_HORIZONTAL);
  panel.setLayoutData(gridData);
  layout = new GridLayout();
  layout.numColumns = 1;
  panel.setLayout(layout);
 
  Label lblExplanation = new Label(panel,SWT.WRAP);
  GridData data = new GridData(GridData.FILL_BOTH);
  lblExplanation.setLayoutData(data);
  Messages.setLanguageText(lblExplanation,"installPluginsWizard.finish.explanation");
View Full Code Here

    Image imgOpenFolder = imageLoader.getImage("openFolderButton");     

    GridData gridData;
    GridLayout layout;

    Composite gStats = new Composite(parent, SWT.NULL);
    gridData = new GridData(GridData.VERTICAL_ALIGN_FILL | GridData.HORIZONTAL_ALIGN_FILL);
    gStats.setLayoutData(gridData);
    layout = new GridLayout();
    layout.numColumns = 3;
    gStats.setLayout(layout);

    // row

    gridData = new GridData();
    gridData.horizontalSpan = 3;
View Full Code Here

    GridData gridData = new GridData();
    label.setLayoutData(gridData);

    shell.pack();
   
    Composite parent = shell.getParent();
   
    if ( parent != null ){
     
      Utils.centerWindowRelativeTo( shell, parent );
     
View Full Code Here

    @Override
    public void createToolbar(Composite parent) {
        GridLayout gridLayout = new GridLayout(2, true);
        parent.setLayout(gridLayout);
       
        Composite left = new Composite(parent, SWT.NONE);
        left.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, true, true));
        RowLayout layout = new RowLayout();
        layout.center = true;
        left.setLayout(layout);
       
        Composite right = new Composite(parent, SWT.NONE);
        right.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, true, true));
        layout = new RowLayout();
        layout.center = true;
        right.setLayout(layout);

       
        _btnDirectAccess = new Button(right, SWT.CHECK);
        _btnDirectAccess.setText("direct access");
       

        boolean isDirectAccess = false;
        try {
            isDirectAccess = WGADesignStructureHelper.isDirectAccess(getInputFile());
        }
        catch (Exception e1) {           
        }  
       
        _btnDirectAccess.setSelection(isDirectAccess);
        if (hasMDHeader()) {
            _btnDirectAccess.setEnabled(false);
        } else {
            _btnDirectAccess.setEnabled(true);
        }
       
        _btnDirectAccess.addSelectionListener(new SelectionListener() {

            public void widgetSelected(SelectionEvent e) {
                if (_tmlFileModel != null) {
                    _tmlFileModel.setDirectAccess(_btnDirectAccess.getSelection());
                    _dirty = true;
                    firePropertyChange(IEditorPart.PROP_DIRTY);
                }
            }
           
            public void widgetDefaultSelected(SelectionEvent e) {
            }
        });
       
        _btnOpenInBrowser = new Button(right, SWT.PUSH);
        _btnOpenInBrowser.setText("open in browser");
        if (isDirectAccess) {
            _btnOpenInBrowser.setEnabled(true);
        } else {
            _btnOpenInBrowser.setEnabled(false);
        }
       
        _btnOpenInBrowser.addSelectionListener(new SelectionListener() {
           
            public void widgetSelected(SelectionEvent e) {
                try {
                    ICommandService cService = (ICommandService) getSite().getService(ICommandService.class);
                    IHandlerService handlerService = (IHandlerService) getSite().getService(IHandlerService.class);
                   
                    Command command = cService.getCommand("de.innovationgate.eclipse.ids.commands.OpenModuleInBrowser");
                   
                    IParameter paramTMLFile = command.getParameter("de.innovationgate.eclipse.ids.commands.OpenModuleInBrowser.paramTMLFilePath");
 
                    Parameterization parm = new Parameterization(paramTMLFile, getInputFile().getFullPath().toString());
      
                    ParameterizedCommand parmCommand = new ParameterizedCommand(command, new Parameterization[] { parm });
                    handlerService.executeCommand(parmCommand, null);
                }
                catch (NotDefinedException e1) {
                }
                catch (ExecutionException e1) {
                    WorkbenchUtils.showErrorDialog(getSite().getShell(), "Unable to open tml module in browser", e1.getMessage());
                }
                catch (NotEnabledException e1) {
                }
                catch (NotHandledException e1) {
                }
            }
           
            public void widgetDefaultSelected(SelectionEvent e) {
            }
        });
       
        Composite leftComp = new Composite(left, SWT.NONE);
       
        GridLayout leftCompLayout = new GridLayout(1, false);
        leftCompLayout.marginTop = 0;
        leftCompLayout.marginBottom = 0;
        leftCompLayout.marginRight = 0;
        leftCompLayout.marginLeft = 0;
        leftCompLayout.marginWidth = 0;
        leftCompLayout.horizontalSpacing = 2;
        leftCompLayout.verticalSpacing = 2;
       
        leftComp.setLayout(leftCompLayout);
       
        _toolbarLblProject = new Label(leftComp, SWT.NONE);
       
        FontData[] fontData = _toolbarLblProject.getFont().getFontData();
        for(int i = 0; i < fontData.length; ++i) {
View Full Code Here

  }

  @Override
  protected Control createContents(Composite parent) {

    _container = new Composite(parent, SWT.NONE);
    GridLayout layout = new GridLayout();
    layout.numColumns = 1;
    layout.marginWidth = 0;
    layout.marginHeight = 0;
    layout.horizontalSpacing = 0;
View Full Code Here

        _headerFileMap = Plugin.getDefault().getHeaderFileMap();
    }

    @Override
    protected Control createContents(Composite parent) {
        Composite container = new Composite(parent, SWT.NONE);
        GridLayout layout = new GridLayout();
        layout.numColumns = 1;
        layout.marginWidth = 0;
        layout.marginHeight = 0;
        layout.horizontalSpacing = 0;
        layout.verticalSpacing = 0;
        container.setLayout(layout);
       
       
        TabFolder headerTabFolder = new TabFolder (container, SWT.NONE);
        headerTabFolder.setLayoutData(new GridData(GridData.FILL_BOTH));
        for (String current : _headerFileMap.keySet()) {
            String titel = _headerFileMap.get(current).getTitle();
            TabItem tabItem = new TabItem (headerTabFolder, SWT.FILL);
            Composite tabItemContainer = new Composite(headerTabFolder, SWT.NONE);
            layout = new GridLayout();
            layout.numColumns = 1;
            layout.marginWidth = 0;
            layout.marginHeight = 0;
            layout.horizontalSpacing = 0;
            layout.verticalSpacing = 0;
            tabItemContainer.setLayout(layout);                      
            tabItem.setText (titel);
           
            Text headerTabText = new Text(tabItemContainer, SWT.BORDER | SWT.MULTI | SWT.V_SCROLL);
            headerTabText.setData(current);
            headerTabText.setText(_headerFileMap.get(current).getDefaultHeader());      
View Full Code Here

TOP

Related Classes of org.eclipse.swt.widgets.Composite

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.