@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; }
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); } }); }
/** * @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(); }
/** * 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); }
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); }
/** * @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(); }
/** * @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(); }
/** * @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(); }
/** * @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(); }
/** * {@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); }
/** * {@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); }
public InputFigure() { setLayoutManager(new FlowLayout()); paramDescriptionLabel = new Label("参数名:"); add(paramDescriptionLabel); TextFieldFigure text = new TextFieldFigure("test",0); add(text); }
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(); }
/** * @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(); }
/** * @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(); }
/** * @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(); }
/** * @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(); }
/** * @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(); }
/** * @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(); }
@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; }
@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; }
@Override protected void refreshVisuals() { super.refreshVisuals(); if (getModel().hasSelected()) { ((LineLayout)getFigure().getLayoutManager()).setMinorAlignment(FlowLayout.ALIGN_CENTER); align(); } label.setText(String.valueOf(getModel().getIndex())); }
public NormalColumnFigure() { final FlowLayout layout = new FlowLayout(); layout.setMinorAlignment(OrderedLayout.ALIGN_CENTER); setLayoutManager(layout); setBorder(new MarginBorder(new Insets(0, 5, 0, 0))); }
/** * {@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); }
public NormalColumnFigure() { FlowLayout layout = new FlowLayout(); layout.setMinorAlignment(FlowLayout.ALIGN_CENTER); this.setLayoutManager(layout); this.setBorder(new MarginBorder(new Insets(0, 5, 0, 0))); }
/** * {@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); }
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); } }
public GroupColumnFigure() { final FlowLayout layout = new FlowLayout(); layout.setStretchMinorAxis(true); layout.setMajorSpacing(0); layout.setMinorSpacing(0); setLayoutManager(layout); }
public NormalColumnFigure() { final FlowLayout layout = new FlowLayout(); layout.setStretchMinorAxis(true); layout.setMajorSpacing(0); layout.setMinorSpacing(0); setLayoutManager(layout); }
@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); }
private void initializeEmpty(final IContourAttributes attributes) { final FlowLayout layout = new FlowLayout(); setLayoutManager(layout); initializeCompartment(); childCompartment.setBorder(null); add(childCompartment); }
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); }
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); }
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; }
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; }