VR
- The visual root node of the UI toolkit used, e.g.
javafx.scene.Node in case of JavaFX.public abstract class AbstractTool<VR> extends java.lang.Object implements ITool<VR>
Modifier and Type | Field and Description |
---|---|
protected java.beans.PropertyChangeSupport |
pcs
A
PropertyChangeSupport that is used as a delegate to notify
listeners about changes to this object. |
ACTIVE_PROPERTY
Constructor and Description |
---|
AbstractTool() |
Modifier and Type | Method and Description |
---|---|
void |
activate() |
void |
addPropertyChangeListener(java.beans.PropertyChangeListener listener) |
void |
deactivate() |
IDomain<VR> |
getAdaptable() |
IDomain<VR> |
getDomain()
|
boolean |
isActive() |
protected void |
registerListeners()
This method is called when a valid
IDomain is attached to this
tool so that you can register event listeners for various inputs
(keyboard, mouse) or model changes (selection, scroll offset / viewport). |
void |
removePropertyChangeListener(java.beans.PropertyChangeListener listener) |
void |
setAdaptable(IDomain<VR> adaptable) |
protected void |
unregisterListeners()
This method is called when the attached
IDomain is reset to
null so that you can unregister previously registered event
listeners. |
protected java.beans.PropertyChangeSupport pcs
PropertyChangeSupport
that is used as a delegate to notify
listeners about changes to this object. May be used by subclasses to
trigger the notification of listeners.public void activate()
activate
in interface IActivatable
public void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
addPropertyChangeListener
in interface IPropertyChangeNotifier
public void deactivate()
deactivate
in interface IActivatable
public IDomain<VR> getAdaptable()
getAdaptable
in interface IAdaptable.Bound<IDomain<VR>>
public boolean isActive()
isActive
in interface IActivatable
protected void registerListeners()
IDomain
is attached to this
tool so that you can register event listeners for various inputs
(keyboard, mouse) or model changes (selection, scroll offset / viewport).public void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
removePropertyChangeListener
in interface IPropertyChangeNotifier
public void setAdaptable(IDomain<VR> adaptable)
setAdaptable
in interface IAdaptable.Bound<IDomain<VR>>
protected void unregisterListeners()
IDomain
is reset to
null
so that you can unregister previously registered event
listeners.Copyright (c) 2014 itemis AG and others. All rights reserved.