Package de.sciss.gui
Class ParamField.Event
- java.lang.Object
-
- java.util.EventObject
-
- de.sciss.app.BasicEvent
-
- de.sciss.gui.ParamField.Event
-
- All Implemented Interfaces:
java.io.Serializable
- Enclosing class:
- ParamField
public static class ParamField.Event extends BasicEvent
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description Event(java.lang.Object source, int ID, long when, Param value, ParamSpace space, ParamSpace.Translator ut, boolean adjusting)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ParamSpacegetSpace()ParamgetTranslatedValue(ParamSpace newSpace)ParamgetValue()booleanincorporate(BasicEvent oldEvent)Asks the event to incorporate the action described by another (older) event.booleanisAdjusting()-
Methods inherited from class de.sciss.app.BasicEvent
getID, getWhen
-
-
-
-
Field Detail
-
VALUE
public static final int VALUE
returned by getID() : the param value changed- See Also:
- Constant Field Values
-
SPACE
public static final int SPACE
returned by getID() : the param space was switched- See Also:
- Constant Field Values
-
-
Constructor Detail
-
Event
public Event(java.lang.Object source, int ID, long when, Param value, ParamSpace space, ParamSpace.Translator ut, boolean adjusting)
-
-
Method Detail
-
isAdjusting
public boolean isAdjusting()
-
getValue
public Param getValue()
-
getTranslatedValue
public Param getTranslatedValue(ParamSpace newSpace)
-
getSpace
public ParamSpace getSpace()
-
incorporate
public boolean incorporate(BasicEvent oldEvent)
Description copied from class:BasicEventAsks the event to incorporate the action described by another (older) event. This method has been created to reduce overhead; when many events are added to the event queue of an ELM, this allows to fuse two adjectant events. The idea is mainly based on thereplaceEdit()method of thejavax.swing.undo.UndoableEditinterface; a pendant of a symmetricaddEdit()like method is not provided because it seems to be unnecessary.Implementation notes : the
oldEventshould generally only be incorporated if it refers to the same source object (getSource()) and has the same ID (getD()). the timestamp of the current event should not be modified.- Specified by:
incorporatein classBasicEvent- Parameters:
oldEvent- the most recent event in the queue which might be incorporated by this new event.- Returns:
trueif this object was able to incorporate the older event. in this case theoldEventis removed from the event queue.falsestates that theoldEventwas incompatible and should remain in the queue.- See Also:
UndoableEdit.replaceEdit( UndoableEdit )
-
-