「GMF」の編集履歴(バックアップ)一覧はこちら
GMF - (2008/12/15 (月) 01:56:35) の1つ前との変更点
追加された行は緑色になります。
削除された行は赤色になります。
環境:Eclipse 3.4.1 (eclipse-modeling-ganymede-SR1-incubation-win32)
----
[[コネクションの途中のベンドポイントをドラッグしたときの動作]]
----
GMFのコネクション制御を行うEditPart基底クラス。
org.eclipse.gmf.runtime.diagram.ui.editparts.ConnectionEditPart extends AbstractConnectionEditPart
フィガーの作成・・・いちいちテンプレートメソッド・・・
final protected IFigure createFigure() {
return createConnectionFigure();
}
abstract protected Connection createConnectionFigure();
installRouterメソッド内で、Styleに設定したルーティングより使用するルーティングクラスが決定する。
環境:Eclipse 3.4.1 (eclipse-modeling-ganymede-SR1-incubation-win32)
----
[[コネクションの途中のベンドポイントをドラッグしたときの動作]]
----
GMFのコネクション制御を行うEditPart基底クラス。
org.eclipse.gmf.runtime.diagram.ui.editparts.ConnectionEditPart extends AbstractConnectionEditPart
フィガーの作成・・・いちいちテンプレートメソッド・・・
final protected IFigure createFigure() {
return createConnectionFigure();
}
abstract protected Connection createConnectionFigure();
installRouterメソッド内で、Styleに設定したルーティングより使用するルーティングクラスが決定する。
ルーティングクラスはレイヤーより取得する
org.eclipse.gmf.runtime.draw2d.ui.internal.figures.ConnectionLayerEx extends ConnectionLayer
protected void installRouter() {
ConnectionLayer cLayer = (ConnectionLayer) getLayer(LayerConstants.CONNECTION_LAYER);
RoutingStyle style = (RoutingStyle) ((View) getModel())
.getStyle(NotationPackage.Literals.ROUTING_STYLE);
if (style != null && cLayer instanceof ConnectionLayerEx) {
ConnectionLayerEx cLayerEx = (ConnectionLayerEx) cLayer;
Routing routing = style.getRouting();
if (Routing.MANUAL_LITERAL == routing) {
getConnectionFigure().setConnectionRouter(
cLayerEx.getObliqueRouter());
} else if (Routing.RECTILINEAR_LITERAL == routing) {
getConnectionFigure().setConnectionRouter(
cLayerEx.getRectilinearRouter());
} else if (Routing.TREE_LITERAL == routing) {
getConnectionFigure().setConnectionRouter(
cLayerEx.getTreeRouter());
}
}
refreshRouterChange();
}