Package org.eclipse.swt.widgets

Examples of org.eclipse.swt.widgets.Group


    new Label(container, SWT.NONE).setText("Script type: ");
    _typeLable = new Text(container, SWT.READ_ONLY);

    _typeLable.setBackground(display.getSystemColor(SWT.COLOR_WIDGET_BACKGROUND));

    _tmlscriptOptionsGrp = new Group(container, SWT.None);
    _tmlscriptOptionsGrp.setText("tmlscript options:");
    GridLayout groupLayout = new GridLayout();
    groupLayout.numColumns = 1;
    _tmlscriptOptionsGrp.setLayout(groupLayout);
    GridData groupLayoutData = new GridData(GridData.FILL_HORIZONTAL);
View Full Code Here


     
    });
    new Label(container, SWT.None);
   
   
    Group optFileNameGroup = new Group(container, SWT.None);
    optFileNameGroup.setText("File name");
    GridLayout groupLayout = new GridLayout();
    groupLayout.numColumns = 1;
    optFileNameGroup.setLayout(groupLayout);
    GridData groupLayoutData = new GridData(GridData.FILL_HORIZONTAL);
    groupLayoutData.horizontalSpan = 3;
    optFileNameGroup.setLayoutData(groupLayoutData);
    _optFileNameShort = new Button(optFileNameGroup, SWT.RADIO);
    _optFileNameShort.setText("Short");
    _optFileNameShort.setLayoutData(new GridData(GridData.FILL, GridData.FILL, true, true));
    _optFileNameShort.setSelection(true);
    _optFileNameShort.addSelectionListener(new SelectionAdapter() {
View Full Code Here

      i++;
    }

    _comboFiles.select(i);

    Group group = new Group(composite, SWT.SHADOW_OUT);
    group.setLayoutData(data);
    group.setLayout(layout);

    group.setText("Prefix");

    // new Label(group,SWT.NONE)
    _buttonCheckPrefix = new Button(group, SWT.CHECK);
    _buttonCheckPrefix.setText("use Prefix");
    _buttonCheckPrefix.setLayoutData(data);
View Full Code Here

        subform = toolkit.createComposite(_detailSection);
        subformLayout = new GridLayout();  
        subformLayout.numColumns = 2;
        subform.setLayout(subformLayout);
       
        Group parentGroup = createParentInformationGroup(subform);
        GridData parentInfoLayoutData = new GridData(GridData.FILL_HORIZONTAL);       
        parentInfoLayoutData.horizontalSpan = 2;
        parentGroup.setLayoutData(parentInfoLayoutData);
       
        txtName = factory.createText(subform, "Itemname:", "name");
        txtName.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
        Combo itemTypeCombo = factory.createCombo(subform, "Type:", "type");       
        _chkItemList = factory.createCheckBox(subform, "List:", "Enabled", "list");

        _lblInitialValues = new Label(subform, SWT.NONE);
        _lblInitialValues.setText("Initial values:");
        _lblInitialValues.setLayoutData(new GridData(SWT.NONE, SWT.BEGINNING, false, false));
       
        _initialValuesSection = toolkit.createSection(subform, Section.EXPANDED | Section.NO_TITLE);
       
        GridData initialValuesSectionLayoutData = new GridData(GridData.FILL_BOTH);
        _initialValuesSection.setLayoutData(initialValuesSectionLayoutData);

        // item subform - text values
        _initialTextValuesSectionClient = toolkit.createComposite(_initialValuesSection);
        _initialTextValuesSectionClient.setLayout(new FillLayout());
        _tblItemTextValues = new EditableTableControl<PrimitiveTypeBean<String>>(_initialTextValuesSectionClient, SWT.NONE);
        _itemTextValuesModel = new PrimitiveTypeBeanListTableModel<String>(true);
        _itemTextValuesModel.addListener(new BeanListTableModelListener() {
           
            public void update(Object bean) {
                _model.fireModelChanged();               
            }
           
            public void remove(Object bean) {
                _model.fireModelChanged();
            }
           
            public void refresh(List beans) {
            }
           
            public void add(Object bean) {
                _model.fireModelChanged();               
            }
        });
        _tblItemTextValues.init(new String[] {"#", "Value"}, _itemTextValuesModel);
        CellEditor[] cellEditors = new CellEditor[2];
        cellEditors[0] = null;
        cellEditors[1] = new TextCellEditor(_tblItemTextValues.getTable());
        _tblItemTextValues.getTableViewer().setCellEditors(cellEditors);
       
        _tblItemTextValues.getButton(EditableTableControl.BUTTON_ADD).addSelectionListener(new org.eclipse.swt.events.SelectionAdapter() {
            public void widgetSelected(org.eclipse.swt.events.SelectionEvent e) {
                WGContentItemDefinitionModel model = (WGContentItemDefinitionModel)_subformModels.get(SUBFORM_CONTENT_ITEM_DEFINITION);
                if (_itemTextValuesModel.getBeans().size() > 0) {                   
                    _chkItemList.setSelection(true);
                    model.setList(true);
                }
                handleAdd(_tblItemTextValues, "");
            }
        });

        _tblItemTextValues.getButton(EditableTableControl.BUTTON_REMOVE).addSelectionListener(new org.eclipse.swt.events.SelectionAdapter() {
            public void widgetSelected(org.eclipse.swt.events.SelectionEvent e) {
                handleRemove(_tblItemTextValues);
            }
        });
       
       
        // item subform - boolean values
        _initialBooleanValuesSectionClient = toolkit.createComposite(_initialValuesSection);
        _initialBooleanValuesSectionClient.setLayout(new FillLayout());
        _tblItemBooleanValues = new EditableTableControl<PrimitiveTypeBean<Boolean>>(_initialBooleanValuesSectionClient, SWT.NONE);
        _itemBooleanValuesModel = new PrimitiveTypeBeanListTableModel<Boolean>(true);
        _itemBooleanValuesModel.addListener(new BeanListTableModelListener() {
           
            public void update(Object bean) {
                _model.fireModelChanged();               
            }
           
            public void remove(Object bean) {
                _model.fireModelChanged();
            }
           
            public void refresh(List beans) {
            }
           
            public void add(Object bean) {
                _model.fireModelChanged();               
            }
        });
        _tblItemBooleanValues.init(new String[] {"#", "Value"}, _itemBooleanValuesModel);
        cellEditors = new CellEditor[2];
        cellEditors[0] = null;
        cellEditors[1] = new CheckboxCellEditor(_tblItemBooleanValues.getTable());
        _tblItemBooleanValues.getTableViewer().setCellEditors(cellEditors);       
       
        _tblItemBooleanValues.getButton(EditableTableControl.BUTTON_ADD).addSelectionListener(new org.eclipse.swt.events.SelectionAdapter() {
            public void widgetSelected(org.eclipse.swt.events.SelectionEvent e) {
                WGContentItemDefinitionModel model = (WGContentItemDefinitionModel)_subformModels.get(SUBFORM_CONTENT_ITEM_DEFINITION);
                if (_itemBooleanValuesModel.getBeans().size() > 0) {                   
                    _chkItemList.setSelection(true);
                    model.setList(true);
                }
                handleAdd(_tblItemBooleanValues, false);               
            }
        });

        _tblItemBooleanValues.getButton(EditableTableControl.BUTTON_REMOVE).addSelectionListener(new org.eclipse.swt.events.SelectionAdapter() {
            public void widgetSelected(org.eclipse.swt.events.SelectionEvent e) {
                handleRemove(_tblItemBooleanValues);
            }
        });
       
       
        // item subform - number values
        _initialNumberValuesSectionClient = toolkit.createComposite(_initialValuesSection);
        _initialNumberValuesSectionClient.setLayout(new FillLayout());
        _tblItemNumberValues = new EditableTableControl<PrimitiveTypeBean<Number>>(_initialNumberValuesSectionClient, SWT.NONE);        
        _itemNumberValuesModel = new PrimitiveTypeBeanListTableModel<Number>(true);
        _itemNumberValuesModel.addListener(new BeanListTableModelListener() {
           
            public void update(Object bean) {
                _model.fireModelChanged();               
            }
           
            public void remove(Object bean) {
                _model.fireModelChanged();
            }
           
            public void refresh(List beans) {
            }
           
            public void add(Object bean) {
                _model.fireModelChanged();               
            }
        });
        _tblItemNumberValues.init(new String[] {"#", "Value"}, _itemNumberValuesModel);
        cellEditors = new CellEditor[2];
        cellEditors[0] = null;
        cellEditors[1] = new DoubleValueCellEditor(_tblItemNumberValues.getTable());

        _tblItemNumberValues.getTableViewer().setCellEditors(cellEditors);
       
        _tblItemNumberValues.getButton(EditableTableControl.BUTTON_ADD).addSelectionListener(new org.eclipse.swt.events.SelectionAdapter() {
            public void widgetSelected(org.eclipse.swt.events.SelectionEvent e) {
                WGContentItemDefinitionModel model = (WGContentItemDefinitionModel)_subformModels.get(SUBFORM_CONTENT_ITEM_DEFINITION);
                if (_itemNumberValuesModel.getBeans().size() > 0) {                   
                    _chkItemList.setSelection(true);
                    model.setList(true);
                }
                handleAdd(_tblItemNumberValues, 0);               
            }
        });

        _tblItemNumberValues.getButton(EditableTableControl.BUTTON_REMOVE).addSelectionListener(new org.eclipse.swt.events.SelectionAdapter() {
            public void widgetSelected(org.eclipse.swt.events.SelectionEvent e) {
                handleRemove(_tblItemNumberValues);
            }
        });
       
       
       
        itemTypeCombo.addModifyListener(new ModifyListener() {
           
            public void modifyText(ModifyEvent e) {
                WGContentItemDefinitionModel model = (WGContentItemDefinitionModel)_subformModels.get(SUBFORM_CONTENT_ITEM_DEFINITION);
                WGContentItemDefinition.Type type = model.getType().getKey();
                if (type.equals(WGContentItemDefinition.Type.TEXT)) {
                    _initialValuesSection.setVisible(true);
                    _lblInitialValues.setVisible(true);
                    _itemTextValuesModel.bind(model.getInitialValues());
                    _initialTextValuesSectionClient.setVisible(true);
                    _initialBooleanValuesSectionClient.setVisible(false);
                    _initialNumberValuesSectionClient.setVisible(false);
                    _initialValuesSection.setClient(_initialTextValuesSectionClient);
                    _initialValuesSection.layout();
                } else if (type.equals(WGContentItemDefinition.Type.BOOLEAN)) {
                    _initialValuesSection.setVisible(true);
                    _lblInitialValues.setVisible(true);
                    _itemBooleanValuesModel.bind(model.getInitialValues());
                    _initialBooleanValuesSectionClient.setVisible(true);
                    _initialTextValuesSectionClient.setVisible(false);
                    _initialNumberValuesSectionClient.setVisible(false);
                    _initialValuesSection.setClient(_initialBooleanValuesSectionClient);
                    _initialValuesSection.layout();
                } else if (type.equals(WGContentItemDefinition.Type.NUMBER)) {
                    _initialValuesSection.setVisible(true);
                    _lblInitialValues.setVisible(true);
                    _itemNumberValuesModel.bind(model.getInitialValues());
                    _initialNumberValuesSectionClient.setVisible(true);
                    _initialBooleanValuesSectionClient.setVisible(false);
                    _initialTextValuesSectionClient.setVisible(false);     
                    _initialValuesSection.setClient(_initialNumberValuesSectionClient);
                    _initialValuesSection.layout();
                } else {
                    _initialValuesSection.setVisible(false);
                    _lblInitialValues.setVisible(false);
                }
               
            }
        });
       
        WGContentItemDefinitionModel contentItemDefinitionModel = new WGContentItemDefinitionModel(_model);       
        contentItemDefinitionModel.addListener(new BeanChangedListener<WGContentItemDefinition>() {
            public void changed(WGContentItemDefinition bean) {
                _treeViewer.refresh(bean, true);
                _model.fireModelChanged();
            }           
        });

       
        _subforms.put(SUBFORM_CONTENT_ITEM_DEFINITION, subform);
        _subformModels.put(SUBFORM_CONTENT_ITEM_DEFINITION, contentItemDefinitionModel);

        // content type meta data subforms
        // subform for description
        subform = toolkit.createComposite(_detailSection);
        subformLayout = new GridLayout();  
        subformLayout.numColumns = 2;
        subform.setLayout(subformLayout);       

        parentGroup = createParentInformationGroup(subform);
        parentInfoLayoutData = new GridData(GridData.FILL_HORIZONTAL);       
        parentInfoLayoutData.horizontalSpan = 2;
        parentGroup.setLayoutData(parentInfoLayoutData);
       
        txtName = factory.createText(subform, "Property:", "name");
        txtName.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
        txtName.setEditable(false);
        Text txtValue = factory.createTextArea(subform, "Description", "description");       
        GridData txtValueLayoutData = new GridData(GridData.FILL_BOTH);
        txtValueLayoutData.minimumHeight = 200;
        txtValue.setLayoutData(txtValueLayoutData)
       
        WGDescriptionMetaFieldDefinitionModel descriptionMetaFieldDefinitionModel = new WGDescriptionMetaFieldDefinitionModel(_model);
        descriptionMetaFieldDefinitionModel.addListener(new BeanChangedListener<WGMetaFieldDefinition>() {
            public void changed(WGMetaFieldDefinition bean) {
                _treeViewer.refresh(bean, true);
                _model.fireModelChanged();
            }
        });
       
        _subforms.put(SUBFORM_META_DESCRIPTION, subform);
        _subformModels.put(SUBFORM_META_DESCRIPTION, descriptionMetaFieldDefinitionModel);
       
        // subform for event scripts
        subform = toolkit.createComposite(_detailSection);
        subformLayout = new GridLayout();  
        subformLayout.numColumns = 2;
        subform.setLayout(subformLayout);       

        parentGroup = createParentInformationGroup(subform);
        parentInfoLayoutData = new GridData(GridData.FILL_HORIZONTAL);       
        parentInfoLayoutData.horizontalSpan = 2;
        parentGroup.setLayoutData(parentInfoLayoutData);
       
        txtName = factory.createText(subform, "Property:", "name");
        txtName.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
        txtName.setEditable(false);
        txtValue = factory.createTextArea(subform, "Scriptcode:", "code");       
        txtValueLayoutData = new GridData(GridData.FILL_BOTH);
        txtValueLayoutData.minimumHeight = 200;
        txtValue.setLayoutData(txtValueLayoutData)
       
        WGEventScriptMetaFieldDefinitionModel eventScriptMetaFieldDefinitionModel = new WGEventScriptMetaFieldDefinitionModel(_model);
        eventScriptMetaFieldDefinitionModel.addListener(new BeanChangedListener<WGMetaFieldDefinition>() {
            public void changed(WGMetaFieldDefinition bean) {
                _treeViewer.refresh(bean, true);
                _model.fireModelChanged();
            }
        });

       
        _subforms.put(SUBFORM_META_EVENTSCRIPT, subform);
        _subformModels.put(SUBFORM_META_EVENTSCRIPT, eventScriptMetaFieldDefinitionModel);
       
        // subform for layouts
        subform = toolkit.createComposite(_detailSection);
        subformLayout = new GridLayout();  
        subformLayout.numColumns = 3;
        subform.setLayout(subformLayout);
               
        parentGroup = createParentInformationGroup(subform);
        parentInfoLayoutData = new GridData(GridData.FILL_HORIZONTAL);       
        parentInfoLayoutData.horizontalSpan = 3;
        parentGroup.setLayoutData(parentInfoLayoutData);
       
        txtName = factory.createText(subform, "Property:", "name");
        txtName.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
        txtName.setEditable(false);
        factory.addFiller(subform);
        txtValue = factory.createText(subform, "Module:", "layout");              
        txtValue.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
       
        final Text fTxtLayout = txtValue;
        Button btnBrowseLayout = new Button(subform, SWT.PUSH);
        btnBrowseLayout.setText("browse ...");
        btnBrowseLayout.addSelectionListener(new SelectionListener() {
           
            public void widgetSelected(SelectionEvent e) {
                handleBrowserLayout(fTxtLayout)
            }
           
            public void widgetDefaultSelected(SelectionEvent e) {                            
            }
        });
        WGLayoutMetaFieldDefinitionModel layoutMetaFieldDefinitionModel = new WGLayoutMetaFieldDefinitionModel(_model);
        layoutMetaFieldDefinitionModel.addListener(new BeanChangedListener<WGMetaFieldDefinition>() {
            public void changed(WGMetaFieldDefinition bean) {
                _treeViewer.refresh(bean, true);
                _model.fireModelChanged();
            }
        });

       
        _subforms.put(SUBFORM_META_LAYOUT, subform);
        _subformModels.put(SUBFORM_META_LAYOUT, layoutMetaFieldDefinitionModel);
       
        // subform for allowed positions
        subform = toolkit.createComposite(_detailSection);
        subformLayout = new GridLayout();  
        subformLayout.numColumns = 2;
        subform.setLayout(subformLayout);
               
        parentGroup = createParentInformationGroup(subform);
        parentInfoLayoutData = new GridData(GridData.FILL_HORIZONTAL);       
        parentInfoLayoutData.horizontalSpan = 2;
        parentGroup.setLayoutData(parentInfoLayoutData);
       
        txtName = factory.createText(subform, "Property:", "name");
        txtName.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
        txtName.setEditable(false);
        Combo comboPositioning = factory.createCombo(subform, "Positions:", "positioning");              
        comboPositioning.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
       
        factory.addFiller(subform);
        _tblAllowedPositions = new EditableTableControl<PrimitiveTypeBean<String>>(subform, SWT.NONE);
        _allowedPositionsModel = new PrimitiveTypeBeanListTableModel<String>();
        _allowedPositionsModel.addListener(new BeanListTableModelListener() {
           
            public void update(Object bean) {
                _model.fireModelChanged();               
            }
           
            public void remove(Object bean) {
                _model.fireModelChanged();
            }
           
            public void refresh(List beans) {
            }
           
            public void add(Object bean) {
                _model.fireModelChanged();               
            }
        });
        _tblAllowedPositions.init(new String[] {"Name"}, _allowedPositionsModel);
        GridData tblLayoutData = new GridData(GridData.FILL_BOTH);
        tblLayoutData.minimumHeight = 200;
        _tblAllowedPositions.setLayoutData(tblLayoutData);
        cellEditors = new CellEditor[1];
        cellEditors[0] = new TextCellEditor(_tblAllowedPositions.getTable());
        _tblAllowedPositions.getTableViewer().setCellEditors(cellEditors);
       
        comboPositioning.addModifyListener(new ModifyListener() {
           
            public void modifyText(ModifyEvent e) {
                WGPositioningMetaFieldDefinitionModel model = (WGPositioningMetaFieldDefinitionModel)_subformModels.get(SUBFORM_META_POSITIONING);
                if (model.getPositioning().getKey().equals(WGContentType.POSITIONING_FIXEDPARENTS) || model.getPositioning().getKey().equals(WGContentType.POSITIONING_FIXEDPARENTTYPES)) {
                    _tblAllowedPositions.setVisible(true);
                    WGContentTypeDefinition cTypeDefinition = _model.findContentTypeDefinition(model.getBean());                   
                    ((PrimitiveTypeBeanListTableModel<String>)_tblAllowedPositions.getModel()).bind(model.getAllowedPositions(cTypeDefinition));
                } else {
                    _tblAllowedPositions.setVisible(false);
                }
            }
        });

        _tblAllowedPositions.getButton(EditableTableControl.BUTTON_ADD).addSelectionListener(new org.eclipse.swt.events.SelectionAdapter() {
            public void widgetSelected(org.eclipse.swt.events.SelectionEvent e) {
                handleAdd(_tblAllowedPositions, "<value>");
            }
        });

        _tblAllowedPositions.getButton(EditableTableControl.BUTTON_REMOVE).addSelectionListener(new org.eclipse.swt.events.SelectionAdapter() {
            public void widgetSelected(org.eclipse.swt.events.SelectionEvent e) {
                handleRemove(_tblAllowedPositions);
            }
        });
       
           
        WGPositioningMetaFieldDefinitionModel positioningMetaFieldDefinitionModel = new WGPositioningMetaFieldDefinitionModel(_model);
        positioningMetaFieldDefinitionModel.addListener(new BeanChangedListener<WGMetaFieldDefinition>() {
            public void changed(WGMetaFieldDefinition bean) {
                _treeViewer.refresh(bean, true);
                _model.fireModelChanged();
            }
        });

       
        _subforms.put(SUBFORM_META_POSITIONING, subform);
        _subformModels.put(SUBFORM_META_POSITIONING, positioningMetaFieldDefinitionModel);
       
       
        // subform for editors
        subform = toolkit.createComposite(_detailSection);
        subformLayout = new GridLayout();  
        subformLayout.numColumns = 2;
        subform.setLayout(subformLayout);
               
        parentGroup = createParentInformationGroup(subform);
        parentInfoLayoutData = new GridData(GridData.FILL_HORIZONTAL);       
        parentInfoLayoutData.horizontalSpan = 2;
        parentGroup.setLayoutData(parentInfoLayoutData);
       
        txtName = factory.createText(subform, "Property:", "name");
        txtName.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
        txtName.setEditable(false);
        Label label = new Label(subform, SWT.NONE);
View Full Code Here

            textControl.setText(helper.computeTMLReference(selection));
        }
    }

    private Group createParentInformationGroup(Composite subform) {
        Group parentInfo = new Group(subform, SWT.BORDER);
        parentInfo.setLayout(new GridLayout(2, false));
        parentInfo.setText("Parent");
       
        Label lblContentTypeName = new Label(parentInfo, SWT.NONE);
        lblContentTypeName.setText("Contenttype:");
        Text txtContentTypeName = new Text(parentInfo, SWT.NONE);
        txtContentTypeName.setEditable(false);
View Full Code Here

    }
   
//    Label filler = new Label(composite, SWT.None);
//    filler.setText("");
   
    Group group = new Group(_composite, SWT.BORDER);
    group.setText("Specify an WGA distribution");
    GridData groupData = new GridData(GridData.FILL_BOTH);
    groupData.horizontalSpan = 2;
    group.setLayoutData(groupData);
    group.setLayout(new GridLayout(3, false));
   
    GridData optionStyle = new GridData();
    optionStyle.horizontalSpan = 3;
    _optionDownload = new Button(group, SWT.RADIO);
    _optionDownload.setText("Download latest WGA release from \n'" + WGADesignerPlugin.getDefault().getWGADownloadURL().toString() + "'.");
View Full Code Here


    // ** Begin Rank Type area
    // Rank Type area.  Encompases the 4 (or more) options groups

    Composite cRankType = new Group(gQR, SWT.NULL);
    layout = new GridLayout();
    layout.numColumns = 2;
    layout.verticalSpacing = 2;
    cRankType.setLayout(layout);
    gridData = new GridData(GridData.HORIZONTAL_ALIGN_FILL);
    cRankType.setLayoutData(gridData);
    Messages.setLanguageText(cRankType, "ConfigView.label.seeding.rankType");

    // Seeds:Peer options
    RadioParameter rparamPeerSeed =
        new RadioParameter(cRankType, "StartStopManager_iRankType",
                           StartStopRulesDefaultPlugin.RANK_SPRATIO);
    Messages.setLanguageText(rparamPeerSeed.getControl(), "ConfigView.label.seeding.rankType.peerSeed");
    gridData = new GridData(GridData.VERTICAL_ALIGN_BEGINNING);
    rparamPeerSeed.setLayoutData(gridData);

    new Label(cRankType, SWT.NULL);


    // Seed Count options
    RadioParameter rparamSeedCount =
        new RadioParameter(cRankType, "StartStopManager_iRankType",
                           StartStopRulesDefaultPlugin.RANK_SEEDCOUNT);
    Messages.setLanguageText(rparamSeedCount.getControl(), "ConfigView.label.seeding.rankType.seed");
    gridData = new GridData(GridData.VERTICAL_ALIGN_BEGINNING);
    rparamSeedCount.setLayoutData(gridData);

    Group gSeedCount = new Group(cRankType, SWT.NULL);
    layout = new GridLayout();
    layout.marginHeight = 2;
    layout.marginWidth = 2;
    layout.numColumns = 3;
    gSeedCount.setLayout(layout);
    gridData = new GridData(GridData.HORIZONTAL_ALIGN_FILL);
    gridData.verticalSpan = 1;
    gSeedCount.setLayoutData(gridData);
    Messages.setLanguageText(gSeedCount, "ConfigView.label.seeding.rankType.seed.options");

    label = new Label(gSeedCount, SWT.NULL);
    Messages.setLanguageText(label, "ConfigView.label.seeding.rankType.seed.fallback");

View Full Code Here

    // ** Begin No Touch area 
 
// Group FP
 
  Composite cFP = new Group(cFirstPriorityArea, SWT.NULL);
    layout = new GridLayout();
    layout.numColumns = 2;
    layout.verticalSpacing = 6;
    cFP.setLayout(layout);
    gridData = new GridData(GridData.HORIZONTAL_ALIGN_FILL | GridData.HORIZONTAL_ALIGN_FILL);
    cFP.setLayoutData(gridData);
  Messages.setLanguageText(cFP, "ConfigView.label.seeding.firstPriority.FP");
 
  // row
  cArea = new Composite(cFP, SWT.NULL);
    layout = new GridLayout();
    layout.marginHeight = 0;
    layout.marginWidth = 0;
    layout.numColumns = 3;
    cArea.setLayout(layout);
  gridData = new GridData(GridData.VERTICAL_ALIGN_FILL | GridData.HORIZONTAL_ALIGN_FILL);
    gridData.horizontalSpan = 3;
    cArea.setLayoutData(gridData);
  label = new Label(cArea, SWT.NULL);
  Messages.setLanguageText(label, "ConfigView.label.seeding.firstPriority");
  String fpLabels[] = { MessageText.getString("ConfigView.text.all"),
      MessageText.getString("ConfigView.text.any") };
  int fpValues[] = { DefaultRankCalculator.FIRSTPRIORITY_ALL,
      DefaultRankCalculator.FIRSTPRIORITY_ANY };
  new IntListParameter(cArea, "StartStopManager_iFirstPriority_Type",
      fpLabels, fpValues);
  label = new Label(cArea, SWT.NULL);
  Messages.setLanguageText(label, "ConfigView.label.seeding.firstPriority.following");

    // row
    label = new Label(cFP, SWT.NULL);
    Messages.setLanguageText(label, "ConfigView.label.seeding.firstPriority.shareRatio");
    String minQueueLabels[] = new String[55];
    int minQueueValues[] = new int[55];
    minQueueLabels[0] = "1:2 (" + 0.5 + ")";
    minQueueValues[0] = 500;
  minQueueLabels[1] = "3:4 (" + 0.75 +")";
  minQueueValues[1] = 750;
  minQueueLabels[2] = "1:1";
  minQueueValues[2] = 1000;
  minQueueLabels[3] = "5:4 (" + 1.25 +")";
  minQueueValues[3] = 1250;
  minQueueLabels[4] = "3:2 (" + 1.50 +")";
  minQueueValues[4] = 1500;
  minQueueLabels[5] = "7:4 (" + 1.75 +")";
  minQueueValues[5] = 1750;
    for (int i = 6; i < minQueueLabels.length; i++) {
      minQueueLabels[i] = i - 4 + ":1";
      minQueueValues[i] = (i - 4) * 1000;
    }
    new IntListParameter(cFP, "StartStopManager_iFirstPriority_ShareRatio",
                         minQueueLabels, minQueueValues);

  String sMinutes = MessageText.getString("ConfigView.text.minutes");
    String sHours = MessageText.getString("ConfigView.text.hours");
 
    // row
    label = new Label(cFP, SWT.NULL);
    Messages.setLanguageText(label, "ConfigView.label.seeding.firstPriority.DLMinutes");

    String dlTimeLabels[] = new String[15];
    int dlTimeValues[] = new int[15];
    dlTimeLabels[0] = MessageText.getString("ConfigView.text.ignore");
    dlTimeValues[0] = 0;
    for (int i = 1; i < dlTimeValues.length; i++) {
      dlTimeLabels[i] = "<= " + (i + 2) + " " + sHours ;
      dlTimeValues[i] = (i + 2) * 60;
    }
    new IntListParameter(cFP, "StartStopManager_iFirstPriority_DLMinutes",
                         dlTimeLabels, dlTimeValues);
 
  label = new Label(cFirstPriorityArea, SWT.WRAP);
 
    // row
    label = new Label(cFP, SWT.NULL);
    Messages.setLanguageText(label, "ConfigView.label.seeding.firstPriority.seedingMinutes");

    String seedTimeLabels[] = new String[15];
    int seedTimeValues[] = new int[15];
    seedTimeLabels[0] = MessageText.getString("ConfigView.text.ignore");
    seedTimeValues[0] = 0;
    seedTimeLabels[1] = "<= 90 " + sMinutes;
    seedTimeValues[1] = 90;
    for (int i = 2; i < seedTimeValues.length; i++) {
      seedTimeLabels[i] = "<= " + i + " " + sHours ;
      seedTimeValues[i] = i * 60;
    }
    new IntListParameter(cFP, "StartStopManager_iFirstPriority_SeedingMinutes",
                         seedTimeLabels, seedTimeValues);

 
 
//   Group Ignore FP
 
    Composite cIgnoreFP = new Group(cFirstPriorityArea, SWT.NULL);
    layout = new GridLayout();
    layout.numColumns = 2;
    layout.verticalSpacing = 6;
  cIgnoreFP.setLayout(layout);
    gridData = new GridData(GridData.HORIZONTAL_ALIGN_FILL | GridData.VERTICAL_ALIGN_FILL);
  cIgnoreFP.setLayoutData(gridData);
    Messages.setLanguageText(cIgnoreFP, "ConfigView.label.seeding.firstPriority.ignore");
 
  // Ignore S:P Ratio
  label = new Label(cIgnoreFP, SWT.NULL);
  Messages.setLanguageText(label, "ConfigView.label.seeding.firstPriority.ignoreSPRatio");
View Full Code Here

     
        if ( pg != current_group ){
         
          current_group  = pg;
         
          current_composite = new Group(main_tab, SWT.NULL);
         
          Messages.setLanguageText(current_composite, current_group.getResourceName());
         
          GridData gridData = new GridData(GridData.VERTICAL_ALIGN_FILL | GridData.HORIZONTAL_ALIGN_FILL);
         
View Full Code Here

   *
   */
  private void generateGeneralGroup() {
    GridData gridData;
   
    Group gCacheGeneral = new Group(panel,SWT.NULL);
    Messages.setLanguageText(gCacheGeneral,"CacheView.general.title");
    gCacheGeneral.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
   
    GridLayout layoutGeneral = new GridLayout();
    layoutGeneral.numColumns = 4;   
    gCacheGeneral.setLayout(layoutGeneral);
    Label lbl;
   
    lbl = new Label(gCacheGeneral,SWT.NULL);
    gridData = new GridData();
    gridData.widthHint = 100;
View Full Code Here

TOP

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

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.