Example usage for org.eclipse.swt.widgets Button Button

List of usage examples for org.eclipse.swt.widgets Button Button

Introduction

In this page you can find the example usage for org.eclipse.swt.widgets Button Button.

Prototype


public Button(Composite parent, int style) 

Source Link

Document

Constructs a new instance of this class given its parent and a style value describing its behavior and appearance.

Usage

From source file:au.gov.ansto.bragg.kowari.ui.views.AnalysisControlView.java

@Override
public void createPartControl(Composite composite) {
    super.createPartControl(composite);
    defaultParametersButton.dispose();/*from w  w  w.j av a 2 s  .  c o m*/
    revertParametersButton.dispose();
    configurationButton.dispose();
    applyParametersButton.setText("Apply");
    GridData data = new GridData();
    data = new GridData();
    data.horizontalAlignment = GridData.FILL;
    data.grabExcessHorizontalSpace = true;
    applyParametersButton.setLayoutData(data);
    generateReportButton = new Button(parameterGroupButtonsComposite, SWT.PUSH);
    data = new GridData();
    data.horizontalAlignment = GridData.FILL;
    data.grabExcessHorizontalSpace = true;
    generateReportButton.setLayoutData(data);
    generateReportButton.setText("Report");
    generateReportButton.setToolTipText("Generate the analysis report");
    generateReportButton.setImage(
            Activator.imageDescriptorFromPlugin(Activator.PLUGIN_ID, "icons/report16x16.png").createImage());
    parametersComposite.layout(parameterGroupButtonsComposite.getChildren());

    initReportListener();
    //      parameterGroupButtonsComposite.layout();
    //      parameterGroupButtonsComposite.update();
    //      parameterGroupButtonsComposite.redraw();
    //      parameterGroupButtonsComposite.getParent().update();
    //      parameterGroupButtonsComposite.getParent().redraw();
    AlgorithmTask task = getAlgorithmTask();
    final Operation operation = task.getOperationManager(0).getOperation(NAVIGATION_PROCESSOR_NAME);
    final Tuner isInLoopTuner = ((ProcessorAgent) operation.getAgent()).getTuner(IS_IN_LOOP_TUNER_NAME);
    final OperationParameter parameter = operation.getOperationParameter(SCAN_VARIABLE_NAME);
    final Operation plotOperation = task.getOperationManager(0).getOperation(ONEDPLOT_PROCESSOR_NAME);
    final Operation geometryOperation = task.getOperationManager(0)
            .getOperation(CORRECTED_HISTOGRAM_PROCESSOR_NAME);
    final Operation integrationOperation = task.getOperationManager(0).getOperation(INTEGRATION_PROCESSOR_NAME);

    generateReportButton.addSelectionListener(new SelectionListener() {

        public void widgetDefaultSelected(SelectionEvent arg0) {
        }

        public void widgetSelected(SelectionEvent arg0) {
            IGroup result = plotOperation.getOutputData();
            if (result == null) {
                MessageDialog.openError(getSite().getShell(), "Report Error",
                        "There is no result data available");
            }
            Plot algorithmResult = (Plot) result;
            String filename = Util.selectDirectoryFromShell(getSite().getShell());
            if (filename == null || filename.trim().length() == 0)
                return;
            URI targetFolderURI = null;
            try {
                targetFolderURI = ConverterLib.path2URI(filename);
            } catch (FileAccessException e) {
                Util.handleException(getSite().getShell(), new FileAccessException("Illegal folder path"));
            }
            exportReport(targetFolderURI, algorithmResult);
        }
    });
    //      final IPointLocatorListener mouseListener = new IPointLocatorListener(){
    //
    //         public void locationUpdated(double x, double y, double val) {
    //            List<OperationParameterEditor> editors = parameterEditorsMap.get(operation.getName());
    //            for (OperationParameterEditor editor : editors){
    //               if (editor.getOperationParameter() == parameter){
    ////                  parameter.setValue(new Double(x));
    ////                  editor.loadData();
    //                  if (editor instanceof OptionOperationParameterEditor)
    //                     ((OptionOperationParameterEditor) editor).setSelection(new Double(x));
    //               }
    //            }
    //            
    //            applyParameters();
    //         }
    //      };

    //      final KurandaMouseListener doubleClickListener = new KurandaMouseListener(){
    //
    //         public void mouseDoubleClick(EventData eventData) {
    //            List<OperationParameterEditor> editors = parameterEditorsMap.get(operation.getName());
    //            for (OperationParameterEditor editor : editors){
    //               if (editor.getOperationParameter() == parameter){
    ////                  parameter.setValue(new Double(x));
    ////                  editor.loadData();
    //                  if (editor instanceof OptionOperationParameterEditor)
    //                     ((OptionOperationParameterEditor) editor).setSelection(
    //                           new Position(String.valueOf(eventData.getX())));
    //               }
    //            }
    //            
    //            applyParameters();            
    //         }
    //
    //         public void mouseDown(EventData eventData) {
    //            
    //         }
    //
    //         public void mouseUp(EventData eventData) {
    //            
    //         }
    //         
    //      };

    final ChartMouseListener chartMouseListener = new ChartMouseListener() {

        @Override
        public void chartMouseMoved(ChartMouseEvent event) {
            // TODO Auto-generated method stub
        }

        @Override
        public void chartMouseClicked(ChartMouseEvent event) {
            if (event instanceof XYChartMouseEvent) {
                List<OperationParameterEditor> editors = parameterEditorsMap.get(operation.getName());
                for (OperationParameterEditor editor : editors) {
                    if (editor.getOperationParameter() == parameter) {
                        if (editor instanceof OptionOperationParameterEditor) {
                            ((OptionOperationParameterEditor) editor).setSelection(
                                    new Position(String.valueOf(((XYChartMouseEvent) event).getX())));
                            applyParameters();
                        }
                    }
                }
            }
        }
    };

    PlotManager.addOpenNewPlotListener(new PlotManager.OpenNewPlotListener() {

        public void newPlotOpened(au.gov.ansto.bragg.kakadu.ui.plot.Plot plot) {
            if (plot.getOperaton() == plotOperation)
                //               plot.getCurrentPlotWidget().addPointLocatorListener(mouseListener);
                plot.getCurrentPlotWidget().addChartMouseListener(chartMouseListener);
        }
    });

    final IMaskEventListener maskEventListener = new IMaskEventListener() {

        @Override
        public void maskAdded(AbstractMask mask) {
            runDelayedTask();
        }

        @Override
        public void maskRemoved(AbstractMask mask) {
            runDelayedTask();
        }

        @Override
        public void maskUpdated(AbstractMask mask) {
            runDelayedTask();
        }

    };

    PlotManager.addOpenNewPlotListener(new PlotManager.OpenNewPlotListener() {

        public void newPlotOpened(au.gov.ansto.bragg.kakadu.ui.plot.Plot plot) {
            if (plot.getOperaton() == geometryOperation)
                plot.getCurrentPlotWidget().addMaskEventListener(maskEventListener);
        }
    });

    final TunerPortListener applyToAllListener = new TunerPortListener(isInLoopTuner) {

        @Override
        public void updateUIMax(Object max) {
        }

        @Override
        public void updateUIMin(Object min) {
        }

        @Override
        public void updateUIOptions(List<?> options) {
        }

        @Override
        public void updateUIValue(Object newData) {
            if (newData instanceof Boolean) {
                DisplayManager.getDefault().setEnable(!(Boolean) newData);
                System.err.println("Display manager " + (!(Boolean) newData ? "enabled" : "disabled"));
                //               geometryOperation.setOperationDataListenerEnabled(!(Boolean) newData);
                //               integrationOperation.setOperationDataListenerEnabled(!(Boolean) newData);
                //               plotOperation.setOperationDataListenerEnabled(!(Boolean) newData);
            }
        }

    };
    isInLoopTuner.addVarPortListener(applyToAllListener);
}

From source file:tools.descartes.bungee.viewer.DemandView.java

@Override
public void createPartControl(final Composite parent) {
    Composite composite = new Composite(parent, SWT.NONE);
    Composite chartParent = new Composite(composite, SWT.NONE);
    GridData gridData = new GridData();
    gridData.verticalAlignment = GridData.FILL;
    gridData.grabExcessVerticalSpace = true;
    gridData.horizontalAlignment = GridData.FILL;
    gridData.grabExcessHorizontalSpace = true;
    chartParent.setLayoutData(gridData);
    showIntensityButton = new Button(composite, SWT.CHECK);
    showIntensityButton.setText("Show Intensity");
    showIntensityButton.addListener(SWT.Selection, new Listener() {
        public void handleEvent(Event e) {
            switch (e.type) {
            case SWT.Selection:
                redrawChart();//from   w ww  .j  a v a  2  s .  c om
                break;
            }
        }
    });
    doCalibrationButton = new Button(composite, SWT.CHECK);
    doCalibrationButton.setText("Do Calibration");
    doCalibrationButton.setSelection(true);
    doCalibrationButton.addListener(SWT.Selection, new Listener() {
        public void handleEvent(Event e) {
            switch (e.type) {
            case SWT.Selection:
                redrawChart();
                break;
            }
        }
    });
    getSite().getWorkbenchWindow().getSelectionService().addSelectionListener(listener);
    composite.setLayout(new GridLayout());
    chartParent.setLayout(new FillLayout());
    this.parent = chartParent;
}

From source file:BorderLayout.java

public BorderLayoutSample() {
    shell.setLayout(new BorderLayout());

    Button buttonWest = new Button(shell, SWT.PUSH);
    buttonWest.setText("West");
    buttonWest.setLayoutData(new BorderLayout.BorderData(BorderLayout.WEST));

    Button buttonEast = new Button(shell, SWT.PUSH);
    buttonEast.setText("East");
    buttonEast.setLayoutData(new BorderLayout.BorderData(BorderLayout.EAST));

    Button buttonNorth = new Button(shell, SWT.PUSH);
    buttonNorth.setText("North");
    buttonNorth.setLayoutData(new BorderLayout.BorderData(BorderLayout.NORTH));

    Button buttonSouth = new Button(shell, SWT.PUSH);
    buttonSouth.setText("South");
    buttonSouth.setLayoutData(new BorderLayout.BorderData(BorderLayout.SOUTH));

    Text text = new Text(shell, SWT.MULTI | SWT.BORDER | SWT.V_SCROLL | SWT.H_SCROLL);
    text.setText("Center");
    text.setLayoutData(new BorderLayout.BorderData(BorderLayout.CENTER));

    shell.pack();/*from w ww .j a  v a  2 s .  co m*/
    shell.open();
    //textUser.forceFocus();

    // Set up the event loop.
    while (!shell.isDisposed()) {
        if (!display.readAndDispatch()) {
            // If no more entries in event queue
            display.sleep();
        }
    }

    display.dispose();
}

From source file:ClipboardExample.java

void createTextTransfer(Composite copyParent, Composite pasteParent) {

    // TextTransfer
    Label l = new Label(copyParent, SWT.NONE);
    l.setText("TextTransfer:"); //$NON-NLS-1$
    copyText = new Text(copyParent, SWT.MULTI | SWT.BORDER | SWT.V_SCROLL | SWT.H_SCROLL);
    copyText.setText("some\nplain\ntext");
    GridData data = new GridData(GridData.FILL_HORIZONTAL);
    data.heightHint = data.widthHint = SIZE;
    copyText.setLayoutData(data);/*from   ww w .j av  a  2 s  .  c o m*/
    Button b = new Button(copyParent, SWT.PUSH);
    b.setText("Copy");
    b.addSelectionListener(new SelectionAdapter() {
        public void widgetSelected(SelectionEvent e) {
            String data = copyText.getText();
            if (data.length() > 0) {
                status.setText("");
                clipboard.setContents(new Object[] { data }, new Transfer[] { TextTransfer.getInstance() });
            } else {
                status.setText("nothing to copy");
            }
        }
    });

    l = new Label(pasteParent, SWT.NONE);
    l.setText("TextTransfer:"); //$NON-NLS-1$
    pasteText = new Text(pasteParent, SWT.READ_ONLY | SWT.MULTI | SWT.BORDER | SWT.V_SCROLL | SWT.H_SCROLL);
    data = new GridData(GridData.FILL_HORIZONTAL);
    data.heightHint = data.widthHint = SIZE;
    pasteText.setLayoutData(data);
    b = new Button(pasteParent, SWT.PUSH);
    b.setText("Paste");
    b.addSelectionListener(new SelectionAdapter() {
        public void widgetSelected(SelectionEvent e) {
            String data = (String) clipboard.getContents(TextTransfer.getInstance());
            if (data != null && data.length() > 0) {
                status.setText("");
                pasteText.setText("begin paste>" + data + "<end paste");
            } else {
                status.setText("nothing to paste");
            }
        }
    });
}

From source file:org.eclipse.swt.examples.controlexample.SashTab.java

/**
 * Creates the "Style" group.//  w  ww .  ja v a  2  s.co m
 */
@Override
void createStyleGroup() {
    super.createStyleGroup();

    /* Create the extra widgets */
    smoothButton = new Button(styleGroup, SWT.CHECK);
    smoothButton.setText("SWT.SMOOTH");
}

From source file:eu.stratosphere.addons.visualization.swt.SWTVertexToolTip.java

public SWTVertexToolTip(Shell parent, final SWTToolTipCommandReceiver commandReceiver,
        ManagementVertex managementVertex, int x, int y) {
    super(parent, x, y);

    this.managementVertex = managementVertex;

    final VertexVisualizationData vertexVisualizationData = (VertexVisualizationData) managementVertex
            .getAttachment();/*from w  ww.ja  v a 2 s.c  o  m*/

    int height;

    final Color backgroundColor = getShell().getBackground();
    final Color foregroundColor = getShell().getForeground();

    // Set the title
    final String taskName = managementVertex.getName() + " (" + (managementVertex.getIndexInGroup() + 1)
            + " of " + managementVertex.getNumberOfVerticesInGroup() + ")";
    setTitle(taskName);

    // Only create chart if profiling is enabled
    if (vertexVisualizationData.isProfilingEnabledForJob()) {
        this.threadChart = createThreadChart(vertexVisualizationData, backgroundColor);
        this.threadChart.setLayoutData(new GridData(GridData.FILL_BOTH));
        height = 240; // should be 265 when cancel button is enabled
    } else {
        this.threadChart = null;
        height = 125;
    }

    final Composite tableComposite = new Composite(getShell(), SWT.NONE);
    tableComposite.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
    tableComposite.setBackground(backgroundColor);
    tableComposite.setForeground(foregroundColor);
    final GridLayout tableGridLayout = new GridLayout(3, false);
    tableGridLayout.marginHeight = 0;
    tableGridLayout.marginLeft = 0;
    tableComposite.setLayout(tableGridLayout);

    final GridData gridData1 = new GridData();
    gridData1.horizontalSpan = 2;
    gridData1.grabExcessHorizontalSpace = true;
    gridData1.widthHint = 200;

    final GridData gridData2 = new GridData();
    gridData2.grabExcessHorizontalSpace = true;

    // Instance type
    final Label instanceTypeTextLabel = new Label(tableComposite, SWT.NONE);
    instanceTypeTextLabel.setBackground(backgroundColor);
    instanceTypeTextLabel.setForeground(foregroundColor);
    instanceTypeTextLabel.setText("Instance type:");

    this.instanceTypeLabel = new Label(tableComposite, SWT.NONE);
    this.instanceTypeLabel.setBackground(backgroundColor);
    this.instanceTypeLabel.setForeground(foregroundColor);
    this.instanceTypeLabel.setText(this.managementVertex.getInstanceType());
    this.instanceTypeLabel.setLayoutData(gridData1);

    // Instance ID
    final Label instanceIDTextLabel = new Label(tableComposite, SWT.NONE);
    instanceIDTextLabel.setBackground(backgroundColor);
    instanceIDTextLabel.setForeground(foregroundColor);
    instanceIDTextLabel.setText("Instance ID:");

    this.instanceIDLabel = new Label(tableComposite, SWT.NONE);
    this.instanceIDLabel.setBackground(backgroundColor);
    this.instanceIDLabel.setForeground(foregroundColor);
    this.instanceIDLabel.setText(this.managementVertex.getInstanceName());
    this.instanceIDLabel.setLayoutData(gridData2);

    final Button switchToInstanceButton = new Button(tableComposite, SWT.PUSH);
    switchToInstanceButton.setText("Switch to instance...");
    switchToInstanceButton.setEnabled(vertexVisualizationData.isProfilingEnabledForJob());
    switchToInstanceButton.setVisible(false);

    /*
     * final String instanceName = this.managementVertex.getInstanceName();
     * switchToInstanceButton.addListener(SWT.Selection, new Listener() {
     * @Override
     * public void handleEvent(Event arg0) {
     * commandReceiver.switchToInstance(instanceName);
     * }
     * });
     */

    // Execution state
    final Label executionStateTextLabel = new Label(tableComposite, SWT.NONE);
    executionStateTextLabel.setBackground(backgroundColor);
    executionStateTextLabel.setForeground(foregroundColor);
    executionStateTextLabel.setText("Execution state:");

    this.executionStateLabel = new Label(tableComposite, SWT.NONE);
    this.executionStateLabel.setBackground(backgroundColor);
    this.executionStateLabel.setForeground(foregroundColor);
    this.executionStateLabel.setText(this.managementVertex.getExecutionState().toString());
    this.executionStateLabel.setLayoutData(gridData1);

    final ManagementGroupVertex groupVertex = this.managementVertex.getGroupVertex();
    final GroupVertexVisualizationData groupVertexVisualizationData = (GroupVertexVisualizationData) groupVertex
            .getAttachment();
    if (groupVertexVisualizationData.isCPUBottleneck()) {
        this.warningComposite = createWarningComposite(WARNINGTEXT, SWT.ICON_WARNING);
        height += ICONSIZE;
    } else {
        this.warningComposite = null;
    }

    // Available task actions
    final Composite taskActionComposite = new Composite(getShell(), SWT.NONE);
    taskActionComposite.setLayout(new RowLayout(SWT.HORIZONTAL));
    taskActionComposite.setBackground(backgroundColor);
    taskActionComposite.setForeground(foregroundColor);

    /*
     * final Button cancelTaskButton = new Button(taskActionComposite, SWT.PUSH);
     * final ManagementVertexID vertexID = this.managementVertex.getID();
     * cancelTaskButton.setText("Cancel task");
     * cancelTaskButton.setEnabled(this.managementVertex.getExecutionState() == ExecutionState.RUNNING);
     * cancelTaskButton.addListener(SWT.Selection, new Listener() {
     * @Override
     * public void handleEvent(Event arg0) {
     * commandReceiver.cancelTask(vertexID, taskName);
     * }
     * });
     */

    getShell().setSize(WIDTH, height);

    finishInstantiation(x, y, WIDTH, false);
}

From source file:BackupFiles.java

/**
 * Helper method to create the label/text/button for a directory
 * // w  w  w. ja va 2s. com
 * @param composite
 *            the parent composite
 * @param label
 *            the text for the label
 * @return Text
 */
private Text createFilePanelHelper(Composite composite, String label) {
    // Create the composite to hold the controls
    Composite panel = new Composite(composite, SWT.BORDER);
    panel.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
    panel.setLayout(new GridLayout(3, false));

    // Create the controls
    new Label(panel, SWT.LEFT).setText(label);
    Text text = new Text(panel, SWT.BORDER);
    text.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
    Button browse = new Button(panel, SWT.PUSH);

    // Add browsing
    browse.setText("...");
    browse.addSelectionListener(new DirectoryBrowser(text));

    // Return the Text that holds the directory
    return text;
}

From source file:DNDExample.java

private void createDragOperations(Composite parent) {
    parent.setLayout(new RowLayout(SWT.VERTICAL));
    final Button moveButton = new Button(parent, SWT.CHECK);
    moveButton.setText("DND.DROP_MOVE");
    moveButton.setSelection(true);//from ww  w . j  a  va  2s.c  om
    dragOperation = DND.DROP_MOVE;
    moveButton.addSelectionListener(new SelectionAdapter() {
        public void widgetSelected(SelectionEvent e) {
            Button b = (Button) e.widget;
            if (b.getSelection()) {
                dragOperation |= DND.DROP_MOVE;
            } else {
                dragOperation = dragOperation & ~DND.DROP_MOVE;
                if (dragOperation == 0) {
                    dragOperation = DND.DROP_MOVE;
                    moveButton.setSelection(true);
                }
            }
            if (dragEnabled) {
                createDragSource();
            }
        }
    });

    Button b = new Button(parent, SWT.CHECK);
    b.setText("DND.DROP_COPY");
    b.addSelectionListener(new SelectionAdapter() {
        public void widgetSelected(SelectionEvent e) {
            Button b = (Button) e.widget;
            if (b.getSelection()) {
                dragOperation |= DND.DROP_COPY;
            } else {
                dragOperation = dragOperation & ~DND.DROP_COPY;
                if (dragOperation == 0) {
                    dragOperation = DND.DROP_MOVE;
                    moveButton.setSelection(true);
                }
            }
            if (dragEnabled) {
                createDragSource();
            }
        }
    });

    b = new Button(parent, SWT.CHECK);
    b.setText("DND.DROP_LINK");
    b.addSelectionListener(new SelectionAdapter() {
        public void widgetSelected(SelectionEvent e) {
            Button b = (Button) e.widget;
            if (b.getSelection()) {
                dragOperation |= DND.DROP_LINK;
            } else {
                dragOperation = dragOperation & ~DND.DROP_LINK;
                if (dragOperation == 0) {
                    dragOperation = DND.DROP_MOVE;
                    moveButton.setSelection(true);
                }
            }
            if (dragEnabled) {
                createDragSource();
            }
        }
    });
}

From source file:eu.stratosphere.nephele.visualization.swt.SWTVertexToolTip.java

public SWTVertexToolTip(Shell parent, final SWTToolTipCommandReceiver commandReceiver,
        ManagementVertex managementVertex, int x, int y) {
    super(parent, x, y);

    this.managementVertex = managementVertex;

    final VertexVisualizationData vertexVisualizationData = (VertexVisualizationData) managementVertex
            .getAttachment();//w  w w . j ava  2s . c  o m

    int height;

    final Color backgroundColor = getShell().getBackground();
    final Color foregroundColor = getShell().getForeground();

    // Set the title
    final String taskName = managementVertex.getName() + " (" + (managementVertex.getIndexInGroup() + 1)
            + " of " + managementVertex.getNumberOfVerticesInGroup() + ")";
    setTitle(taskName);

    // Only create chart if profiling is enabled
    if (vertexVisualizationData.isProfilingEnabledForJob()) {
        this.threadChart = createThreadChart(vertexVisualizationData, backgroundColor);
        this.threadChart.setLayoutData(new GridData(GridData.FILL_BOTH));
        height = 240; // should be 265 when cancel button is enabled
    } else {
        this.threadChart = null;
        height = 125;
    }

    final Composite tableComposite = new Composite(getShell(), SWT.NONE);
    tableComposite.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
    tableComposite.setBackground(backgroundColor);
    tableComposite.setForeground(foregroundColor);
    final GridLayout tableGridLayout = new GridLayout(3, false);
    tableGridLayout.marginHeight = 0;
    tableGridLayout.marginLeft = 0;
    tableComposite.setLayout(tableGridLayout);

    final GridData gridData1 = new GridData();
    gridData1.horizontalSpan = 2;
    gridData1.grabExcessHorizontalSpace = true;
    gridData1.widthHint = 200;

    final GridData gridData2 = new GridData();
    gridData2.grabExcessHorizontalSpace = true;

    // Instance type
    final Label instanceTypeTextLabel = new Label(tableComposite, SWT.NONE);
    instanceTypeTextLabel.setBackground(backgroundColor);
    instanceTypeTextLabel.setForeground(foregroundColor);
    instanceTypeTextLabel.setText("Instance type:");

    this.instanceTypeLabel = new Label(tableComposite, SWT.NONE);
    this.instanceTypeLabel.setBackground(backgroundColor);
    this.instanceTypeLabel.setForeground(foregroundColor);
    this.instanceTypeLabel.setText(this.managementVertex.getInstanceType());
    this.instanceTypeLabel.setLayoutData(gridData1);

    // Instance ID
    final Label instanceIDTextLabel = new Label(tableComposite, SWT.NONE);
    instanceIDTextLabel.setBackground(backgroundColor);
    instanceIDTextLabel.setForeground(foregroundColor);
    instanceIDTextLabel.setText("Instance ID:");

    this.instanceIDLabel = new Label(tableComposite, SWT.NONE);
    this.instanceIDLabel.setBackground(backgroundColor);
    this.instanceIDLabel.setForeground(foregroundColor);
    this.instanceIDLabel.setText(this.managementVertex.getInstanceName());
    this.instanceIDLabel.setLayoutData(gridData2);

    final Button switchToInstanceButton = new Button(tableComposite, SWT.PUSH);
    switchToInstanceButton.setText("Switch to instance...");
    switchToInstanceButton.setEnabled(vertexVisualizationData.isProfilingEnabledForJob());
    switchToInstanceButton.setVisible(false);

    /*
     * final String instanceName = this.managementVertex.getInstanceName();
     * switchToInstanceButton.addListener(SWT.Selection, new Listener() {
     * @Override
     * public void handleEvent(Event arg0) {
     * commandReceiver.switchToInstance(instanceName);
     * }
     * });
     */

    // Execution state
    final Label executionStateTextLabel = new Label(tableComposite, SWT.NONE);
    executionStateTextLabel.setBackground(backgroundColor);
    executionStateTextLabel.setForeground(foregroundColor);
    executionStateTextLabel.setText("Execution state:");

    this.executionStateLabel = new Label(tableComposite, SWT.NONE);
    this.executionStateLabel.setBackground(backgroundColor);
    this.executionStateLabel.setForeground(foregroundColor);
    this.executionStateLabel.setText(this.managementVertex.getExecutionState().toString());
    this.executionStateLabel.setLayoutData(gridData1);

    // Checkpoint state
    final Label checkpointStateTextLabel = new Label(tableComposite, SWT.NONE);
    checkpointStateTextLabel.setBackground(backgroundColor);
    checkpointStateTextLabel.setForeground(foregroundColor);
    checkpointStateTextLabel.setText("Checkpoint state:");

    this.checkpointStateLabel = new Label(tableComposite, SWT.NONE);
    this.checkpointStateLabel.setBackground(backgroundColor);
    this.checkpointStateLabel.setForeground(foregroundColor);
    this.checkpointStateLabel.setText(this.managementVertex.getCheckpointState().toString());
    this.checkpointStateLabel.setLayoutData(gridData1);

    final ManagementGroupVertex groupVertex = this.managementVertex.getGroupVertex();
    final GroupVertexVisualizationData groupVertexVisualizationData = (GroupVertexVisualizationData) groupVertex
            .getAttachment();
    if (groupVertexVisualizationData.isCPUBottleneck()) {
        this.warningComposite = createWarningComposite(WARNINGTEXT, SWT.ICON_WARNING);
        height += ICONSIZE;
    } else {
        this.warningComposite = null;
    }

    // Available task actions
    final Composite taskActionComposite = new Composite(getShell(), SWT.NONE);
    taskActionComposite.setLayout(new RowLayout(SWT.HORIZONTAL));
    taskActionComposite.setBackground(backgroundColor);
    taskActionComposite.setForeground(foregroundColor);

    /*
     * final Button cancelTaskButton = new Button(taskActionComposite, SWT.PUSH);
     * final ManagementVertexID vertexID = this.managementVertex.getID();
     * cancelTaskButton.setText("Cancel task");
     * cancelTaskButton.setEnabled(this.managementVertex.getExecutionState() == ExecutionState.RUNNING);
     * cancelTaskButton.addListener(SWT.Selection, new Listener() {
     * @Override
     * public void handleEvent(Event arg0) {
     * commandReceiver.cancelTask(vertexID, taskName);
     * }
     * });
     */

    getShell().setSize(WIDTH, height);

    finishInstantiation(x, y, WIDTH, false);
}