use of org.eclipse.draw2d.ToolbarLayout in project webtools.sourceediting by eclipse.
the class BoxEditPart method createFigure.
protected IFigure createFigure() {
BoxFigure figure = new BoxFigure();
LineBorder boxLineBorder = new LineBorder(1);
figure.setBorder(boxLineBorder);
ToolbarLayout toolbarLayout = new ToolbarLayout();
toolbarLayout.setStretchMinorAxis(true);
figure.setLayoutManager(toolbarLayout);
// we should organize ITreeElement and integrate it with the facade
if (getModel() instanceof ITreeElement) {
figure.getNameLabel().setIcon(((ITreeElement) getModel()).getImage());
}
return figure;
}
use of org.eclipse.draw2d.ToolbarLayout in project webtools.sourceediting by eclipse.
the class RootContentEditPart method createFigure.
protected IFigure createFigure() {
Panel panel = new Panel();
panel.setBorder(new MarginBorder(60));
ToolbarLayout panelLayout = new ToolbarLayout(false);
panelLayout.setStretchMinorAxis(true);
panel.setLayoutManager(panelLayout);
contentPane = new Figure();
panel.add(contentPane);
ToolbarLayout tb = new ToolbarLayout(false);
tb.setMinorAlignment(ToolbarLayout.ALIGN_CENTER);
tb.setStretchMinorAxis(true);
tb.setSpacing(40);
contentPane.setLayoutManager(tb);
return panel;
}
use of org.eclipse.draw2d.ToolbarLayout in project webtools.sourceediting by eclipse.
the class RootHolderEditPart method createFigure.
protected IFigure createFigure() {
panel = new Panel();
ToolbarLayout layout = new ToolbarLayout(true);
layout.setStretchMinorAxis(false);
layout.setSpacing(100);
panel.setLayoutManager(layout);
return panel;
}
use of org.eclipse.draw2d.ToolbarLayout in project webtools.sourceediting by eclipse.
the class TopLevelComponentEditPart method createFigure.
protected IFigure createFigure() {
Figure typeGroup = new Figure() {
public void paint(Graphics graphics) {
super.paint(graphics);
if (hasFocus) {
try {
graphics.pushState();
Rectangle r = getBounds();
graphics.setXORMode(true);
graphics.drawFocus(r.x, r.y + 1, r.width - 1, r.height - 2);
} finally {
graphics.popState();
}
}
}
};
typeGroup.setLayoutManager(new ToolbarLayout());
labelHolder = new Figure();
FillLayout fillLayout = new FillLayout();
labelHolder.setLayoutManager(fillLayout);
typeGroup.add(labelHolder);
label = new HyperLinkLabel();
label.setOpaque(true);
label.setBorder(new MarginBorder(1, 2, 2, 5));
if (!isHighContrast)
label.setForegroundColor(ColorConstants.black);
labelHolder.add(label);
return typeGroup;
}
use of org.eclipse.draw2d.ToolbarLayout in project cubrid-manager by CUBRID.
the class GraphPlanTooltipFigure method addTextItem.
public void addTextItem(String name, String value) {
ToolbarLayout layout = new ToolbarLayout(false);
Panel panel = new Panel();
panel.setLayoutManager(layout);
getTextCompartment().add(panel);
Label namelbl = new Label();
namelbl.setFont(bolderFont);
namelbl.setTextAlignment(PositionConstants.LEFT);
namelbl.setText(name);
panel.add(namelbl);
Label outputLbl = new Label();
outputLbl.setText(value);
outputLbl.setFont(normalFont);
panel.add(outputLbl);
updateMap(name, textFigures, namelbl, outputLbl);
}
Aggregations