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


Java RectangleFigure.setBackgroundColor方法代码示例

本文整理汇总了Java中org.eclipse.draw2d.RectangleFigure.setBackgroundColor方法的典型用法代码示例。如果您正苦于以下问题:Java RectangleFigure.setBackgroundColor方法的具体用法?Java RectangleFigure.setBackgroundColor怎么用?Java RectangleFigure.setBackgroundColor使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.eclipse.draw2d.RectangleFigure的用法示例。


在下文中一共展示了RectangleFigure.setBackgroundColor方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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: createDragSourceFeedbackFigure

import org.eclipse.draw2d.RectangleFigure; //导入方法依赖的package包/类
protected IFigure createDragSourceFeedbackFigure() {
	RectangleFigure r = new FeedbackFigure();
	r.setOpaque(false);
	r.setAlpha(50);
	r.setBackgroundColor(ColorConstants.gray);
	r.setFill(false);
	r.setBorder(new LineBorder(ColorConstants.gray, 1));
	addFeedback(r);
	return r;
}
 
开发者ID:OpenSoftwareSolutions,项目名称:PDFReporter-Studio,代码行数:11,代码来源:TableCellResizableEditPolicy.java

示例3: 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

示例4: PickerFigure

import org.eclipse.draw2d.RectangleFigure; //导入方法依赖的package包/类
public PickerFigure() {
	super.setMargin(10);
	selection = new RectangleFigure();
	selection.setAlpha(50);
	selection.setBackgroundColor(ColorConstants.blue);
	//setLayoutManager(new PickerFigureLayout());
}
 
开发者ID:ShoukriKattan,项目名称:ForgedUI-Eclipse,代码行数:8,代码来源:PickerFigure.java

示例5: 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

示例6: createFigure

import org.eclipse.draw2d.RectangleFigure; //导入方法依赖的package包/类
@Override
protected IFigure createFigure()
{
  RectangleFigure rectangle = new RectangleFigure();
  rectangle.setOutline(false);
  GridLayout layout = new GridLayout();
  layout.marginHeight = 0;
  layout.marginWidth = 0;
  layout.horizontalSpacing = 10;
  layout.verticalSpacing = 10;
  rectangle.setLayoutManager(layout);
  rectangle.setBackgroundColor(Display.getDefault().getSystemColor(
      SWT.COLOR_WIDGET_BACKGROUND));
  return rectangle;
}
 
开发者ID:debrief,项目名称:limpet,代码行数:16,代码来源:ChartsPanelEditPart.java

示例7: createFigure

import org.eclipse.draw2d.RectangleFigure; //导入方法依赖的package包/类
@Override
protected IFigure createFigure()
{
  RectangleFigure rectangle = new RectangleFigure();
  rectangle.setOutline(false);
  GridLayout gridLayout = new GridLayout();
  gridLayout.marginHeight = 10;
  gridLayout.marginWidth = 10;
  rectangle.setLayoutManager(gridLayout);
  rectangle.setBackgroundColor(Display.getDefault().getSystemColor(
      SWT.COLOR_WIDGET_BACKGROUND));

  return rectangle;
}
 
开发者ID:debrief,项目名称:limpet,代码行数:15,代码来源:ChartSetEditPart.java

示例8: addBreak

import org.eclipse.draw2d.RectangleFigure; //导入方法依赖的package包/类
protected void addBreak()
{
  final RectangleFigure messageBreak = new RectangleFigure();
  messageBreak.setBackgroundColor(ColorConstants.white);
  messageBreak.setOutline(false);
  final Rectangle bounds = Rectangle.SINGLETON;
  bounds.x = -1;
  bounds.y = -1;
  bounds.width = 4;
  bounds.height = 13;
  messageBreak.setBounds(bounds);
  messageBreak.setBorder(MessageFigure.MESSAGE_BREAK_BORDER);
  add(messageBreak, new MidpointLocator(this, 0));
}
 
开发者ID:UBPL,项目名称:jive,代码行数:15,代码来源:MessageFigure.java

示例9: InteractionDrawingEditor

import org.eclipse.draw2d.RectangleFigure; //导入方法依赖的package包/类
/**
 * Create the Interaction drawing editor.
 * Requires the needed motion listeners, the parent window as well as the
 * height and location of the properties panel.
 *
 * It also takes a background color which is used to color the window.
 *
 * A cursor is also provided to handle rollovers.
 *
 * NOTE: color will be disposed by this class;
 * DO NOT Dispose of it yourself.
 *
 * @param child
 * @param motionL
 * @param clickL
 * @param window
 * @param propertiesPaneSize
 * @param propertiesPaneLoc
 * @param paletteSize
 * @param editorCursor
 */
public InteractionDrawingEditor(CogToolScalableFigure child,
                                IFlatDraw2DMouseMotionListener motionL,
                                IFlatDraw2DMouseListener clickL,
                                Zoomable zoom,
                                Composite window,
                                int propertiesPaneSize,
                                int propertiesPaneLoc,
                                int paletteSize,
                                Cursor editorCursor,
                                Color bgColor)
{
    // Call the parent StandardDrawingEditor
    super(window, propertiesPaneSize, propertiesPaneLoc, paletteSize, zoom, 0);

    // Store the interaction layer, which is created with the motion and
    // click listeners as well as the editing cursor.
    interactionLayer =
        new InteractionFigure(this, motionL, clickL, editorCursor);

    backgroundColor = bgColor;
    backgroundColorFigure = new RectangleFigure();
    backgroundColorFigure.setBackgroundColor(backgroundColor);

    mouseClickState = clickL;
    mouseMotionState = motionL;

    setContents(child);

    // set default editors size
    editorComposite.setBounds(getContentSize());

    // Set the contents of the LightweightSystem to the interaction layer.
    // The scaled interaction layer will be the TOPMOST parent of all
    // draw2d objects.
    // Also calls resize the scroll area to handle the current object size.
    getLWS().setContents(interactionLayer);

    // Specify a control adapter to handle resize events.
    super.addEditorControlListener(new ControlAdapter() {
                @Override
                public void controlResized(ControlEvent e) {
                    // On resize, get the new area, and resize the internal
                    // contents
                    org.eclipse.swt.graphics.Rectangle r =
                        editorComposite.getClientArea();

                    // Specify true to shrink the minimum area of the
                    // window; this is to allow for the window to reclaim
                    // space that is no longer needed.
                    resizeContents(r.width, r.height, true);

                    // set scroll increments to something larger than one
                    setScrollIncrements();
                }
            });
}
 
开发者ID:cogtool,项目名称:cogtool,代码行数:78,代码来源:InteractionDrawingEditor.java


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