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);
}
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;
}
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);
}
Aggregations