|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--PopupRegistry
The PopupRegistry class implements a call-back mechanism for active popup windows It is also usable for any other objects that impelement MaeEventListeners that are dynamicaly created and need to be notified of state changes. Examples of the latter are MAEPlugin instances.
It registers popup windows (plots, spreadsheets, string text areas, expr. profiles, MAEPlugin Instance Objects etc.) So they can be checked for user event handling. When an event gets registered, it supplies a list of events it wants to be notified of which include: CurGene changed, data Filter changed, threshold Sliders changed, sample labels or other lables changed, and timeout (not implemented yet). Also, when a window registers it supplies a popup key (i.e. popup name) and this may be required to be UNIQUE or not. If unique, then only one instance of that window may exist and the old windows must be removed (by the caller) prior to to creating the new window.
There are 6 types of popups that are able to be registered here. Class variable prefix ShowPlotPopup sppXXX[0:nSPP-1] active Plot popups ShowSpreadsheetPopup ssspXXX[0:nSSSP-1] active ShowSpreadsheetPopup popups ShowStringPopup sspXXX[0:nSSP-1] active String popups ShowExprProfilesPopup seppXXX[0:nSEPP-1] active ExprProfile's popups MAEPluginUpdateListener maepXXX[0:nMAEP-1] active MAEPlugin Instance Object's Object popups [TODO]
This work was produced by Peter Lemkin of the National Cancer Institute, an agency of the United States Government. As a work of the United States Government there is no associated copyright. It is offered as open source software under the Mozilla Public License (version 1.1) subject to the limitations noted in the accompanying LEGAL file. This notice must be included with the code. The MAExplorer Mozilla and Legal files are available on http://maexplorer.sourceforge.net/.
Field Summary | |
private Config |
cfg
link to global Config instance |
(package private) static int |
CUR_GENE
Property bit type: Notify bit if CurGene changed |
(package private) static int |
FILTER
Property bit type: Notify bit if Filter changed |
private int |
idxMAEP
MAEPlugin Object current index |
private int |
idxSEPP
ShowExprProfilesPopup current index |
private int |
idxSPP
ShowPlotPopup popups currrent index |
private int |
idxSSP
ShowStringPopup popups current index |
private int |
idxSSSP
ShowSpreadsheetPopup popups current index |
(package private) static int |
LABEL
Property bit type: Notify bit if Labels changed |
private MAExplorer |
mae
link to global MAExplorer instance |
private java.lang.String[] |
maepKey
[0:nMAEP-1] MAEPlugin Object key names |
private MAEUpdateListener[] |
maepList
[0:nMAEP-1] list of active MAEPlugin Objects |
private int[] |
maepPropBits
[0:nMAEP-1] bits requesting notification of MAEPlugin Object list of changes |
private Maps |
map
link to global Maps instance |
(package private) static int |
MAX_POPUPS
maximum # of popups for each type of popup |
private MenuBarFrame |
mbf
link to global MenuBarFrame instance |
private int |
nMAEP
MAEPlugin Instance Object counter |
private int |
nSEPP
ShowExprProfilesPopup counter |
private int |
nSPP
Plot popups counter |
private int |
nSSP
String popups counter |
private int |
nSSSP
ShowSpreadsheetPopup popups counter |
private int |
oldWorkingCLlength
last value of fc.workingCL.length to see if update clusters - if filter changed. |
(package private) int |
prevObjMID
previous MID object used to see if switched current gene object |
private java.lang.String[] |
seppKey
[0:nSEPP-1] ExprProfilePopup key names |
private ShowExprProfilesPopup[] |
seppList
[0:nSEPP-1] list of active Expr Profile popups |
private int[] |
seppPropBits
[0:nSEPP-1] bits requesting notification of ExprProfilePopup list of changes |
(package private) static int |
SLIDER
Property bit type: Notify bit if Slider changed |
private java.lang.String[] |
sppKey
[0:nSPP-1] ShowPlotPopup key names |
private ShowPlotPopup[] |
sppList
[0:nSPP-1] list of active Plot popups |
private int[] |
sppPropBits
[0:nSPP-1] bits requesting notification of ShowPlotPopup of change |
private java.lang.String[] |
sspKey
[0:nSSP-1] ShowStringPopup key names |
private ShowStringPopup[] |
sspList
[0:nSSP-1] list of active String popups |
private int[] |
sspPropBits
[0:nSSP-1] bits requesting notification of ShowStringPopup of changes |
private int[] |
sspTime
[0:nSPP-1] String Popup timeout seconds |
private java.lang.String[] |
ssspKey
[0:nSSSP-1] ShowSpreadsheetPopup key names |
private ShowSpreadsheetPopup[] |
ssspList
[0:nSSSP-1] list of active spreadsheet popup popups |
private int[] |
ssspPropBits
[0:nSSSP-1] bits requesting notification of ShowSpreadsheetPopup of change |
(package private) static int |
TIMEOUT
Property bit type: set if timeout and kill itself after TIMEOUT_DELAY milliseconds |
(package private) static int |
TIMEOUT_DELAY
# msec. |
(package private) static int |
UNIQUE
Property bit type: set if this is a unique popup |
Constructor Summary | |
(package private) |
PopupRegistry(MAExplorer mae)
PopupRegistry() - constructor to popup registry |
Method Summary | |
(package private) int |
addPopupWindowToReg(MAEUpdateListener maep,
java.lang.String key,
int propBits)
addPopupWindowToReg() - register MAEPlugin Instance Object window in maepList[] |
(package private) int |
addPopupWindowToReg(ShowExprProfilesPopup sepp,
java.lang.String key,
int propBits)
addPopupWindowToReg() - register ShowExprProfilesPopup window in seppList[] |
(package private) int |
addPopupWindowToReg(ShowPlotPopup spp,
java.lang.String key,
int propBits)
addPopupWindowToReg() - register ShowPlotPopup window in sppList[] |
(package private) int |
addPopupWindowToReg(ShowSpreadsheetPopup sssp,
java.lang.String key,
int propBits)
addPopupWindowToReg() - register ShowSpreadsheetPopup window in ssspList[] |
(package private) int |
addPopupWindowToReg(ShowStringPopup ssp,
java.lang.String key,
int propBits)
addPopupWindowToReg() - register ShowStringPopup window in sspList[] |
(package private) void |
checkStringPopupTimeouts(int runLoopDelayMsec)
checkPopupTimeouts() - check timeouts for all active popups and kill any that exceed the time. |
(package private) boolean |
chkOtherCurGeneEffects(int midA,
int mouseKeyMods)
chkOtherCurGeneEffects() - check other gene effects when change current gene in ms.objXXX. |
(package private) boolean |
doesPopupExist(java.lang.String testKey)
doesPopupExist() - check to see if popup exists for this key. |
(package private) boolean |
doesUniquePopupExist(java.lang.String testKey)
doesUniquePopupExist() - check to see if popup exists for this key |
(package private) java.lang.Object |
lookupMAEPluginInstanceObjectInstance(java.lang.String testKey)
lookupMAEPluginInstanceObjectInstance() - lookup MAEPlugin Object for unique key instance |
(package private) ShowExprProfilesPopup |
lookupShowExprProfilesPopupInstance(java.lang.String testKey)
lookupShowExprProfilesPopupInstance() - lookup ShowExprProfilesPopup for unique key instance |
(package private) ShowPlotPopup |
lookupShowPlotPopupInstance(java.lang.String testKey)
lookupShowPlotPopupInstance() - lookup ShowPlotPopup for unique key instance |
(package private) ShowSpreadsheetPopup |
lookupShowSpreadsheetPopupInstance(java.lang.String testKey)
lookupShowSpreadsheetPopupInstance() - lookup ShowSpreadsheetPopup for unique key instance |
(package private) ShowStringPopup |
lookupShowStringPopupInstance(java.lang.String testKey)
lookupShowStringPopupInstance() - lookup ShowStringPopup for unique key instance |
(package private) boolean |
removePopupByKey(java.lang.String testKey)
removePopupByKey() - remove popup by unique key if existing instance |
(package private) int |
rmvPopupFromReg(java.lang.Object maep,
int BOGUS)
rmvPopupFromReg() - remove popup from maepList[]. |
(package private) int |
rmvPopupFromReg(ShowExprProfilesPopup seep)
rmvPopupFromReg() - remove popup from ShowExprProfilesPopup seppList[]. |
(package private) int |
rmvPopupFromReg(ShowPlotPopup spp)
rmvPopupFromReg() - remove popup instance from ShowPlotPopup sppList[]. |
(package private) int |
rmvPopupFromReg(ShowSpreadsheetPopup sssp)
rmvPopupFromReg() - remove popup from ShowSpreadsheetPopup ssspList[]. |
(package private) int |
rmvPopupFromReg(ShowStringPopup ssp)
rmvPopupFromReg() - remove popup from ShowStringPopup ssptList[]. |
(package private) void |
setWaitCursor(boolean waitCursorFlag)
setWaitCursor() - if true set wait cursor, else set default cursor. |
(package private) boolean |
updateCurGene(int mid,
int mouseKeyMods,
java.lang.Object sObj)
updateCurGene() - update (plot,report,string,MAEPlugin) popups with the current gene. |
(package private) boolean |
updateCurGeneInImageAndReg(java.lang.String nameOrId)
updateCurGeneInImageAndReg() - update current gene in pseudoarray image and notify the PopupRegistry. |
(package private) boolean |
updateFilter(GeneList ml)
updateFilter() - update popups using Filter workingCL changes for (plot,report,string,MAEPlugin) popups. |
(package private) boolean |
updateLabels()
updateLabels() - update popups using Label changes for (plot,report,string,MAEPlugin) popups. |
(package private) boolean |
updateSlider()
updateSlider() - update popups using Slider changes for (plot,report,string,MAEPlugin) popups. |
Methods inherited from class java.lang.Object |
|
Field Detail |
private MAExplorer mae
private MenuBarFrame mbf
private Maps map
private Config cfg
static final int CUR_GENE
static final int FILTER
static final int SLIDER
static final int LABEL
static final int UNIQUE
static final int TIMEOUT
static final int TIMEOUT_DELAY
static final int MAX_POPUPS
private ShowPlotPopup[] sppList
private ShowSpreadsheetPopup[] ssspList
private ShowStringPopup[] sspList
private ShowExprProfilesPopup[] seppList
private MAEUpdateListener[] maepList
private java.lang.String[] sppKey
private java.lang.String[] ssspKey
private java.lang.String[] sspKey
private java.lang.String[] seppKey
private java.lang.String[] maepKey
private int[] sppPropBits
private int[] ssspPropBits
private int[] sspPropBits
private int[] seppPropBits
private int[] maepPropBits
private int[] sspTime
private int nSPP
private int nSSSP
private int nSSP
private int nSEPP
private int nMAEP
private int idxSPP
private int idxSSSP
private int idxSSP
private int idxSEPP
private int idxMAEP
int prevObjMID
private int oldWorkingCLlength
Constructor Detail |
PopupRegistry(MAExplorer mae)
mae
- is instance of MAExplorerMethod Detail |
int addPopupWindowToReg(ShowPlotPopup spp, java.lang.String key, int propBits)
ssp
- instance of window to registerkey
- is popup name for this windowpropBits
- specify which updates are to be invoked for this windowint addPopupWindowToReg(ShowSpreadsheetPopup sssp, java.lang.String key, int propBits)
sssp
- instance of window to registerkey
- is popup name for this windowpropBits
- specify which updates are to be invoked for this windowint addPopupWindowToReg(ShowStringPopup ssp, java.lang.String key, int propBits)
ssp
- instance of window to registerkey
- is popup name for this windowpropBits
- specify which updates are to be invoked for this windowint addPopupWindowToReg(ShowExprProfilesPopup sepp, java.lang.String key, int propBits)
sepp
- instance of window to registerkey
- is popup name for this windowpropBits
- specify which updates are to be invoked for this windowint addPopupWindowToReg(MAEUpdateListener maep, java.lang.String key, int propBits)
maep
- instance of window to registerkey
- is popup name for this windowpropBits
- specify which updates are to be invoked for this windowint rmvPopupFromReg(ShowPlotPopup spp)
spp
- is instance of previously registered window to be removedint rmvPopupFromReg(ShowSpreadsheetPopup sssp)
sssp
- is instance of previously registered window to be removedint rmvPopupFromReg(ShowStringPopup ssp)
spp
- is instance of previously registered window to be removedint rmvPopupFromReg(ShowExprProfilesPopup seep)
seep
- is instance of previously registered window to be removedint rmvPopupFromReg(java.lang.Object maep, int BOGUS)
maep
- is instance of previously registered window to be removedboolean chkOtherCurGeneEffects(int midA, int mouseKeyMods)
1. modifying the 'editable gene list', 2. poping up a web browser on external GenBank etc. data, 3. changing the gene used in the 'single' expression profile plot, 4. update cluster algorithms and redraw overlays in pseudoarray image.If mouseKeyMods==ClusterGenes.UPDATE, compute it again even if midA==cdb.objMID.
midA
- specifying the gene MIDmouseKeyMods
- modifieers (i.e.CONTROL or SHIFT)ClusterGenes.copyCurClusterToEditedGeneList()
,
ClusterGenes.findClustersOfGene(MAExplorer, Gene, float, boolean)
,
ClusterGenes.updateGeneClustersOfCurrentGeneReport()
,
Gene.lookupIDbyName(java.lang.String)
,
EditedGeneList.processEditCommand(int)
,
EventMenu.setClusterDisplayState(java.awt.CheckboxMenuItem, boolean)
,
ExprProfilePopup.updateData(int, java.lang.String, boolean)
,
Component.repaint()
,
ShowStringPopup.changeGeneButton(java.lang.String, java.lang.String, int)
,
StateScrollers.regenerateScrollers(boolean)
,
Util.popupViewer(java.net.URL, java.lang.String, java.lang.String)
,
Util.rmvIMAGEstr(java.lang.String)
,
Util.saveCmdHistory(java.lang.String)
boolean updateCurGene(int mid, int mouseKeyMods, java.lang.Object sObj)
mid
- specifying the gene MIDmouseKeyMods
- modifieers (i.e.CONTROL or SHIFT)sObj
- object invoking the change if not null, don't refresh
'self' object which called update.updateCurGene(int, int, java.lang.Object)
,
chkOtherCurGeneEffects(int, int)
boolean updateFilter(GeneList ml)
ml
- is GeneList to be used when running the data FilterupdateFilter(GeneList)
,
Component.repaint()
boolean updateSlider()
updateSlider()
boolean updateLabels()
updateLabels()
boolean doesPopupExist(java.lang.String testKey)
boolean doesUniquePopupExist(java.lang.String testKey)
key
- is the popup name of the window to test forlookupMAEPluginInstanceObjectInstance(java.lang.String)
,
lookupShowExprProfilesPopupInstance(java.lang.String)
,
lookupShowPlotPopupInstance(java.lang.String)
,
lookupShowSpreadsheetPopupInstance(java.lang.String)
,
lookupShowStringPopupInstance(java.lang.String)
ShowPlotPopup lookupShowPlotPopupInstance(java.lang.String testKey)
key
- is the popup name of the window to test forShowSpreadsheetPopup lookupShowSpreadsheetPopupInstance(java.lang.String testKey)
key
- is the popup name of the window to test forShowStringPopup lookupShowStringPopupInstance(java.lang.String testKey)
key
- is the popup name of the window to test forShowExprProfilesPopup lookupShowExprProfilesPopupInstance(java.lang.String testKey)
key
- is the popup name of the window to test forjava.lang.Object lookupMAEPluginInstanceObjectInstance(java.lang.String testKey)
key
- is the popup name of the window to test forboolean removePopupByKey(java.lang.String testKey)
key
- is the popup name of the windowlookupMAEPluginInstanceObjectInstance(java.lang.String)
,
lookupShowExprProfilesPopupInstance(java.lang.String)
,
lookupShowPlotPopupInstance(java.lang.String)
,
lookupShowSpreadsheetPopupInstance(java.lang.String)
,
lookupShowStringPopupInstance(java.lang.String)
,
rmvPopupFromReg(ShowPlotPopup)
void checkStringPopupTimeouts(int runLoopDelayMsec)
runLoopDelayMsec
- is the timeout to test forrmvPopupFromReg(ShowPlotPopup)
void setWaitCursor(boolean waitCursorFlag)
waitCursorFlag
- is the new cursor stateboolean updateCurGeneInImageAndReg(java.lang.String nameOrId)
nameOrId
- to set as the new current geneComponent.repaint()
,
Component.repaint()
,
SpotFeatures.getXYG(java.awt.Point, MaHybridSample)
,
SpotFeatures.getSpotFeatures(java.awt.Point, MaHybridSample)
,
SpotFeatures.getSpotGenomicData(java.awt.Point, MaHybridSample)
,
Util.showMsg(java.lang.String)
,
Util.showFeatures(java.lang.String, java.lang.String)
,
updateCurGene(int, int, java.lang.Object)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |