Search this API

y.view
Interface MultiplexingNodeEditor.NodeEditor

All Superinterfaces:
MouseInputEditor
All Known Implementing Classes:
MultiplexingNodeEditor.EventReporter, TableLabelEditor, TableOrderEditor, TableSelectionEditor, TableSizeEditor
Enclosing class:
MultiplexingNodeEditor

public static interface MultiplexingNodeEditor.NodeEditor
extends MouseInputEditor

A class implementing this interface can be added to a MultiplexingNodeEditor and implements one behaviour of a node triggered by a mouse gesture.

 
Your browser does not support SVG content.

Method Summary
 java.awt.Cursor getCursor(Mouse2DEvent event)
          Returns a mouse cursor to indicate what action this event could trigger or null if the editor does not want to initiate a cursor change.
 boolean isValidStartPosition(double x, double y)
          Determines if the input mode could start editing at the given position.
 void setContext(Graph2DView view, MultiplexingNodeEditor parent, NodeRealizer realizer)
          Provides context information for the editor.
 
Methods inherited from interface y.view.MouseInputEditor
addChangeListener, isEditing, isInterestedInEvents, mouse2DEventHappened, removeChangeListener, startEditing, startsEditing, stopEditing
 

Method Detail

setContext

void setContext(Graph2DView view,
                MultiplexingNodeEditor parent,
                NodeRealizer realizer)
Provides context information for the editor.

Parameters:
view - the current view in which the editing is done.
parent - the multiplexing editor that delegates to the node editor.
realizer - the realizer representing the node to edit.

isValidStartPosition

boolean isValidStartPosition(double x,
                             double y)
Determines if the input mode could start editing at the given position. This method is called to determine whether a subordinate editor of a MultiplexingNodeEditor instance is able to handle mouse gestures at the specified position.

Parameters:
x - The horizontal position.
y - The vertical position.
Returns:
true if the input mode could start editing at the given position; false otherwise.

getCursor

java.awt.Cursor getCursor(Mouse2DEvent event)
Returns a mouse cursor to indicate what action this event could trigger or null if the editor does not want to initiate a cursor change.

Parameters:
event - The mouse event a cursor can be returned for.
Returns:
A Cursor if a possible action for this mouse event shall be indicated or null.

© Copyright 2000-2022,
yWorks GmbH.
All rights reserved.