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

项目:Hydrograph    文件:ComponentLabelFigure.java   
/**
 * Creates a new LabelFigure with a MarginBorder that is the given size and
 * a FlowPage containing a TextFlow with the style WORD_WRAP_SOFT.
 * 
 * @param borderSize
 *            the size of the MarginBorder
 */
public ComponentLabelFigure(int borderSize) {
    setBorder(new MarginBorder(borderSize));
    flowPage = new FlowPage();

    textFlow.setLayoutManager(new ParagraphTextLayout(textFlow,
            ParagraphTextLayout.WORD_WRAP_SOFT));


    flowPage.add(textFlow);
    flowPage.setHorizontalAligment(PositionConstants.CENTER);

    setLayoutManager(new StackLayout());
    add(flowPage);
    font = new Font( Display.getDefault(), "Arial", 9,
            SWT.NORMAL );
    setFont(font);
    setForegroundColor(ColorConstants.black);

}
项目:Hydrograph    文件:CommentBoxFigure.java   
/**
 * Creates a new CommentBoxFigure with a MarginBorder that is the given size and a FlowPage containing a TextFlow
 * with the style WORD_WRAP_SOFT.
 * 
 * @param borderSize
 *            the size of the MarginBorder
 */
public CommentBoxFigure(int borderSize) {
    setBorder(new MarginBorder(5));
    FlowPage flowPage = new FlowPage();

    textFlow = new TextFlow();

    textFlow.setLayoutManager(new ParagraphTextLayout(textFlow, ParagraphTextLayout.WORD_WRAP_SOFT));

    flowPage.add(textFlow);

    setLayoutManager(new StackLayout());
    add(flowPage);
    font = new Font(Display.getDefault(), "Arial", 9, SWT.NORMAL);
    setFont(font);
    setForegroundColor(ColorConstants.black);
    setOpaque(false);

}
项目:ermasterr    文件:FunnyStyleSupport.java   
/**
 * {@inheritDoc}
 */
@Override
public void createColumnArea(final IFigure columns) {
    initColumnArea(columns);

    columns.setBorder(new MarginBorder(0, 0, 0, 0));
    columns.setBackgroundColor(ColorConstants.white);
    columns.setOpaque(true);

    final Figure centerFigure = new Figure();
    centerFigure.setLayoutManager(new BorderLayout());
    centerFigure.setBorder(new MarginBorder(new Insets(0, 2, 0, 2)));

    centerFigure.add(columns, BorderLayout.CENTER);
    getTableFigure().add(centerFigure, BorderLayout.CENTER);
}
项目:ermasterr    文件:FunnyStyleSupport.java   
/**
 * {@inheritDoc}
 */
@Override
public void createFooter() {
    final IFigure footer = new Figure();
    final BorderLayout footerLayout = new BorderLayout();
    footer.setLayoutManager(footerLayout);
    footer.setBorder(new MarginBorder(new Insets(0, 2, 0, 2)));

    final IFigure footer1 = new Figure();
    footer1.setSize(-1, 10);
    footer1.setBackgroundColor(Resources.VERY_LIGHT_GRAY);
    footer1.setOpaque(true);

    footer.add(footer1, BorderLayout.TOP);

    final IFigure footer2 = new Figure();
    footer2.setSize(-1, 7);

    footer.add(footer2, BorderLayout.BOTTOM);

    getTableFigure().add(footer, BorderLayout.BOTTOM);
}
项目:ermasterr    文件:SimpleStyleSupport.java   
/**
 * {@inheritDoc}
 */
@Override
public void initTitleBar(final Figure top) {
    final ToolbarLayout topLayout = new ToolbarLayout();

    topLayout.setMinorAlignment(OrderedLayout.ALIGN_TOPLEFT);
    topLayout.setStretchMinorAxis(true);
    top.setLayoutManager(topLayout);

    nameLabel = new Label();
    nameLabel.setBorder(new MarginBorder(new Insets(5, 20, 5, 20)));
    top.add(nameLabel);

    final Figure separater = new Figure();
    separater.setSize(-1, 1);
    separater.setBackgroundColor(getTextColor());
    separater.setOpaque(true);

    top.add(separater);
}
项目:ermaster-k    文件:FunnyStyleSupport.java   
/**
 * {@inheritDoc}
 */
@Override
public void createColumnArea(IFigure columns) {
    this.initColumnArea(columns);

    columns.setBorder(new MarginBorder(0, 0, 0, 0));
    columns.setBackgroundColor(ColorConstants.white);
    columns.setOpaque(true);

    this.centerFigure = new Figure();
    this.centerFigure.setLayoutManager(new BorderLayout());
    this.centerFigure.setBorder(new MarginBorder(new Insets(0, 2, 0, 2)));

    centerFigure.add(columns, BorderLayout.CENTER);
    this.getTableFigure().add(this.centerFigure, BorderLayout.CENTER);
}
项目:ermaster-k    文件:FunnyStyleSupport.java   
/**
 * {@inheritDoc}
 */
@Override
public void createFooter() {
    IFigure footer = new Figure();
    BorderLayout footerLayout = new BorderLayout();
    footer.setLayoutManager(footerLayout);
    footer.setBorder(new MarginBorder(new Insets(0, 2, 0, 2)));

    IFigure footer1 = new Figure();
    footer1.setSize(-1, 10);
    footer1.setBackgroundColor(Resources.VERY_LIGHT_GRAY);
    footer1.setOpaque(true);

    footer.add(footer1, BorderLayout.TOP);

    IFigure footer2 = new Figure();
    footer2.setSize(-1, 7);

    footer.add(footer2, BorderLayout.BOTTOM);

    this.getTableFigure().add(footer, BorderLayout.BOTTOM);
}
项目:ermaster-k    文件:SimpleStyleSupport.java   
/**
 * {@inheritDoc}
 */
@Override
public void initTitleBar(Figure top) {
    ToolbarLayout topLayout = new ToolbarLayout();

    topLayout.setMinorAlignment(ToolbarLayout.ALIGN_TOPLEFT);
    topLayout.setStretchMinorAxis(true);
    top.setLayoutManager(topLayout);

    this.nameLabel = new Label();
    this.nameLabel.setBorder(new MarginBorder(new Insets(5, 20, 5, 20)));
    top.add(nameLabel);

    Figure separater = new Figure();
    separater.setSize(-1, 1);
    separater.setBackgroundColor(this.getTextColor());
    separater.setOpaque(true);

    top.add(separater);
}
项目:NEXCORE-UML-Modeler    文件:NoteFigure.java   
/**
 * createTextFlow
 * 
 * @return TextFlow
 */
public TextFlow createTextFlow() {
    flowPage = new FlowPage();

    flow = new TextFlow();

    flow.setLayoutManager(new ParagraphTextLayout(flow, ParagraphTextLayout.WORD_WRAP_SOFT));
    flow.setForegroundColor(new Color(null, 0, 0, 0));

    if (getName() != null)
        flow.setText(getName());
    else
        flow.setText(""); //$NON-NLS-1$

    flowPage.add(flow);
    flowPage.setHorizontalAligment(PositionConstants.LEFT);
    flowPage.setBorder(new MarginBorder(new Insets(15, 7, 7, 7)));
    setLayoutManager(new StackLayout());
    add(flowPage);

    return flow;
}
项目:NEXCORE-UML-Modeler    文件:LifeLineNameHeaderFigure.java   
/**
 * LifeLineNameHeaderFigure
 * @param name
 */
public LifeLineNameHeaderFigure(String name) {
    super();
    this.stereptypeLabel = new Label("");
    this.add(this.stereptypeLabel);

    nameLabel = new CollapsedLabel(name);
    this.nameLabel2 = new Label("");
    this.nameLabel.setChildLabel(this.nameLabel2);
    // nameLabel.setIcon(IConstantImageRegistry.eInstance.getSmallIcon(IConstantImageRegistry.ICONNAME_LIFELINE));

    ToolbarLayout layout = new ToolbarLayout();
    layout.setSpacing(2);
    layout.setMinorAlignment(ToolbarLayout.ALIGN_CENTER);
    setLayoutManager(layout);

    setOpaque(true);
    setBackgroundColor(UiCorePlugin.getDefault().getColor(IConstantColorRegistry.White));
    setBorder(new MarginBorder(6));
    add(nameLabel);
    this.add(this.nameLabel2);

}
项目:NEXCORE-UML-Modeler    文件:LifeLineNameFigure.java   
/**
 * LifeLineNameFigure
 * @param name
 */
public LifeLineNameFigure(String name) {
    this.stereptypeLabel = new Label(UICoreConstant.PROJECT_CONSTANTS__EMPTY_STRING);
    this.add(this.stereptypeLabel);

    nameLabel = new CollapsedLabel(name);
    this.nameLabel2 = new Label(UICoreConstant.PROJECT_CONSTANTS__EMPTY_STRING);
    this.nameLabel.setChildLabel(this.nameLabel2);
    nameLabel.setIcon(IConstantImageRegistry.eInstance.getSmallIcon(IConstantImageRegistry.ICONNAME_LIFELINE));

    ToolbarLayout layout = new ToolbarLayout();
    layout.setSpacing(2);
    layout.setMinorAlignment(ToolbarLayout.ALIGN_CENTER);
    setLayoutManager(layout);

    setOpaque(true);
    setBackgroundColor(UiCorePlugin.getDefault().getColor(IConstantColorRegistry.White));
    setBorder(new MarginBorder(6));
    add(nameLabel);
    this.add(this.nameLabel2);

}
项目:statecharts    文件:FinalStateFigure.java   
protected void createContents() {
    int size = mapMode.DPtoLP(2);
    this.setBorder(new MarginBorder(size, size, size, size));
    Ellipse whiteCircle = new Ellipse();
    whiteCircle.setOutline(false);
    whiteCircle.setLineWidth(1);
    whiteCircle.setBackgroundColor(ColorConstants.white);
    size = mapMode.DPtoLP(3);
    whiteCircle.setBorder(new MarginBorder(size, size, size, size));
    BorderLayout layout = new BorderLayout();
    whiteCircle.setLayoutManager(layout);
    Object data = BorderLayout.CENTER;
    this.add(whiteCircle, data);
    Ellipse blackCircle = new Ellipse();
    blackCircle.setOutline(false);
    blackCircle.setLineWidth(mapMode.DPtoLP(1));
    blackCircle.setBackgroundColor(ColorConstants.black);
    data = BorderLayout.CENTER;
    whiteCircle.add(blackCircle, data);
}
项目:erflute    文件:ModelPropertiesFigure.java   
private void addRow(String name, String value, String tableStyle) {
    final Border border = new MarginBorder(5);
    final ToolbarLayout layout = new ToolbarLayout();
    layout.setMinorAlignment(ToolbarLayout.ALIGN_TOPLEFT);
    layout.setStretchMinorAxis(true);
    final Label nameLabel = new Label();
    final Label valueLabel = new Label();
    nameLabel.setBorder(border);
    nameLabel.setText(name);
    nameLabel.setLabelAlignment(PositionConstants.LEFT);
    nameLabel.setForegroundColor(foregroundColor);
    add(nameLabel);
    if (!DisplayMessages.getMessage("action.title.change.design.simple").equals(tableStyle)
            && !DisplayMessages.getMessage("action.title.change.design.frame").equals(tableStyle)) {
        valueLabel.setBackgroundColor(ColorConstants.white);
        valueLabel.setOpaque(true);
        valueLabel.setForegroundColor(ColorConstants.black);
    } else {
        valueLabel.setOpaque(false);
        valueLabel.setForegroundColor(foregroundColor);
    }
    valueLabel.setBorder(border);
    valueLabel.setText(value);
    valueLabel.setLabelAlignment(PositionConstants.LEFT);
    add(valueLabel);
}
项目:erflute    文件:FunnyStyleSupport.java   
@Override
public void createFooter() {
    final IFigure footer = new Figure();
    final BorderLayout footerLayout = new BorderLayout();
    footer.setLayoutManager(footerLayout);
    footer.setBorder(new MarginBorder(new Insets(0, 0, 0, 0)));

    final IFigure footer1 = new Figure();
    footer1.setSize(-1, 1);
    footer1.setBackgroundColor(ColorConstants.black);
    footer1.setOpaque(true);
    footer.add(footer1, BorderLayout.TOP);

    final IFigure footer2 = new Figure();
    footer2.setSize(-1, 6);
    footer.add(footer2, BorderLayout.BOTTOM);

    getTableFigure().add(footer, BorderLayout.BOTTOM);
}
项目:erflute    文件:FunnyStyleSupport.java   
@Override
public void addColumnGroup(GroupColumnFigure columnFigure, int viewMode,
        String name, boolean isAdded, boolean isUpdated, boolean isRemoved) {
    columnFigure.setBorder(new MarginBorder(new Insets(1, 0, 1, 0)));

    final ImageFigure image = new ImageFigure();
    image.setBorder(new MarginBorder(new Insets(0, 4, 0, 7)));
    image.setImage(Activator.getImage(ImageKey.GROUP));
    columnFigure.add(image);

    final StringBuilder text = new StringBuilder();
    text.append(name);
    text.append(" (GROUP)");

    setColumnFigureColor(columnFigure, false, false, isAdded, isUpdated, isRemoved);

    final Label label = createColumnLabel();

    label.setForegroundColor(ColorConstants.black);
    label.setLabelAlignment(PositionConstants.RIGHT);
    label.setBorder(new MarginBorder(new Insets(1, 3, 0, 4)));

    label.setText(text.toString());

    columnFigure.add(label);
}
项目:erflute    文件:FunnyStyleSupport.java   
@Override
public void addIndex(IndexFigure indexFigure, String name, boolean isFirst) {
    final ImageFigure image = new ImageFigure();
    image.setBorder(new MarginBorder(new Insets(0, 0, 0, 19)));
    image.setImage(Activator.getImage(ImageKey.BLANK_WHITE));
    image.setOpaque(true);
    indexFigure.add(image);

    final StringBuilder text = new StringBuilder();
    text.append(name);
    final Label label = createColumnLabel();
    label.setBorder(new MarginBorder(new Insets(1, 0, 0, 4)));
    label.setForegroundColor(ColorConstants.black);
    label.setText(text.toString());

    indexFigure.add(label);
}
项目:erflute    文件:SimpleStyleSupport.java   
@Override
public void initTitleBar(Figure top) {
    final ToolbarLayout topLayout = new ToolbarLayout();

    topLayout.setMinorAlignment(ToolbarLayout.ALIGN_TOPLEFT);
    topLayout.setStretchMinorAxis(true);
    top.setLayoutManager(topLayout);

    this.nameLabel = new Label();
    nameLabel.setBorder(new MarginBorder(new Insets(5, 20, 5, 20)));
    top.add(nameLabel);

    final Figure separater = new Figure();
    separater.setSize(-1, 1);
    separater.setBackgroundColor(getTextColor());
    separater.setOpaque(true);

    top.add(separater);
}
项目:OpenSPIFe    文件:ScaleTimelineMarkerEditPart.java   
@Override
protected IFigure createFigure() {
    TimelineMarker marker = getModel();
    Image image = getImage();
    if (image != null) {
        Label label = new Label();
        label.setIcon(image);
        label.setBorder(new MarginBorder(2));
        return label;
    } // else...
    ScaleMarkerFigure figure = new ScaleMarkerFigure();
    figure.setBackgroundColor(marker.getColor());
    figure.setForegroundColor(marker.getColor());
    figure.setPreferredSize(FIGURE_WIDTH, FIGURE_HEIGHT);
    return figure;
}
项目:ermaster-nhit    文件:FunnyStyleSupport.java   
/**
 * {@inheritDoc}
 */
@Override
public void createColumnArea(IFigure columns) {
    this.initColumnArea(columns);

    columns.setBorder(new MarginBorder(0, 0, 0, 0));
    columns.setBackgroundColor(ColorConstants.white);
    columns.setOpaque(true);

    Figure centerFigure = new Figure();
    centerFigure.setLayoutManager(new BorderLayout());
    centerFigure.setBorder(new MarginBorder(new Insets(0, 2, 0, 2)));

    centerFigure.add(columns, BorderLayout.CENTER);
    this.getTableFigure().add(centerFigure, BorderLayout.CENTER);
}
项目:ermaster-nhit    文件:FunnyStyleSupport.java   
/**
 * {@inheritDoc}
 */
@Override
public void createFooter() {
    IFigure footer = new Figure();
    BorderLayout footerLayout = new BorderLayout();
    footer.setLayoutManager(footerLayout);
    footer.setBorder(new MarginBorder(new Insets(0, 2, 0, 2)));

    IFigure footer1 = new Figure();
    footer1.setSize(-1, 10);
    footer1.setBackgroundColor(Resources.VERY_LIGHT_GRAY);
    footer1.setOpaque(true);

    footer.add(footer1, BorderLayout.TOP);

    IFigure footer2 = new Figure();
    footer2.setSize(-1, 7);

    footer.add(footer2, BorderLayout.BOTTOM);

    this.getTableFigure().add(footer, BorderLayout.BOTTOM);
}
项目:ermaster-nhit    文件:SimpleStyleSupport.java   
/**
 * {@inheritDoc}
 */
@Override
public void initTitleBar(Figure top) {
    ToolbarLayout topLayout = new ToolbarLayout();

    topLayout.setMinorAlignment(ToolbarLayout.ALIGN_TOPLEFT);
    topLayout.setStretchMinorAxis(true);
    top.setLayoutManager(topLayout);

    this.nameLabel = new Label();
    this.nameLabel.setBorder(new MarginBorder(new Insets(5, 20, 5, 20)));
    top.add(nameLabel);

    Figure separater = new Figure();
    separater.setSize(-1, 1);
    separater.setBackgroundColor(this.getTextColor());
    separater.setOpaque(true);

    top.add(separater);
}
项目:gef-gwt    文件:ToolbarEditPart.java   
public IFigure createFigure() {
    IFigure figure = new Figure() {

        protected void paintFigure(Graphics graphics) {
            super.paintFigure(graphics);

            // draw top border
            graphics.setForegroundColor(PaletteColorUtil.WIDGET_LIST_BACKGROUND);
            graphics.drawLine(getBounds().getTopLeft(), getBounds()
                    .getTopRight());

            // draw bottom border
            graphics.setForegroundColor(PaletteColorUtil.WIDGET_BACKGROUND_NORMAL_SHADOW_70);
            graphics.drawLine(
                    getBounds().getBottomLeft().getTranslated(0, -1),
                    getBounds().getBottomRight().getTranslated(0, -1));
        }

    };
    figure.setOpaque(true);
    figure.setBackgroundColor(PaletteColorUtil.WIDGET_BACKGROUND);
    figure.setBorder(new MarginBorder(2, 1, 1, 1));

    return figure;
}
项目:jive    文件:LifelineFigure.java   
public LifelineFigure(final IContourAttributes attributes)
{
  isGutter = (attributes == null);
  if (isGutter)
  {
    head = new Label("");
    head.setOpaque(false);
    head.setBorder(new MarginBorder(5));
  }
  else
  {
    head = new Label(attributes.getText(), attributes.getIcon());
    final Label tooltip = new Label(attributes.getToolTipText(), attributes.getToolTipIcon());
    head.setToolTip(tooltip);
    head.setToolTip(tooltip);
    head.setOpaque(true);
    head.setBorder(LifelineFigure.HEAD_BORDER);
    head.setIconAlignment(PositionConstants.BOTTOM);
    head.setLabelAlignment(PositionConstants.LEFT);
    head.setBackgroundColor(attributes.getLabelBackgroundColor());
  }
  setOpaque(false);
  setLayoutManager(new XYLayout());
  add(head, new Rectangle(0, 0, -1, -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    文件:NoteModelFigure.java   
public void create() {
    this.setBackgroundColor(ColorConstants.yellow);
    this.setBorder(new MarginBorder(RETURN_WIDTH));
    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);
}
项目:wt-studio    文件:ViewModelFigure.java   
/**
 * {@inheritDoc}
 */
public void initTitleBar(Figure top) {
    top.setLayoutManager(new BorderLayout());

    Figure title = new Figure();
    top.add(title, BorderLayout.TOP);
    title.setLayoutManager(new FlowLayout());
    title.setBackgroundColor(ColorConstants.darkGreen);

    ImageFigure image = new ImageFigure();
    image.setBorder(new MarginBorder(new Insets(5, 10, 5, 2)));
    image.setImage(Activator.getImageDescriptor(ImageResource.VIEW).createImage());
    title.add(image);

    this.nameLabel = new Label();
    this.nameLabel.setBorder(new MarginBorder(new Insets(5, 0, 5, 20)));
    title.add(this.nameLabel);

    Figure separater = new Figure();
    separater.setSize(-1, 1);
    separater.setBackgroundColor(ColorConstants.black);
    separater.setOpaque(true);

    top.add(separater, BorderLayout.BOTTOM);
}
项目:wt-studio    文件:ViewModelFigure.java   
/**
 * {@inheritDoc}
 */
public void createFooter(Figure figure) {
    IFigure footer = new Figure();
    BorderLayout footerLayout = new BorderLayout();
    footer.setLayoutManager(footerLayout);
    footer.setBorder(new MarginBorder(new Insets(0, 2, 0, 2)));

    IFigure footer1 = new Figure();
    footer1.setSize(-1, 10);
    footer1.setBackgroundColor(VERY_LIGHT_GRAY);
    footer1.setOpaque(true);

    footer.add(footer1, BorderLayout.TOP);

    IFigure footer2 = new Figure();
    footer2.setSize(-1, 7);

    footer.add(footer2, BorderLayout.BOTTOM);

    figure.add(footer, BorderLayout.BOTTOM);
}
项目:wt-studio    文件:ColumnModelFigure.java   
private void CreateContainer()
{

     FKImage = new ImageFigure();
     FKImage.setBounds(new Rectangle(this.bounds.x,this.bounds.y,80,20));
     FKImage.setBorder(new MarginBorder(new Insets(5, 2, 5, 2)));
    // FKImage.setImage(null);
     Rectangle tempRect=new Rectangle();
     Point loc=this.getLocation();
     Dimension dim=new Dimension(16,16);
     tempRect.setBounds(loc,dim);
     this.add(FKImage,tempRect);
     label = new Label();
     label.setBorder(new MarginBorder(new Insets(3, 5, 3, 5)));
     label.setLabelAlignment(PositionConstants.LEFT);
     this.add(label);

}
项目:wt-studio    文件:TableModelFigure.java   
/**
 * {@inheritDoc}
 */
public void initTitleBar(Figure top) {
    top.setLayoutManager(new BorderLayout());

    Figure title = new Figure();
    top.add(title, BorderLayout.TOP);
    title.setLayoutManager(new FlowLayout());
    title.setBackgroundColor(ColorConstants.darkGreen);

    ImageFigure image = new ImageFigure();
    image.setBorder(new MarginBorder(new Insets(5, 10, 5, 2)));
    image.setImage(Activator.getImageDescriptor(ImageResource.TABLE).createImage());
    title.add(image);

    this.nameLabel = new Label();
    this.nameLabel.setBorder(new MarginBorder(new Insets(5, 0, 5, 20)));
    title.add(this.nameLabel);

    Figure separater = new Figure();
    separater.setSize(100, 100);
    separater.setBackgroundColor(ColorConstants.black);
    separater.setOpaque(false);
    top.add(separater, BorderLayout.BOTTOM);
}
项目:wt-studio    文件:TableModelFigure.java   
/**
 * {@inheritDoc}
 */
public void createColumnArea() {
    columns=new Figure();
    this.initColumnArea(columns);

    columns.setBorder(new MarginBorder(0, 0, 0, 0));
    columns.setBackgroundColor(ColorConstants.white);
    columns.setOpaque(true);

    Figure centerFigure = new Figure();
    centerFigure.setLayoutManager(new BorderLayout());
    centerFigure.setBorder(new MarginBorder(new Insets(0, 2, 0, 2)));
    centerFigure.setBackgroundColor(new Color(null,192,192,192));
    centerFigure.add(columns, BorderLayout.CENTER);
    this.add(centerFigure, BorderLayout.CENTER);
}
项目:wt-studio    文件:TableModelFigure.java   
/**
 * {@inheritDoc}
 */
public void createFooter(Figure figure) {
    IFigure footer = new Figure();
    BorderLayout footerLayout = new BorderLayout();
    footer.setLayoutManager(footerLayout);
    footer.setBorder(new MarginBorder(new Insets(0, 2, 0, 2)));

    IFigure footer1 = new Figure();
    footer1.setSize(-1, 10);
    footer1.setBackgroundColor(VERY_LIGHT_GRAY);
    footer1.setOpaque(true);

    footer.add(footer1, BorderLayout.TOP);

    IFigure footer2 = new Figure();
    footer2.setSize(-1, 7);
    footer.add(footer2, BorderLayout.BOTTOM);
    figure.add(footer, BorderLayout.BOTTOM);
}
项目:chrysalix    文件:FocusTreeCanvas.java   
void showIconView( final Column column ) {
    iconViewColumn = column;
    focusLine.setVisible( false );
    for ( final Column col : focusTree.columns ) {
        if ( col != column ) col.cellColumn.setVisible( false );
    }
    column.cellWidthBeforeIconView = 0;
    for ( final Object figure : column.cellColumn.getChildren() ) {
        final Cell cell = ( Cell ) figure;
        if ( column.cellWidthBeforeIconView == 0 ) column.cellWidthBeforeIconView =
            ( ( GridData ) column.cellColumn.getLayoutManager().getConstraint( cell ) ).widthHint;
        cell.icon.setImage( focusTree.viewModel.iconViewIcon( cell.item ) );
        final Dimension size = cell.getPreferredSize( iconViewCellWidth, SWT.DEFAULT );
        cell.setPreferredSize( size );
    }
    final FlowLayout layout = new FlowLayout();
    layout.setMinorAlignment( OrderedLayout.ALIGN_BOTTOMRIGHT );
    layout.setMajorSpacing( columnMargins.width );
    layout.setMinorSpacing( columnMargins.height );
    column.cellColumn.setLayoutManager( layout );
    column.cellColumn.setBorder( new MarginBorder( columnMargins.height, columnMargins.width,
                                                   columnMargins.height, columnMargins.width ) );
    updateIconViewBounds();
}
项目: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));
}
项目:MMINT    文件:OperatorEditPart.java   
/**
 * @generated
 */
public OperatorFigure() {

    FlowLayout layoutThis = new FlowLayout();
    layoutThis.setStretchMinorAxis(false);
    layoutThis.setMinorAlignment(FlowLayout.ALIGN_LEFTTOP);

    layoutThis.setMajorAlignment(FlowLayout.ALIGN_LEFTTOP);
    layoutThis.setMajorSpacing(5);
    layoutThis.setMinorSpacing(5);
    layoutThis.setHorizontal(true);

    this.setLayoutManager(layoutThis);

    this.setLineWidth(3);
    this.setForegroundColor(THIS_FORE);
    this.setBackgroundColor(THIS_BACK);
    this.setBorder(
        new MarginBorder(
            getMapMode().DPtoLP(10),
            getMapMode().DPtoLP(10),
            getMapMode().DPtoLP(10),
            getMapMode().DPtoLP(10)));
    createContents();
}
项目:MMINT    文件:ModelEditPart.java   
/**
 * @generated
 */
public ModelFigure() {

    FlowLayout layoutThis = new FlowLayout();
    layoutThis.setStretchMinorAxis(false);
    layoutThis.setMinorAlignment(FlowLayout.ALIGN_LEFTTOP);

    layoutThis.setMajorAlignment(FlowLayout.ALIGN_LEFTTOP);
    layoutThis.setMajorSpacing(5);
    layoutThis.setMinorSpacing(5);
    layoutThis.setHorizontal(true);

    this.setLayoutManager(layoutThis);

    this.setLineWidth(3);
    this.setForegroundColor(THIS_FORE);
    this.setBackgroundColor(THIS_BACK);
    this.setMinimumSize(new Dimension(getMapMode().DPtoLP(0), getMapMode().DPtoLP(60)));
    this.setBorder(
        new MarginBorder(
            getMapMode().DPtoLP(7),
            getMapMode().DPtoLP(7),
            getMapMode().DPtoLP(7),
            getMapMode().DPtoLP(7)));
    createContents();
}
项目:MMINT    文件:Model2EditPart.java   
/**
 * @generated
 */
public ModelFigure() {

    FlowLayout layoutThis = new FlowLayout();
    layoutThis.setStretchMinorAxis(false);
    layoutThis.setMinorAlignment(FlowLayout.ALIGN_LEFTTOP);

    layoutThis.setMajorAlignment(FlowLayout.ALIGN_LEFTTOP);
    layoutThis.setMajorSpacing(5);
    layoutThis.setMinorSpacing(5);
    layoutThis.setHorizontal(true);

    this.setLayoutManager(layoutThis);

    this.setLineWidth(3);
    this.setForegroundColor(THIS_FORE);
    this.setBackgroundColor(THIS_BACK);
    this.setMinimumSize(new Dimension(getMapMode().DPtoLP(0), getMapMode().DPtoLP(60)));
    this.setBorder(
        new MarginBorder(
            getMapMode().DPtoLP(7),
            getMapMode().DPtoLP(7),
            getMapMode().DPtoLP(7),
            getMapMode().DPtoLP(7)));
    createContents();
}
项目:MMINT    文件:ModelElementReference2EditPart.java   
/**
 * @generated
 */
public ModelElementReferenceFigure() {

    FlowLayout layoutThis = new FlowLayout();
    layoutThis.setStretchMinorAxis(false);
    layoutThis.setMinorAlignment(FlowLayout.ALIGN_LEFTTOP);

    layoutThis.setMajorAlignment(FlowLayout.ALIGN_LEFTTOP);
    layoutThis.setMajorSpacing(5);
    layoutThis.setMinorSpacing(5);
    layoutThis.setHorizontal(true);

    this.setLayoutManager(layoutThis);

    this.setForegroundColor(THIS_FORE);
    this.setBackgroundColor(THIS_BACK);
    this.setBorder(new MarginBorder(getMapMode().DPtoLP(7), getMapMode().DPtoLP(7), getMapMode().DPtoLP(7),
            getMapMode().DPtoLP(7)));
    createContents();
}
项目:MMINT    文件:ModelElementReferenceEditPart.java   
/**
 * @generated
 */
public ModelElementReferenceFigure() {

    FlowLayout layoutThis = new FlowLayout();
    layoutThis.setStretchMinorAxis(false);
    layoutThis.setMinorAlignment(FlowLayout.ALIGN_LEFTTOP);

    layoutThis.setMajorAlignment(FlowLayout.ALIGN_LEFTTOP);
    layoutThis.setMajorSpacing(5);
    layoutThis.setMinorSpacing(5);
    layoutThis.setHorizontal(true);

    this.setLayoutManager(layoutThis);

    this.setForegroundColor(THIS_FORE);
    this.setBackgroundColor(THIS_BACK);
    this.setBorder(new MarginBorder(getMapMode().DPtoLP(7), getMapMode().DPtoLP(7), getMapMode().DPtoLP(7),
            getMapMode().DPtoLP(7)));
    createContents();
}
项目:MMINT    文件:MappingReferenceEditPart.java   
/**
 * @generated
 */
public MappingReferenceFigure() {

    FlowLayout layoutThis = new FlowLayout();
    layoutThis.setStretchMinorAxis(false);
    layoutThis.setMinorAlignment(FlowLayout.ALIGN_LEFTTOP);

    layoutThis.setMajorAlignment(FlowLayout.ALIGN_LEFTTOP);
    layoutThis.setMajorSpacing(5);
    layoutThis.setMinorSpacing(5);
    layoutThis.setHorizontal(true);

    this.setLayoutManager(layoutThis);

    this.setCornerDimensions(new Dimension(getMapMode().DPtoLP(12), getMapMode().DPtoLP(12)));
    this.setLineWidth(3);
    this.setForegroundColor(THIS_FORE);
    this.setBackgroundColor(THIS_BACK);
    this.setMinimumSize(new Dimension(getMapMode().DPtoLP(0), getMapMode().DPtoLP(60)));
    this.setBorder(new MarginBorder(getMapMode().DPtoLP(7), getMapMode().DPtoLP(7), getMapMode().DPtoLP(7),
            getMapMode().DPtoLP(7)));
    createContents();
}
项目:MMINT    文件:ModelElementReference3EditPart.java   
/**
 * @generated
 */
public ModelElementReferenceSuperFigure() {

    FlowLayout layoutThis = new FlowLayout();
    layoutThis.setStretchMinorAxis(false);
    layoutThis.setMinorAlignment(FlowLayout.ALIGN_LEFTTOP);

    layoutThis.setMajorAlignment(FlowLayout.ALIGN_LEFTTOP);
    layoutThis.setMajorSpacing(5);
    layoutThis.setMinorSpacing(5);
    layoutThis.setHorizontal(true);

    this.setLayoutManager(layoutThis);

    this.setLineStyle(Graphics.LINE_DASH);
    this.setForegroundColor(THIS_FORE);
    this.setBackgroundColor(THIS_BACK);
    this.setBorder(new MarginBorder(getMapMode().DPtoLP(7), getMapMode().DPtoLP(7), getMapMode().DPtoLP(7),
            getMapMode().DPtoLP(7)));
    createContents();
}