Examples of Section


Examples of org.eclipse.ui.forms.widgets.Section

      tblLayoutData.minimumHeight = 200;
       
      GridData btnLayout = new GridData(GridData.HORIZONTAL_ALIGN_FILL, GridData.VERTICAL_ALIGN_FILL, true, false);
     
        // mediakeys section
    Section section = toolkit.createSection(form.getBody(), Section.DESCRIPTION|Section.TITLE_BAR|Section.TWISTIE|Section.EXPANDED);
    section.setText("Media Keys");

        Composite sectionClient = toolkit.createComposite(section);
        section.setClient(sectionClient);     
        sectionClient.setLayout(sectionLayout);   
       
        // create Table media keys
        _tblMediaKeys = toolkit.createTable(sectionClient, SWT.BORDER|SWT.FULL_SELECTION);
        _tblMediaKeys.setHeaderVisible(true);         
        _tblMediaKeys.setLayoutData(GridDataFactory.copyData(tblLayoutData));  
        registerField("mediaKeys", _tblMediaKeys);
               
        _mediaKeyColumn = new TableColumn(_tblMediaKeys, SWT.NONE);               
        _mediaKeyColumn.setText("Key");
        _mediaKeyColumn.setWidth((int)(tableWidth * 0.25));
       
        _mediaMimeTypeColumn = new TableColumn(_tblMediaKeys, SWT.NONE)
        _mediaMimeTypeColumn.setText("Mime type");
        _mediaMimeTypeColumn.setWidth((int)(tableWidth * 0.25));
       
        _mediaBinaryColumn = new TableColumn(_tblMediaKeys, SWT.NONE)
        _mediaBinaryColumn.setText("Binary output");
        _mediaBinaryColumn.setWidth((int)(tableWidth * 0.25));

       
        _mediaHTTPLoginColumn = new TableColumn(_tblMediaKeys, SWT.NONE)
        _mediaHTTPLoginColumn.setText("Use HTTP login");
        _mediaHTTPLoginColumn.setWidth((int)(tableWidth * 0.25));

        _mediaKeysModel = new MediaKeysModel(_model.getMediaKeys());
        _mediaKeysModel.addListener(new BeanListTableModelListener() {

      public void add(Object bean) {
        _model.fireModelChanged();         
      }

      public void remove(Object bean) {
        _model.fireModelChanged();       
      }

      public void update(Object bean) {
        _model.fireModelChanged();         
      }
     
      @SuppressWarnings("unchecked")
      public void refresh(List beans) {
        _model.fireModelChanged();       
      }
         
        });
       
        _tblViewerMediaKeys = new TableViewer(_tblMediaKeys);
       
        CellEditor[] editors = new CellEditor[4];
        editors[0] = new TextCellEditor(_tblMediaKeys);
        editors[1] = new TextCellEditor(_tblMediaKeys);
        editors[2] = new CheckboxCellEditor(_tblMediaKeys, SWT.CENTER);       
        editors[3] = new CheckboxCellEditor(_tblMediaKeys, SWT.CENTER);
        _tblViewerMediaKeys.setCellEditors(editors);
       
        BeanListTableModelCellModifier modifier = new BeanListTableModelCellModifier(_tblViewerMediaKeys, _mediaKeysModel);
        modifier.setEditMode(2, BeanListTableModelCellModifier.EDIT_MODE_ON_SINGLE_CLICK);
        modifier.setEditMode(3, BeanListTableModelCellModifier.EDIT_MODE_ON_SINGLE_CLICK);
        _tblViewerMediaKeys.setCellModifier(modifier);
       
        _tblViewerMediaKeys.setContentProvider(new BeanListTableModelContentProvider());
        _tblViewerMediaKeys.setLabelProvider(new BeanListTableModelLabelProvider(_mediaKeysModel));
        _tblViewerMediaKeys.setInput(_mediaKeysModel)
       

        _btnAddMediaKey = toolkit.createButton(sectionClient, "add", SWT.PUSH);
        _btnAddMediaKey.setLayoutData(btnLayout);
        _btnAddMediaKey.addSelectionListener(new org.eclipse.swt.events.SelectionAdapter() {
      public void widgetSelected(org.eclipse.swt.events.SelectionEvent e) {
        handleAddMediaKey();
      }

    });
       
        _btnRemoveMediaKey = toolkit.createButton(sectionClient, "remove", SWT.PUSH);
        _btnRemoveMediaKey.setLayoutData(btnLayout);
        _btnRemoveMediaKey.addSelectionListener(new org.eclipse.swt.events.SelectionAdapter() {
      public void widgetSelected(org.eclipse.swt.events.SelectionEvent e) {
        handleRemoveMediaKey();
      }
    });
       
    // encoder section
    section = toolkit.createSection(form.getBody(), Section.DESCRIPTION|Section.TITLE_BAR|Section.TWISTIE|Section.COMPACT);
    section.setText("Encoder Mappings");

        sectionClient = toolkit.createComposite(section);
        sectionClient.setLayout(sectionLayout);
        section.setClient(sectionClient);
       
        // create Table encoder mappings
        _tblEncoderMappings = toolkit.createTable(sectionClient, SWT.BORDER|SWT.FULL_SELECTION);
        _tblEncoderMappings.setHeaderVisible(true);                 
        _tblEncoderMappings.setLayoutData(GridDataFactory.copyData(tblLayoutData));   
        registerField("encoderMappings", _tblEncoderMappings);
         
        _encoderNameColumn = new TableColumn(_tblEncoderMappings, SWT.NONE)
        _encoderNameColumn.setText("Encoder name");
        _encoderNameColumn.setWidth((int)(tableWidth * 0.5));
       
        _encoderImplClassColumn = new TableColumn(_tblEncoderMappings, SWT.NONE);
        _encoderImplClassColumn.setText("Implementation class");
        _encoderImplClassColumn.setWidth((int)(tableWidth * 0.5));         

        _encoderMappingsModel = new EncoderMappingsModel(_model.getEncoderMappings());
        _encoderMappingsModel.addListener(new BeanListTableModelListener() {

      public void add(Object bean) {
        _model.fireModelChanged();         
      }

      public void remove(Object bean) {
        _model.fireModelChanged();       
      }

      public void update(Object bean) {
        _model.fireModelChanged();         
      }     

      @SuppressWarnings("unchecked")
      public void refresh(List beans) {
        _model.fireModelChanged();       
      }
         
        });
       
        _tblViewerEncoderMappings = new TableViewer(_tblEncoderMappings);
       
        // text editors for both columns
        editors = new CellEditor[2];
        editors[0] = new TextCellEditor(_tblEncoderMappings);
        editors[1] = new TextCellEditor(_tblEncoderMappings);         
        _tblViewerEncoderMappings.setCellEditors(editors);
       
        _tblViewerEncoderMappings.setCellModifier(new BeanListTableModelCellModifier(_tblViewerEncoderMappings, _encoderMappingsModel));                                       
        _tblViewerEncoderMappings.setContentProvider(new BeanListTableModelContentProvider());
        _tblViewerEncoderMappings.setLabelProvider(new BeanListTableModelLabelProvider(_encoderMappingsModel));
        _tblViewerEncoderMappings.setInput(_encoderMappingsModel)
       
        _btnAddEncoderMapping = toolkit.createButton(sectionClient, "add", SWT.PUSH);
        _btnAddEncoderMapping.setLayoutData(btnLayout);
        _btnAddEncoderMapping.addSelectionListener(new org.eclipse.swt.events.SelectionAdapter() {
      public void widgetSelected(org.eclipse.swt.events.SelectionEvent e) {
        handleAddEncoderMapping();
      }

    });
       
        _btnRemoveEncoderMapping = toolkit.createButton(sectionClient, "remove", SWT.PUSH);
        _btnRemoveEncoderMapping.setLayoutData(btnLayout);
      _btnRemoveEncoderMapping.addSelectionListener(new org.eclipse.swt.events.SelectionAdapter() {
      public void widgetSelected(org.eclipse.swt.events.SelectionEvent e) {
        handleRemoveEncoderMapping();
      }
    });

     
      // element section
    section = toolkit.createSection(form.getBody(), Section.DESCRIPTION|Section.TITLE_BAR|Section.TWISTIE|Section.COMPACT);
    section.setText("Element Mappings");

        sectionClient = toolkit.createComposite(section);
        section.setClient(sectionClient);     
        sectionLayout.numColumns = 2;
        sectionClient.setLayout(sectionLayout);   
       
        // create Table element mappings
        _tblElementMappings = toolkit.createTable(sectionClient, SWT.BORDER|SWT.FULL_SELECTION);
View Full Code Here

Examples of org.eclipse.ui.forms.widgets.Section

    ColumnLayout layout = new ColumnLayout();
    layout.maxNumColumns = 2;
    form.getBody().setLayout(layout);
       
    // publisher options section
    Section section = toolkit.createSection(form.getBody(), Section.DESCRIPTION|Section.TITLE_BAR|Section.TWISTIE|Section.EXPANDED);
    section.setText("Publisher options");

        Composite sectionClient = toolkit.createComposite(section);
        section.setClient(sectionClient);
        GridLayout sectionLayout = new GridLayout();
        GridData fillHSpan = new GridData(GridData.FILL_HORIZONTAL);
        fillHSpan.horizontalSpan = 4;

        sectionLayout.numColumns = 1;
        sectionClient.setLayout(sectionLayout);   
       
        _tablePublisherOptions = new EditableTableControl<PublisherOption>(sectionClient,SWT.NONE, SWT.FULL_SELECTION|SWT.BORDER);
        GridData tablePublisherOptionsLayoutData = new GridData(GridData.FILL_BOTH);
        tablePublisherOptionsLayoutData.minimumHeight = 200;
        _tablePublisherOptions.setLayoutData(tablePublisherOptionsLayoutData);
       
    // create columns
    String[] columnNames = new String[] { "Name", "Value" };
   
    // create model
    _publisherOptionsModel = new PublisherOptionsModel(_model.getPublisherOptions());
   
    _publisherOptionsModel.addListener(new BeanListTableModelListener() {

      public void add(Object bean) {
        _model.fireModelChanged();         
      }

      public void remove(Object bean) {
        _model.fireModelChanged();       
      }

      public void update(Object bean) {
        _model.fireModelChanged();         
      }     

      @SuppressWarnings("unchecked")
      public void refresh(List beans) {
        //_model.fireModelChanged();       
      }
         
        });
   
    _tablePublisherOptions.init(columnNames, _publisherOptionsModel);

   
    CellEditor[] editors = new CellEditor[2];
        editors[0] = new TextCellEditor(_tablePublisherOptions.getTable());
        editors[1] = new TextCellEditor(_tablePublisherOptions.getTable());
    _tablePublisherOptions.getTableViewer().setCellEditors(editors);
   
    toolkit.adapt(_tablePublisherOptions.getButton(EditableTableControl.BUTTON_ADD), true, true);
    toolkit.adapt(_tablePublisherOptions.getButton(EditableTableControl.BUTTON_REMOVE), true, true);
   
    _tablePublisherOptions.getButton(EditableTableControl.BUTTON_ADD).addSelectionListener(new org.eclipse.swt.events.SelectionAdapter() {
      public void widgetSelected(org.eclipse.swt.events.SelectionEvent e) {
        handleAddPublisherOption();
      }
    });

    _tablePublisherOptions.getButton(EditableTableControl.BUTTON_REMOVE).addSelectionListener(new org.eclipse.swt.events.SelectionAdapter() {
      public void widgetSelected(org.eclipse.swt.events.SelectionEvent e) {
        handleRemovePublisherOption();
      }
    });
   
    _tablePublisherOptions.getTable().addSelectionListener(new SelectionAdapter() {
      public void widgetSelected(org.eclipse.swt.events.SelectionEvent e) {
        if (_tablePublisherOptions.getTable().getSelectionCount() > 0) {
          PublisherOption option = (PublisherOption) _tablePublisherOptions.getTable().getSelection()[0].getData();
          if (_publisherOptionsModel.isBeanEditable(option)) {
            _tablePublisherOptions.getButton(EditableTableControl.BUTTON_REMOVE).setEnabled(true);
          } else {
            _tablePublisherOptions.getButton(EditableTableControl.BUTTON_REMOVE).setEnabled(false);
          }
        }
      }
    });
       
       
    // remote actions section
    section = toolkit.createSection(form.getBody(), Section.DESCRIPTION|Section.TITLE_BAR|Section.TWISTIE|Section.EXPANDED);
    section.setText("Remote Actions");

        sectionClient = toolkit.createComposite(section);
        section.setClient(sectionClient);
        sectionLayout = new GridLayout();
        fillHSpan = new GridData(GridData.FILL_HORIZONTAL);
        fillHSpan.horizontalSpan = 4;
       
        GridData prefSize = new GridData();
View Full Code Here

Examples of org.eclipse.ui.forms.widgets.Section

    ColumnLayout layout = new ColumnLayout();
    layout.maxNumColumns = 2;
    form.getBody().setLayout(layout);
       
    // encoder section
    Section section = toolkit.createSection(form.getBody(), Section.DESCRIPTION|Section.TITLE_BAR|Section.TWISTIE|Section.EXPANDED);
    section.setText("Remote Actions");

        Composite sectionClient = toolkit.createComposite(section);
        section.setClient(sectionClient);
        GridLayout sectionLayout = new GridLayout();
        GridData fillHSpan = new GridData(GridData.FILL_HORIZONTAL);
        fillHSpan.horizontalSpan = 4;
       
        GridData prefSize = new GridData();
View Full Code Here

Examples of org.eclipse.ui.forms.widgets.Section

    ColumnLayout layout = new ColumnLayout();
    layout.maxNumColumns = 2;
    form.getBody().setLayout(layout);
       
    // encoder section
    Section section = toolkit.createSection(form.getBody(), Section.DESCRIPTION|Section.TITLE_BAR|Section.TWISTIE|Section.EXPANDED);
    section.setText("Job Definitions");

        Composite sectionClient = toolkit.createComposite(section);
        section.setClient(sectionClient);
        GridLayout sectionLayout = new GridLayout();
        GridData fillHSpan = new GridData(GridData.FILL_HORIZONTAL);
        fillHSpan.horizontalSpan = 4;
       
        GridData prefSize = new GridData();
View Full Code Here

Examples of org.eclipse.ui.forms.widgets.Section

        GridLayout formLayout = new GridLayout(2, true);
        form.getBody().setLayout(formLayout);       
       
        // tree
        Section schemaSection = toolkit.createSection(form.getBody(), Section.DESCRIPTION | Section.TITLE_BAR | Section.TWISTIE | Section.EXPANDED);
        schemaSection.setText("Schema Definition");
        schemaSection.setLayoutData(new GridData(GridData.FILL_BOTH));
        // register schemaSection as error catcher
        registerField(WGASchemaDefinitionModel.PROPERTY_HINT_SCHEMADEF, schemaSection);
       
        Tree tree = toolkit.createTree(schemaSection, SWT.NONE);
        tree.setLayoutData(new GridData(GridData.FILL_BOTH));
        schemaSection.setClient(tree);
       
        final Menu menu = new Menu(Display.getCurrent().getActiveShell(), SWT.POP_UP);
        MenuItem itemNewContentTypeDefinition = new MenuItem(menu, SWT.PUSH);
        itemNewContentTypeDefinition.setText("Content Type Definition");
        itemNewContentTypeDefinition.addSelectionListener(new SelectionListener() {
           
            public void widgetSelected(SelectionEvent e) {
                WGContentTypeDefinition cType = _model.createContentTypeDefinition();
                _treeViewer.expandToLevel(cType, 1);
                _treeViewer.setSelection(new SingleStructuredSelection(cType));               
            }
           
            public void widgetDefaultSelected(SelectionEvent e) {
            }
        });
        MenuItem itemNewAreaDefinition = new MenuItem(menu, SWT.PUSH);
        itemNewAreaDefinition.setText("Area Definition");
        itemNewAreaDefinition.addSelectionListener(new SelectionListener() {
           
            public void widgetSelected(SelectionEvent e) {
                WGAreaDefinition area = _model.createAreaDefinition();
                _treeViewer.expandToLevel(area, 1);
                _treeViewer.setSelection(new SingleStructuredSelection(area));               
            }
           
            public void widgetDefaultSelected(SelectionEvent e) {
            }
        });
        MenuItem itemNewLanguageDefinition = new MenuItem(menu, SWT.PUSH);
        itemNewLanguageDefinition.setText("Language Definition");
        itemNewLanguageDefinition.addSelectionListener(new SelectionListener() {
           
            public void widgetSelected(SelectionEvent e) {
                WGLanguageDefinition lang = _model.createLanguageDefinition();
                _treeViewer.expandToLevel(lang, 1);
                _treeViewer.setSelection(new SingleStructuredSelection(lang));               
            }
           
            public void widgetDefaultSelected(SelectionEvent e) {
            }
        });
       
       
        final ToolBar schemaSectionToolBar = new ToolBar(schemaSection, SWT.FLAT);
        final ToolItem schemaSectionItemNew = new ToolItem(schemaSectionToolBar, SWT.DROP_DOWN);
        schemaSectionItemNew.setText("new");
        schemaSectionItemNew.setImage(Plugin.getDefault().getImageRegistry().get(Plugin.IMAGE_SCHEMADEFINITION_ADD));
        schemaSectionItemNew.addListener(SWT.Selection, new Listener() {
            public void handleEvent(Event event) {

                  Rectangle rect = schemaSectionItemNew.getBounds();
                  Point pt = new Point(rect.x, rect.y + rect.height);
                  pt = schemaSectionToolBar.toDisplay(pt);
                  menu.setLocation(pt.x, pt.y);
                  menu.setVisible(true);

              }
           }
        );
        final ToolItem schemaSectionItemDelete = new ToolItem(schemaSectionToolBar, SWT.PUSH);
        schemaSectionItemDelete.setText("delete");
        schemaSectionItemDelete.setImage(Plugin.getDefault().getImageRegistry().get(Plugin.IMAGE_SCHEMADEFINITION_REMOVE));
        schemaSectionItemDelete.addSelectionListener(new SelectionListener() {
           
            public void widgetSelected(SelectionEvent e) {
                ISelection selection = _treeViewer.getSelection();
                if (selection instanceof TreeSelection) {
                    TreeSelection treeSelection = (TreeSelection) selection;
                    Object node = treeSelection.getFirstElement();
                    if (node instanceof WGSchemaDocumentDefinition) {
                        WGSchemaDocumentDefinition def = (WGSchemaDocumentDefinition)node;
                        String typeName = "Document Definition";
                        if (def instanceof WGContentTypeDefinition) {
                            typeName = "Content Type Definition";
                        } else if (def instanceof WGAreaDefinition) {
                            typeName = "Area Definition";
                        } else if (def instanceof WGLanguageDefinition) {
                            typeName = "Language Definition";
                        }
                        boolean result = MessageDialog.openConfirm(Display.getCurrent().getActiveShell(), "Delete " + typeName, "Delete " + typeName + " '" + def.getName() + "'?");
                        if (result) {
                            _model.removeSchemaDocumentDefintion(def);
                        }
                    } else if (node instanceof WGContentItemDefinition) {
                        WGContentItemDefinition def = (WGContentItemDefinition)node;
                        String typeName = "Item Definition";
                        boolean result = MessageDialog.openConfirm(Display.getCurrent().getActiveShell(), "Delete " + typeName, "Delete " + typeName + " '" + def.getName() + "'?");
                        if (result) {
                            _model.remove(def);
                        }
                    } else if (node instanceof WGMetaFieldDefinition) {
                        WGMetaFieldDefinition def = (WGMetaFieldDefinition)node;
                        String typeName = "Property";
                        boolean result = MessageDialog.openConfirm(Display.getCurrent().getActiveShell(), "Delete " + typeName, "Delete " + typeName + " '" + AddContentTypeMetaDefinitionDialog.METADATA_DEFINITION_LABELS.get(def.getName()) + "'?");
                        if (result) {
                            _model.remove(def);
                        }
                    }
                }
               
            }
           
            public void widgetDefaultSelected(SelectionEvent e) {
                // TODO Auto-generated method stub
               
            }
        });
       
        schemaSection.setTextClient(schemaSectionToolBar);
       
       
       
        _treeViewer = new TreeViewer(tree);
        _treeViewer.setContentProvider(new WGASchemaDefinitionContentProvider());              
View Full Code Here

Examples of org.eclipse.ui.forms.widgets.Section

    ColumnLayout layout = new ColumnLayout();
    layout.maxNumColumns = 2;
    form.getBody().setLayout(layout);
   
    // general section
    Section section = toolkit.createSection(form.getBody(), Section.DESCRIPTION|Section.TITLE_BAR|Section.TWISTIE|Section.EXPANDED);
    section.setText("General");

        Composite sectionClient = toolkit.createComposite(section);
        section.setClient(sectionClient);
        GridLayout sectionLayout = new GridLayout();
        GridData fillHSpan = new GridData(GridData.FILL_HORIZONTAL);
        fillHSpan.horizontalSpan = 2;
        GridData fillH = new GridData(GridData.FILL_HORIZONTAL);
       
        sectionLayout.numColumns = 3;
        sectionClient.setLayout(sectionLayout);
       
       
        _lblDirectory = factory.createLabel(sectionClient, "Directory", "designDirectory");       
        _lblDirectory.setLayoutData(fillHSpan);
       
//      _lblDesignKey = factory.createLabel(sectionClient, "Design key:", "designKey");
//      _lblDesignKey.setLayoutData(fillHSpan);
     
      _txtInitScript= factory.createText(sectionClient, "Initialisation script:", "initScript");
      _txtInitScript.setLayoutData(fillH);
      registerField("initScript", _txtInitScript);
     
      _btnBrowseInitScript = toolkit.createButton(sectionClient, "...", SWT.PUSH);
      _btnBrowseInitScript.addSelectionListener(new org.eclipse.swt.events.SelectionAdapter() {
      public void widgetSelected(org.eclipse.swt.events.SelectionEvent e) {
        handleBrowseInitScript();
      }
    });
     
      _txtConnectionScript= factory.createText(sectionClient, "Connection script:", "connectionScript");
      _txtConnectionScript.setLayoutData(fillH);
      registerField("connectionScript", _txtConnectionScript);
     
      _btnBrowseConnectionScript = toolkit.createButton(sectionClient, "...", SWT.PUSH);
      _btnBrowseConnectionScript.addSelectionListener(new org.eclipse.swt.events.SelectionAdapter() {
      public void widgetSelected(org.eclipse.swt.events.SelectionEvent e) {
        handleBrowseConnectionScript();
      }
    });
     
      _txtDisconnectionScript= factory.createText(sectionClient, "Disconnection script:", "disconnectionScript");
      _txtDisconnectionScript.setLayoutData(fillH);
      registerField("disconnectionScript", _txtDisconnectionScript);
           
      _btnBrowseDisconnectionScript = toolkit.createButton(sectionClient, "...", SWT.PUSH);
      _btnBrowseDisconnectionScript.addSelectionListener(new org.eclipse.swt.events.SelectionAdapter() {
      public void widgetSelected(org.eclipse.swt.events.SelectionEvent e) {
        handleBrowseDisconnectionScript();
      }
    });     
      _txtDisconnectionScript.addPaintListener(new PaintListener() {

      public void paintControl(PaintEvent e) {
        _btnBrowseDisconnectionScript.setEnabled(_txtDisconnectionScript.isEnabled());       
      }
       
      });

     
      _comboDefaultAccessLevel = factory.createCombo(sectionClient, "Default access level:", "defaultAccessLevel");
      factory.addFiller(sectionClient);
      registerField("defaultAccessLevel", _comboDefaultAccessLevel);
         
      _comboAnonymousAccessLevel = factory.createCombo(sectionClient, "Anonymous access level:", "anonymousAccessLevel");
      factory.addFiller(sectionClient);
      registerField("anonymousAccessLevel", _comboAnonymousAccessLevel);
     
      _comboVersionCompliance = factory.createCombo(sectionClient, "Developed for WGA version:", "versionCompliance");
      factory.addFiller(sectionClient)
      registerField("versionCompliance", _comboVersionCompliance);     
     
      // libraries section
      section = toolkit.createSection(form.getBody(), Section.DESCRIPTION|Section.TITLE_BAR|Section.TWISTIE|Section.COMPACT);
    section.setText("Libraries");

        sectionClient = toolkit.createComposite(section);
        section.setClient(sectionClient);
        sectionLayout = new GridLayout();       
        sectionLayout.numColumns = 3;
        sectionClient.setLayout(sectionLayout);
     
        _chkStaticClasspath = factory.createCheckBox(sectionClient, "Prevent reloading of java libraries", "Enabled", "staticClasspath");
      registerField("staticClasspath", _chkStaticClasspath);
       
        GridData fillBoth = new GridData(GridData.FILL_BOTH);
        fillBoth.minimumHeight = 100;
        fillBoth.verticalSpan = 2;
        fillBoth.horizontalSpan = 2;
        _lstLibraries = new List(sectionClient, SWT.BORDER|SWT.MULTI);
        _lstLibraries.setLayoutData(fillBoth);
        _lstLibraries.setItems(_model.getLibraryNames());
       
        _btnAddLibrary = toolkit.createButton(sectionClient, "add...", SWT.PUSH);
        _btnAddLibrary.addSelectionListener(new org.eclipse.swt.events.SelectionAdapter() {
      public void widgetSelected(org.eclipse.swt.events.SelectionEvent e) {
        handleAddLibrary();
      }
    });
       
        GridData btnLayout = new GridData(GridData.HORIZONTAL_ALIGN_FILL, GridData.VERTICAL_ALIGN_FILL, false, false);
        _btnAddLibrary.setLayoutData(btnLayout);
       
        //factory.addFiller(sectionClient);
       
        _btnRemoveLibrary = toolkit.createButton(sectionClient, "remove...", SWT.PUSH);
       
        _btnRemoveLibrary.setLayoutData(btnLayout);       
        _btnRemoveLibrary.addSelectionListener(new org.eclipse.swt.events.SelectionAdapter() {
      public void widgetSelected(org.eclipse.swt.events.SelectionEvent e) {
        handleRemoveLibrary();
      }
    });
       

       
       
        // publishing section
      section = toolkit.createSection(form.getBody(), Section.DESCRIPTION|Section.TITLE_BAR|Section.TWISTIE|Section.EXPANDED);
    section.setText("Publishing");

        sectionClient = toolkit.createComposite(section);
        section.setClient(sectionClient);
        sectionLayout = new GridLayout();       
        sectionLayout.numColumns = 2;
        sectionClient.setLayout(sectionLayout);
       
      _txtHomePage= factory.createText(sectionClient, "Home Page:", "homePage");
View Full Code Here

Examples of org.eclipse.ui.forms.widgets.Section

    _menuId = menuId;
  }
 
  private void init(ScrolledForm form, FormToolkit toolkit, IEditorPart editor) { 
    // exporting section
    Section section = toolkit.createSection(form.getBody(), Section.DESCRIPTION|Section.TITLE_BAR|Section.TWISTIE|Section.EXPANDED);
    section.setText("Exporting");   
       
    final Composite sectionClient = toolkit.createComposite(section);
        section.setClient(sectionClient);
        GridLayout sectionLayout = new GridLayout();                                     
        sectionLayout.numColumns = 1;
        sectionClient.setLayout(sectionLayout);
       
        final HyperlinkGroup group = new HyperlinkGroup(sectionClient.getDisplay());
View Full Code Here

Examples of org.eclipse.ui.forms.widgets.Section

    ColumnLayout layout = new ColumnLayout();
    layout.maxNumColumns = 2;
    form.getBody().setLayout(layout);
   
    // general section
    Section section = toolkit.createSection(form.getBody(), Section.DESCRIPTION|Section.TITLE_BAR|Section.TWISTIE|Section.EXPANDED);
    section.setText("General");

        Composite sectionClient = toolkit.createComposite(section);
        section.setClient(sectionClient);
        GridLayout sectionLayout = new GridLayout();
        GridData fillHSpan = new GridData(GridData.FILL_HORIZONTAL);
        fillHSpan.horizontalSpan = 2;
        GridData comboLayout = new GridData(GridData.GRAB_HORIZONTAL);
        comboLayout.minimumWidth = 150;
       
        sectionLayout.numColumns = 3;
        sectionClient.setLayout(sectionLayout);
       
        _comboWGADistribution = factory.createCombo(sectionClient, "WGA Distribution:", "wgaDeployment");
        _comboWGADistribution.setLayoutData(comboLayout);
       
//      _btnConfigureWGAInstallations = new Button(sectionClient, SWT.NONE);
//      _btnConfigureWGAInstallations.setText("Configure distributions ...");
//      _btnConfigureWGAInstallations.addSelectionListener(new org.eclipse.swt.events.SelectionAdapter() {
//      public void widgetSelected(org.eclipse.swt.events.SelectionEvent e) {
//        handleConfigureWGADistributions();
//      }
//    });
     
    HyperlinkGroup group = new HyperlinkGroup(sectionClient.getDisplay());     
      ImageHyperlink linkConfigureDistributions = new ImageHyperlink(sectionClient, SWT.None);
      linkConfigureDistributions.setText("Configure distributions ...");
      linkConfigureDistributions.addHyperlinkListener(new HyperlinkAdapter() {
      public void linkActivated(HyperlinkEvent e) {
        handleConfigureWGADistributions();
      }
    });   
      group.add(linkConfigureDistributions);
     
      //factory.createCheckBox(sectionClient, "Output TML-Warnings on server console:", "enabled", "outputTMLWarningsOnConsole");
      //factory.addFiller(sectionClient);
//      factory.createCheckBox(sectionClient, "TML-Script debugger:", "enabled", "tmlScriptDebuggerEnabled");
//      factory.addFiller(sectionClient);
//     
//      factory.createCheckBox(sectionClient, "Java debugging:", "enabled", "javaDebuggerEnabled");
//      factory.addFiller(sectionClient);
     
    group = new HyperlinkGroup(sectionClient.getDisplay());     
      ImageHyperlink linkConfigureGlobalRuntimePreferences = new ImageHyperlink(sectionClient, SWT.None);
      linkConfigureGlobalRuntimePreferences.setText("Configure global runtime settings ...");
      linkConfigureGlobalRuntimePreferences.addHyperlinkListener(new HyperlinkAdapter() {
      public void linkActivated(HyperlinkEvent e) {
        openGeneralPreferencesPage();
      }
    });   
      group.add(linkConfigureGlobalRuntimePreferences);
     
     
      // libraries section
      section = toolkit.createSection(form.getBody(), Section.DESCRIPTION|Section.TITLE_BAR|Section.TWISTIE|Section.COMPACT);
    section.setText("Tomcat libraries");

        sectionClient = toolkit.createComposite(section);
        section.setClient(sectionClient);
        sectionLayout = new GridLayout();       
        sectionLayout.numColumns = 2;
        sectionClient.setLayout(sectionLayout);
     
        GridData fillBoth = new GridData(GridData.FILL_BOTH);
        fillBoth.minimumHeight = 100;
        fillBoth.verticalSpan = 2;
        _lstTomcatLibraries = new List(sectionClient, SWT.BORDER|SWT.MULTI);
        _lstTomcatLibraries.setLayoutData(fillBoth);
        _lstTomcatLibraries.setItems(_model.getTomcatLibraryNames());
       
        _btnAddTomcatLibrary = toolkit.createButton(sectionClient, "add...", SWT.PUSH);
        _btnAddTomcatLibrary.addSelectionListener(new org.eclipse.swt.events.SelectionAdapter() {
      public void widgetSelected(org.eclipse.swt.events.SelectionEvent e) {
        handleAddTomcatLibrary();
      }
    });
       
        GridData btnLayout = new GridData(GridData.HORIZONTAL_ALIGN_FILL, GridData.VERTICAL_ALIGN_FILL, false, false);
        _btnAddTomcatLibrary.setLayoutData(btnLayout);
     
      _btnRemoveTomcatLibrary = toolkit.createButton(sectionClient, "remove...", SWT.PUSH);
     
      _btnRemoveTomcatLibrary.setLayoutData(btnLayout);       
      _btnRemoveTomcatLibrary.addSelectionListener(new org.eclipse.swt.events.SelectionAdapter() {
      public void widgetSelected(org.eclipse.swt.events.SelectionEvent e) {
        handleRemoveTomcatLibrary();
      }
    });
     
      // java section
      section = toolkit.createSection(form.getBody(), Section.DESCRIPTION|Section.TITLE_BAR|Section.TWISTIE|Section.EXPANDED);
    section.setText("Java");

        sectionClient = toolkit.createComposite(section);
        section.setClient(sectionClient);
        sectionLayout = new GridLayout();       
        sectionLayout.numColumns = 2;
        sectionClient.setLayout(sectionLayout);
     
        _comboJVM = factory.createCombo(sectionClient, "Execution Environment:", "executionEnvironment");
View Full Code Here

Examples of org.eclipse.ui.forms.widgets.Section

    ColumnLayout layout = new ColumnLayout();
    layout.maxNumColumns = 1;
    form.getBody().setLayout(layout);
   
    // management section
        Section section = toolkit.createSection(form.getBody(), Section.DESCRIPTION|Section.TITLE_BAR|Section.TWISTIE|Section.EXPANDED);
    section.setText("Management");

    Composite sectionClient = toolkit.createComposite(section);
        section.setClient(sectionClient);
        GridLayout sectionLayout = new GridLayout();       
        sectionLayout.numColumns = 2;
        sectionClient.setLayout(sectionLayout);
       
       
View Full Code Here

Examples of org.eclipse.xtext.xdoc.xdoc.Section

  }
 
  protected CharSequence _genLabel(final SectionRef sRef) {
    StringConcatenation _builder = new StringConcatenation();
    {
      Section _section = sRef.getSection();
      String _name = _section.getName();
      boolean _notEquals = (!Objects.equal(_name, null));
      if (_notEquals) {
        _builder.append("\\label{");
        Section _section_1 = sRef.getSection();
        String _name_1 = _section_1.getName();
        String _string = null;
        if (_name_1!=null) {
          _string=_name_1.toString();
        }
        _builder.append(_string, "");
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.