jp.carabiner.inkpod.pi.shape.handle
インタフェース Handle

既知の実装クラスの一覧:
AbstractBodyHandle, AbstractBoxHandle, AbstractCircleHandle, AbstractCornerHandle, AbstractHandle, AbstractNodeShapeHandle, AbstractNodeShapeHandle.BottomHandle, AbstractNodeShapeHandle.LeftBottomHandle, AbstractNodeShapeHandle.LeftHandle, AbstractNodeShapeHandle.LeftTopHandle, AbstractNodeShapeHandle.RightBottomHandle, AbstractNodeShapeHandle.RightHandle, AbstractNodeShapeHandle.RightTopHandle, AbstractNodeShapeHandle.TopHandle, AbstractRelationShapeHandle, AbstractRelationShapeHandle.EdgePointHandle, AbstractRelationShapeHandle.EndPointHandle, AbstractRelationShapeHandle.StartPointHandle, AbstractSquareHandle, BezierCurvesNodeShapeHandle, BezierCurvesNodeShapeHandle.ControlPoint1Handle, BezierCurvesNodeShapeHandle.ControlPoint2Handle, BezierCurvesNodeShapeHandle.PointHandle, BezierCurvesNodeShapeHandle.SegmentHandle, CurveRelationShapeHandle, CurveRelationShapePointHandle, DiamondShapeHandle, LineSegmentHandle, NodeShapeRotationHandle, OvalShapeHandle, PolylineLineSegmentHandle, PolylinePointHandle, PolylineRelationShapeHandle, RectangleShapeHandle, RelationRotationHandle, RelationTextBoxHandle, RightAngleRelationShapeHandle, RightAngleRelationShapeHandle.DraggableLineCenterHandle, RightAngleRelationShapeHandle.LineEdgePointHandle, RightAngleRelationShapeHandle.RightAnglePointHandle, RotationHandle, RoundrectShapeHandle

public interface Handle


メソッドの概要
 void addHandleDragListener(HandleDragListener listener)
           
 void addTextEditorListener(TextEditorListener listener)
           
 void cancelDrag()
          このハンドルのドラッグがキャンセルされたことを通知する。
 boolean click(java.awt.geom.Point2D p, java.awt.event.MouseEvent me, EditorViewConfiguration viewConfiguration)
          このハンドルがクリックされたことを通知する。
 Handle drag(java.awt.geom.Point2D newLocation, java.awt.event.MouseEvent event, EditorViewConfiguration viewConfiguration)
          このハンドルがドラッグ中に呼び出される。
 void drawHandle(java.awt.Graphics g, ShapeRenderingContext context)
          このハンドルを現在の場所に描画する。
 void endDrag(java.awt.event.MouseEvent event)
          このハンドルのドラッグが終了したときに呼び出される。
 Handle[] getChildHandles()
          このハンドルの子のハンドルを返す。
 java.awt.Cursor getCursor()
           
 java.awt.geom.Point2D getLastClickedPoint()
          最後にクリックされた座標を返す。
 java.awt.geom.Point2D getLocation()
          このハンドルの位置を返す。
 java.awt.geom.Point2D getLocation(java.awt.geom.Point2D point)
          このハンドルの位置を返す。
 java.lang.String getName()
           
 PMapObject getTargetObject()
           
 PObjectShape getTargetShape()
          このハンドルの操作対象のシェイプを返す。
 TextEditor getTextEditor()
          このハンドルと結びついたテキストエディタを返す。
 boolean isBodyHandle()
          シェイプの本体のハンドルであるかを返す。
 boolean isConstantVisible()
          推奨されていません。 
 boolean isDraggable()
          このハンドルがドラッグ可能であるかを返す。
 boolean isDragging()
          このハンドルがドラッグ中であるかを返す。
 boolean isFocusable()
           
 boolean isHit(double x, double y, java.awt.event.MouseEvent mouseEvent, EditorViewConfiguration viewConfiguration)
          このハンドルの領域に、指定された座標が含まれるかを調べる。
 boolean isTopMost()
           
 boolean isVisible(boolean topLevel, boolean selected, boolean singleSelected)
           
 boolean keyPressed(java.awt.event.KeyEvent ke, EditorViewConfiguration viewConfiguration)
          キーが押されたことを通知する。
 boolean keyReleased(java.awt.event.KeyEvent ke, EditorViewConfiguration viewConfiguration)
          キーが離されたことを通知する。
 boolean keyTyped(java.awt.event.KeyEvent ke, EditorViewConfiguration viewConfiguration)
          キーがタイプされたことを通知する。
 boolean readyDrag(java.awt.geom.Point2D startPoint, java.awt.event.MouseEvent mouseEvent, EditorViewConfiguration viewConfiguration)
          このハンドルのドラッグの準備をしていることを通知する。
 void removeHandleDragListener(HandleDragListener listener)
           
 void removeTextEditorListener(TextEditorListener listener)
           
 void setLocation(double x, double y, java.awt.event.MouseEvent event, EditorViewConfiguration viewConfiguration)
          このハンドルの位置を変更する
 void setLocation(java.awt.geom.Point2D newLocation, java.awt.event.MouseEvent event, EditorViewConfiguration viewConfiguration)
          このハンドルの位置を変更する
 boolean startDrag(java.awt.geom.Point2D point, java.awt.event.MouseEvent mouseEvent, EditorViewConfiguration viewConfiguration)
          このハンドルのドラッグを開始したことを通知する。
 void updateFocus(boolean focused)
           
 void updateSelection(boolean selected, boolean singleSelected)
           
 

メソッドの詳細

getName

java.lang.String getName()

getTargetObject

PMapObject getTargetObject()

getTargetShape

PObjectShape getTargetShape()
このハンドルの操作対象のシェイプを返す。

戻り値:
このハンドルの操作対象のシェイプ

addHandleDragListener

void addHandleDragListener(HandleDragListener listener)

removeHandleDragListener

void removeHandleDragListener(HandleDragListener listener)

addTextEditorListener

void addTextEditorListener(TextEditorListener listener)

removeTextEditorListener

void removeTextEditorListener(TextEditorListener listener)

click

boolean click(java.awt.geom.Point2D p,
              java.awt.event.MouseEvent me,
              EditorViewConfiguration viewConfiguration)
このハンドルがクリックされたことを通知する。

パラメータ:
p - クリックされた座標(マップ上の座標系)
me - マウスイベント
viewConfiguration - ビューの状態
戻り値:
このイベントを処理した場合true、何もしなかった場合はfalse

keyTyped

boolean keyTyped(java.awt.event.KeyEvent ke,
                 EditorViewConfiguration viewConfiguration)
キーがタイプされたことを通知する。

パラメータ:
ke - キーイベント
viewConfiguration - ビューの状態
戻り値:
このイベントを処理した場合true、何もしなかった場合はfalse

keyPressed

boolean keyPressed(java.awt.event.KeyEvent ke,
                   EditorViewConfiguration viewConfiguration)
キーが押されたことを通知する。

パラメータ:
ke - キーイベント
viewConfiguration - ビューの状態
戻り値:
このイベントを処理した場合true、何もしなかった場合はfalse

keyReleased

boolean keyReleased(java.awt.event.KeyEvent ke,
                    EditorViewConfiguration viewConfiguration)
キーが離されたことを通知する。

パラメータ:
ke - キーイベント
viewConfiguration - ビューの状態
戻り値:
このイベントを処理した場合true、何もしなかった場合はfalse

getLastClickedPoint

java.awt.geom.Point2D getLastClickedPoint()
最後にクリックされた座標を返す。

戻り値:
最後にクリックされた座標(マップ上の座標系)
関連項目:
click(Point2D, MouseEvent, EditorViewConfiguration)

setLocation

void setLocation(double x,
                 double y,
                 java.awt.event.MouseEvent event,
                 EditorViewConfiguration viewConfiguration)
このハンドルの位置を変更する

パラメータ:
x - 新しいX座標(マップ上の座標系)
y - 新しいY座標(マップ上の座標系)
event - ハンドル位置を変更するきっかけになったマウスイベント
viewConfiguration - ビューの状態

setLocation

void setLocation(java.awt.geom.Point2D newLocation,
                 java.awt.event.MouseEvent event,
                 EditorViewConfiguration viewConfiguration)
このハンドルの位置を変更する

パラメータ:
newLocation - 新しい座標(マップ上の座標系)
event - ハンドル位置を変更するきっかけになったマウスイベント
viewConfiguration - ビューの状態

getLocation

java.awt.geom.Point2D getLocation()
このハンドルの位置を返す。

戻り値:
ハンドルの位置(マップ上の座標系)

getLocation

java.awt.geom.Point2D getLocation(java.awt.geom.Point2D point)
このハンドルの位置を返す。

パラメータ:
point - ハンドルの位置(マップ上の座標系)を格納するPoint2Dオブジェクト
戻り値:
point引数を返す。

isHit

boolean isHit(double x,
              double y,
              java.awt.event.MouseEvent mouseEvent,
              EditorViewConfiguration viewConfiguration)
このハンドルの領域に、指定された座標が含まれるかを調べる。

パラメータ:
x - 調べるX座標(マップ上の座標系)
y - 調べるY座標(マップ上の座標系)
mouseEvent - 元のマウスイベント
viewConfiguration - ビューの状態
戻り値:
ハンドルの領域に、指定された座標が含まれていたらtrue

readyDrag

boolean readyDrag(java.awt.geom.Point2D startPoint,
                  java.awt.event.MouseEvent mouseEvent,
                  EditorViewConfiguration viewConfiguration)
このハンドルのドラッグの準備をしていることを通知する。

パラメータ:
startPoint - 開始点の座標系
mouseEvent - マウスイベント
viewConfiguration - ビューの状態
戻り値:
ドラッグの準備ができたらtrue、何らかの理由で失敗したらfalse

startDrag

boolean startDrag(java.awt.geom.Point2D point,
                  java.awt.event.MouseEvent mouseEvent,
                  EditorViewConfiguration viewConfiguration)
このハンドルのドラッグを開始したことを通知する。

パラメータ:
point - ハンドルの位置
mouseEvent - マウスイベント
viewConfiguration - ビューの状態
戻り値:
ドラッグを開始したらtrue、何らかの理由で失敗したらfalse

drag

Handle drag(java.awt.geom.Point2D newLocation,
            java.awt.event.MouseEvent event,
            EditorViewConfiguration viewConfiguration)
このハンドルがドラッグ中に呼び出される。

パラメータ:
newLocation - ハンドルの新しい座標
event - マウスイベント
viewConfiguration - ビューの状態
戻り値:
別のハンドルに移った場合、新しいハンドル。それ以外はthis。

cancelDrag

void cancelDrag()
このハンドルのドラッグがキャンセルされたことを通知する。


endDrag

void endDrag(java.awt.event.MouseEvent event)
このハンドルのドラッグが終了したときに呼び出される。

パラメータ:
event - ドラッグ終了時のマウスイベント

isDraggable

boolean isDraggable()
このハンドルがドラッグ可能であるかを返す。

戻り値:
ドラッグ可能ならtrue

isDragging

boolean isDragging()
このハンドルがドラッグ中であるかを返す。

戻り値:
ドラッグ中ならtrue

getChildHandles

Handle[] getChildHandles()
このハンドルの子のハンドルを返す。

戻り値:
ハンドルの配列

drawHandle

void drawHandle(java.awt.Graphics g,
                ShapeRenderingContext context)
このハンドルを現在の場所に描画する。

パラメータ:
g - Grpahicsオブジェクト
context - 描画コンテキスト情報

getCursor

java.awt.Cursor getCursor()

isTopMost

boolean isTopMost()

isConstantVisible

@Deprecated
boolean isConstantVisible()
推奨されていません。 

このハンドルが常に表示されるべきかを返す。 falseを返すと、グループ化されている場合などに表示されなくなります。

戻り値:
常に表示される場合はtrue、そうでなければfalse

isVisible

boolean isVisible(boolean topLevel,
                  boolean selected,
                  boolean singleSelected)

isFocusable

boolean isFocusable()

isBodyHandle

boolean isBodyHandle()
シェイプの本体のハンドルであるかを返す。 本体のハンドルなら、子を持ちます。

戻り値:
シェイプ本体のハンドルなら、true

getTextEditor

TextEditor getTextEditor()
このハンドルと結びついたテキストエディタを返す。 このハンドルと結びついた、インライン編集可能なテキストがある場合に、TextEditorオブジェクトを返します。 無い場合は、nullを返します。

戻り値:
テキストエディタ

updateSelection

void updateSelection(boolean selected,
                     boolean singleSelected)

updateFocus

void updateFocus(boolean focused)