本文整理汇总了Java中org.eclipse.draw2d.RectangleFigure.add方法的典型用法代码示例。如果您正苦于以下问题:Java RectangleFigure.add方法的具体用法?Java RectangleFigure.add怎么用?Java RectangleFigure.add使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.eclipse.draw2d.RectangleFigure
的用法示例。
在下文中一共展示了RectangleFigure.add方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: createFigure
import org.eclipse.draw2d.RectangleFigure; //导入方法依赖的package包/类
@Override
protected IFigure createFigure()
{
RectangleFigure figure = new RectangleFigure();
figure.setBackgroundColor(BACKGROUND_COLOR);
Color borderCol = Display.getCurrent().getSystemColor(SWT.COLOR_GRAY);
Border figureBorder = new LineBorder(borderCol, 2);
figure.setBorder(figureBorder);
figure.setOutline(false);
GridLayout layoutManager = new GridLayout();
// zero margin, in order to connect the dependent axes to the shared one
layoutManager.marginHeight = 0;
layoutManager.marginWidth = 0;
figure.setLayoutManager(layoutManager);
datasetsPane = new RectangleFigure();
datasetsPane.setOutline(false);
final SimpleLoweredBorder datasetBorder = new SimpleLoweredBorder(3);
datasetsPane.setBorder(datasetBorder);
GridLayout datasetsPaneLayout = new GridLayout();
datasetsPane.setLayoutManager(datasetsPaneLayout);
figure.add(datasetsPane);
arrowFigure = new ArrowFigure(false);
figure.add(arrowFigure);
axisNameLabel = new AxisNameFigure(this);
figure.add(axisNameLabel);
return figure;
}
示例2: createFigure
import org.eclipse.draw2d.RectangleFigure; //导入方法依赖的package包/类
@Override
protected IFigure createFigure()
{
final RectangleFigure figure = new RectangleFigure();
figure.setOutline(false);
final Color borderCol = Display.getCurrent().getSystemColor(SWT.COLOR_GRAY);
final Border figureBorder = new LineBorder(borderCol, 2);
figure.setBorder(figureBorder);
figure.setLayoutManager(new GridLayout());
nameLabel = new DirectionalLabel(Activator.FONT_8);
final ChartPaneEditPart.AxisLandingPad pad =
(ChartPaneEditPart.AxisLandingPad) getModel();
nameLabel.setText(pad.pos == ChartPanePosition.MIN ? "Min Axis"
: "Max Axis");
figure.add(nameLabel);
figure.getLayoutManager().setConstraint(nameLabel, new GridData(
GridData.FILL, GridData.FILL, true, true));
return figure;
}
示例3: createFigure
import org.eclipse.draw2d.RectangleFigure; //导入方法依赖的package包/类
@Override
protected IFigure createFigure()
{
RectangleFigure rectangle = new RectangleFigure();
rectangle.setOutline(false);
GridLayout gridLayout = new GridLayout();
gridLayout.marginHeight = 0;
gridLayout.marginWidth = 0;
rectangle.setLayoutManager(gridLayout);
arrowFigure = new ArrowFigure(true);
rectangle.add(arrowFigure);
// and the text label
axisNameLabel = new DirectionalIconLabel(StackedchartsImages.getImage(
StackedchartsImages.DESC_AXIS));
axisNameLabel.getLabel().setTextAlignment(PositionConstants.TOP);
rectangle.add(axisNameLabel);
return rectangle;
}