public class SequenceEvent extends java.lang.Object implements CollapsibleEvent
Modifier and Type | Class and Description |
---|---|
static class |
SequenceEvent.SequenceEventSourceType |
static class |
SequenceEvent.SequenceEventType |
Constructor and Description |
---|
SequenceEvent(Sequence sequence,
SequenceEvent.SequenceEventSourceType sourceType) |
SequenceEvent(Sequence sequence,
SequenceEvent.SequenceEventSourceType sourceType,
java.lang.Object source) |
SequenceEvent(Sequence sequence,
SequenceEvent.SequenceEventSourceType sourceType,
java.lang.Object source,
int param) |
SequenceEvent(Sequence sequence,
SequenceEvent.SequenceEventSourceType sourceType,
java.lang.Object source,
SequenceEvent.SequenceEventType type) |
SequenceEvent(Sequence sequence,
SequenceEvent.SequenceEventSourceType sourceType,
java.lang.Object source,
SequenceEvent.SequenceEventType type,
int param) |
SequenceEvent(Sequence sequence,
SequenceEvent.SequenceEventSourceType sourceType,
SequenceEvent.SequenceEventType type) |
Modifier and Type | Method and Description |
---|---|
boolean |
collapse(CollapsibleEvent event)
Collapse current object/event with specified one.
|
boolean |
equals(java.lang.Object obj)
Returns
true if the current event is equivalent to the specified one. |
int |
getParam()
Extra parameter of event.
|
Sequence |
getSequence() |
java.lang.Object |
getSource()
Source object of the event.
|
SequenceEvent.SequenceEventSourceType |
getSourceType()
SourceType define the object type of
source The following source types are available: SEQUENCE_TYPE --> source object is nullSEQUENCE_META --> source object define the meta data id (String)It can be null (consider global metadata change) SEQUENCE_COLORMAP --> source object is an instance of IcyColorModelSEQUENCE_COMPONENTBOUNDS --> source object is an instance of IcyColorModelSEQUENCE_DATA --> source object is an instance of IcyBufferedImagesource object can be null when severals images has been modified SEQUENCE_ROI --> source object is an instance of ROIsource object can be null when severals images has been modified SEQUENCE_OVERLAY --> source object is an instance of Overlaysource object can be null when severals images has been modified SEQUENCE_PAINTER --> source object is an instance of Paintersource object can be null when severals images has been modified |
SequenceEvent.SequenceEventType |
getType()
Type define the type of event.
|
int |
hashCode()
Returns hash code for current event.
|
public SequenceEvent(Sequence sequence, SequenceEvent.SequenceEventSourceType sourceType)
public SequenceEvent(Sequence sequence, SequenceEvent.SequenceEventSourceType sourceType, java.lang.Object source)
public SequenceEvent(Sequence sequence, SequenceEvent.SequenceEventSourceType sourceType, java.lang.Object source, int param)
public SequenceEvent(Sequence sequence, SequenceEvent.SequenceEventSourceType sourceType, SequenceEvent.SequenceEventType type)
public SequenceEvent(Sequence sequence, SequenceEvent.SequenceEventSourceType sourceType, java.lang.Object source, SequenceEvent.SequenceEventType type)
public SequenceEvent(Sequence sequence, SequenceEvent.SequenceEventSourceType sourceType, java.lang.Object source, SequenceEvent.SequenceEventType type, int param)
public Sequence getSequence()
public SequenceEvent.SequenceEventSourceType getSourceType()
source
SEQUENCE_TYPE
--> source object is nullSEQUENCE_META
--> source object define the meta data id (String)SEQUENCE_COLORMAP
--> source object is an instance of IcyColorModelSEQUENCE_COMPONENTBOUNDS
--> source object is an instance of IcyColorModelSEQUENCE_DATA
--> source object is an instance of IcyBufferedImageSEQUENCE_ROI
--> source object is an instance of ROISEQUENCE_OVERLAY
--> source object is an instance of OverlaySEQUENCE_PAINTER
--> source object is an instance of Painterpublic java.lang.Object getSource()
sourceType
value.public SequenceEvent.SequenceEventType getType()
sourceType
is one of the following :SEQUENCE_TYPE, SEQUENCE_META, SEQUENCE_COLORMAP, SEQUENCE_COMPONENTBOUNDS
SequenceEventType.CHANGED
sourceType
is one of the following :SEQUENCE_DATA, SEQUENCE_ROI, SEQUENCE_PAINTER, SEQUENCE_OVERLAY
SequenceEventType.ADDED
or SequenceEventType.REMOVED
source != null
) has been added or
removed from the sequence.source == null
that mean we have a global change event and some stuff need to
be recalculated.public int getParam()
sourceType
is SEQUENCE_COLORMAP
or
SEQUENCE_COMPONENTBOUNDS
(in both case source
is instance of IcyColorModel
).public boolean collapse(CollapsibleEvent event)
CollapsibleEvent
collapse
in interface CollapsibleEvent
false
if collapse operation failed (object are not 'equals')public int hashCode()
CollapsibleEvent
Object.hashCode()
contract.hashCode
in interface CollapsibleEvent
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
CollapsibleEvent
true
if the current event is equivalent to the specified one.Object.equals(Object)
method as we use an HashMap to store
these event
in the UpdateEventHandler
class.equals
in interface CollapsibleEvent
equals
in class java.lang.Object