本文整理汇总了Java中org.eclipse.draw2d.RectangleFigure.setForegroundColor方法的典型用法代码示例。如果您正苦于以下问题:Java RectangleFigure.setForegroundColor方法的具体用法?Java RectangleFigure.setForegroundColor怎么用?Java RectangleFigure.setForegroundColor使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.eclipse.draw2d.RectangleFigure
的用法示例。
在下文中一共展示了RectangleFigure.setForegroundColor方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: showLayoutTargetFeedback
import org.eclipse.draw2d.RectangleFigure; //导入方法依赖的package包/类
@Override
protected void showLayoutTargetFeedback(Request request) {
eraseLayoutTargetFeedback(request);
if (request instanceof ChangeBoundsRequest || (request instanceof CreateRequest
&& acceptCreate((CreateRequest) request))){
targetFeedback = new RectangleFigure();
Rectangle parentBounds = ((ElementEditPart)getHost()).getBounds();
translateToAbsolute(getContainerFigure(), parentBounds);
Rectangle lineBounds = parentBounds.getCopy();
lineBounds.height = 4;
lineBounds.y--;
targetFeedback.setForegroundColor(ColorConstants.green);
targetFeedback.setBackgroundColor(ColorConstants.green);
if (isInsertAfter((DropRequest) request)){
lineBounds.y += parentBounds.height;
}
targetFeedback.setBounds(lineBounds);
addFeedback(targetFeedback);
} else if (request instanceof ChangeBoundsRequest){
}
}
示例2: createFigure
import org.eclipse.draw2d.RectangleFigure; //导入方法依赖的package包/类
/**
* @see org.eclipse.gef.editparts.AbstractGraphicalEditPart#createFigure()
*/
protected IFigure createFigure() {
NotationNode notationNode = (NotationNode) getModel();
RectangleFigure figure = new RectangleFigure();
figure.setBackgroundColor(ColorConstants.lightBlue);
figure.setForegroundColor(UiCorePlugin.getDefault().getColor(IConstantColorRegistry.Black));
figure.setLineWidth(2);
figure.setFill(true);
figure.setLocation(new Point(notationNode.getX(), notationNode.getY()));
figure.setSize(notationNode.getWidth(), notationNode.getHeight());
return figure;
}
示例3: createDragSourceFeedbackFigure
import org.eclipse.draw2d.RectangleFigure; //导入方法依赖的package包/类
/**
* Creates the figure used for feedback.
*
* @return the new feedback figure
*/
protected IFigure createDragSourceFeedbackFigure() {
// Use a ghost rectangle for feedback
RectangleFigure r = new RectangleFigure();
FigureUtilities.makeGhostShape(r);
r.setLineStyle(Graphics.LINE_DOT);
r.setForegroundColor(ColorConstants.white);
r.setBounds(getInitialFeedbackBounds());
addFeedback(r);
return r;
}
示例4: createDragSourceFeedbackFigure
import org.eclipse.draw2d.RectangleFigure; //导入方法依赖的package包/类
/**
* Creates the figure used for feedback.
*
* @return the new feedback figure
*/
protected IFigure createDragSourceFeedbackFigure() {
// Use a ghost rectangle for feedback
RectangleFigure r = new ElementFeedbackFigure();
// FigureUtilities.makeGhostShape(r);
r.setLineStyle(Graphics.LINE_DOT);
r.setForegroundColor(ColorConstants.black);
r.setBounds(getInitialFeedbackBounds().resize(-1, -1));// new Rectangle(ifb.x, ifb.y, ifb.width -100,
// ifb.height));
addFeedback(r);
return r;
}
示例5: createDragSourceFeedbackFigure
import org.eclipse.draw2d.RectangleFigure; //导入方法依赖的package包/类
@Override
protected IFigure createDragSourceFeedbackFigure() {
// Use a ghost rectangle for feedback
RectangleFigure r = new RectangleFigure();
r.setFill(false);
r.setLineStyle(Graphics.LINE_DOT);
r.setForegroundColor(ColorConstants.black);
r.setLineWidth(1);
r.setBounds(getInitialFeedbackBounds());
addFeedback(r);
return r;
}
示例6: createDragSourceFeedbackFigure
import org.eclipse.draw2d.RectangleFigure; //导入方法依赖的package包/类
/**
* Creates the figure used for feedback.
*
* @return the new feedback figure
*/
protected IFigure createDragSourceFeedbackFigure() {
// Use a ghost rectangle for feedback
RectangleFigure r = new RectangleFigure();
FigureUtilities.makeGhostShape(r);
r.setLineStyle(Graphics.LINE_DOT);
r.setForegroundColor(ColorConstants.white);
r.setBounds(getInitialFeedbackBounds());
addFeedback(r);
return r;
}
示例7: createUnderline
import org.eclipse.draw2d.RectangleFigure; //导入方法依赖的package包/类
private RectangleFigure createUnderline() {
final RectangleFigure outUnderline = new RectangleFigure();
outUnderline.setForegroundColor(ACTIVE_COLOR);
outUnderline.setVisible(false);
return outUnderline;
}