jp.carabiner.inkpod.pi.shape.handle
クラス AbstractHandle<S extends PObjectShape>

java.lang.Object
  上位を拡張 jp.carabiner.inkpod.pi.shape.handle.AbstractHandle<S>
すべての実装されたインタフェース:
Handle
直系の既知のサブクラス:
AbstractBodyHandle, AbstractBoxHandle, AbstractCircleHandle, AbstractSquareHandle, BezierCurvesNodeShapeHandle.SegmentHandle, LineSegmentHandle, RotationHandle

public abstract class AbstractHandle<S extends PObjectShape>
extends java.lang.Object
implements Handle


フィールドの概要
protected static Handle[] EMPTY_CHILDREN
           
 
コンストラクタの概要
AbstractHandle(AbstractHandle parent, S shape)
           
AbstractHandle(S shape)
           
 
メソッドの概要
 void addHandleDragListener(HandleDragListener listener)
           
 void addTextEditorListener(TextEditorListener listener)
           
 void cancelDrag()
          このハンドルのドラッグがキャンセルされたことを通知する。
 boolean click(java.awt.geom.Point2D p, java.awt.event.MouseEvent mouseEvent, EditorViewConfiguration viewConfiguration)
          このハンドルがクリックされたことを通知する。
protected  AbstractTextEditor createTextEditor(S shape)
           
protected  boolean delegate(AbstractHandle<S> targetHandle)
           
 Handle drag(java.awt.geom.Point2D point, java.awt.event.MouseEvent event, EditorViewConfiguration configuration)
          このハンドルがドラッグ中に呼び出される。
 void endDrag(java.awt.event.MouseEvent event)
          このハンドルのドラッグが終了したときに呼び出される。
protected  void filter(java.awt.geom.Point2D point, java.awt.event.MouseEvent event, EditorViewConfiguration configuration)
           
protected  void fireDragCanceledEvent(Handle source)
           
protected  void fireDragEndedEvent(Handle source)
           
protected  void fireDragRequestedEvent(Handle source)
           
protected  void fireDragStartedEvent(Handle source)
           
protected  void fireTextEditorEvent(TextEditorEvent event)
           
 Handle[] getChildHandles()
          このハンドルの子のハンドルを返す。
 java.awt.Cursor getCursor()
           
protected  java.awt.geom.Point2D getDragStartPoint()
           
protected  java.awt.geom.Point2D getDragStartPointDelta(java.awt.geom.Point2D startPoint, java.awt.geom.Point2D location)
           
 java.awt.geom.Point2D getLastClickedPoint()
          最後にクリックされた座標を返す。
 java.awt.geom.Point2D getLocation()
          このハンドルの位置を返す。
 PMapObject getTargetObject()
           
 S getTargetShape()
          このハンドルの操作対象のシェイプを返す。
 TextEditor getTextEditor()
          このハンドルと結びついたテキストエディタを返す。
 boolean isDragging()
          このハンドルがドラッグ中であるかを返す。
 boolean isFocused()
           
 boolean isSelected()
           
 boolean isSingleSelected()
           
 boolean keyPressed(java.awt.event.KeyEvent ke, EditorViewConfiguration screenConfigration)
          キーが押されたことを通知する。
 boolean keyReleased(java.awt.event.KeyEvent ke, EditorViewConfiguration screenConfigration)
          キーが離されたことを通知する。
 boolean keyTyped(java.awt.event.KeyEvent ke, EditorViewConfiguration screenConfigration)
          キーがタイプされたことを通知する。
 boolean readyDrag(java.awt.geom.Point2D startPoint, java.awt.event.MouseEvent mouseEvent, EditorViewConfiguration configuration)
          このハンドルのドラッグの準備をしていることを通知する。
 void removeHandleDragListener(HandleDragListener listener)
           
 void removeTextEditorListener(TextEditorListener listener)
           
protected  AbstractHandle requestDelegate(double x, double y, EditorViewConfiguration configuration)
           
 void setLocation(java.awt.geom.Point2D newLocation, java.awt.event.MouseEvent event, EditorViewConfiguration configuration)
          このハンドルの位置を変更する
 boolean startDrag(java.awt.geom.Point2D cursorLocation, java.awt.event.MouseEvent mouseEvent, EditorViewConfiguration configuration)
          このハンドルのドラッグを開始したことを通知する。
 void updateFocus(boolean focused)
           
 void updateSelection(boolean selected, boolean singleSelected)
           
 
クラス java.lang.Object から継承されたメソッド
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
インタフェース jp.carabiner.inkpod.pi.shape.handle.Handle から継承されたメソッド
drawHandle, getLocation, getName, isBodyHandle, isConstantVisible, isDraggable, isFocusable, isHit, isTopMost, isVisible, setLocation
 

フィールドの詳細

EMPTY_CHILDREN

protected static final Handle[] EMPTY_CHILDREN
コンストラクタの詳細

AbstractHandle

public AbstractHandle(S shape)

AbstractHandle

public AbstractHandle(AbstractHandle parent,
                      S shape)
メソッドの詳細

getTargetShape

public S getTargetShape()
インタフェース Handle の記述:
このハンドルの操作対象のシェイプを返す。

定義:
インタフェース Handle 内の getTargetShape
戻り値:
このハンドルの操作対象のシェイプ

getTextEditor

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

定義:
インタフェース Handle 内の getTextEditor
戻り値:
テキストエディタ

createTextEditor

protected AbstractTextEditor createTextEditor(S shape)

addHandleDragListener

public void addHandleDragListener(HandleDragListener listener)
定義:
インタフェース Handle 内の addHandleDragListener

removeHandleDragListener

public void removeHandleDragListener(HandleDragListener listener)
定義:
インタフェース Handle 内の removeHandleDragListener

addTextEditorListener

public void addTextEditorListener(TextEditorListener listener)
定義:
インタフェース Handle 内の addTextEditorListener

removeTextEditorListener

public void removeTextEditorListener(TextEditorListener listener)
定義:
インタフェース Handle 内の removeTextEditorListener

fireDragRequestedEvent

protected void fireDragRequestedEvent(Handle source)

fireDragStartedEvent

protected void fireDragStartedEvent(Handle source)

fireDragCanceledEvent

protected void fireDragCanceledEvent(Handle source)

fireDragEndedEvent

protected void fireDragEndedEvent(Handle source)

fireTextEditorEvent

protected void fireTextEditorEvent(TextEditorEvent event)

getTargetObject

public PMapObject getTargetObject()
定義:
インタフェース Handle 内の getTargetObject

getChildHandles

public Handle[] getChildHandles()
インタフェース Handle の記述:
このハンドルの子のハンドルを返す。

定義:
インタフェース Handle 内の getChildHandles
戻り値:
ハンドルの配列

click

public boolean click(java.awt.geom.Point2D p,
                     java.awt.event.MouseEvent mouseEvent,
                     EditorViewConfiguration viewConfiguration)
インタフェース Handle の記述:
このハンドルがクリックされたことを通知する。

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

keyPressed

public boolean keyPressed(java.awt.event.KeyEvent ke,
                          EditorViewConfiguration screenConfigration)
インタフェース Handle の記述:
キーが押されたことを通知する。

定義:
インタフェース Handle 内の keyPressed
パラメータ:
ke - キーイベント
screenConfigration - ビューの状態
戻り値:
このイベントを処理した場合true、何もしなかった場合はfalse

keyReleased

public boolean keyReleased(java.awt.event.KeyEvent ke,
                           EditorViewConfiguration screenConfigration)
インタフェース Handle の記述:
キーが離されたことを通知する。

定義:
インタフェース Handle 内の keyReleased
パラメータ:
ke - キーイベント
screenConfigration - ビューの状態
戻り値:
このイベントを処理した場合true、何もしなかった場合はfalse

keyTyped

public boolean keyTyped(java.awt.event.KeyEvent ke,
                        EditorViewConfiguration screenConfigration)
インタフェース Handle の記述:
キーがタイプされたことを通知する。

定義:
インタフェース Handle 内の keyTyped
パラメータ:
ke - キーイベント
screenConfigration - ビューの状態
戻り値:
このイベントを処理した場合true、何もしなかった場合はfalse

getLastClickedPoint

public java.awt.geom.Point2D getLastClickedPoint()
インタフェース Handle の記述:
最後にクリックされた座標を返す。

定義:
インタフェース Handle 内の getLastClickedPoint
戻り値:
最後にクリックされた座標(マップ上の座標系)
関連項目:
Handle.click(Point2D, MouseEvent, EditorViewConfiguration)

getLocation

public java.awt.geom.Point2D getLocation()
インタフェース Handle の記述:
このハンドルの位置を返す。

定義:
インタフェース Handle 内の getLocation
戻り値:
ハンドルの位置(マップ上の座標系)

setLocation

public void setLocation(java.awt.geom.Point2D newLocation,
                        java.awt.event.MouseEvent event,
                        EditorViewConfiguration configuration)
インタフェース Handle の記述:
このハンドルの位置を変更する

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

readyDrag

public boolean readyDrag(java.awt.geom.Point2D startPoint,
                         java.awt.event.MouseEvent mouseEvent,
                         EditorViewConfiguration configuration)
インタフェース Handle の記述:
このハンドルのドラッグの準備をしていることを通知する。

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

getDragStartPointDelta

protected java.awt.geom.Point2D getDragStartPointDelta(java.awt.geom.Point2D startPoint,
                                                       java.awt.geom.Point2D location)

startDrag

public boolean startDrag(java.awt.geom.Point2D cursorLocation,
                         java.awt.event.MouseEvent mouseEvent,
                         EditorViewConfiguration configuration)
インタフェース Handle の記述:
このハンドルのドラッグを開始したことを通知する。

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

delegate

protected boolean delegate(AbstractHandle<S> targetHandle)

requestDelegate

protected AbstractHandle requestDelegate(double x,
                                         double y,
                                         EditorViewConfiguration configuration)

getDragStartPoint

protected java.awt.geom.Point2D getDragStartPoint()

filter

protected void filter(java.awt.geom.Point2D point,
                      java.awt.event.MouseEvent event,
                      EditorViewConfiguration configuration)

drag

public Handle drag(java.awt.geom.Point2D point,
                   java.awt.event.MouseEvent event,
                   EditorViewConfiguration configuration)
インタフェース Handle の記述:
このハンドルがドラッグ中に呼び出される。

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

isDragging

public boolean isDragging()
インタフェース Handle の記述:
このハンドルがドラッグ中であるかを返す。

定義:
インタフェース Handle 内の isDragging
戻り値:
ドラッグ中ならtrue

cancelDrag

public void cancelDrag()
インタフェース Handle の記述:
このハンドルのドラッグがキャンセルされたことを通知する。

定義:
インタフェース Handle 内の cancelDrag

endDrag

public void endDrag(java.awt.event.MouseEvent event)
インタフェース Handle の記述:
このハンドルのドラッグが終了したときに呼び出される。

定義:
インタフェース Handle 内の endDrag
パラメータ:
event - ドラッグ終了時のマウスイベント

getCursor

public java.awt.Cursor getCursor()
定義:
インタフェース Handle 内の getCursor

updateSelection

public void updateSelection(boolean selected,
                            boolean singleSelected)
定義:
インタフェース Handle 内の updateSelection

updateFocus

public void updateFocus(boolean focused)
定義:
インタフェース Handle 内の updateFocus

isSelected

public boolean isSelected()

isSingleSelected

public boolean isSingleSelected()

isFocused

public boolean isFocused()