Interface InteractionSource
- All Known Subinterfaces:
DrawingPanel3D
,Element
,ElementArrow
,ElementBox
,ElementCircle
,ElementCone
,ElementCylinder
,ElementEllipsoid
,ElementImage
,ElementObject
,ElementPlane
,ElementPoints
,ElementPolygon
,ElementSegment
,ElementSphere
,ElementSpring
,ElementSurface
,ElementTessellation
,ElementTetrahedron
,ElementText
,ElementTrail
,Group
,Set
- All Known Implementing Classes:
AbstractTile
,DrawingPanel3D
,Element
,ElementArrow
,ElementBox
,ElementCircle
,ElementCone
,ElementCylinder
,ElementEllipsoid
,ElementImage
,ElementObject
,ElementPlane
,ElementPoints
,ElementPolygon
,ElementSegment
,ElementSphere
,ElementSpring
,ElementSurface
,ElementTessellation
,ElementTetrahedron
,ElementText
,ElementTrail
,Group
,Set
public interface InteractionSource
Title: InteractionSource
Description: This is the interface for an object that the user can interact with. The object contains one or several interaction targets, which are hot spots that respond to user interaction by issuing an interaction event.
Classes implementing this class should document what targets the contain.
Classes implementing the InteractionListener interface can register
to receive interaction events using the addInteractionListener
method of this interface.
Copyright: Open Source Physics project
- Version:
- May 2005
- Author:
- Francisco Esquembre
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addInteractionListener
(InteractionListener listener) Adds the specified interaction listener to receive interaction events to any of its targets from this source.getInteractionTarget
(int target) Gives access to one of the targets of this source.void
removeInteractionListener
(InteractionListener listener) Removes the specified interaction listener
-
Method Details
-
getInteractionTarget
Gives access to one of the targets of this source. Sources should document the list of their available targets.- Parameters:
target
- An integer number that identifies the target in the source.- Returns:
- InteractionTarget
-
addInteractionListener
Adds the specified interaction listener to receive interaction events to any of its targets from this source.- Parameters:
listener
- An object that implements the InteractionListener interface- See Also:
-
removeInteractionListener
Removes the specified interaction listener- See Also:
-