Examples of GridData


Examples of org.eclipse.swt.layout.GridData

        _container.setLayout(layout);

        Label label = new Label(_container, SWT.NONE);
        label.setText("Local runtime:");       
        _lblLocalRuntime = new Label(_container, SWT.NONE);
        _lblLocalRuntime.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
       
        label = new Label(_container, SWT.NONE);
        label.setText("Local web application:");       
        _lblWebApplication = new Label(_container, SWT.NONE);
        _lblWebApplication.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));       
       
        label = new Label(_container, SWT.NONE);
        label.setText("Remote location:");       
        _lblRemoteLocation = new Label(_container, SWT.NONE);
        _lblRemoteLocation.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
       
        label = new Label(_container, SWT.NONE);
        label.setText("Remote database server:");       
        _lblRemoteDatabaseServer = new Label(_container, SWT.NONE);
        _lblRemoteDatabaseServer.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
       
        label = new Label(_container, SWT.NONE);
        label.setText("Remote database name:");       
        _lblRemoteDatabaseName = new Label(_container, SWT.NONE);
        _lblRemoteDatabaseName.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
       
        label = new Label(_container, SWT.NONE);
       
        GridData chkGridData = new GridData(GridData.FILL_HORIZONTAL);       
        _chkCopyLocalContent = new Button(_container, SWT.CHECK);
        _chkCopyLocalContent.setText("copy local content");
        _chkCopyLocalContent.setLayoutData(chkGridData);
        _chkCopyLocalContent.setEnabled(false);
       
        label = new Label(_container, SWT.NONE);
       
        _chkIncludeACL = new Button(_container, SWT.CHECK);
        _chkIncludeACL.setText("include ACL on content copy");
        _chkIncludeACL.setLayoutData(GridDataFactory.copyData(chkGridData));
        _chkIncludeACL.setEnabled(false);
       
        _multiTaskStatusControl = new MultiTaskStatusControl(_container, SWT.NONE);
       
        _multiTaskStatusControl.setLayoutData(new GridData(GridData.FILL_BOTH));
       
        _taskStatusMap = new LinkedHashMap<String, TaskStatus>();
        _taskStatusMap.put(DBNAME_TASK, new TaskStatus("Name for new database is available on database server"));              
        _taskStatusMap.put(DESIGN_TASK,new TaskStatus("WebTML design"));
        _taskStatusMap.put(PLUGINS_TASK,new TaskStatus("Plugin status:"));
       
        List<TaskStatus> statusList = new ArrayList<TaskStatus>();
        statusList.addAll(_taskStatusMap.values());
        _multiTaskStatusControl.init(statusList);
             
        _multiTaskStatusControl.getRefreshButton().addSelectionListener(new SelectionListener() {
           
            public void widgetSelected(SelectionEvent e) {
                performCheck();
            }
           
            public void widgetDefaultSelected(SelectionEvent e) {
            }
        });
       
        GridData statusLayoutData = new GridData(GridData.FILL_BOTH);
        statusLayoutData.horizontalSpan = 2;
        _multiTaskStatusControl.setLayoutData(statusLayoutData);
       
        setControl(_container);
    }
View Full Code Here

Examples of org.eclipse.swt.layout.GridData

        container.setLayout(layout);
       
        Label label = new Label(container, SWT.NONE);
        label.setText("Available database servers on remote location:");
       
        GridData gd = new GridData(GridData.FILL_HORIZONTAL);
        gd.horizontalSpan = 2;
        label.setLayoutData(gd);
      
       
        _tblDatabaseServers = new TableViewer(container);
        _tblDatabaseServers.setLabelProvider(new DBServerLabelProvider());
        _tblDatabaseServers.setContentProvider(new DBServerContentProvider());
        _tblDatabaseServers.setInput(_config);

        _tblDatabaseServers.addSelectionChangedListener(this);
       
        gd = new GridData(GridData.FILL_BOTH);
        gd.horizontalSpan = 2;
        _tblDatabaseServers.getTable().setLayoutData(gd);
       
        label = new Label(container, SWT.NONE);
        label.setText("Database name:");
       
       
        _txtDatabaseName = new Text(container, SWT.BORDER);
        _txtDatabaseName.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
       
        _txtDatabaseName.addModifyListener(this);
       
        label = new Label(container, SWT.NONE);
        label.setText("Options:");
       
        GridData chkGridData = new GridData(GridData.FILL_HORIZONTAL);
           
        _chkCopyLocalContent = new Button(container, SWT.CHECK);
        _chkCopyLocalContent.setText("copy local content");
        _chkCopyLocalContent.setLayoutData(chkGridData);
        _chkCopyLocalContent.addSelectionListener(new SelectionListener() {
View Full Code Here

Examples of org.eclipse.swt.layout.GridData

       
        _tblWebApplications = new TableViewer(_container);
        _tblWebApplications.setLabelProvider(new WebApplicationsLabelProvider());
        _tblWebApplications.setContentProvider(new WebApplicationsContentProvider());
       
        GridData gd = new GridData(GridData.FILL_BOTH);
        _tblWebApplications.getTable().setLayoutData(gd);
       
        _tblWebApplications.addSelectionChangedListener(this);
       
        setControl(_container);
View Full Code Here

Examples of org.eclipse.swt.layout.GridData

    setHelpAvailable(false);
  }

  protected Control createDialogArea(Composite parent) {
    Composite composite = new Composite(parent, SWT.None);
    composite.setLayoutData(new GridData(GridData.FILL, GridData.FILL, true, true));
    GridLayout layout = new GridLayout(3, false);
    composite.setLayout(layout);

    GridData txtStyle = new GridData(GridData.FILL_HORIZONTAL);
    txtStyle.minimumWidth = convertWidthInCharsToPixels(60);

    Label lblTemplateName = new Label(composite, SWT.None);
    lblTemplateName.setText("Template name:");
    _tmplName = new Text(composite, SWT.BORDER);
View Full Code Here

Examples of org.eclipse.swt.layout.GridData

  }

 
  protected Control createDialogArea(Composite parent) {
    Composite composite = new Composite(parent, SWT.None);
    GridData data = new GridData(GridData.FILL, GridData.FILL, true, true);
    composite.setLayoutData(data);
    GridLayout layout = new GridLayout(1, false);
    composite.setLayout(layout);   
   
    Label label = new Label(composite,SWT.NONE);
View Full Code Here

Examples of org.eclipse.swt.layout.GridData

        GridLayout layout = new GridLayout(1, false);
        layout.horizontalSpacing = convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_SPACING);
        layout.verticalSpacing = convertVerticalDLUsToPixels(IDialogConstants.VERTICAL_SPACING);
        viewerComposite.setLayout(layout);

        GridData data = new GridData(GridData.FILL_BOTH);
        data.heightHint = 200;
        data.widthHint = 350;

        viewerComposite.setLayoutData(data);

        viewer = CheckboxTableViewer.newCheckList(viewerComposite, SWT.BORDER);
        viewer.getControl().setLayoutData(new GridData(GridData.FILL_BOTH));

        class WorkingSetLabelProvider extends LabelProvider {
            private ResourceManager images;

            public WorkingSetLabelProvider() {
                images = new LocalResourceManager(JFaceResources.getResources());
            }

            public void dispose() {
                images.dispose();

                super.dispose();
            }

            public Image getImage(Object object) {
                Assert.isTrue(object instanceof IWorkingSet);
                IWorkingSet workingSet = (IWorkingSet) object;
                ImageDescriptor imageDescriptor = workingSet.getImageDescriptor();

                if (imageDescriptor == null) {
                    return null;
                }

                Image icon = (Image) images.get(imageDescriptor);
                return icon;
            }

            public String getText(Object object) {
                Assert.isTrue(object instanceof IWorkingSet);
                IWorkingSet workingSet = (IWorkingSet) object;
                return workingSet.getLabel();
            }
        }
        viewer.setLabelProvider(new WorkingSetLabelProvider());

        viewer.setContentProvider(new ArrayContentProvider());
        viewer.setInput(PlatformUI.getWorkbench().getWorkingSetManager().getWorkingSets());
        viewer.addSelectionChangedListener(new ISelectionChangedListener() {
            public void selectionChanged(SelectionChangedEvent event) {
                // handleSelectionChanged();
            }
        });

        data = new GridData(GridData.FILL_BOTH);
        data.heightHint = 200;
        data.widthHint = 50;
        viewer.getControl().setLayoutData(data);
        Dialog.applyDialogFont(composite);
       
View Full Code Here

Examples of org.eclipse.swt.layout.GridData

    setHelpAvailable(false);
  }

  protected Control createDialogArea(Composite parent) {
    Composite composite = new Composite(parent, SWT.None);
    composite.setLayoutData(new GridData(GridData.FILL, GridData.FILL, true, true));
    GridLayout layout = new GridLayout(2, false);
    composite.setLayout(layout);

    GridData txtStyle = new GridData(GridData.FILL_HORIZONTAL);
    txtStyle.minimumWidth = convertWidthInCharsToPixels(60);

    Label lblTemplateName = new Label(composite, SWT.None);
    lblTemplateName.setText("Server name:");
    _srvName = new Text(composite, SWT.BORDER);
    _srvName.setLayoutData(txtStyle);
    _srvName.addModifyListener(this);

    //Label filler = new Label(composite, SWT.None);
    //filler.setText("");

    Label lblUrl = new Label(composite, SWT.None);
    lblUrl.setText("URL:");
    _srvURL = new Text(composite, SWT.BORDER);
    _srvURL.setLayoutData(txtStyle);
    _srvURL.addModifyListener(this);

    //filler = new Label(composite, SWT.None);
    //filler.setText("");

    Label lblUser = new Label(composite, SWT.None);
    lblUser.setText("User:");
    _srvUser = new Text(composite, SWT.BORDER);
    _srvUser.setLayoutData(txtStyle);
    _srvUser.addModifyListener(this);

    //filler = new Label(composite, SWT.None);
    //filler.setText("");

    Label lblPW = new Label(composite, SWT.None);
    lblPW.setText("Password:");
    _srvPW = new Text(composite, SWT.PASSWORD | SWT.BORDER);
    _srvPW.setLayoutData(txtStyle);
    _srvPW.addModifyListener(this);

    _btnTestConnection = new Button(composite, SWT.PUSH);
    _btnTestConnection.addSelectionListener(new SelectionListener() {

      public void widgetDefaultSelected(SelectionEvent e) {
      }

      public void widgetSelected(SelectionEvent e) {
        handleTestConnection();
      }

    });
    _btnTestConnection.setText("Test connection");
    _btnTestConnection.setEnabled(false);
   
    GridData g = new GridData();
    g.horizontalAlignment = GridData.END;
    g.horizontalSpan = 2;
    _btnTestConnection.setLayoutData(g);

    if (_server != null) {
View Full Code Here

Examples of org.eclipse.swt.layout.GridData

      label.setText("Metadata headers are present in this tml file. Editing metadata with this editor is not possible. Please remove metadata headers first.");
      noDefaultAndApplyButton();
    } else {
      Label label = new Label(composite, SWT.None);
      label.setText("Description:");
      label.setLayoutData(new GridData(SWT.LEFT, SWT.TOP, false, false));
      _txtDescription = new Text(composite, SWT.MULTI|SWT.BORDER);
      _txtDescription.setData("description");
      GridData descriptionLayout = new GridData(SWT.FILL, SWT.FILL, true, false);
      descriptionLayout.heightHint = WidgetFactory.computeFontHeight(_txtDescription) * 5;
        _txtDescription.setLayoutData(descriptionLayout);
     
     
      label = new Label(composite, SWT.None);
      label.setText("DirectAccess:");
      _chkDirectAccess = new Button(composite, SWT.CHECK);
      _chkDirectAccess.setText("enabled");
      _chkDirectAccess.setData("directAccess");
     
      label = new Label(composite, SWT.None);
      label.setText("Caching:");
      _chkCachable = new Button(composite, SWT.CHECK);
      _chkCachable.setText("enabled");
      _chkCachable.setData("cachable");
     
     
      Label filler = new Label(composite, SWT.None);
      GridData fillerLayout = new GridData(SWT.FILL, SWT.FILL, true, true);
      fillerLayout.horizontalSpan = 2;
      filler.setLayoutData(fillerLayout);
       
      bind(composite);           
    }
View Full Code Here

Examples of org.eclipse.swt.layout.GridData

  public Composite configSectionCreate(final Composite parent) {
    ImageLoader imageLoader = ImageLoader.getInstance();
    Image imgOpenFolder = imageLoader.getImage("openFolderButton");     

    GridData gridData;
    GridLayout layout;

    Composite gLogging = new Composite(parent, SWT.NULL);
    gridData = new GridData(GridData.VERTICAL_ALIGN_FILL | GridData.HORIZONTAL_ALIGN_FILL);
    gLogging.setLayoutData(gridData);
    layout = new GridLayout();
    layout.numColumns = 2;
    gLogging.setLayout(layout);
   
    int userMode = COConfigurationManager.getIntParameter("User Mode");

   
    BooleanParameter enable_logger = new BooleanParameter(gLogging, "Logger.Enabled", CFG_PREFIX + "loggerenable");
    gridData = new GridData();
    gridData.horizontalSpan = 2;
    enable_logger.setLayoutData(gridData);

    // row

    final BooleanParameter enableLogging =
      new BooleanParameter(gLogging,
                           "Logging Enable",
                           CFG_PREFIX + "enable");
    gridData = new GridData();
    gridData.horizontalSpan = 2;
    enableLogging.setLayoutData(gridData);

    Composite cArea = new Composite(gLogging, SWT.NULL);
    layout = new GridLayout();
    layout.marginHeight = 0;
    layout.marginWidth = 0;
    layout.numColumns = 3;
    cArea.setLayout(layout);
    gridData = new GridData(GridData.FILL_HORIZONTAL);
    gridData.horizontalSpan = 2;
    cArea.setLayoutData(gridData);


    // row

    Label lStatsPath = new Label(cArea, SWT.NULL);
    Messages.setLanguageText(lStatsPath, CFG_PREFIX + "logdir"); //$NON-NLS-1$

    gridData = new GridData();
    gridData.widthHint = 150;
    final StringParameter pathParameter = new StringParameter(cArea, "Logging Dir"); //$NON-NLS-1$ //$NON-NLS-2$
    pathParameter.setLayoutData(gridData);
    Button browse = new Button(cArea, SWT.PUSH);
    browse.setImage(imgOpenFolder);
    imgOpenFolder.setBackground(browse.getBackground());
    browse.setToolTipText(MessageText.getString("ConfigView.button.browse"));
    browse.addListener(SWT.Selection, new Listener() {
      /* (non-Javadoc)
       * @see org.eclipse.swt.widgets.Listener#handleEvent(org.eclipse.swt.widgets.Event)
       */
      public void handleEvent(Event event) {
      DirectoryDialog dialog = new DirectoryDialog(parent.getShell(), SWT.APPLICATION_MODAL);
        dialog.setFilterPath(pathParameter.getValue());
        dialog.setText(MessageText.getString(CFG_PREFIX + "choosedefaultsavepath")); //$NON-NLS-1$
        String path = dialog.open();
        if (path != null) {
        pathParameter.setValue(path);
        }
      }
    });

    Label lMaxLog = new Label(cArea, SWT.NULL);

    Messages.setLanguageText(lMaxLog, CFG_PREFIX + "maxsize");
    final String lmLabels[] = new String[logFileSizes.length];
    final int lmValues[] = new int[logFileSizes.length];
    for (int i = 0; i < logFileSizes.length; i++) {
      int  num = logFileSizes[i];
      lmLabels[i] = " " + num + " MB";
      lmValues[i] = num;
    }

    IntListParameter paramMaxSize = new IntListParameter(cArea, "Logging Max Size", lmLabels, lmValues);
    gridData = new GridData();
    gridData.horizontalSpan = 2;
    paramMaxSize.setLayoutData(gridData);
   
    if(userMode > 1)
    {
      Label timeStampLbl = new Label(cArea, SWT.NULL);
      Messages.setLanguageText(timeStampLbl, CFG_PREFIX+"timestamp");
      timeStampLbl.setLayoutData(new GridData());
      StringParameter timeStamp = new StringParameter(cArea,"Logging Timestamp");
      gridData = new GridData();
      gridData.horizontalSpan = 2;
      gridData.widthHint = 150;
      timeStamp.setLayoutData(gridData);
    }
   
   
   
    /** FileLogging filter, consisting of a List of types (info, warning, error)
     * and a checkbox Table of component IDs.
     */
    final String sFilterPrefix = CFG_PREFIX + "filter";
    Group gLogIDs = new Group(gLogging, SWT.NULL);
    Messages.setLanguageText(gLogIDs, sFilterPrefix);
    layout = new GridLayout();
    layout.numColumns = 2;
    gLogIDs.setLayout(layout);
    gridData = new GridData(SWT.BEGINNING, SWT.BEGINNING, true, true);
    gridData.horizontalSpan = 2;
    gLogIDs.setLayoutData(gridData);

    final List listLogTypes = new List(gLogIDs, SWT.BORDER | SWT.SINGLE
        | SWT.V_SCROLL);
    gridData = new GridData(SWT.NULL, SWT.BEGINNING, false, false);
    listLogTypes.setLayoutData(gridData);

    final int[] logTypes = { LogEvent.LT_INFORMATION, LogEvent.LT_WARNING,
        LogEvent.LT_ERROR };
    for (int i = 0; i < logTypes.length; i++)
      listLogTypes.add(MessageText.getString(CFG_PREFIX + "log" + i + "type"));
    listLogTypes.select(0);

    final LogIDs[] logIDs = FileLogging.configurableLOGIDs;
    //Arrays.sort(logIDs);
    final Table tableLogIDs = new Table(gLogIDs, SWT.CHECK | SWT.BORDER
        | SWT.SINGLE | SWT.FULL_SELECTION);
    gridData = new GridData(GridData.FILL_BOTH);
    tableLogIDs.setLayoutData(gridData);
    tableLogIDs.setLinesVisible (false);   
    tableLogIDs.setHeaderVisible(false);
    TableColumn column = new TableColumn(tableLogIDs, SWT.NONE);

View Full Code Here

Examples of org.eclipse.swt.layout.GridData

  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 = 3;
  panel.setLayout(layout);

  Label label = new Label(panel, SWT.WRAP);
  gridData = new GridData();
  gridData.horizontalSpan = 3;
  gridData.widthHint = 380;
  label.setLayoutData(gridData);
  Messages.setLanguageText(label, "exportTorrentWizard.finish.message");
  }
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.