GMF

「GMF」の編集履歴(バックアップ)一覧はこちら

GMF - (2008/12/15 (月) 01:58:54) の最新版との変更点

追加された行は緑色になります。

削除された行は赤色になります。

環境: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(); } 例えばorg.eclipse.gmf.runtime.draw2d.ui.internal.routers.RectilinearRouter org.eclipse.gmf.runtime.draw2d.ui.internal.routers.BorderItemRectilinearRouter とか
環境:Eclipse 3.4.1 (eclipse-modeling-ganymede-SR1-incubation-win32) ---- [[GMFの印刷(プリント)機能]] ---- [[コネクションの途中のベンドポイントをドラッグしたときの動作]] [[ベンドポイントを永続化するコマンド]] [[ベンドポイントをモデルからフィガーの制約にロード箇所]] [[ベンドポイントのハンドルを表示している箇所]] [[マンハッタンルーター的な動作をするGMFのルーター]] [[マンハッタンルーター的な動作をするGMFのルーターでハンドルが増える契機]] ---- GMFのコネクション制御を行うEditPart基底クラス。 org.eclipse.gmf.runtime.diagram.ui.editparts.ConnectionEditPart extends AbstractConnectionEditPart protected void refreshVisuals() { super.refreshVisuals(); refreshVisibility(); refreshForegroundColor(); refreshRoutingStyles(); refreshSmoothness(); refreshJumplinks(); refreshBendpoints(); refreshFont(); } フィガーの作成・・・いちいちテンプレートメソッド・・・ 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(); } 例えば org.eclipse.gmf.runtime.draw2d.ui.internal.routers.RectilinearRouter org.eclipse.gmf.runtime.draw2d.ui.internal.routers.BorderItemRectilinearRouter とか refreshBendpoints内でモデルから制約を取得してルーターにセットしている

表示オプション

横に並べて表示:
変化行の前後のみ表示:
ツールボックス

下から選んでください:

新しいページを作成する
ヘルプ / FAQ もご覧ください。