org.eclipse.gmf.runtime.draw2d.ui.mapmode.IMapMode Java Examples
The following examples show how to use
org.eclipse.gmf.runtime.draw2d.ui.mapmode.IMapMode.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: CustomShapeCompartmentFigure.java From bonita-studio with GNU General Public License v2.0 | 6 votes |
@Override protected void configureFigure(IMapMode mm) { ScrollPane scrollpane = getScrollPane(); if (scrollpane == null) { scrollpane = scrollPane = new ScrollPane(); } scrollpane.setViewport(new FreeformViewport()); scrollPane.setScrollBarVisibility(ScrollPane.NEVER); scrollPane.setVerticalScrollBar(null); scrollpane.setLayoutManager(new ScrollPaneLayout()); IFigure contents = new BorderItemsAwareFreeFormLayer(); contents.setLayoutManager(new FreeFormLayoutEx()); scrollpane.setContents(contents); int MB = mm.DPtoLP(0); scrollpane.setBorder(new MarginBorder(MB, MB, MB, MB)); int W_SZ = mm.DPtoLP(10); int H_SZ = mm.DPtoLP(10); scrollpane.setMinimumSize(new Dimension(W_SZ, H_SZ)); this.setFont(FONT_TITLE); }
Example #2
Source File: CustomSubprocessShapeCompartmentFigure.java From bonita-studio with GNU General Public License v2.0 | 6 votes |
@Override protected void configureFigure(IMapMode mm) { ScrollPane scrollpane = getScrollPane(); if(scrollpane==null){ scrollpane = scrollPane = new ScrollPane(); } scrollpane.setViewport(new FreeformViewport()); scrollPane.setScrollBarVisibility(ScrollPane.NEVER); scrollPane.setVerticalScrollBar(null); scrollpane.setLayoutManager(new ScrollPaneLayout() ); IFigure contents = new BorderItemsAwareFreeFormLayer(); contents.setLayoutManager(new FreeFormLayoutEx()); scrollpane.setContents(contents); int MB = mm.DPtoLP(0); scrollpane.setBorder(new MarginBorder(MB, MB,MB, MB)); int W_SZ = mm.DPtoLP(10); int H_SZ = mm.DPtoLP(10); scrollpane.setMinimumSize(new Dimension(W_SZ, H_SZ)); this.setFont(FONT_TITLE); }
Example #3
Source File: SyntaxColoringLabel.java From statecharts with Eclipse Public License 1.0 | 5 votes |
public StyleTextUtilities(IMapMode mapmode) { super(mapmode); cache = CacheBuilder.newBuilder().build(new CacheLoader<String, Dimension>() { @Override public Dimension load(String key) throws Exception { return getTextExtentsInternal(key, getFont()); } }); }
Example #4
Source File: CustomShapeCompartmentFigure.java From bonita-studio with GNU General Public License v2.0 | 5 votes |
@Override protected AnimatableScrollPane createScrollpane(IMapMode mm) { scrollPane = new AnimatableScrollPane(); scrollPane.getViewport().setContentsTracksWidth(false); scrollPane.getViewport().setContentsTracksHeight(false); scrollPane.setLayoutManager(new OverlayScrollPaneLayout()); scrollPane.setVerticalScrollBarVisibility(ScrollPane.NEVER); scrollPane.setHorizontalScrollBarVisibility(ScrollPane.NEVER); scrollPane.setContents(new Figure()); scrollPane.getContents().setBorder(null); return (AnimatableScrollPane) scrollPane; }
Example #5
Source File: CustomSubprocessShapeCompartmentFigure.java From bonita-studio with GNU General Public License v2.0 | 5 votes |
@Override protected AnimatableScrollPane createScrollpane(IMapMode mm) { scrollPane = new AnimatableScrollPane() ; scrollPane.getViewport().setContentsTracksWidth(true); scrollPane.getViewport().setContentsTracksHeight(true); scrollPane.setLayoutManager(new OverlayScrollPaneLayout()) ; scrollPane.setVerticalScrollBarVisibility(ScrollPane.NEVER); scrollPane.setHorizontalScrollBarVisibility(ScrollPane.NEVER); Figure f = new Figure() ; f.setBackgroundColor(ColorConstants.red) ; scrollPane.setContents(f); scrollPane.getContents().setBorder(new MarginBorder(0,0,0,0)); return (AnimatableScrollPane)scrollPane; }
Example #6
Source File: StatechartTextFigure.java From statecharts with Eclipse Public License 1.0 | 5 votes |
public StatechartTextFigure(IMapMode mapMode) { GridLayout layout = new GridLayout(1, false); layout.verticalSpacing = 2; this.setLayoutManager(layout); this.setOutline(true); createContents(); }
Example #7
Source File: StateFigure.java From statecharts with Eclipse Public License 1.0 | 5 votes |
public StateFigure(IMapMode mapMode) { GridLayout layout = new GridLayout(1, false); layout.verticalSpacing = 0; layout.horizontalSpacing = 0; layout.marginHeight = 5; layout.marginWidth = 5; this.setLayoutManager(layout); this.setCornerDimensions(new Dimension(mapMode.DPtoLP(15), mapMode.DPtoLP(15))); this.setOutline(true); createContents(); }
Example #8
Source File: RegionFigure.java From statecharts with Eclipse Public License 1.0 | 5 votes |
public RegionFigure(IMapMode mapMode) { this.mapMode = mapMode; GridLayout layoutThis = new GridLayout(1, false); layoutThis.verticalSpacing = 2; this.setLayoutManager(layoutThis); this.setLineWidth(mapMode.DPtoLP(1)); createContents(); }
Example #9
Source File: SynchronizationFigure.java From statecharts with Eclipse Public License 1.0 | 5 votes |
public SynchronizationFigure(IMapMode mapMode) { this.mapMode = mapMode; this.setLineWidth(1); this.setForegroundColor(ColorConstants.black); this.setBackgroundColor(ColorConstants.black); this.setPreferredSize(new Dimension(getMapMode().DPtoLP(defaultSize), getMapMode().DPtoLP(defaultSize))); }
Example #10
Source File: FinalStateFigure.java From statecharts with Eclipse Public License 1.0 | 5 votes |
public FinalStateFigure(IMapMode mapMode) { this.mapMode = mapMode; BorderLayout layout = new BorderLayout(); this.setLayoutManager(layout); this.setOutline(false); this.setLineWidth(0); this.setBackgroundColor(ColorConstants.black); createContents(); }
Example #11
Source File: PriorityFigure.java From statecharts with Eclipse Public License 1.0 | 5 votes |
public PriorityFigure(IMapMode mapMode, int priority) { this.priority = priority; this.setLayoutManager(new StackLayout()); setForegroundColor(ColorConstants.black); setBackgroundColor(ColorConstants.white); this.setOutline(false); setOpaque(false); setFill(true); this.setLineWidth(-1); label = new Label(String.valueOf(priority)); label.setFont(createFont(priority)); add(label); }
Example #12
Source File: TransitionFigure.java From statecharts with Eclipse Public License 1.0 | 5 votes |
public TransitionFigure(IMapMode mapMode, boolean reversed) { this.mapMode = mapMode; setTolerance(); setLineWidth(mapMode.DPtoLP(1)); if (reversed) setSourceDecoration(createTargetDecoration()); else setTargetDecoration(createTargetDecoration()); }
Example #13
Source File: FeedbackGraphicalNodeEditPolicy.java From statecharts with Eclipse Public License 1.0 | 5 votes |
protected IMapMode getMapMode() { RootEditPart root = getHost().getRoot(); if (root instanceof DiagramRootEditPart) { DiagramRootEditPart dgrmRoot = (DiagramRootEditPart) root; return dgrmRoot.getMapMode(); } return MapModeUtil.getMapMode(); }
Example #14
Source File: StreamFigure.java From scava with Eclipse Public License 2.0 | 5 votes |
public StreamFigure(IMapMode mapMode, boolean isTopic) { this.isTopic = isTopic; GridLayout layoutThis = new GridLayout(); layoutThis.numColumns = 1; layoutThis.makeColumnsEqualWidth = true; this.setLayoutManager(layoutThis); this.setBorder(new MarginBorder(mapMode.DPtoLP(5), mapMode.DPtoLP(5), mapMode.DPtoLP(5), mapMode.DPtoLP(5))); createContents(); }
Example #15
Source File: SynchronizationFigure.java From statecharts with Eclipse Public License 1.0 | 4 votes |
public IMapMode getMapMode() { return mapMode; }
Example #16
Source File: MapModeUtils.java From statecharts with Eclipse Public License 1.0 | 4 votes |
public static Dimension getDefaultSizeDimension(IMapMode mode) { return new Dimension(mode.DPtoLP(DEFAULT_NODE_WIDTH), mode.DPtoLP(DEFAULT_NODE_HEIGHT)); }
Example #17
Source File: MapModeUtils.java From statecharts with Eclipse Public License 1.0 | 4 votes |
public static Dimension getMappedDimensions(IMapMode mode, Dimension d) { return new Dimension(mode.DPtoLP(d.width), mode.DPtoLP(d.height)); }
Example #18
Source File: ExitFigure.java From statecharts with Eclipse Public License 1.0 | 4 votes |
public ExitFigure(IMapMode mapMode) { this.mapMode = mapMode; this.setLineWidth(2); }
Example #19
Source File: RegionFigure.java From statecharts with Eclipse Public License 1.0 | 4 votes |
public IMapMode getMapMode() { return mapMode; }
Example #20
Source File: TransitionFigure.java From statecharts with Eclipse Public License 1.0 | 4 votes |
protected IMapMode getMapMode() { return mapMode; }
Example #21
Source File: CustomSubprocessShapeCompartmentFigure.java From bonita-studio with GNU General Public License v2.0 | 4 votes |
public CustomSubprocessShapeCompartmentFigure(String title, IMapMode mm) { super(title, mm); setBorder(null); }
Example #22
Source File: TransitionFigure.java From statecharts with Eclipse Public License 1.0 | 4 votes |
public TransitionFigure(IMapMode mapMode) { this(mapMode, false); }
Example #23
Source File: CustomShapeCompartmentFigure.java From bonita-studio with GNU General Public License v2.0 | 4 votes |
public CustomShapeCompartmentFigure(String title, IMapMode mm) { super(title, mm); setBorder(new OneLineBorder(mm.DPtoLP(1), PositionConstants.RIGHT)); }