Packagecom.yworks.graph.input
Interfacepublic interface IActionButtonProvider

A simple interface that can be used to simulate simple buttons for INodeStyles etc.

GraphEditorInputMode will query the IModelItem's lookup method for this interface if it has detected mouse clicks. If the item yields an instance of this interface and the click was inside the provided bounds, then the associated action is invoked.

See also

GraphEditorInputMode
CollapsibleNodeStyleDecorator


Public Methods
 MethodDefined By
  
Gets a IHitTestable that can be used to query the button bounds.
IActionButtonProvider
  
invokeAction(context:IInputModeContext, x:Number, y:Number):void
Called by the framework to indicate that the button has been clicked by the user at the specified location.
IActionButtonProvider
Method Detail
getButtonBounds()method
public function getButtonBounds():IHitTestable

Gets a IHitTestable that can be used to query the button bounds.

Returns
IHitTestable — A hit testable that can determine whether the button has been hit by a given click.
invokeAction()method 
public function invokeAction(context:IInputModeContext, x:Number, y:Number):void

Called by the framework to indicate that the button has been clicked by the user at the specified location.

This method is called by GraphEditorInputMode#click for the IModelItems that yielded an instance of this interface.

Parameters

context:IInputModeContext — The context to use for the click operation.
 
x:Number — The absolute x coordinate where the click occured in the world coordinate system.
 
y:Number — The absolute y coordinate where the click occured in the world coordinate system.