Package PamView.dialog
Class GroupedSourcePanel
java.lang.Object
PamView.dialog.SourcePanel
PamView.dialog.GroupedSourcePanel
- All Implemented Interfaces:
ActionListener
,EventListener
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
static final int
static final int
Fields inherited from class PamView.dialog.SourcePanel
borderTitle, channelBoxes, excludedBlocks, hasChannels, includeSubClasses, ownerWindow, panel, sourceList, sourceTypes
-
Constructor Summary
ConstructorsConstructorDescriptionGroupedSourcePanel
(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 groupsprotected void
void
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
protected void
selectionChanged
(int channel) void
setAutoGrouping
(boolean autoGrouping) void
setChannelGroups
(int[] channelGroups) void
setGrouping
(int groupType) void
setParams
(GroupedSourceParameters params) protected void
Methods inherited from class PamView.dialog.SourcePanel
actionPerformed, addSelectionListener, addSourcePanelMonitor, addSourceType, clearExcludeList, excludeDataBlock, getChannelBoxes, getChannelList, getCompatibleDataBlocks, getLocalisationRequirements, getPanel, getSource, getSourceCount, getSourceIndex, getSourceName, isAllowNull, removeSourcePanelMonitor, rePackOwner, selectAllChannels, selectNoChannels, setAllowNull, setChannelList, setEnabled, setEnabledWithChannels, setLocalisationRequirements, setSource, setSource, setSourceIndex, setSourceList, setSourceList, setSourceToolTip, sourceChanged
-
Field Details
-
Constructor Details
-
Method Details
-
createPanel
protected void createPanel()- Overrides:
createPanel
in classSourcePanel
-
showChannels
protected void showChannels()- Overrides:
showChannels
in classSourcePanel
-
setChannelGroups
public void setChannelGroups(int[] channelGroups) -
addComponent
-
isAutoGrouping
public boolean isAutoGrouping() -
setAutoGrouping
public void setAutoGrouping(boolean autoGrouping) -
setGrouping
public void setGrouping(int groupType) -
selectionChanged
protected void selectionChanged(int channel) - Overrides:
selectionChanged
in classSourcePanel
-
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:
-