Search in sources :

Example 1 with GridLayout

use of org.eclipse.draw2d.GridLayout in project cubrid-manager by CUBRID.

the class GraphPlanTooltipFigure method addKeyValueItem.

public void addKeyValueItem(String key, String value) {
    GridLayout layout = new GridLayout();
    layout.numColumns = 2;
    layout.horizontalSpacing = 5;
    layout.verticalSpacing = 0;
    layout.makeColumnsEqualWidth = true;
    Label namelbl = new Label();
    namelbl.setFont(bolderFont);
    namelbl.setTextAlignment(PositionConstants.LEFT);
    namelbl.setText(key);
    GridData nameData = new GridData(SWT.NONE);
    nameData.grabExcessHorizontalSpace = true;
    nameData.horizontalSpan = 0;
    getKeyValueCompartment().add(namelbl, nameData);
    Label valueLbl = new Label();
    valueLbl.setFont(normalFont);
    valueLbl.setTextAlignment(PositionConstants.RIGHT);
    valueLbl.setText(value);
    GridData valueData = new GridData(SWT.NONE);
    valueData.grabExcessHorizontalSpace = true;
    valueData.horizontalSpan = 0;
    getKeyValueCompartment().add(valueLbl, valueData);
    updateMap(key + value, keyValueFigures, namelbl, valueLbl);
}
Also used : GridLayout(org.eclipse.draw2d.GridLayout) Label(org.eclipse.draw2d.Label) GridData(org.eclipse.draw2d.GridData)

Example 2 with GridLayout

use of org.eclipse.draw2d.GridLayout in project cubrid-manager by CUBRID.

the class GraphPlanTooltipFigure method getKeyValueCompartment.

private Figure getKeyValueCompartment() {
    if (keyValueFigure == null) {
        keyValueFigure = new Panel();
        keyValueFigure.setBorder(new CompartmentFigureBorder());
        GridLayout layout = new GridLayout(2, true);
        layout.verticalSpacing = 0;
        keyValueFigure.setLayoutManager(layout);
    }
    return keyValueFigure;
}
Also used : Panel(org.eclipse.draw2d.Panel) GridLayout(org.eclipse.draw2d.GridLayout)

Example 3 with GridLayout

use of org.eclipse.draw2d.GridLayout in project tdi-studio-se by Talend.

the class TreeBranchContent method createContent.

protected void createContent() {
    GridLayout manager = new GridLayout(4, false);
    manager.horizontalSpacing = 5;
    manager.verticalSpacing = 1;
    manager.marginHeight = -1;
    manager.marginWidth = 5;
    setLayoutManager(manager);
    nameFigure = new Label();
    nameFigure.setText(getNameValue());
    this.add(nameFigure);
}
Also used : GridLayout(org.eclipse.draw2d.GridLayout) Label(org.eclipse.draw2d.Label)

Aggregations

GridLayout (org.eclipse.draw2d.GridLayout)3 Label (org.eclipse.draw2d.Label)2 GridData (org.eclipse.draw2d.GridData)1 Panel (org.eclipse.draw2d.Panel)1