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 Details

  • Constructor Details

    • GroupedSourceParameters

      public GroupedSourceParameters(String dataSource, int channelBitmap, int[] channelGroups, int groupingType)
      Create a grouped source parameters object.
      Parameters:
      dataSource - data source
      channelBitmap - channel bitmap
      channelGroups - channel groups list
      groupingType - 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

      public String getDataSource()
      Returns:
      the dataSource
    • setDataSource

      public void setDataSource(String dataSource)
      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

      public GroupedSourceParameters clone()
    • getParameterSet

      public PamParameterSet 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 interface ManagedParameters
      Returns:
      description of the parameters in a class.