|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.ObjectPamView.SourcePanel
public class SourcePanel
Standard panel for dialogs that shows a list of available data sources and, optionally a list of data channels.
This is for general use within other dialog panels.
| Nested Class Summary | |
|---|---|
(package private) class |
SourcePanel.SelectionListener
|
| Field Summary | |
|---|---|
protected java.lang.String |
borderTitle
|
protected javax.swing.JCheckBox[] |
channelBoxes
|
private int |
currentNShown
|
protected java.util.ArrayList<PamDataBlock> |
excludedBlocks
|
protected boolean |
hasChannels
|
protected boolean |
includeSubClasses
|
private int |
localisationRequirements
Flags to specify the minimum localisation data requirements from a data block. |
protected java.awt.Window |
ownerWindow
|
protected javax.swing.JPanel |
panel
|
protected javax.swing.JComboBox |
sourceList
|
protected java.lang.Class |
sourceType
|
private java.util.ArrayList<SourcePanelMonitor> |
spMonitors
|
| Constructor Summary | |
|---|---|
SourcePanel(java.awt.Window ownerWindow,
java.lang.Class sourceType,
boolean hasChannels,
boolean includeSubClasses)
Construct a panel without a border |
|
SourcePanel(java.awt.Window ownerWindow,
java.lang.String borderTitle,
java.lang.Class sourceType,
boolean hasChannels,
boolean includeSubClasses)
Construct a panel with a titles border |
|
| Method Summary | |
|---|---|
void |
actionPerformed(java.awt.event.ActionEvent e)
action listener to update channel list when a a different source is selected |
void |
addSelectionListener(java.awt.event.ActionListener listener)
Add a listener to the data source drop down list |
void |
addSourcePanelMonitor(SourcePanelMonitor gspm)
|
void |
clearExcludeList()
Clear the list of excluded data blocks. |
protected void |
createPanel()
|
void |
excludeDataBlock(PamDataBlock block,
boolean exclude)
Exclude specific data blocks from the source list. |
javax.swing.JCheckBox[] |
getChannelBoxes()
|
int |
getChannelList()
Get a list of selected channels |
int |
getLocalisationRequirements()
|
javax.swing.JPanel |
getPanel()
Get a reference to the JPanel containing the controls |
PamDataBlock |
getSource()
return the selected data source |
int |
getSourceCount()
Get the number of items in the list. |
int |
getSourceIndex()
Get the currently selected source index |
java.lang.Class |
getSourceType()
get the data source type for this SourcePanel |
private void |
notifySourcePanelMonitors()
|
void |
removeSourcePanelMonitor(SourcePanelMonitor gspm)
|
protected void |
rePackOwner(int channelsMap)
Repack the owner window if the number of channels has changed |
protected void |
selectionChanged(int channel)
|
void |
setChannelList(int channelList)
Set the current channel selection |
void |
setEnabled(boolean enabled)
|
void |
setLocalisationRequirements(int localisationRequirements)
|
void |
setSource(PamDataBlock sourceBlock)
Set the current data source by block reference |
boolean |
setSource(java.lang.String sourceName)
Set the current data source using the data source name |
boolean |
setSourceList()
Fill the list of available data sources, taking into account the list of excluded sources |
boolean |
setSourceList(boolean replaceChosen)
|
void |
setSourceType(java.lang.Class sourceType)
Set the source type for this SourcePanel |
protected void |
showChannels()
|
protected void |
sourceChanged()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected javax.swing.JPanel panel
protected java.lang.Class sourceType
protected boolean hasChannels
protected java.lang.String borderTitle
protected boolean includeSubClasses
protected javax.swing.JComboBox sourceList
protected javax.swing.JCheckBox[] channelBoxes
protected java.awt.Window ownerWindow
private int localisationRequirements
protected java.util.ArrayList<PamDataBlock> excludedBlocks
private java.util.ArrayList<SourcePanelMonitor> spMonitors
private int currentNShown
| Constructor Detail |
|---|
public SourcePanel(java.awt.Window ownerWindow,
java.lang.String borderTitle,
java.lang.Class sourceType,
boolean hasChannels,
boolean includeSubClasses)
borderTitle - Title to go in bordersourceType - Data Source typehasChannels - Include a set of checkboxes to list available channelsincludeSubClasses - inlcude all subclasses of sourceType in the list.
public SourcePanel(java.awt.Window ownerWindow,
java.lang.Class sourceType,
boolean hasChannels,
boolean includeSubClasses)
ownerWindow - Parent windowsourceType - Data Source typehasChannels - Include a set of checkboxes to list available channelsinclude - subclasses of the sourceType| Method Detail |
|---|
public void setEnabled(boolean enabled)
public void addSelectionListener(java.awt.event.ActionListener listener)
listener - listenerprotected void selectionChanged(int channel)
protected void createPanel()
public void actionPerformed(java.awt.event.ActionEvent e)
actionPerformed in interface java.awt.event.ActionListenerprotected void sourceChanged()
protected void showChannels()
protected void rePackOwner(int channelsMap)
channelsMap - bitmap of used channels.public boolean setSource(java.lang.String sourceName)
sourceName -
public void setSource(PamDataBlock sourceBlock)
sourceBlock - public boolean setSourceList()
public boolean setSourceList(boolean replaceChosen)
public PamDataBlock getSource()
public int getChannelList()
public void setChannelList(int channelList)
channelList - bitmap of currently selected channelspublic java.lang.Class getSourceType()
public void setSourceType(java.lang.Class sourceType)
sourceType - public int getSourceIndex()
public javax.swing.JPanel getPanel()
public void excludeDataBlock(PamDataBlock block,
boolean exclude)
block - PamDataBlock to exlcudeexclude - true - excluse; false - allowpublic void clearExcludeList()
public javax.swing.JCheckBox[] getChannelBoxes()
public int getLocalisationRequirements()
public void setLocalisationRequirements(int localisationRequirements)
public int getSourceCount()
public void addSourcePanelMonitor(SourcePanelMonitor gspm)
public void removeSourcePanelMonitor(SourcePanelMonitor gspm)
private void notifySourcePanelMonitors()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||