当前位置: 首页>>代码示例>>Java>>正文


Java RectangleFigure.add方法代码示例

本文整理汇总了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;
}
 
开发者ID:debrief,项目名称:limpet,代码行数:33,代码来源:AxisEditPart.java

示例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;
}
 
开发者ID:debrief,项目名称:limpet,代码行数:25,代码来源:AxisLandingPadEditPart.java

示例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;
}
 
开发者ID:debrief,项目名称:limpet,代码行数:22,代码来源:SharedAxisEditPart.java


注:本文中的org.eclipse.draw2d.RectangleFigure.add方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。