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

项目:gemoc-studio    文件:BranchEditPart.java   
@Override
protected IFigure createFigure() {
    final LineLayout layout = new LineLayout();
    layout.setHorizontal(true);
    layout.setMajorAlignment(FlowLayout.ALIGN_TOPLEFT);
    layout.setMinorAlignment(FlowLayout.ALIGN_BOTTOMRIGHT);
    layout.setMinorSpacing(SPACING);
    layout.setMargin(MARGIN);

    FreeformLayer res = new FreeformLayer();
    final Label toolTip = new Label();
    toolTip.setFont(JFaceResources.getFont(JFaceResources.TEXT_FONT));
    toolTip.setBackgroundColor(ColorConstants.tooltipBackground);
    toolTip.setForegroundColor(ColorConstants.tooltipForeground);
    toolTip.setText(getModel().getTimelineWindow().getProvider().getTextAt(getModel().getBranch()));
    res.setToolTip(toolTip);
    res.setLayoutManager(layout);
    return res;
}
项目:pandionj    文件:ObjectFigure.java   
MethodWidget(IMethod method) {
    setLayoutManager(new FlowLayout());
    button = new Button(shortSig(method));
    button.setToolTip(new Label(longSig(method)));
    button.setForegroundColor(ColorConstants.black);
    FontManager.setFont(button, PandionJConstants.BUTTON_FONT_SIZE);
    button.setEnabled(methodsEnabled);
    add(button);
    resultLabel = new Label();
    resultLabel.setForegroundColor(ColorConstants.black);
    add(resultLabel);
    button.addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent event) {
            invoke(model, method, resultLabel);
        }
    });
}
项目:xtext-gef    文件:StateEditPart.java   
/**
 * @generated
 */
public StateFigure() {

    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.setPreferredSize(new Dimension(getMapMode().DPtoLP(40),
            getMapMode().DPtoLP(40)));
    createContents();
}
项目:PDFReporter-Studio    文件:ColumnFigure.java   
/**
 * Constructs a CheckBox with the passed text in its label.
 * 
 * @param text
 *          The label text
 * @since 2.0
 */
public ColumnFigure(String text, Image image) {
    setLayoutManager(new FlowLayout(true));
    checkbox = new CheckBox();
    checkbox.addChangeListener(new ChangeListener() {

        @Override
        public void handleStateChanged(ChangeEvent event) {
            if (event.getPropertyName().equals(ButtonModel.SELECTED_PROPERTY))
                handleSelectionChanged();
        }
    });
    add(checkbox);
    Label lbl = new Label(ConvertUtil.cleanDbNameFull(text), image);
    lbl.setTextPlacement(PositionConstants.WEST);
    add(lbl);
}
项目:snaker-designer    文件:FieldFigure.java   
public FieldFigure(Field field) {
    this.model = field;
    this.component = ConfigManager.getComponentByGroupAndType(
            ConfigManager.COMPONENT_TYPE_FIELD, field.getType());
    setLayoutManager(new FlowLayout());

    setForegroundColor(ColorConstants.blue);
    setBackgroundColor(ColorConstants.blue);
    setBorder(new FieldBorder(field.getDisplayName()));
    setOpaque(true);
    SimpleLabel sl = new SimpleLabel();
    sl.setIcon(getImageByType());
    add(sl, ToolbarLayout.ALIGN_CENTER);

    placeHolder = ConfigManager.getPlaceHolderValue(component);
    int iWidth = 200 * placeHolder + 1;
    setSize(iWidth, 22);
}
项目:HelloBrazil    文件:GroupMatchEditPart.java   
/**
 * @generated
 */
public GroupMatchFigure() {

    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);

    createContents();
}
项目:HelloBrazil    文件:GroupEditPart.java   
/**
 * @generated
 */
public GroupFigure() {

    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);

    createContents();
}
项目:HelloBrazil    文件:TeamEditPart.java   
/**
 * @generated
 */
public TeamFigure() {

    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);

    createContents();
}
项目:HelloBrazil    文件:EliminationMatchEditPart.java   
/**
 * @generated
 */
public EliminationMatchFigure() {

    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);

    createContents();
}
项目: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    文件: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    文件:InputFigure.java   
public InputFigure() {
    setLayoutManager(new FlowLayout());
    paramDescriptionLabel = new Label("参数名:");
    add(paramDescriptionLabel);
    TextFieldFigure text = new TextFieldFigure("test",0);
    add(text);
}
项目: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();
}
项目: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();
}
项目:MMINT    文件:MappingReference2EditPart.java   
/**
 * @generated
 */
public MappingReferenceSuperFigure() {

    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.setLineStyle(Graphics.LINE_DASH);
    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();
}
项目:gemoc-studio    文件:TimelineWindowEditPart.java   
@Override
protected IFigure createFigure() {
    final LineLayout layout = new LineLayout();
    layout.setHorizontal(false);
    layout.setMajorAlignment(FlowLayout.ALIGN_TOPLEFT);
    layout.setMinorAlignment(FlowLayout.ALIGN_TOPLEFT);
    layout.setMinorSpacing(SPACING);
    layout.setMargin(MARGIN);

    FreeformLayer res = new FreeformLayer();
    res.setLayoutManager(layout);
    return res;
}
项目:gemoc-studio    文件:ChoiceEditPart.java   
@Override
protected IFigure createFigure() {
    final LineLayout layout = new LineLayout();
    layout.setHorizontal(false);
    layout.setMajorAlignment(FlowLayout.ALIGN_TOPLEFT);
    layout.setMinorAlignment(FlowLayout.ALIGN_TOPLEFT);
    layout.setMinorSpacing(SPACING);

    FreeformLayer res = new FreeformLayer();
    res.setLayoutManager(layout);
    label = new Label();
    res.add(label);
    return res;
}
项目:gemoc-studio    文件:ChoiceEditPart.java   
@Override
protected void refreshVisuals() {
    super.refreshVisuals();
    if (getModel().hasSelected()) {
        ((LineLayout)getFigure().getLayoutManager()).setMinorAlignment(FlowLayout.ALIGN_CENTER);
        align();
    }
    label.setText(String.valueOf(getModel().getIndex()));
}
项目:ermasterr    文件:NormalColumnFigure.java   
public NormalColumnFigure() {
    final FlowLayout layout = new FlowLayout();
    layout.setMinorAlignment(OrderedLayout.ALIGN_CENTER);
    setLayoutManager(layout);

    setBorder(new MarginBorder(new Insets(0, 5, 0, 0)));
}
项目:ermasterr    文件:FunnyStyleSupport.java   
/**
 * {@inheritDoc}
 */
@Override
public void initTitleBar(final Figure top) {
    top.setLayoutManager(new BorderLayout());

    final Figure title = new Figure();
    top.add(title, BorderLayout.TOP);
    final FlowLayout titleLayout = new FlowLayout();
    titleLayout.setMinorAlignment(OrderedLayout.ALIGN_CENTER);
    title.setLayoutManager(titleLayout);

    final ImageFigure image = new ImageFigure();
    image.setBorder(new MarginBorder(new Insets(5, 10, 5, 2)));
    image.setImage(ERDiagramActivator.getImage(getTableFigure().getImageKey()));
    title.add(image);

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

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

    top.add(separater, BorderLayout.BOTTOM);
}
项目:ermaster-k    文件:NormalColumnFigure.java   
public NormalColumnFigure() {
    FlowLayout layout = new FlowLayout();
    layout.setMinorAlignment(FlowLayout.ALIGN_CENTER);
    this.setLayoutManager(layout);

    this.setBorder(new MarginBorder(new Insets(0, 5, 0, 0)));
}
项目:ermaster-k    文件:FunnyStyleSupport.java   
/**
 * {@inheritDoc}
 */
@Override
public void initTitleBar(Figure top) {
    top.setLayoutManager(new BorderLayout());

    Figure title = new Figure();
    top.add(title, BorderLayout.TOP);
    FlowLayout titleLayout = new FlowLayout();
    titleLayout.setMinorAlignment(FlowLayout.ALIGN_CENTER);
    title.setLayoutManager(titleLayout);

    ImageFigure image = new ImageFigure();
    image.setBorder(new MarginBorder(new Insets(5, 10, 5, 2)));
    image.setImage(ERDiagramActivator.getImage(this.getTableFigure().getImageKey()));
    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);
}
项目:statecharts    文件:StatechartValidationDecorationProvider.java   
protected void decorate(View view) {
    List<SCTIssue> issues = store.getIssues(semanticID);
    SCTIssue subDiagramIssue = getSubDiagramIssue(view);
    if (subDiagramIssue != null)
        issues.add(subDiagramIssue);
    Severity severity = Severity.INFO;
    Label toolTip = null;
    if (issues.isEmpty())
        return;
    for (int i = 0; i < issues.size(); i++) {
        Issue issue = issues.get(i);
        Severity nextSeverity = issue.getSeverity();
        Image nextImage = getImage(nextSeverity);
        if (toolTip == null) {
            toolTip = new Label(issue.getMessage(), nextImage);
        } else {
            if (toolTip.getChildren().isEmpty()) {
                Label comositeLabel = new Label();
                FlowLayout fl = new FlowLayout(false);
                fl.setMinorSpacing(0);
                comositeLabel.setLayoutManager(fl);
                comositeLabel.add(toolTip);
                toolTip = comositeLabel;
            }
            toolTip.add(new Label(issue.getMessage(), nextImage));
        }
        severity = (nextSeverity.ordinal() < severity.ordinal()) ? nextSeverity : severity;
    }

    if (view instanceof Edge) {
        setDecoration(getDecoratorTarget().addConnectionDecoration(getImage(severity), 50, true));
        getDecoration().setToolTip(toolTip);
    } else {
        int margin = view.getElement() instanceof Pseudostate || view.getElement() instanceof FinalState ? 0
                : -1;
        setDecoration(getDecoratorTarget().addShapeDecoration(getImage(severity),
                IDecoratorTarget.Direction.NORTH_EAST, margin, false));
        getDecoration().setToolTip(toolTip);
    }
}
项目:erflute    文件:GroupColumnFigure.java   
public GroupColumnFigure() {
    final FlowLayout layout = new FlowLayout();
    layout.setStretchMinorAxis(true);
    layout.setMajorSpacing(0);
    layout.setMinorSpacing(0);
    setLayoutManager(layout);
}
项目:erflute    文件:NormalColumnFigure.java   
public NormalColumnFigure() {
    final FlowLayout layout = new FlowLayout();
    layout.setStretchMinorAxis(true);
    layout.setMajorSpacing(0);
    layout.setMinorSpacing(0);
    setLayoutManager(layout);
}
项目:erflute    文件:FunnyStyleSupport.java   
@Override
public void initTitleBar(Figure top) {
    top.setLayoutManager(new BorderLayout());

    final FlowLayout layout = new FlowLayout();
    layout.setStretchMinorAxis(true);
    final Figure title = new Figure();
    top.add(title, BorderLayout.TOP);
    title.setLayoutManager(layout);

    title.setBorder(new MarginBorder(new Insets(2, 2, 2, 2)));

    final ImageFigure image = new ImageFigure();
    image.setBorder(new MarginBorder(new Insets(0, 0, 0, 0)));
    image.setImage(Activator.getImage(getTableFigure().getImageKey()));
    title.add(image);

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

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

    top.add(separater, BorderLayout.BOTTOM);
}
项目:ermaster-nhit    文件:NormalColumnFigure.java   
public NormalColumnFigure() {
    FlowLayout layout = new FlowLayout();
    layout.setMinorAlignment(FlowLayout.ALIGN_CENTER);
    this.setLayoutManager(layout);

    this.setBorder(new MarginBorder(new Insets(0, 5, 0, 0)));
}
项目:ermaster-nhit    文件:FunnyStyleSupport.java   
/**
 * {@inheritDoc}
 */
@Override
public void initTitleBar(Figure top) {
    top.setLayoutManager(new BorderLayout());

    Figure title = new Figure();
    top.add(title, BorderLayout.TOP);
    FlowLayout titleLayout = new FlowLayout();
    titleLayout.setMinorAlignment(FlowLayout.ALIGN_CENTER);
    title.setLayoutManager(titleLayout);

    ImageFigure image = new ImageFigure();
    image.setBorder(new MarginBorder(new Insets(5, 10, 5, 2)));
    image.setImage(ERDiagramActivator.getImage(this.getTableFigure().getImageKey()));
    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);
}
项目:jive    文件:ContourFigure.java   
private void initializeEmpty(final IContourAttributes attributes)
{
  final FlowLayout layout = new FlowLayout();
  setLayoutManager(layout);
  initializeCompartment();
  childCompartment.setBorder(null);
  add(childCompartment);
}
项目:jive    文件:ContourFigure.java   
private void initializeNode(final IContourAttributes attributes)
{
  final FlowLayout layout = new FlowLayout(false);
  setLayoutManager(layout);
  initializeLabel(attributes);
  label.setBorder(null);
  label.setBackgroundColor(null);
  initializeCompartment();
  childCompartment.setBorder(null);
  add(label);
  add(childCompartment);
}
项目:jive    文件:ContourFigure.java   
private void initializeOutline(final IContourAttributes attributes)
{
  final FlowLayout layout = new FlowLayout();
  setLayoutManager(layout);
  setBorder(ContourFigure.CONTOUR_BORDER);
  setBackgroundColor(ContourFigure.CONTOUR_BACKGROUND_COLOR);
  setOpaque(true);
  initializeCompartment();
  add(childCompartment);
}
项目:birt    文件:AttributeEditPart.java   
protected IFigure createFigure( )
{

    ColumnFigure columnFigure = null;
    columnFigure = new AttributeFigure( );
    FlowLayout layout = new FlowLayout( );
    layout.setMinorSpacing( 2 );
    columnFigure.setLayoutManager( layout );
    columnFigure.setOpaque( true );
    String name = OlapUtil.getDataFieldDisplayName( getColumn( ) );
    label = new Label( name );
    columnFigure.add( label );
    return columnFigure;

}
项目:birt    文件:HierarchyColumnEditPart.java   
protected IFigure createFigure( )
{
    ColumnFigure columnFigure = null;
    columnFigure = new ColumnFigure( );
    FlowLayout layout = new FlowLayout( );
    layout.setMinorSpacing( 2 );
    columnFigure.setLayoutManager( layout );
    columnFigure.setOpaque( true );
    String name = OlapUtil.getDataFieldDisplayName( getColumn( ) );
    label = new Label( name );
    columnFigure.add( label );
    return columnFigure;
}
项目:birt    文件:ColumnEditPart.java   
protected IFigure createFigure( )
{
    ColumnFigure columnFigure = null;
    columnFigure = new ColumnFigure( );
    FlowLayout layout = new FlowLayout( );
    layout.setMinorSpacing( 2 );
    columnFigure.setLayoutManager( layout );
    columnFigure.setOpaque( true );
    String name = OlapUtil.getDataFieldDisplayName( getColumn( ) );
    label = new Label( name );
    columnFigure.add( label );
    return columnFigure;
}