Java 类org.eclipse.draw2d.LineBorder 实例源码

项目:bts    文件:MarkerFigure.java   
public MarkerFigure(String name) {
    ToolbarLayout layout = new ToolbarLayout();
    setLayoutManager(layout);
    setBorder(new LineBorder(ColorConstants.black, 1));
    setBackgroundColor(classColor);
    setOpaque(true);
    org.eclipse.draw2d.Label label = new org.eclipse.draw2d.Label();
    label.setText(name);
    add(label);
    super.setCornerDimensions(new Dimension(0, 0));
    this.name = name;
}
项目:gw4e.project    文件:EdgeFigure.java   
public EdgeFigure() {
    tooltipFigure = new TooltipFigure();
    setToolTip(tooltipFigure);

    this.setLineWidth(this.getLineWidth() * 2);

    this.setTargetDecoration(new PolylineDecoration());

    label = new Label("e_"+ID.getId());
    label.setOpaque(true);
    label.setBackgroundColor(ColorConstants.buttonLightest);
    label.setBorder(new LineBorder());
    add(label, new MidpointLocator(this, 0));

    guardedFigure = new GuardFigure();
    blockedFigure = new BlockedFigure();
    actionFigure = new ActionFigure ();
    add (actionFigure, new RelativeLocator(label,0.5,1.5));
}
项目:bdf2    文件:TableFigure.java   
public TableFigure() {
    ToolbarLayout layout = new ToolbarLayout();
    setLayoutManager(layout);
    LineBorder lineBorder = new LineBorder(ColorConstants.lightGray, 2);
    setBorder(lineBorder);
    setOpaque(true);
    setBackgroundColor(ColorConstants.white);

    Font font = new Font(null, "宋体", 11, SWT.NORMAL);
    label.setFont(font);
    label.setBorder(new LineBorder(ColorConstants.lightGray));
    label.setIcon(Activator.getImage(Activator.IMAGE_TABLE_16));
    label.setOpaque(true);
    label.setBackgroundColor(ColorConstants.lightBlue);
    label.setForegroundColor(ColorConstants.black);
    add(label);
    add(columnFigure);
}
项目:pandionj    文件:ValueLabel.java   
ValueLabel(IValueModel model) {
    this.model = model;
    setOpaque(true);
    FontManager.setFont(this, PandionJConstants.VALUE_FONT_SIZE);
    setSize(model.isDecimal() || model.isBoolean() ? PandionJConstants.POSITION_WIDTH*2 : PandionJConstants.POSITION_WIDTH, PandionJConstants.POSITION_WIDTH);
    setForegroundColor(ColorConstants.black);
    setBackgroundColor(PandionJConstants.Colors.VARIABLE_BOX);
    setBorder(new LineBorder(ColorConstants.black, PandionJConstants.ARRAY_LINE_WIDTH, SWT.LINE_SOLID));
    updateValue();
    model.registerDisplayObserver((a) -> updateValue());
    model.getRuntimeModel().registerDisplayObserver((e) -> {
        if(e.type == IRuntimeModel.Event.Type.STEP || e.type == IRuntimeModel.Event.Type.EVALUATION) {
            updateBackground();
        }
    });
    dirty = false;
}
项目:pandionj    文件:ColorRGBArrayWidget.java   
void update(int r, int g, int b) {
    boolean valid = 
            r >= 0 && r <= 255 && 
            g >= 0 && g <= 255 && 
            b >= 0 && b <= 255;
    colorFig.setOpaque(valid);
    colorFig.setBackgroundColor(valid ? PandionJUI.getColor(r, g, b) : null);
    colorFig.setBorder(new LineBorder(valid ? ColorConstants.black : PandionJConstants.Colors.ERROR));
    if(valid)
        colorFig.setToolTip(null);
    else {
        Label label = new Label("Invalid RGB values");
        label.setForegroundColor(PandionJConstants.Colors.ERROR);
        colorFig.setToolTip(label);
    }
    text.setText(r + ", " + g + ", " + b);
}
项目:DarwinSPL    文件:DwThemedNonResizableEditPolicy.java   
/**
 * Create selection handles in the style as predefined in DeltaEcore
 * @see DEGraphicalEditorTheme
 */
@Override
protected List<Object> createSelectionHandles() {
    List<Object> list = new ArrayList<Object>();

    MoveHandle moveHandle = new MoveHandle((GraphicalEditPart) getHost());
    moveHandle.setDragTracker(getDragTracker());        

    if (isDragAllowed()) {
        moveHandle.setCursor(Cursors.SIZEALL);
    } else {
        moveHandle.setCursor(SharedCursors.ARROW);
    }

    // set line style to meet the predefined theme
    DEGraphicalEditorTheme theme = DEGraphicalEditor.getTheme();
    LineBorder border = new LineBorder();
    border.setColor(theme.getSelectionSecondaryColor());
    border.setWidth(theme.getLineWidth());
    moveHandle.setBorder(border);

    list.add(moveHandle);

    return list;
}
项目:NEXCORE-UML-Modeler    文件:CombinedFragmentFigure.java   
/**
 * createContents
 *   void
 */
private void createContents() {

    setLayoutManager(new CombinedFragmentLayout());
    setBorder(new LineBorder(0));
    setFill(false);
    setXOR(false);

    fragmentBoundary = new Polygon();
    fragmentBoundary.setFill(true);
    fragmentBoundary.setBackgroundColor(UiCorePlugin.getDefault().getColor(IConstantColorRegistry.LightGray));
    this.add(fragmentBoundary);

    fragmentLabel = new Label("None");
    this.add(fragmentLabel);

}
项目:PDFReporter-Studio    文件:TableCellResizableEditPolicy.java   
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;
}
项目:limpet    文件:AxisEditPart.java   
@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;
}
项目:limpet    文件:AxisLandingPadEditPart.java   
@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;
}
项目:birt    文件:PlaceHolderEditPart.java   
public void refreshFigure( )
{
    StyleHandle style = ( (DesignElementHandle) getDefaultHandle( ) )
            .getPrivateStyle( );

    //TODO:fixed the bug 191874
    //( (LabelFigure) getFigure( ) ).setFont( getFont( ) ); 
    ( (LabelFigure) getFigure( ) ).setImage( getImage( ) );
    ( (LabelFigure) getFigure( ) ).setAlignment( PositionConstants.WEST );
    ( (LabelFigure) getFigure( ) ).setDirection( getTextDirection( getDefaultHandle( )) ); // bidi_hcg
    ( (LabelFigure) getFigure( ) ).setText( getTemplateModel( )
            .getDisplayDescription( ) );
    ( (LabelFigure) getFigure( ) )
            .setTextAlign( DesignChoiceConstants.TEXT_ALIGN_CENTER );
    ( (LabelFigure) getFigure( ) )
            .setForegroundColor( ReportColorConstants.ShadowLineColor );
    ( (LabelFigure) getFigure( ) ).setDisplay( style.getDisplay( ) );

    getFigure( ).setBorder( new LineBorder( 1 ) );
}
项目:birt    文件:DestroyEditPart.java   
public void refreshFigure( )
{
    StyleHandle style = ( (DesignElementHandle) getModel( ) ).getPrivateStyle( );
    ( (LabelFigure) getFigure( ) ).setFont( FontManager.getFont("Dialog", 10, SWT.ITALIC) ); //$NON-NLS-1$

    //( (LabelFigure) getFigure( ) ).setImage( getImage( ) );
    ( (LabelFigure) getFigure( ) ).setAlignment( PositionConstants.WEST );

    // bidi_hcg start
    // Set direction before setting text
    ( (LabelFigure) getFigure( ) ).setDirection( getTextDirection( ) );
    // bidi_hcg end
    ( (LabelFigure) getFigure( ) ).setText( MESSAGE );
    ( (LabelFigure) getFigure( ) ).setTextAlign( DesignChoiceConstants.TEXT_ALIGN_LEFT );
    ( (LabelFigure) getFigure( ) ).setForegroundColor( ReportColorConstants.RedWarning );
    ( (LabelFigure) getFigure( ) ).setDisplay( style.getDisplay( ) );

    getFigure( ).setBorder( new LineBorder( 1 ) );
}
项目:birt    文件:RowHandle.java   
/**
 * Initializes the handle. Sets the {@link DragTracker}and DragCursor.
 */
protected void initialize( )
{
    setOpaque( true );
    LineBorder bd = new LineBorder( 1 );
    bd.setColor( ReportColorConstants.HandleBorderColor );
    setBorder( bd );

    String tp = getTooltipText( );
    if ( tp != null )
    {
        Label tooltip = new Label( tp );
        tooltip.setBorder( new MarginBorder( 0, 2, 0, 2 ) );
        setToolTip( tooltip );
    }

    setCursor( Cursors.ARROW );
}
项目:wt-studio    文件:TextAreaModelFigure.java   
public TextAreaModelFigure()
{

    this.setLayoutManager(new BorderLayout());
    FlowPage page = new FlowPage();

    label = new TextFlow();
    ParagraphTextLayout layout = new ParagraphTextLayout(label,
            ParagraphTextLayout.WORD_WRAP_SOFT);
    label.setLayoutManager(layout);
    label.setOpaque(false);
    page.add(label);
    this.add(page, BorderLayout.CENTER);
    this.setBorder(new LineBorder());
    this.setMinimumSize(new Dimension(RETURN_WIDTH * 2, RETURN_WIDTH * 2));
}
项目:wt-studio    文件:VerticalBlockModelFigure.java   
public VerticalBlockModelFigure()
{
    // if (blockModel instanceof VerticalBlockModel)
    PageXYLayout vertical = new PageXYLayout();
    //vertical.setSpacing(5);
    // setLayoutManager(new VerticalFillLayout());
    // if (blockModel instanceof HorizontalBlockModel)
    // setLayoutManager(new HorizontalFillLayout());
    // FlowLayout vertical = new FlowLayout();
    // vertical.setSpacing(MAX_FLAG);
    // vertical.setVertical(true);
    setLayoutManager(vertical);
    setOpaque(true);
    setBackgroundColor(ColorConstants.white);
    // this.setBounds(rect)
    border = new LineBorder();
    // border.setLabel("垂直容器");
    border.setColor(color);
    border.setWidth(1);
    // FocusBorder focus = new FocusBorder();
    // this.setBorder(border);
    // border = new TitleBarBorder("Table dsf");
    setBorder(border);
}
项目:xeda    文件:DepartmentNodeFigure.java   
public DepartmentNodeFigure() {
    ToolbarLayout layout= new ToolbarLayout();
    setLayoutManager(layout);

    label = new Label();

    label.setLabelAlignment(PositionConstants.LEFT);
    label.setForegroundColor(ColorConstants.blue);
    label.setIcon(Activator.getDefault().getImageRegistry().get(Activator.STATE_MACHINE));
    label.setPreferredSize(700, 50);
    label.setBorder(new MarginBorder(TOP_LEVEL_SPACE));

    add(label);

    Figure line = new RectangleFigure();
    line.setBackgroundColor(ColorConstants.lightGray);
    line.setForegroundColor(ColorConstants.lightGray);
    line.setPreferredSize(700, 1);
    add(line);

    figure = new Figure();
    figure.setLayoutManager(new XYLayout());

    add(figure);
    setBorder(new LineBorder(ColorConstants.lightGray, 1));
}
项目:relations    文件:ItemFigure.java   
private Label createFigure(final String inTitle) {
    setOpaque(true);
    setLayoutManager(new XYLayout());
    setBorder(new LineBorder(ColorConstants.black));
    setBackgroundColor(GraphicalViewerCreator.BG_COLOR);
    setSize(RelationsConstants.ITEM_WIDTH, RelationsConstants.ITEM_HEIGHT);

    final Label outLabel = new Label(inTitle);
    outLabel.setOpaque(true);
    outLabel.setBackgroundColor(GraphicalViewerCreator.BG_COLOR);
    outLabel.setLabelAlignment(PositionConstants.LEFT);
    add(outLabel);
    setConstraint(outLabel, new Rectangle(ICON_WIDTH, 0, LABEL_WIDTH, RelationsConstants.ITEM_HEIGHT));

    final ImageFigure lImage = new ImageFigure(image);
    add(lImage);
    setConstraint(lImage, new Rectangle(-1, -1, ICON_WIDTH, ICON_WIDTH));
    return outLabel;
}
项目:OnionUmlVisualization    文件:ClassFigure.java   
/**
 * Constructs a new ClassFigure with the specified background color
 * and fonts.
 * @param bgColor the background color of the class
 * @param nameFont the font to use for the name label of the class
 * @param contentFont the font to use for properties and operations
 * @param stereotypeFont the font to use for the stereotype label
 */
public ClassFigure(Color bgColor, Font nameFont, Font contentFont,
        Font stereotypeFont) {

    ToolbarLayout layout = new ToolbarLayout();
    setLayoutManager(layout);
    setBorder(new LineBorder(ColorConstants.black, 1));
    setBackgroundColor(bgColor);
    setOpaque(true);

    mStereotypeLabel = new Label("");
    mNameLabel = new Label("");
    mStereotypeLabel.setFont(stereotypeFont);
    mNameLabel.setFont(nameFont);

    mContentFont = contentFont;

    mPropertiesFigure = new ClassSectionFigure(false);
    mOperationsFigure = new ClassSectionFigure(false);
    mOnionRelationshipsFigure = new ClassSectionFigure(true);

    reconstruct();
}
项目:gw4e.project    文件:GraphFigure.java   
public GraphFigure() {
    layout = new XYLayout();
    setLayoutManager(layout);

    name.setForegroundColor(ColorConstants.red);
    add(name);
    setConstraint(name, new Rectangle(5, 5, -1, -1));

    setForegroundColor(ColorConstants.black);
    setBorder(new LineBorder(2));
}
项目:bdf2    文件:TableFigure.java   
public void setSelected(boolean isSelected) {
    LineBorder lineBorder = (LineBorder) getBorder();
    lineBorder.setColor(isSelected ? ColorConstants.gray : ColorConstants.lightGray);
    lineBorder.setWidth(isSelected ? 3 : 2);
    erase();
    repaint();
}
项目:pandionj    文件:StackFrameFigure.java   
private void updateLook(IStackFrameModel model, boolean termination) {
    if(!invisible) {
        if(model.isObsolete() || termination) {
            setBackgroundColor(PandionJConstants.Colors.OBSOLETE);
            setBorder(new LineBorder(model.exceptionOccurred() ?  PandionJConstants.Colors.ERROR : ColorConstants.lightGray, 2, SWT.LINE_DASH));
        }
        else if(model.exceptionOccurred()) {
            setBackgroundColor(PandionJConstants.Colors.INST_POINTER);
            setBorder(new LineBorder(PandionJConstants.Colors.ERROR, PandionJConstants.STACKFRAME_LINE_WIDTH, SWT.LINE_DASH));


            if(model.getExceptionType().equals(NullPointerException.class.getName()))
                paintNullRefs();

            Label labelExc = new Label(PandionJConstants.Messages.prettyException(model.getExceptionType()));
            labelExc.setForegroundColor(PandionJConstants.Colors.ERROR);
            setToolTip(labelExc);
        }
        else if(model.isExecutionFrame())
            setBackgroundColor(PandionJConstants.Colors.INST_POINTER);
        else
            setBackgroundColor(PandionJConstants.Colors.VIEW_BACKGROUND);
    }
    layout.layout(this);
    if(label != null && frame.getSourceFile() != null && frame.getLineNumber() != -1) 
        label.setToolTip(new Label(frame.getSourceFile().getName() + " (line " + frame.getLineNumber() +")"));
}
项目:pandionj    文件:ValueLabel.java   
ValueLabel(String fixedValue, boolean isIndexLabel){
    setText(fixedValue);
    setOpaque(!isIndexLabel);
    setPreferredSize(PandionJConstants.POSITION_WIDTH, PandionJConstants.POSITION_WIDTH);
    if(isIndexLabel){
        FontManager.setFont(this, PandionJConstants.INDEX_FONT_SIZE);
        setLabelAlignment(SWT.CENTER);
        setForegroundColor(ColorConstants.gray);
        setToolTip(new Label(fixedValue));
    }else{
        FontManager.setFont(this, PandionJConstants.VALUE_FONT_SIZE);
        setBackgroundColor(ColorConstants.white);
        setBorder(new LineBorder(ColorConstants.black, PandionJConstants.ARRAY_LINE_WIDTH, SWT.LINE_SOLID));
    }
}
项目:pandionj    文件:BinaryWidget.java   
@Override
public IFigure createFigure(IValueModel v) {
    label = new Label(""); 
    label.setOpaque(true);
    label.setBackgroundColor(ColorConstants.white);
    label.setBorder(new LineBorder(1));
    label.setFont(PandionJUI.getFont(14));
    update(v, Integer.parseInt(v.getCurrentValue()));
    v.registerDisplayObserver((value) -> {
        update(v, Integer.parseInt(v.getCurrentValue()));
    });
    return label;
}
项目:DarwinSPL    文件:DwFeatureModelEditPart.java   
@Override
protected IFigure createFigure() {
    ScalableFreeformLayeredPane layer = new ScalableFreeformLayeredPane();
    layer.setLayoutManager(new FreeformLayout());
    layer.setBorder(new LineBorder(1));
    layer.addLayoutListener(LayoutAnimator.getDefault());
    return layer;
}
项目:DarwinSPL    文件:DwTooltipFigure.java   
public DwTooltipFigure() {
    setOpaque(true);
    setBackgroundColor(ColorConstants.white);


    setBorder( new CompoundBorder(
            new LineBorder( ColorConstants.black, 2 ),
            new MarginBorder( 12 )));

    message = new TextFlow();
    message.setText("");
    add(message);

}
项目:subclipse    文件:NodeTooltipFigure.java   
public void endLayout() {
    if (tagCount > tagsAdded) add(createLabel((tagCount - tagsAdded) + " more...", JFaceResources.getTextFont()));

    Dimension d = getPreferredSize();
    int width = d.width+BORDER_WIDTH2;
    int height = d.height+BORDER_WIDTH2;

    Rectangle b = PlatformUI.getWorkbench().getDisplay().getClientArea();
    width = width > b.width?b.width-30:width;
    height = height > b.height?b.height-50:height;

    setPreferredSize(width, height);
    setBorder(new LineBorder(Activator.BGCOLOR, BORDER_WIDTH));
}
项目:NEXCORE-UML-Modeler    文件:DeleteSignFigure.java   
/**
 * DeleteSignFigure
 * @param string
 */
public DeleteSignFigure(String string) {
    setBorder(new LineBorder(ColorConstants.black));
    setLayoutManager(new StackLayout() {
        @SuppressWarnings("unchecked")
        public void layout(IFigure figure) {
            Rectangle rectangle = figure.getClientArea();
            List children = figure.getChildren();
            IFigure child;
            org.eclipse.draw2d.geometry.Dimension dimension;
            int sizeValue = children.size();
            for (int i = 0; i < children.size(); i++) {
                if (!(children.get(i) instanceof RectangleFigure)) {
                    child = (IFigure) children.get(i);
                    dimension = child.getPreferredSize(rectangle.width, rectangle.height);
                    dimension.width = Math.min(dimension.width, rectangle.width);
                    dimension.height = Math.min(dimension.height, rectangle.height);
                    Rectangle childRect = new Rectangle(rectangle.x + (rectangle.width - dimension.width) / 2,
                        rectangle.y + (rectangle.height - dimension.height) / 2 + (int) (i * dimension.height)
                            - (sizeValue * 3),
                        dimension.width,
                        dimension.height);
                    child.setBounds(childRect);
                }
            }
        }
    });

    Label nameLabel = new Label(string);
    add(nameLabel);
}
项目:NEXCORE-UML-Modeler    文件:ClassFigure.java   
/**
 * ClassFigure
 * @param isDangling
 */
public ClassFigure(boolean isDangling) {
    setDangling(isDangling);

    ToolbarLayout layout = new ToolbarLayout();
    setLayoutManager(layout);
    setOpaque(true);

    setBorder(new LineBorder(ColorConstants.black));
}
项目:NEXCORE-UML-Modeler    文件:EnumerationFigure.java   
/**
 * EnumerationFigure
 * @param isDangling
 */
public EnumerationFigure(boolean isDangling) {
    setDangling(isDangling);
    ToolbarLayout layout = new ToolbarLayout();
    setLayoutManager(layout);
    setOpaque(true);

    setBorder(new LineBorder(ColorConstants.black));
}
项目:NEXCORE-UML-Modeler    文件:ComponentFigure.java   
/**
 * ComponentFigure
 */
public ComponentFigure(boolean isDangling) {
    setDangling(isDangling);
    ToolbarLayout layout = new ToolbarLayout();

    setLayoutManager(layout);
    setBorder(new LineBorder(ColorConstants.black, 1));
    setOpaque(true);
}
项目:NEXCORE-UML-Modeler    文件:InterfaceFigure.java   
/**
 * InterfaceFigure
 * @param isDangling
 */
public InterfaceFigure(boolean isDangling) {
    setDangling(isDangling);

    ToolbarLayout layout = new ToolbarLayout();
    setLayoutManager(layout);
    setOpaque(true);

    setBorder(new LineBorder(ColorConstants.black));
}
项目:NEXCORE-UML-Modeler    文件:DataStoreNodeFigure.java   
/**
 * @param stereotype
 * @param interfaceName
 * @param image
 */
public DataStoreNodeFigure() {

    ToolbarLayout layout = new ToolbarLayout();
    setLayoutManager(layout);
    setBorder(new LineBorder(UiCorePlugin.getDefault().getColor(IConstantColorRegistry.Black)));
    setBackgroundColor(FigureUtil.getFigureImage());
    setOpaque(true);
}
项目:NEXCORE-UML-Modeler    文件:CentralBufferFigure.java   
/**
 * @param stereotype
 * @param interfaceName
 * @param image
 */
public CentralBufferFigure(String name, Image image) {
    //
    ToolbarLayout layout = new ToolbarLayout();
    setLayoutManager(layout);
    setBorder(new LineBorder(UiCorePlugin.getDefault().getColor(IConstantColorRegistry.Black)));
    setBackgroundColor(FigureUtil.getFigureImage());
    setOpaque(true);

}
项目:bts    文件:AmbivalenceEndFigure.java   
public AmbivalenceEndFigure(String name) {
    ToolbarLayout layout = new ToolbarLayout();
    setLayoutManager(layout);
    setBorder(new LineBorder(ColorConstants.black, 1));
    setBackgroundColor(classColor);
    setOpaque(true);
    org.eclipse.draw2d.Label label = new org.eclipse.draw2d.Label();
    label.setText("Am");
    add(label);
    org.eclipse.draw2d.Label label2 = new org.eclipse.draw2d.Label();
    label2.setText("End");
    add(label2);
}
项目:PDFReporter-Studio    文件:CrosstabCellResizableEditPolicy.java   
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;
}
项目:PDFReporter-Studio    文件:CalloutFigure.java   
/**
 * Instantiates a new map figure.
 */
public CalloutFigure() {
    super();
    setOpaque(true);
    setBackgroundColor(ColorConstants.yellow);
    setForegroundColor(ColorConstants.black);
    setBorder(new LineBorder(ColorConstants.orange, 1));
}
项目:OpenSPIFe    文件:TreeTimelineDataEditPart.java   
private void updateChildVisuals(int index) {
    List children = getContentPane().getChildren();
    for (int i=index; i<children.size(); i++) {
        IFigure child = (IFigure) children.get(i);
        if (i%2 == 0) child.setBackgroundColor(ColorConstants.white);
        else          child.setBackgroundColor(alternatingColor);
        child.setBorder(new LineBorder(alternatingBorderColor, 1) {

            @Override
            public void paint(IFigure figure, Graphics graphics, Insets insets) {
                tempRect.setBounds(getPaintRectangle(figure, insets));
                if (getWidth() % 2 == 1) {
                    tempRect.width--;
                    tempRect.height--;
                }
                tempRect.shrink(getWidth() / 2, getWidth() / 2);
                graphics.setLineWidth(getWidth());
                // Set the timeline horizontal line color
                if(horizontalLineColor != null) {
                    graphics.setForegroundColor(horizontalLineColor);
                    graphics.setBackgroundColor(horizontalLineColor);
                }
                else if (getColor() != null) {
                    graphics.setForegroundColor(getColor());
                    graphics.setBackgroundColor(getColor());
                }
                if(!isHorizontalLinesHidden) {
                    // The timeline horizontal grid line
                    graphics.drawLine(tempRect.getBottomLeft(), tempRect.getBottomRight());
                }
            }

        });
    }
}
项目:ant-ivyde    文件:ResolveVisualizerForm.java   
private void createZoomableCanvas(Composite parent) {
    FormData data = new FormData();
    data.top = new FormAttachment(100, -100);
    data.left = new FormAttachment(100, -100);
    data.right = new FormAttachment(100, 0);
    data.bottom = new FormAttachment(100, 0);

    thumbnail = new FigureCanvas(parent, SWT.NONE);
    thumbnail.setBackground(ColorConstants.white);
    thumbnail.setLayoutData(data);

    tb = new ScrollableThumbnail();
    tb.setBorder(new LineBorder(1));
    thumbnail.setContents(tb);
}
项目:antlr4ide    文件:RectangleNode.java   
@Override
protected Border createBorder() {
  MarginBorder marginBorder = new MarginBorder(PADDING - 1);
  LineBorder lineBorder = new LineBorder(1);
  lineBorder.setColor(ColorConstants.black);
  return new CompoundBorder(lineBorder, marginBorder);
}
项目:antlr4ide    文件:CompartmentSegment.java   
public CompartmentSegment(final EObject eObject, final ISegmentFigure innerSegment,
    final PrimitiveFigureFactory primitiveFactory) {
  super(eObject);
  setEntry(primitiveFactory.createCrossPoint(this));
  setExit(primitiveFactory.createCrossPoint(this));
  add(innerSegment);
  primitiveFactory.createConnection(getEntry(), innerSegment.getEntry(), this);
  primitiveFactory.createConnection(innerSegment.getExit(), getExit(), this);
  setBorder(new LineBorder(getForegroundColor(), 1, Graphics.LINE_DASH));
  innerFigure = innerSegment;
}