Package PamView
Class GroupedSourceParameters
java.lang.Object
PamView.GroupedSourceParameters
- All Implemented Interfaces:
Serializable
,Cloneable
,ManagedParameters
- Direct Known Subclasses:
WhistleToneParameters
public class GroupedSourceParameters
extends Object
implements Serializable, Cloneable, ManagedParameters
Specific parameters which always to with a GroupedSourcePanel
- Author:
- Doug Gillespie
- See Also:
-
Field Summary
-
Constructor Summary
ConstructorDescriptionGroupedSourceParameters
(String dataSource, int channelBitmap, int[] channelGroups, int groupingType) Create a grouped source parameters object. -
Method Summary
Modifier and TypeMethodDescriptionclone()
int
Get the total number of channel groupsint
This method has been added so that the channelBitmap field will be included in XML output.int[]
int
Return the channel bitmap selected from the Source Pane.int
getGroupChannels
(int iGroup) Get the specific channels associated with a particular group.int
int
Get the group bitmap.Note that all the fields have getters, so even though they are private they will still be included in the output so we don't need to explicitly add them hereboolean
boolean
void
setChannelGroups
(int[] channelGroups) void
setChanOrSeqBitmap
(int channelBitmap) Set the channel or sequence bitmap (depending on the source that has been selected)void
setDataSource
(String dataSource) void
setGroupingType
(int groupingType)
-
Field Details
-
serialVersionUID
public static final long serialVersionUID- See Also:
-
-
Constructor Details
-
GroupedSourceParameters
public GroupedSourceParameters(String dataSource, int channelBitmap, int[] channelGroups, int groupingType) Create a grouped source parameters object.- Parameters:
dataSource
- data sourcechannelBitmap
- channel bitmapchannelGroups
- channel groups listgroupingType
- grouping type.
-
GroupedSourceParameters
public GroupedSourceParameters()
-
-
Method Details
-
getGroupMap
public int getGroupMap()Get the group bitmap. i.e. the group numbers. This is not the channel bitmap.- Returns:
- the group bitmap.
-
countChannelGroups
public int countChannelGroups()Get the total number of channel groups- Returns:
- number of groups
-
getGroupChannels
public int getGroupChannels(int iGroup) Get the specific channels associated with a particular group.- Parameters:
iGroup
- group index (0, 1, 2, 3 whatever the actual group numbers are !)- Returns:
- bitmap of group channels
-
getDataSource
- Returns:
- the dataSource
-
setDataSource
- Parameters:
dataSource
- the dataSource to set
-
getChanOrSeqBitmap
public int getChanOrSeqBitmap()Return the channel bitmap selected from the Source Pane. Note that this may actually be the sequence bitmap and not the channel bitmap, depending on the source that has been selected- Returns:
- the channelBitmap or sequenceBitmap
-
getChannelBitmap
public int getChannelBitmap()This method has been added so that the channelBitmap field will be included in XML output.- Returns:
-
setChanOrSeqBitmap
public void setChanOrSeqBitmap(int channelBitmap) Set the channel or sequence bitmap (depending on the source that has been selected)- Parameters:
channelBitmap
- the channelBitmap to set
-
getChannelGroups
public int[] getChannelGroups()- Returns:
- the channelGroups
-
setChannelGroups
public void setChannelGroups(int[] channelGroups) - Parameters:
channelGroups
- the channelGroups to set
-
getGroupingType
public int getGroupingType()- Returns:
- the groupingType
-
setGroupingType
public void setGroupingType(int groupingType) - Parameters:
groupingType
- the groupingType to set
-
mayHaveBearings
public boolean mayHaveBearings()- Returns:
- true if at least one group has multiple elements, so might be able to calculate bearings.
-
mayHaveRange
public boolean mayHaveRange()- Returns:
- true if mayHaveBearings is true and if there is more than one group
-
clone
-
getParameterSet
Note that all the fields have getters, so even though they are private they will still be included in the output so we don't need to explicitly add them here- Specified by:
getParameterSet
in interfaceManagedParameters
- Returns:
- description of the parameters in a class.
-