Package org.eclipse.swt.layout

Examples of org.eclipse.swt.layout.RowData


        rl.justify = true;
        topshell.setLayout(rl);
        topshell.addDisposeListener(this);
        preference = new Composite(topshell, SWT.BORDER);
        preference.setLayoutData(
                new RowData(topshell.getClientArea().width, 50));
        preference.setLayout(new RowLayout());
        lbDevice = new Label(preference, SWT.READ_ONLY);
        lbDevice.setText("Device: ");
        RowData rowd = new RowData();
        rowd.height = 45;
        rowd.width = 130;
        device = new List(preference, SWT.READ_ONLY | SWT.V_SCROLL);
        device.setLayoutData(rowd);
        lbType = new Label(preference, SWT.SHADOW_IN);
        lbType.setText("Type: ");
        typ = new List(preference, SWT.READ_ONLY);
        typ.setItems(new String[] {"Linear", "Logarithmic"});
        typ.setSelection(0);
        lbAggregation = new Label(preference, SWT.SHADOW_IN);
        lbAggregation.setText("Values are :");
        cumulative = new List(preference, SWT.READ_ONLY);
        cumulative.setItems(new String[] {"accumulated", "not accumulated"});
        cumulative.setSelection(1);
        lbAccessType = new Label(preference, SWT.READ_ONLY);
        lbAccessType.setText("Visualizing: ");
        visualizing = new List(preference, SWT.READ_ONLY);
        visualizing.setItems(new String[] {"Read" , "Write"});
        visualizing.setSelection(0);
        c = new Canvas(topshell, SWT.DOUBLE_BUFFERED | SWT.BORDER);
        c.setLayoutData(new RowData(topshell.getClientArea().width,
                topshell.getClientArea().height - 75));
        c.addPaintListener(this);
        value = new float[noOfBins];
        for (int i = 0; i < noOfBins; i++) {
            value[i] = 0;
View Full Code Here


     * Method which orders repainting of the histogram.
     * @param e ControlEvent
     */
    public final void controlResized(final ControlEvent e) {
        preference.setLayoutData(
               new RowData(topshell.getClientArea().width - 10, 60));
        c.setLayoutData(new RowData(topshell.getClientArea().width - 10,
                topshell.getClientArea().height - 80));
        c.redraw();
    }
View Full Code Here

        btResetAccumulation.setText("Reset Accumulation");
        btResetAccumulation.addSelectionListener(this);
        Label lb = new Label(c, SWT.NONE);
        lb.setText("jSCSI Server: ");
        serverName = new Text(c, SWT.SINGLE | SWT.BORDER);
        serverName.setLayoutData(new RowData(200, -1));
        serverName.setText(Activator.getDefault().getPluginPreferences().
                getString(PreferenceConstants.P_STRING_DEFAULT_LOG_FILE));
        Label lb2 = new Label(c, SWT.NONE);
        lb2.setText("Type-File: ");
        typeFileName = new Text(c, SWT.SINGLE | SWT.BORDER);
        typeFileName.setLayoutData(new RowData(200, -1));
        typeFileName.setText(Activator.getDefault().getPluginPreferences().
                getString(PreferenceConstants.P_STRING_DEFAULT_TYPE_FILE));
        Label lb3 = new Label(c, SWT.NONE);
        lb3.setText("Value added at hit: ");
        sc = new Scale(c, SWT.HORIZONTAL);
View Full Code Here

    /**
     * Method which orders repainting of the legend.
     * @param e ControlEvent
     */
    public final void controlResized(final ControlEvent e) {
        c2.setLayoutData(new RowData(topshell.getClientArea().width - 10,
                topshell.getClientArea().height - 50));
        c2.redraw();
        c.setLayoutData(new RowData(topshell.getClientArea().width - 10, 30));
        c.redraw();
    }
View Full Code Here

    composite.setLayout( new RowLayout() );

    decorator.addGroupedListener( SWT.Selection, mock( Listener.class ) );

    Control facade = composite.getChildren()[ 0 ];
    RowData layoutData = ( RowData )facade.getLayoutData();
    assertTrue( layoutData.exclude );
  }
View Full Code Here

  protected void refreshDebugButtons(CloudFoundryApplicationModule appModule) {
    int state = appModule.getState();

    if (isDebugAllowed()) {
      if (state == IServer.STATE_STOPPED || state == IServer.STATE_UNKNOWN) {
        RowData data = new RowData();
        data.exclude = false;
        debugControl.setLayoutData(data);
        debugControl.setVisible(true);

        data = new RowData();
        data.exclude = true;
        connectToDebugger.setLayoutData(data);
        connectToDebugger.setVisible(false);
      }
      else {
        RowData data = new RowData();
        data.exclude = true;
        debugControl.setLayoutData(data);
        debugControl.setVisible(false);

        // Show the connect to debugger button if the application is
        // running
        // in debug mode but no debugger is connected
        DebugModeType modeType = getDeployedAppDebugMode();
        if (modeType != null
            && !CloudFoundryProperties.isConnectedToDebugger.testProperty(new IModule[] { module },
                cloudServer)) {
          data = new RowData();
          data.exclude = false;
          connectToDebugger.setLayoutData(data);
          connectToDebugger.setVisible(true);
        }
        else {
          data = new RowData();
          data.exclude = true;
          connectToDebugger.setLayoutData(data);
          connectToDebugger.setVisible(false);
        }
      }
View Full Code Here

    }

    // Show/hide action buttons based on server state
    if (state == IServer.STATE_STOPPED || state == IServer.STATE_UNKNOWN) {

      RowData data = new RowData();
      data.exclude = false;
      startAppButton.setLayoutData(data);
      startAppButton.setVisible(true);

      data = new RowData();
      data.exclude = true;
      restartAppButton.setCompositeLayoutData(data);
      restartAppButton.setVisible(false);

      data = new RowData();
      data.exclude = true;
      stopAppButton.setLayoutData(data);
      stopAppButton.setVisible(false);

    }
    else {

      RowData data = new RowData();
      data.exclude = true;
      startAppButton.setLayoutData(data);
      startAppButton.setVisible(false);

      data = new RowData();
      data.exclude = false;
      restartAppButton.setCompositeLayoutData(data);
      restartAppButton.setVisible(true);

      data = new RowData();
      data.exclude = false;
      stopAppButton.setLayoutData(data);
      stopAppButton.setVisible(true);
    }

    // handle the update and restart button
    // Do not show the update button if there is not accessible
    // module project in the workspace, as no source update would be
    // possible within Eclipse
    if (state == IServer.STATE_STOPPED
        || state == IServer.STATE_UNKNOWN
        || !CloudFoundryProperties.isModuleProjectAccessible
            .testProperty(new IModule[] { module }, cloudServer)) {
      RowData data = new RowData();
      data.exclude = true;
      updateRestartAppButton.setCompositeLayoutData(data);
      updateRestartAppButton.setVisible(false);
    }
    else {
      RowData data = new RowData();
      data.exclude = false;
      updateRestartAppButton.setCompositeLayoutData(data);
      updateRestartAppButton.setVisible(true);
    }
View Full Code Here

      }
    });

    // If debugging is not supported, permanently hide the debug buttons
    if (!isDebugAllowed()) {
      RowData data = new RowData();
      data.exclude = true;
      debugControl.setLayoutData(data);
      debugControl.setVisible(false);

      data = new RowData();
      data.exclude = true;
      connectToDebugger.setLayoutData(data);
      connectToDebugger.setVisible(false);

      buttonComposite.layout(true, true);
View Full Code Here

        });

        // Text field
        traceIndexField = new Text(buttonsPanel, SWT.SINGLE | SWT.BORDER);
        traceIndexField.setToolTipText("Select index of first trace event to display");
        traceIndexField.setLayoutData(new RowData(60, SWT.DEFAULT));
        traceIndexField.addListener(SWT.Modify, new Listener() {

            @Override
            public void handleEvent(final Event event) {
                try {
                    correctInput = false;
                    final Long value = new Long(traceIndexField.getText());

                    if (value >= 1
                            && value <= TraceBackend.getInstance().getActiveResultSet()
                                    .getSize()) {
                        index = value;
                        showButton.setEnabled(nextButton.isEnabled()
                                || previousButton.isEnabled());
                        correctInput = true;
                    } else {
                        showButton.setEnabled(false);
                    }
                } catch (final Exception e) {
                    showButton.setEnabled(false);
                }
            }
        });
        traceIndexField.addKeyListener(new KeyListener() {

            @Override
            public void keyReleased(final KeyEvent e) {
                if (e.keyCode == SWT.CR && correctInput) {
                    doSelection();
                }
            }

            @Override
            public void keyPressed(final KeyEvent e) {
            }
        });

        // label
        label = new Label(buttonsPanel, SWT.NONE);
        label.setLayoutData(new RowData(200, SWT.DEFAULT));

        updateButtonsPanel();
    }
View Full Code Here

        final Button loadConfigButton = new Button(container, SWT.PUSH | SWT.CENTER);
        final Button deleteConfigButton = new Button(container, SWT.PUSH | SWT.CENTER);
        final Button saveConfigButton = new Button(container, SWT.PUSH | SWT.CENTER);
        final Button saveAsConfigButton = new Button(container, SWT.PUSH | SWT.CENTER);
        final Label configNameLabel = new Label(container, SWT.NULL);
        configNameLabel.setLayoutData(new RowData(120, SWT.DEFAULT));

        // "Load patterns" button
        loadConfigButton.setToolTipText("Load pattern set...");
        loadConfigButton.setImage(PlatformUI.getWorkbench().getSharedImages()
                .getImage(ISharedImages.IMG_OBJ_FOLDER));
View Full Code Here

TOP

Related Classes of org.eclipse.swt.layout.RowData

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.