本文整理汇总了Java中org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure.setForegroundColor方法的典型用法代码示例。如果您正苦于以下问题:Java NodeFigure.setForegroundColor方法的具体用法?Java NodeFigure.setForegroundColor怎么用?Java NodeFigure.setForegroundColor使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure
的用法示例。
在下文中一共展示了NodeFigure.setForegroundColor方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: createNodeFigure
import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure; //导入方法依赖的package包/类
@Override
protected NodeFigure createNodeFigure() {
final NodeFigure figure = new NodeFigure() {
@Override
public PointList getPolygonPoints() {
PointList points = new PointList(5);
Rectangle handleBounds = getHandleBounds();
points.addPoint(handleBounds.x + (handleBounds.width / 2), handleBounds.y);
points.addPoint(handleBounds.x + handleBounds.width, handleBounds.y + (handleBounds.height / 2));
points.addPoint(handleBounds.x + (handleBounds.width / 2), handleBounds.y + handleBounds.height);
points.addPoint(handleBounds.x, handleBounds.y + handleBounds.height / 2);
points.addPoint(handleBounds.x + (handleBounds.width / 2), handleBounds.y);
return points;
}
};
figure.setLayoutManager(new StackLayout());
figure.add(createPrimaryShape());
figure.setBackgroundColor(org.eclipse.draw2d.ColorConstants.white);
figure.setForegroundColor(org.eclipse.draw2d.ColorConstants.black);
figure.setMinimumSize(getDefaultSize());
return figure;
}
示例2: createMainFigure
import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure; //导入方法依赖的package包/类
@Override
protected NodeFigure createMainFigure() {
final NodeFigure figure = new EllipseAnchorDefaultSizeNodeFigure(MapModeUtils.DEFAULT_SMALL_NODE_DIMENSION);
figure.setLayoutManager(new StackLayout());
figure.add(createPrimaryShape());
figure.setBackgroundColor(ColorConstants.black);
figure.setForegroundColor(ColorConstants.white);
return figure;
}
示例3: createMainFigure
import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure; //导入方法依赖的package包/类
@Override
protected NodeFigure createMainFigure() {
final NodeFigure figure = new EllipseAnchorDefaultSizeNodeFigure(MapModeUtils.DEFAULT_SMALL_NODE_DIMENSION);
figure.setLayoutManager(new StackLayout());
figure.add(new ExitFigure(getMapMode()));
figure.setForegroundColor(ColorConstants.black);
figure.setBackgroundColor(ColorConstants.white);
return figure;
}