Search this API

y.view
Class AbstractMouseInputEditor

java.lang.Object
  extended by y.view.AbstractMouseInputEditor
All Implemented Interfaces:
MouseInputEditor
Direct Known Subclasses:
GroupNodePainter.GroupStateEditor, MultiplexingNodeEditor, MultiplexingNodeEditor.EventReporter, TableLabelEditor, TableOrderEditor, TableSelectionEditor, TableSizeEditor

public abstract class AbstractMouseInputEditor
extends java.lang.Object
implements MouseInputEditor

Abstract base class implementation for MouseInputEditor that provides convenient support for the necessary listener implementation.

 

Constructor Summary
AbstractMouseInputEditor()
           
 
Method Summary
 void addChangeListener(javax.swing.event.ChangeListener inputEditorListener)
          Adds a ChangeListener instance that will be notified if the MouseInputEditor.isEditing() state of this instance changes.
protected  void fireStateChanged()
          Helper method that notifies interested listeners when the state of this instance has changed.
 boolean isEditing()
          Determines whether this instance is currently "editing".
 boolean isEnabled()
          Returns whether this editor is deemed enabled.
 boolean isInterestedInEvents()
          Returns true iff this editor is enabled.
 void removeChangeListener(javax.swing.event.ChangeListener inputEditorListener)
          Removes a ChangeListener instance that was notified if the MouseInputEditor.isEditing() state of this instance changes.
 void setEnabled(boolean enabled)
          Sets whether this editor is deemed enabled.
 void startEditing()
          Used by clients to programmatically start the editing process.
 void stopEditing()
          Called by clients to stop the editing process cleanly.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface y.view.MouseInputEditor
mouse2DEventHappened, startsEditing
 

Constructor Detail

AbstractMouseInputEditor

public AbstractMouseInputEditor()
Method Detail

isEnabled

public boolean isEnabled()
Returns whether this editor is deemed enabled. If it is not enabled it will not be interested in events.

Returns:
whether this editor is enabled

setEnabled

public void setEnabled(boolean enabled)
Sets whether this editor is deemed enabled. If it is not enabled it will not be interested in events.

Parameters:
enabled - whether to enable this editor

isInterestedInEvents

public boolean isInterestedInEvents()
Returns true iff this editor is enabled.

Specified by:
isInterestedInEvents in interface MouseInputEditor
Returns:
whether this editor is enabled
See Also:
MouseInputEditor.startsEditing(Mouse2DEvent), MouseInputEditor.mouse2DEventHappened(Mouse2DEvent)

isEditing

public boolean isEditing()
Description copied from interface: MouseInputEditor
Determines whether this instance is currently "editing".

Specified by:
isEditing in interface MouseInputEditor
Returns:
whether this instance is currently editing.

startEditing

public void startEditing()
Description copied from interface: MouseInputEditor
Used by clients to programmatically start the editing process.

Specified by:
startEditing in interface MouseInputEditor

stopEditing

public void stopEditing()
Description copied from interface: MouseInputEditor
Called by clients to stop the editing process cleanly.

Specified by:
stopEditing in interface MouseInputEditor

fireStateChanged

protected void fireStateChanged()
Helper method that notifies interested listeners when the state of this instance has changed.


addChangeListener

public void addChangeListener(javax.swing.event.ChangeListener inputEditorListener)
Description copied from interface: MouseInputEditor
Adds a ChangeListener instance that will be notified if the MouseInputEditor.isEditing() state of this instance changes.

Specified by:
addChangeListener in interface MouseInputEditor
Parameters:
inputEditorListener - the listener to notify of state changes

removeChangeListener

public void removeChangeListener(javax.swing.event.ChangeListener inputEditorListener)
Description copied from interface: MouseInputEditor
Removes a ChangeListener instance that was notified if the MouseInputEditor.isEditing() state of this instance changes.

Specified by:
removeChangeListener in interface MouseInputEditor
Parameters:
inputEditorListener - the listener to notify of state changes

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