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


Java RectangleFigure.setForegroundColor方法代码示例

本文整理汇总了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){
		
	}
	
}
 
开发者ID:ShoukriKattan,项目名称:ForgedUI-Eclipse,代码行数:24,代码来源:AddStackElementEditPolicy.java

示例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;

}
 
开发者ID:SK-HOLDINGS-CC,项目名称:NEXCORE-UML-Modeler,代码行数:17,代码来源:LifeLineBehaviorEditPart.java

示例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;
}
 
开发者ID:SK-HOLDINGS-CC,项目名称:NEXCORE-UML-Modeler,代码行数:16,代码来源:MessageBendpointEditPolicy.java

示例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;
}
 
开发者ID:OpenSoftwareSolutions,项目名称:PDFReporter-Studio,代码行数:18,代码来源:ElementResizableEditPolicy.java

示例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;
}
 
开发者ID:nasa,项目名称:OpenSPIFe,代码行数:13,代码来源:TimelineNodeMoveEditPolicy.java

示例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;
}
 
开发者ID:ghillairet,项目名称:gef-gwt,代码行数:16,代码来源:NonResizableEditPolicy.java

示例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;
}
 
开发者ID:aktion-hip,项目名称:relations,代码行数:7,代码来源:ItemFigure.java


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