JUNG にはAnnotation
、グラフからオブジェクトを選択、移動、サイズ変更、または削除する機能がありますか?
編集:
AnnotationDemo (@sdasdadas が引用) を検討した結果、次の興味深いコードが特定されました (126 ~ 134 行目)。
// Get the RenderContext for this visualization viewer
RenderContext<String,Number> rc = vv.getRenderContext();
// Create a new AnnotatingGraphMousePlugin with default settings.
// The AnnotatingGraphMousePlugin class is a subclass of AbstractGraphMousePlugin
// and also implements the interfaces MouseListener and MouseMotionListener. As
// such, the respective overridden methods would be a interesting place to embed
// the logic for the required behavior. However I am still not sure!
AnnotatingGraphMousePlugin<String,Number> annotatingPlugin =
new AnnotatingGraphMousePlugin<String,Number>(rc);
// Create a GraphMouse for the main view, using the annotating mouse plugin.
final AnnotatingModalGraphMouse<String,Number> graphMouse =
new AnnotatingModalGraphMouse<String,Number>(rc, annotatingPlugin);
および (174 ~ 180 行目):
// Create annotation controls to allow the selection of color, shape, fill,
// and z-order. None of these controls is of interest to us.
AnnotationControls<String,Number> annotationControls =
new AnnotationControls<String,Number>(annotatingPlugin);
上記のコメントに基づいて、私の最初の質問は同じままです。