twaver.network.interaction
Class SelectionInteraction

java.lang.Object
  extended by twaver.network.interaction.Interaction
      extended by twaver.network.interaction.SelectionInteraction
All Implemented Interfaces:
IInteraction
Direct Known Subclasses:
MultiSelectionInteraction

public class SelectionInteraction
extends Interaction

点选交互


Field Summary
 
Fields inherited from class twaver.network.interaction.Interaction
network
 
Constructor Summary
SelectionInteraction(Network network)
          构造函数,点选操作
 
Method Summary
protected  boolean doSelection(Element element)
          点选
 boolean onDoubleTap(TouchEvent e)
          双击
 void onLongPress(TouchEvent event)
          长按
 boolean onSingleTapConfirmed(TouchEvent event)
          单指点击事件
 
Methods inherited from class twaver.network.interaction.Interaction
destroy, onDown, onFling, onMove, onScale, onScaleBegin, onScaleEnd, onScroll, onSingleTapUp, onUp, reset
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SelectionInteraction

public SelectionInteraction(Network network)
构造函数,点选操作

Parameters:
network - 拓扑图
Method Detail

onDoubleTap

public boolean onDoubleTap(TouchEvent e)
Description copied from interface: IInteraction
双击

Specified by:
onDoubleTap in interface IInteraction
Overrides:
onDoubleTap in class Interaction
Parameters:
e - 触摸事件
Returns:
是否处理

onSingleTapConfirmed

public boolean onSingleTapConfirmed(TouchEvent event)
Description copied from interface: IInteraction
单指点击事件

Specified by:
onSingleTapConfirmed in interface IInteraction
Overrides:
onSingleTapConfirmed in class Interaction
Parameters:
event - 触摸事件
Returns:
是否处理

doSelection

protected boolean doSelection(Element element)
点选

Parameters:
element - 网元
Returns:
是否选中成功

onLongPress

public void onLongPress(TouchEvent event)
Description copied from interface: IInteraction
长按

Specified by:
onLongPress in interface IInteraction
Overrides:
onLongPress in class Interaction
Parameters:
event - 触摸事件