Package PamView.dialog
Class GroupedSourcePanel
java.lang.Object
PamView.dialog.SourcePanel
PamView.dialog.GroupedSourcePanel
- All Implemented Interfaces:
ActionListener
,EventListener
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
static final int
static final int
-
Constructor Summary
ConstructorDescriptionGroupedSourcePanel
(Window ownerWindow, Class sourceType, boolean hasChannels, boolean includeSubClasses, boolean autoGrouping) GroupedSourcePanel
(Window ownerWindow, String borderTitle, Class sourceType, boolean hasChannels, boolean includeSubClasses, boolean autoGrouping) -
Method Summary
Modifier and TypeMethodDescriptionstatic void
addComponent
(JPanel panel, Component p, GridBagConstraints constraints) static int
countChannelGroups
(int channelMap, int[] groupList) Count the number of separate channel groupsvoid
int[]
Returns the channel group assignment.static int[]
getGroupAssignments
(int channelMap, int[] groupList) Get a look up table which can assign individual channels to indexed groups.static int
getGroupChannels
(int group, int channelMap, int[] groupList) Get a bitmap of channels in the ith groupstatic int
getGroupIndex
(int groupMap, int channelMap, int[] groupList) int
static String
getGroupList
(int group, int channelMap, int[] groupList) Get a string representation of the channels in a groupstatic int
getGroupMap
(int channelMap, int[] groupList) boolean
getParams
(GroupedSourceParameters params) boolean
void
setAutoGrouping
(boolean autoGrouping) void
setChannelGroups
(int[] channelGroups) void
setGrouping
(int groupType) void
setParams
(GroupedSourceParameters params) Methods inherited from class PamView.dialog.SourcePanel
actionPerformed, addSelectionListener, addSourcePanelMonitor, addSourceType, clearExcludeList, excludeDataBlock, getChannelBoxes, getChannelList, getCompatibleDataBlocks, getLocalisationRequirements, getPanel, getSource, getSourceCount, getSourceIndex, getSourceName, isAllowNull, removeSourcePanelMonitor, setAllowNull, setChannelList, setEnabled, setEnabledWithChannels, setLocalisationRequirements, setSource, setSource, setSourceIndex, setSourceList, setSourceList, setSourceToolTip
-
Field Details
-
GROUP_SINGLES
public static final int GROUP_SINGLES- See Also:
-
GROUP_ALL
public static final int GROUP_ALL- See Also:
-
GROUP_USER
public static final int GROUP_USER- See Also:
-
-
Constructor Details
-
GroupedSourcePanel
-
GroupedSourcePanel
-
-
Method Details
-
setChannelGroups
public void setChannelGroups(int[] channelGroups) -
addComponent
-
isAutoGrouping
public boolean isAutoGrouping() -
setAutoGrouping
public void setAutoGrouping(boolean autoGrouping) -
setGrouping
public void setGrouping(int groupType) -
enableGroupBoxes
public void enableGroupBoxes() -
getGrouping
public int getGrouping() -
getChannelGroups
public int[] getChannelGroups()Returns the channel group assignment. The array returned is of length nChannels, and each index position 'i' holds the group number that is associated with channel 'i'- Returns:
-
setParams
-
getParams
-
getGroupAssignments
public static int[] getGroupAssignments(int channelMap, int[] groupList) Get a look up table which can assign individual channels to indexed groups.- Parameters:
channelMap
- total channel mapgroupList
- channel group assignments- Returns:
- look up table from channels to groups. -1 where a channel isn't assigned.
-
getGroupMap
public static int getGroupMap(int channelMap, int[] groupList) -
countChannelGroups
public static int countChannelGroups(int channelMap, int[] groupList) Count the number of separate channel groups- Parameters:
channelMap
- total channel mapgroupList
- channel group assignments- Returns:
- number of groups
-
getGroupChannels
public static int getGroupChannels(int group, int channelMap, int[] groupList) Get a bitmap of channels in the ith group- Parameters:
group
- group numberchannelMap
- total channel mapgroupList
- channel group assignments- Returns:
- bitmap of channels in the group
-
getGroupList
Get a string representation of the channels in a group- Parameters:
group
- group indexchannelMap
- total channel mapgroupList
- channel group assignments- Returns:
- string representation of the group
-
getGroupIndex
public static int getGroupIndex(int groupMap, int channelMap, int[] groupList) - Parameters:
groupMap
-channelMap
-groupList
-- Returns:
-