Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordstadnik2006-03-17 10:21:29 -0500
committerdstadnik2006-03-17 10:21:29 -0500
commite6672ca3ae8d04bd7a14f2fb93ba89d226d6b874 (patch)
treed87790e527bf065cb7fd8c2f077a6a86ddf4f370
parent59220b4d43eb5af52deaf835103d590046a3d247 (diff)
downloadorg.eclipse.gmf-tooling-e6672ca3ae8d04bd7a14f2fb93ba89d226d6b874.tar.gz
org.eclipse.gmf-tooling-e6672ca3ae8d04bd7a14f2fb93ba89d226d6b874.tar.xz
org.eclipse.gmf-tooling-e6672ca3ae8d04bd7a14f2fb93ba89d226d6b874.zip
regenerate
-rw-r--r--examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/parts/PortEditPart.java5
-rw-r--r--examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/parts/ShipEditPart.java5
-rw-r--r--examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/parts/Ship_CargoCompartmentEditPart.java44
3 files changed, 50 insertions, 4 deletions
diff --git a/examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/parts/PortEditPart.java b/examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/parts/PortEditPart.java
index c80914042..3720de7e3 100644
--- a/examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/parts/PortEditPart.java
+++ b/examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/parts/PortEditPart.java
@@ -16,7 +16,6 @@ import org.eclipse.draw2d.Figure;
import org.eclipse.draw2d.IFigure;
import org.eclipse.draw2d.PositionConstants;
import org.eclipse.draw2d.StackLayout;
-import org.eclipse.draw2d.ToolbarLayout;
import org.eclipse.emf.ecore.EAnnotation;
@@ -37,6 +36,8 @@ import org.eclipse.gmf.runtime.diagram.ui.editparts.ShapeNodeEditPart;
import org.eclipse.gmf.runtime.diagram.ui.editpolicies.ConstrainedToolbarLayoutEditPolicy;
import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
+import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout;
+
import org.eclipse.gmf.runtime.draw2d.ui.internal.figures.ImageFigureEx;
import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure;
@@ -170,7 +171,7 @@ public class PortEditPart extends ShapeNodeEditPart {
*/
protected IFigure setupContentPane(IFigure nodeShape) {
if (nodeShape.getLayoutManager() == null) {
- ToolbarLayout layout = new ToolbarLayout();
+ ConstrainedToolbarLayout layout = new ConstrainedToolbarLayout();
layout.setSpacing(getMapMode().DPtoLP(5));
nodeShape.setLayoutManager(layout);
}
diff --git a/examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/parts/ShipEditPart.java b/examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/parts/ShipEditPart.java
index ff412494f..a144ac305 100644
--- a/examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/parts/ShipEditPart.java
+++ b/examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/parts/ShipEditPart.java
@@ -16,7 +16,6 @@ import org.eclipse.draw2d.Figure;
import org.eclipse.draw2d.IFigure;
import org.eclipse.draw2d.PositionConstants;
import org.eclipse.draw2d.StackLayout;
-import org.eclipse.draw2d.ToolbarLayout;
import org.eclipse.emf.ecore.EAnnotation;
@@ -46,6 +45,8 @@ import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewAndElementRequest;
+import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout;
+
import org.eclipse.gmf.runtime.draw2d.ui.internal.figures.ImageFigureEx;
import org.eclipse.gmf.runtime.emf.type.core.IElementType;
@@ -198,7 +199,7 @@ public class ShipEditPart extends ShapeNodeEditPart {
*/
protected IFigure setupContentPane(IFigure nodeShape) {
if (nodeShape.getLayoutManager() == null) {
- ToolbarLayout layout = new ToolbarLayout();
+ ConstrainedToolbarLayout layout = new ConstrainedToolbarLayout();
layout.setSpacing(getMapMode().DPtoLP(5));
nodeShape.setLayoutManager(layout);
}
diff --git a/examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/parts/Ship_CargoCompartmentEditPart.java b/examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/parts/Ship_CargoCompartmentEditPart.java
index 73b4730d8..f3de62253 100644
--- a/examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/parts/Ship_CargoCompartmentEditPart.java
+++ b/examples/org.eclipse.gmf.examples.taipan.gmf.editor/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/parts/Ship_CargoCompartmentEditPart.java
@@ -13,6 +13,14 @@ package org.eclipse.gmf.examples.taipan.gmf.editor.edit.parts;
import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.draw2d.MarginBorder;
+import org.eclipse.draw2d.Orientable;
+import org.eclipse.draw2d.ScrollPane;
+
+import org.eclipse.draw2d.geometry.Dimension;
+import org.eclipse.draw2d.geometry.Insets;
+
import org.eclipse.emf.common.notify.Notification;
import org.eclipse.gmf.examples.taipan.gmf.editor.edit.policies.Ship_CargoCompartmentCanonicalEditPolicy;
@@ -23,6 +31,13 @@ import org.eclipse.gmf.runtime.diagram.ui.editparts.ListCompartmentEditPart;
import org.eclipse.gmf.runtime.diagram.ui.editpolicies.CreationEditPolicy;
import org.eclipse.gmf.runtime.diagram.ui.editpolicies.DragDropEditPolicy;
+import org.eclipse.gmf.runtime.diagram.ui.figures.ResizableCompartmentFigure;
+import org.eclipse.gmf.runtime.diagram.ui.figures.ShapeCompartmentFigure;
+
+import org.eclipse.gmf.runtime.draw2d.ui.figures.ListScrollBar;
+
+import org.eclipse.gmf.runtime.draw2d.ui.mapmode.IMapMode;
+
/**
* @generated
*/
@@ -59,4 +74,33 @@ public class Ship_CargoCompartmentEditPart extends ListCompartmentEditPart {
installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy());
installEditPolicy(EditPolicyRoles.CANONICAL_ROLE, new Ship_CargoCompartmentCanonicalEditPolicy());
}
+
+ /**
+ * Temporary fix for the https://bugs.eclipse.org/bugs/show_bug.cgi?id=132219
+ * @generated
+ */
+ public IFigure createFigure() {
+ IMapMode mm = getMapMode();
+ ResizableCompartmentFigure rcf = (ResizableCompartmentFigure) super.createFigure();
+ if (rcf instanceof ShapeCompartmentFigure) {
+ Insets insets = new Insets(mm.DPtoLP(1), mm.DPtoLP(2), mm.DPtoLP(1), mm.DPtoLP(0));
+ Dimension size = new Dimension(mm.DPtoLP(15), mm.DPtoLP(15));
+
+ ScrollPane scrollpane = rcf.getScrollPane();
+ scrollpane.setHorizontalScrollBar(new ListScrollBar(Orientable.HORIZONTAL, insets, size, mm.DPtoLP(10), mm.DPtoLP(50)));
+ scrollpane.setVerticalScrollBar(new ListScrollBar(Orientable.VERTICAL, insets, size, mm.DPtoLP(10), mm.DPtoLP(50)));
+
+ int MB = mm.DPtoLP(5);
+ scrollpane.setBorder(new MarginBorder(MB, MB, MB, MB));
+ int SZ = mm.DPtoLP(10);
+ scrollpane.setMinimumSize(new Dimension(SZ, SZ));
+ } else {
+ Insets insets = new Insets(mm.DPtoLP(1), mm.DPtoLP(2), mm.DPtoLP(1), mm.DPtoLP(0));
+ Dimension size = new Dimension(mm.DPtoLP(15), mm.DPtoLP(15));
+
+ ScrollPane scrollPane = rcf.getScrollPane();
+ scrollPane.setVerticalScrollBar(new ListScrollBar(Orientable.VERTICAL, insets, size, mm.DPtoLP(10), mm.DPtoLP(50)));
+ }
+ return rcf;
+ }
}

Back to the top