Class SpecsPhoibosSequence
java.lang.Object
uk.ac.diamond.daq.devices.specs.phoibos.api.SpecsPhoibosSequence
- All Implemented Interfaces:
Serializable
A class for holding a list of
SpecsPhoibosRegion's. It has property change support for use in dynamic GUIs.
The sequence listens to events in each region to pass those through.
It implements Serializable to allow sequences to be passed over RMI.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionSpecsPhoibosSequence(SpecsPhoibosSequence sequence) Copy constructor for creating a new sequence from an existing one -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidaddRegion(SpecsPhoibosRegion region) Adds a region to the sequence.booleanGet the regions in the sequence that are enabledGets the names of all the regions in the sequence.Gets all regions in the sequenceinthashCode()voidvoidremoveRegion(SpecsPhoibosRegion region) voidsetRegions(List<SpecsPhoibosRegion> regions) toString()voidThis can be called to ensure that the sequence has one listener per region it contains.
-
Constructor Details
-
SpecsPhoibosSequence
public SpecsPhoibosSequence() -
SpecsPhoibosSequence
Copy constructor for creating a new sequence from an existing one- Parameters:
sequence- To be copied
-
-
Method Details
-
addPropertyChangeListener
-
removePropertyChangeListener
-
getRegions
Gets all regions in the sequence- Returns:
- List of all regions includes disabled
- See Also:
-
getEnabledRegions
Get the regions in the sequence that are enabled- Returns:
- List of only the enabled regions
- See Also:
-
setRegions
-
addRegion
Adds a region to the sequence.- Parameters:
region- The region to add- Throws:
IllegalArgumentException- If the sequence already contains a region with the same name as the region being added
-
removeRegion
-
toString
-
getRegionNames
Gets the names of all the regions in the sequence.- Returns:
- List of the region names in the sequence
-
updateRegionListeners
public void updateRegionListeners()This can be called to ensure that the sequence has one listener per region it contains. This is required after loading a sequence from XML because the XMLDecoder callsgetRegions()than then adds the regions to the list. -
hashCode
public int hashCode() -
equals
-