Package org.eclipse.swt.custom

Examples of org.eclipse.swt.custom.ScrolledComposite


        TabItem tabItem1 = new TabItem(tabFolder, SWT.NONE);
        tabItem1.setText(Messages.getString("SQLActionHandlerConfig.title.configuration"));
        tabItem1.setControl(composite);

        ScrolledComposite scrolledComposite = new ScrolledComposite(composite, SWT.V_SCROLL | SWT.BORDER);
        scrolledComposite.setExpandHorizontal(true);
        scrolledComposite.setExpandVertical(true);
        scrolledComposite.setLayoutData(new GridData(GridData.FILL_BOTH));

        try {
            if (initialValue.trim().length() != 0) {
                model = SQLTasksModel.fromXml(initialValue);
            }
        } catch (Exception ex) {
            DesignerLogger.logError(Messages.getString("SQLActionHandlerConfig.error.parse"), ex);
            // TODO translate to = Unable to parse model from XML
        }
        if (model == null) {
            model = SQLTasksModel.createDefault();
        }
        constructorView = new ConstructorView(scrolledComposite, SWT.NONE);
        constructorView.setLayoutData(new GridData(GridData.FILL_BOTH));
        model.getFirstTask().changeListener = constructorView;

        scrolledComposite.setContent(constructorView);

        xmlContentView = new XmlContentView(tabFolder, SWT.NONE);
        xmlContentView.setLayoutData(new GridData(GridData.FILL_BOTH));
        xmlContentView.setValidateXSD(true);
        xmlContentView.setValue(initialValue);
View Full Code Here


            tab.setControl(createControl(mediator.folder));

        }

        private Control createControl(Composite parent) {
            ScrolledComposite sc = new ScrolledComposite(parent, SWT.BORDER | SWT.H_SCROLL | SWT.V_SCROLL);
            panel = buildPanel(sc);
            sc.setContent(panel);
            sc.setExpandHorizontal(true);
            sc.setExpandVertical(true);
            sc.setMinSize(640, 480);
            sc.setMinSize(panel.computeSize(SWT.DEFAULT, SWT.DEFAULT));
            return sc;
        }
View Full Code Here

      tab.setControl(createControl(mediator.folder));

    }

    private Control createControl(Composite parent) {
      ScrolledComposite sc = new ScrolledComposite(parent, SWT.BORDER | SWT.H_SCROLL | SWT.V_SCROLL);
      panel = buildPanel(sc);
      sc.setContent(panel);
      sc.setExpandHorizontal(true);
      sc.setExpandVertical(true);
      sc.setMinSize(640, 480);
      sc.setMinSize(panel.computeSize(SWT.DEFAULT, SWT.DEFAULT));
      return sc;
    }
View Full Code Here

    {
        headerBindingHashMap = new HashMap<Text, Text>();
        _paramsComposite.setLayout(new GridLayout());
        _paramsComposite.setLayoutData(new GridData(SWT.FILL, SWT.TOP, true, true));
        final ScrolledComposite scrolledComposite = new ScrolledComposite(_paramsComposite, SWT.BORDER | SWT.V_SCROLL);
        scrolledComposite.setExpandHorizontal(true);
        scrolledComposite.setExpandVertical(true);  
        GridData layoutData = new GridData(SWT.FILL, SWT.TOP, true, true);
        scrolledComposite.setLayoutData(layoutData);
        scrolledComposite.setLayout(new GridLayout());
       
        final Composite composite = _toolkit.createComposite(scrolledComposite, SWT.NONE);
        scrolledComposite.setContent(composite);
        layoutData = new GridData(SWT.FILL, SWT.FILL, true, true);           
        layoutData.verticalIndent = 20;
        composite.setLayoutData(layoutData);
        composite.setLayout(new FormLayout());
       
        List<ParameterData> params = _opData.getParameters();
        ParameterData param = params.get(0);
        // Queue selection widget
        Label label = _toolkit.createLabel(composite, ViewUtility.getDisplayText(param.getName()));
        FormData formData = new FormData();
        formData.top = new FormAttachment(0, 2);
        formData.right = new FormAttachment(labelWidth);
        label.setLayoutData(formData);
        label.setToolTipText(param.getDescription());
       
        formData = new FormData();
        formData.top = new FormAttachment(0);
        formData.left = new FormAttachment(label, 5);
        formData.right = new FormAttachment(valueWidth);

        Combo combo = new Combo(composite, SWT.READ_ONLY | SWT.DROP_DOWN);
        List<String> qList = ApplicationRegistry.getServerRegistry(_mbean).getQueueNames(_virtualHostName);
        combo.setItems(qList.toArray(new String[0]));
        combo.add("Select Queue", 0);
        combo.select(0);
        combo.setLayoutData(formData);
        combo.setData(param);
        combo.addSelectionListener(parameterSelectionListener);

        // Binding creation widgets
        createARowForCreatingHeadersBinding(composite, 1);
        createARowForCreatingHeadersBinding(composite, 2);
        createARowForCreatingHeadersBinding(composite, 3);
        createARowForCreatingHeadersBinding(composite, 4);
        createARowForCreatingHeadersBinding(composite, 5);
        createARowForCreatingHeadersBinding(composite, 6);
        createARowForCreatingHeadersBinding(composite, 7);
        createARowForCreatingHeadersBinding(composite, 8);
       
        final Button addMoreButton = _toolkit.createButton(composite, "Add More", SWT.PUSH);
        formData = new FormData();
        formData.top = new FormAttachment(0, heightForAParameter);
        formData.left = new FormAttachment(70, 5);
        addMoreButton.setLayoutData(formData);
        addMoreButton.setData("rowCount", 8);
        addMoreButton.addSelectionListener(new SelectionAdapter()
            {
                public void widgetSelected(SelectionEvent e)
                {
                    int count = Integer.parseInt(addMoreButton.getData("rowCount").toString());
                    createARowForCreatingHeadersBinding(composite, ++count);
                    addMoreButton.setData("rowCount", count);
                    scrolledComposite.setMinSize(composite.computeSize(SWT.DEFAULT, SWT.DEFAULT));
                    composite.layout();
                    _form.layout();
                }
            });
         
        scrolledComposite.setMinSize(composite.computeSize(SWT.DEFAULT, SWT.DEFAULT));
        composite.layout();
    }
View Full Code Here

    FillLayout layout = new FillLayout();
    // layout.marginHeight = 10;
    // layout.marginWidth = 10;
    this.setLayout(layout);

    final ScrolledComposite scrolledComposite = new ScrolledComposite(this,
        SWT.BORDER | SWT.H_SCROLL | SWT.V_SCROLL);
    scrolledComposite.setExpandHorizontal(true);
    scrolledComposite.setExpandVertical(true);

    scrolledComposite.addControlListener(new ControlAdapter() {
      @Override
      public void controlResized(ControlEvent e) {
        Rectangle r = scrolledComposite.getClientArea();
        scrolledComposite.setMinSize(CharacterProfessionsView.this
            .computeSize(r.width, SWT.DEFAULT));
      }
    });

    this.professionsExpandBar = new ExpandBar(scrolledComposite, SWT.NONE);
    this.professionsExpandBar.setSpacing(5);
    scrolledComposite.setContent(this.professionsExpandBar);
    refresh();
  }
View Full Code Here

    data .verticalAlignment = GridData.FILL;
    data .grabExcessVerticalSpace = false;
    data .horizontalAlignment = GridData.FILL;
    data .grabExcessHorizontalSpace = false;
   
    ScrolledComposite scrollable = new ScrolledComposite(parent, SWT.H_SCROLL | SWT.V_SCROLL | SWT.BORDER | SWT.CENTER);
    scrollable.setLayout(new GridLayout(1, false));
    scrollable.setExpandHorizontal(true);
    scrollable.setExpandVertical(true);
   
    this.pool = new Composite(scrollable, SWT.CENTER);
    this.pool.setBackground(new Color(scrollable.getDisplay(), 0, 0, 255));
    scrollable.setContent(this.pool);
    this.pool.setLayout(layout);
    this.pool.setLayoutData(data);
   
    this.cams = new ArrayList<CameraViewer>();
    int cam_count = NativeCamManager.getCameraCount();
    System.out.println("Available camera: " + cam_count);

   
   
    for (int i = 0; i < cam_count; i++) {
      CameraViewer new_viewer = new CameraViewer(this.pool, SWT.NULL, i);
      new_viewer.registerListener(this);
      new_viewer.setLayoutData(data);
      this.cams.add(new_viewer);
   

    scrollable.setMinSize(this.pool.computeSize(SWT.DEFAULT, SWT.DEFAULT));
  }
View Full Code Here

    fSizeY += personMinVerticalGap;

    if (bMove) {
      if (familyComposite.getParent() instanceof ScrolledComposite) {
        // Scrollbars enablen.
        ScrolledComposite sc = (ScrolledComposite) familyComposite.getParent();
        sc.setMinSize(fSizeX, fSizeY);

        // Das FamilyComposite innerhalb des ScrolledComposites so verschieben,
        // dass die aktuelle Person mittig dargestellt
        // wird.
        Point pSc = sc.getSize();
        int originX = currPersonX - pSc.x / 2 + OptionData.instance.getInt(OptionData.PERSON_WIDTH) / 2;
        int originY = currPersonY - pSc.y / 2 + OptionData.instance.getInt(OptionData.PERSON_HEIGHT) / 2;
        sc.setOrigin(originX, originY);
      }
    }

    return new Point(fSizeX, fSizeY);
  }
View Full Code Here

    buttonCancel.setText("Abbrechen");
    gd = new GridData(SWT.FILL, SWT.FILL, true, true);
    buttonCancel.setLayoutData(gd);
    buttonCancel.addSelectionListener(this);

    ScrolledComposite scrolledData = new ScrolledComposite(inner, SWT.BORDER | SWT.H_SCROLL | SWT.V_SCROLL);
    fd = new FormData();
    fd.top = new FormAttachment(label1, 5, SWT.BOTTOM);
    fd.bottom = new FormAttachment(compButtons, -5, SWT.TOP);
    fd.left = new FormAttachment(0, 0);
    fd.right = new FormAttachment(100, 0);
    scrolledData.setLayoutData(fd);

    Composite inScrollComposite = new Composite(scrolledData, 0);
    GridLayout gridLayout = new GridLayout(2, false);
    inScrollComposite.setLayout(gridLayout);

    firstCtrl = GUI.instance.createAtomWidgets(Person.atomData, inScrollComposite, null, this, null, viewData);
    GUI.instance.createAtomWidgets(Person.atomDataNotes, inScrollComposite, null, this, null, viewData);
    GUI.instance.createAtomWidgets(Person.atomDataSources, inScrollComposite, null, this, null, viewData);

    scrolledData.setContent(inScrollComposite);
    int width = Math.max(660, inScrollComposite.computeSize(SWT.DEFAULT, SWT.DEFAULT).x);
    int height = inScrollComposite.computeSize(SWT.DEFAULT, SWT.DEFAULT).y + 5;
    inScrollComposite.setSize(width, height);
  }
View Full Code Here

    buttonCancel.setText("Abbrechen");
    gd = new GridData(SWT.FILL, SWT.FILL, true, true);
    buttonCancel.setLayoutData(gd);
    buttonCancel.addSelectionListener(this);

    ScrolledComposite scrolledData = new ScrolledComposite(inner, SWT.BORDER | SWT.H_SCROLL | SWT.V_SCROLL);
    fd = new FormData();
    fd.top = new FormAttachment(label1, 5, SWT.BOTTOM);
    fd.bottom = new FormAttachment(compButtons, -5, SWT.TOP);
    fd.left = new FormAttachment(0, 0);
    fd.right = new FormAttachment(100, 0);
    scrolledData.setLayoutData(fd);

    Composite inScrollComposite = new Composite(scrolledData, 0);
    GridLayout gridLayout = new GridLayout(2, false);
    inScrollComposite.setLayout(gridLayout);

    // Widgets erzeugen, zum Editieren.
    GUI.instance.createAtomWidgets(RelationshipPartners.atomDataPartner, inScrollComposite, Relationship.PARTNERS,
        null, this, viewData);

    scrolledData.setContent(inScrollComposite);
    inScrollComposite.setSize(660, inScrollComposite.computeSize(SWT.DEFAULT, SWT.DEFAULT).y + 5);
  }
View Full Code Here

    layout.marginWidth = 2;
    shell.setLayout(layout);

    // Den oberen Bereich dominiert das Family-Composite, wo die einzelnen
    // Familienmitglieder dargestellt werden.
    scrollerFamilyComposite = new ScrolledComposite(shell, SWT.BORDER | SWT.H_SCROLL | SWT.V_SCROLL);
    scrollerFamilyComposite.getVerticalBar().setIncrement(10);
    scrollerFamilyComposite.getVerticalBar().setPageIncrement(100);
    scrollerFamilyComposite.getHorizontalBar().setIncrement(10);
    scrollerFamilyComposite.getHorizontalBar().setPageIncrement(100);
    familyComposite = new FamilyComposite(scrollerFamilyComposite);
View Full Code Here

TOP

Related Classes of org.eclipse.swt.custom.ScrolledComposite

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.