Package org.eclipse.swt.custom

Examples of org.eclipse.swt.custom.CLabel


     * Builds a default CLabel
     * @param title The text for the label to contain
     * @return The created CLabel
     */
    protected CLabel getDefaultCLabel(String title) {
        CLabel label = new CLabel(this, SWT.RIGHT);
        label.setText(title);
        return label;
    }
View Full Code Here


    Composite composite = new Composite(sash,SWT.NULL);
    GridLayout layout = new GridLayout();
    layout.marginHeight      = 0;
    layout.marginWidth       = 0;
    composite.setLayout(layout);
    CLabel label = new CLabel(composite,SWT.NULL);
    label.setText(HTMLPlugin.getResourceString("ImageView.Preview"));
    label.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
    canvas = new ScaleableImageCanvas(composite,SWT.BORDER);
    canvas.setLayoutData(new GridData(GridData.FILL_BOTH));
  }
View Full Code Here

    applyDialogFont(composite);
    // initialize the dialog units
    initializeDialogUnits(composite);
    // create the dialog area and button bar
    dialogArea = createDialogArea(composite);
    errorLabel = new CLabel(composite, SWT.NULL);
    errorLabel.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
    buttonBar = createButtonBar(composite);
   
    validate();
   
View Full Code Here

    }
    gc.dispose();

    int minHeight = typicalHeight * lines.length;

    CLabel imgLabel = new CLabel(inner, SWT.NONE);
    imgLabel.setLayoutData(new GridData(GridData.VERTICAL_ALIGN_BEGINNING | GridData.HORIZONTAL_ALIGN_BEGINNING));
    imgLabel.setImage(_informationImage);

    CLabel titleLabel = new CLabel(inner, SWT.NONE);
    titleLabel.setLayoutData(new GridData(GridData.FILL_HORIZONTAL | GridData.VERTICAL_ALIGN_CENTER));
    titleLabel.setText(Constants.APP_NAME);
    titleLabel.setForeground(_titleFgColor);
    Font f = titleLabel.getFont();
    FontData fd = f.getFontData()[0];
    fd.setStyle(SWT.BOLD);
    _titleFont = new Font(null, fd);
    titleLabel.setFont(_titleFont);

    Label text = new Label(inner, SWT.WRAP);
    GridData gd = new GridData(GridData.FILL_BOTH);
    gd.horizontalSpan = 2;
    //gd.horizontalAlignment = SWT.CENTER;
View Full Code Here

    }
    gc.dispose();

    int minHeight = typicalHeight * lines.length;

    CLabel imgLabel = new CLabel(inner, SWT.NONE);
    imgLabel.setLayoutData(new GridData(GridData.VERTICAL_ALIGN_BEGINNING | GridData.HORIZONTAL_ALIGN_BEGINNING));
    imgLabel.setImage(_informationImage);

    CLabel titleLabel = new CLabel(inner, SWT.NONE);
    titleLabel.setLayoutData(new GridData(GridData.FILL_HORIZONTAL | GridData.VERTICAL_ALIGN_CENTER));
    titleLabel.setText(Constants.APP_NAME);
    titleLabel.setForeground(_titleFgColor);
    Font f = titleLabel.getFont();
    FontData fd = f.getFontData()[0];
    fd.setStyle(SWT.BOLD);
    _titleFont = new Font(null, fd);
    titleLabel.setFont(_titleFont);

    Label text = new Label(inner, SWT.NONE);
    GridData gd = new GridData(GridData.FILL_BOTH);
    gd.horizontalSpan = 2;
    text.setLayoutData(gd);
View Full Code Here

   
    Composite cont = factory.createComposite(parent, SWT.NO_FOCUS);
    GridLayout layout = new GridLayout(1, false);
    cont.setLayout(layout);

    CLabel lbl =
      factory.createCLabel(cont, PDPlugin.getResourceString("QuickEditTab.no_quick_edit_md"));//$NON-NLS-1$
    lbl.setLayoutData(new GridData());   
  }
View Full Code Here

        super(parent, style);

        SarosPluginContext.initComponent(this);

        this.setLayout(LayoutUtils.createGridLayout(1, false, 10, 3, 0, 0));
        stateLabel = new CLabel(this, SWT.NONE);
        stateLabel.setLayoutData(LayoutUtils.createFillHGrabGridData());
        FontUtils.makeBold(stateLabel);

        updateLabel(saros.getSarosNet().getConnectionState());
        this.stateLabel.setForeground(getDisplay().getSystemColor(
View Full Code Here

     *
     * @param parent the parent <code>Composite</code>.
     * @since 3.0
     */
    private void createImage(Composite parent) {
        descImageCanvas = new CLabel(parent, SWT.NONE);
        GridData data = new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING
                | GridData.VERTICAL_ALIGN_BEGINNING);
        data.widthHint = 0;
        data.heightHint = 0;
        descImageCanvas.setLayoutData(data);
View Full Code Here

    solutionTableStack = new Composite(composite, SWT.NONE);
    solutionTableStack.setLayout(solutionTableStackLayout);
    solutionTableStack.setLayoutData(tableGridLayout);

    CLabel solutionTablesLabel = new CLabel(composite, SWT.SHADOW_ETCHED_IN);
    solutionTablesLabel.setBackground(labelColor, new int[] { 100 });
    solutionTablesLabel.setFont(new Font(null, "Tahoma", 8, SWT.BOLD));
    solutionTablesLabel.setText("Solution tables");
    solutionTablesLabel.setLayoutData(new GridData(SWT.FILL, SWT.BEGINNING, true, false, 1, 1));
   
    solutionFileList = new List(composite, SWT.BORDER | SWT.SIMPLE | SWT.H_SCROLL | SWT.V_SCROLL);
    solutionFileList.setToolTipText("Select which table you want to see");
    GridData fileListLayoutData = new GridData(SWT.FILL, SWT.BEGINNING, true, true, 1, 1);
    solutionFileList.setLayoutData(fileListLayoutData);
View Full Code Here

    sourceTableStack = new Composite(composite, SWT.NONE);
    sourceTableStack.setLayout(sourceTableStackLayout);
    sourceTableStack.setLayoutData(tableGridLayout);
   
    CLabel sourceTablesLabel = new CLabel(composite, SWT.SHADOW_ETCHED_IN);
    sourceTablesLabel.setBackground(labelColor, new int[] { 100 });
    sourceTablesLabel.setFont(new Font(null, "Tahoma", 8, SWT.BOLD));
    sourceTablesLabel.setText("Source tables");
    sourceTablesLabel.setLayoutData(new GridData(SWT.FILL, SWT.BEGINNING, false, false, 1, 1));

    sourceFileList = new List(composite, SWT.BORDER | SWT.SIMPLE | SWT.H_SCROLL | SWT.V_SCROLL);
    sourceFileList.setToolTipText("Select which table you want to edit");
    sourceFileList.setLayoutData(fileListLayoutData);
    sourceFileList.addSelectionListener(sourceFileListSelectionListener);
    sourceFileList.add("Resource needs", 0);
    sourceFileList.add("Atomic jobs", 1);
    sourceFileList.add("Resources", 2);
    sourceFileList.add("Traffic periods", 3);
    sourceFileList.add("Places", 4);
    sourceFileList.add("Permissions", 5);
    sourceFileList.add("Shifts", 6);
    sourceFileList.add("Travellings", 7);
    sourceFileList.add("Starting state", 8);
    sourceFileList.setSelection(0);
   
    CLabel algGroupLabel = new CLabel(composite, SWT.SHADOW_ETCHED_IN);
    algGroupLabel.setBackground(labelColor, new int[] { 100 });
    algGroupLabel.setFont(new Font(null, "Tahoma", 8, SWT.BOLD));
    algGroupLabel.setText("Algorithms");
    algGroupLabel.setLayoutData(new GridData(SWT.FILL, SWT.BEGINNING, true, false, 1, 1));

    algSelector = new Combo(composite, SWT.SIMPLE | SWT.DROP_DOWN | SWT.READ_ONLY);
    algSelector.setLayoutData(new GridData(SWT.FILL, SWT.BEGINNING, true, false, 1, 1));
    algSelector.setEnabled(false);
    algSelector.addListener(SWT.Selection, algSelectorListener);
   
    for (int i = 0; i < ResourceAllocation.algorithms.length; i++) {
      algSelector.add(ResourceAllocation.algorithms[i]);
    }

    CLabel optionsLabel = new CLabel(composite, SWT.SHADOW_ETCHED_IN);
    optionsLabel.setBackground(labelColor, new int[] { 100 });
    optionsLabel.setFont(new Font(null, "Tahoma", 8, SWT.BOLD));
    optionsLabel.setText("Parameters");
    optionsLabel.setLayoutData(new GridData(SWT.FILL, SWT.BEGINNING, true, false, 1, 1));

    optionsGroup = new Group(composite, SWT.NONE);
    optionsGroup.setLayout(new GridLayout(8, false));
    optionsGroup.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1));
    optionsGroup.setToolTipText("Possible modifiers for selected algorithm.");
View Full Code Here

TOP

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

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.