13.2.1-7 baseline

Former-commit-id: c0b56ae597 [formerly 370b2558f0] [formerly 1ce95d1df2] [formerly c0b56ae597 [formerly 370b2558f0] [formerly 1ce95d1df2] [formerly c86246ab4d [formerly 1ce95d1df2 [formerly 132297ab4acf8e649e3cf9a3d54d4f4676b280be]]]]
Former-commit-id: c86246ab4d
Former-commit-id: f76444254f [formerly 4bc81ce1de] [formerly 487e22db3552e2e061b19f214b91446a1ad77f8e [formerly 37be2e3f23]]
Former-commit-id: 4e998b11e07806a3d1725189e94643feab1fbb68 [formerly 4c0a8e0106]
Former-commit-id: b2c3100109
This commit is contained in:
Steve Harris 2013-02-11 16:50:39 -05:00
parent 91ea402e4a
commit ee8bfc9941
2 changed files with 49 additions and 34 deletions

View file

@ -130,6 +130,9 @@ import com.vividsolutions.jts.geom.Polygon;
* Dec 20, 2012 DR 15537 Qinglu Lin Changed the assigned value to trackEditable from false
* to true in boxSelected().
* Jan 24, 2013 DR 15723 Qinglu Lin Invoked WarngenLayer's initRemovedGids().
* Feb 7, 2013 DR 15799 Qinglu Lin Added setPolygonLocked(false) to conSelected(), newSelected(); added
* setPolygonLocked(true) below conSelected() is called in corSelected(),
* and removed it from updateListSelected().
*
* </pre>
*
@ -1518,7 +1521,6 @@ public class WarngenDialog extends CaveSWTDialog implements
*/
public void updateListSelected() {
warngenLayer.setOldWarningPolygon(null);
setPolygonLocked(false);
if (updateListCbo.getSelectionIndex() >= 0) {
AbstractWarningRecord oldWarning = null;
FollowupData data = (FollowupData) updateListCbo
@ -1829,7 +1831,8 @@ public class WarngenDialog extends CaveSWTDialog implements
* @param selected
*/
private AbstractWarningRecord conSelected(FollowupData data) {
CurrentWarnings cw = CurrentWarnings.getInstance(warngenLayer
setPolygonLocked(false);
CurrentWarnings cw = CurrentWarnings.getInstance(warngenLayer
.getLocalizedSite());
AbstractWarningRecord newWarn = null;
if (WarningAction.COR == WarningAction.valueOf(data.getAct())) {
@ -1877,6 +1880,7 @@ public class WarngenDialog extends CaveSWTDialog implements
// Special case - allows for Correction of Followups
if (!allowsNewProduct) {
newWarn = conSelected(data);
setPolygonLocked(true);
} else {
CurrentWarnings cw = CurrentWarnings.getInstance(warngenLayer
.getLocalizedSite());
@ -1986,6 +1990,7 @@ public class WarngenDialog extends CaveSWTDialog implements
* @param selected
*/
private AbstractWarningRecord newSelected(FollowupData data) {
setPolygonLocked(false);
AbstractWarningRecord newWarn = CurrentWarnings.getInstance(
warngenLayer.getLocalizedSite()).getNewestByTracking(
data.getEtn(), data.getPhen() + "." + data.getSig());

View file

@ -1564,11 +1564,11 @@ public class NsharpResourceHandler {
addElementToTableAndLists(elmDesc,stnId,timeLine,stnInfo);
}
if(displayNewData){
//Set default parcel trace data
//Set default parcel trace data
currentParcel = NsharpNativeConstants.PARCELTYPE_MOST_UNSTABLE;
currentParcelLayerPressure = NsharpNativeConstants.MU_LAYER;
setCurrentSoundingLayerInfo();
resetData();
setCurrentSoundingLayerInfo();
resetData();
}
else {
//Not display new data. Reset current "parameter"s after adding data to map/lists
@ -1580,11 +1580,21 @@ public class NsharpResourceHandler {
//set total time line group and stn id list page number
int numTimeLinePerPage = (cnYOrig-dtNextPageEnd)/charHeight;
//System.out.println("numTimeLinePerPage="+numTimeLinePerPage);
totalTimeLinePage = timeLineStateList.size()/numTimeLinePerPage + 1; //NEW CODE
curTimeLinePage = currentTimeLineStateListIndex/numTimeLinePerPage + 1; //NEW CODE
totalStnIdPage = stnStateList.size()/numTimeLinePerPage + 1; //NEW CODE
curStnIdPage= currentStnStateListIndex/numTimeLinePerPage + 1; //NEW CODE
//fix bug, when numTimeLinePerPage ==0 case
if(numTimeLinePerPage <= 0) {
numTimeLinePerPage = 1;
totalTimeLinePage = timeLineStateList.size();
curTimeLinePage = currentTimeLineStateListIndex;
totalStnIdPage = stnStateList.size();
curStnIdPage= currentStnStateListIndex;
}
else{
totalTimeLinePage = timeLineStateList.size()/numTimeLinePerPage + 1;
curTimeLinePage = currentTimeLineStateListIndex/numTimeLinePerPage + 1;
totalStnIdPage = stnStateList.size()/numTimeLinePerPage + 1;
curStnIdPage= currentStnStateListIndex/numTimeLinePerPage + 1;
}
/* Chin: TBD: do we need these code?
NsharpSkewTPaneDisplay renderableDisplay = (NsharpSkewTPaneDisplay) skewtPaneRsc.getDescriptor().getRenderableDisplay();
@ -1650,9 +1660,9 @@ public class NsharpResourceHandler {
if( totalStnIdPage == 1)
return;
if((c.x - (dtXOrig+dtWidth)) < (dtWidth/2)){
curStnIdPage++;
if(curStnIdPage>totalStnIdPage)
curStnIdPage=1;
curStnIdPage++;
if(curStnIdPage>totalStnIdPage)
curStnIdPage=1;
} else {
curStnIdPage--;
if(curStnIdPage <=0)
@ -1695,9 +1705,9 @@ public class NsharpResourceHandler {
if( totalTimeLinePage == 1)
return;
if((c.x - dtXOrig) < (dtWidth/2)){
curTimeLinePage++;
if(curTimeLinePage>totalTimeLinePage)
curTimeLinePage=1;
curTimeLinePage++;
if(curTimeLinePage>totalTimeLinePage)
curTimeLinePage=1;
} else {
curTimeLinePage--;
if(curTimeLinePage <=0)
@ -1709,7 +1719,7 @@ public class NsharpResourceHandler {
index =((int)(c.y - dtNextPageEnd))/ charHeight +
(curTimeLinePage-1)* numTimeLinePerPage ;
if( index < timeLineStateList.size() ){
if( index < timeLineStateList.size() && index >=0 ){
switch(timeLineStateList.get(index).getTimeState()){
case INACTIVE:
timeLineStateList.get(index).setTimeState( NsharpConstants.State.ACTIVE);
@ -2177,28 +2187,28 @@ public class NsharpResourceHandler {
NsharpAbstractPaneResource absPaneRsc = (NsharpAbstractPaneResource)rscP.getResource();
if (absPaneRsc instanceof NsharpSkewTPaneResource){
skewtPaneRsc = (NsharpSkewTPaneResource)absPaneRsc ;
skewtPaneRsc.setLinePropertyMap(linePropertyMap);
skewtPaneRsc.setGraphConfigProperty(graphConfigProperty);
skewtPaneRsc.setNsharpNative(nsharpNative);
}
skewtPaneRsc.setLinePropertyMap(linePropertyMap);
skewtPaneRsc.setGraphConfigProperty(graphConfigProperty);
skewtPaneRsc.setNsharpNative(nsharpNative);
}
else if (absPaneRsc instanceof NsharpDataPaneResource){
dataPaneRsc = (NsharpDataPaneResource)absPaneRsc;
dataPaneRsc.setLinePropertyMap(linePropertyMap);
dataPaneRsc.setGraphConfigProperty(graphConfigProperty);
dataPaneRsc.setNsharpNative(nsharpNative);
dataPaneRsc.setPageDisplayOrderNumberArray(pageDisplayOrderNumberArray);
}
dataPaneRsc.setLinePropertyMap(linePropertyMap);
dataPaneRsc.setGraphConfigProperty(graphConfigProperty);
dataPaneRsc.setNsharpNative(nsharpNative);
dataPaneRsc.setPageDisplayOrderNumberArray(pageDisplayOrderNumberArray);
}
else if (absPaneRsc instanceof NsharpHodoPaneResource){
hodoPaneRsc = (NsharpHodoPaneResource)absPaneRsc;
hodoPaneRsc.setLinePropertyMap(linePropertyMap);
hodoPaneRsc.setGraphConfigProperty(graphConfigProperty);
hodoPaneRsc.setNsharpNative(nsharpNative);
}
hodoPaneRsc.setLinePropertyMap(linePropertyMap);
hodoPaneRsc.setGraphConfigProperty(graphConfigProperty);
hodoPaneRsc.setNsharpNative(nsharpNative);
}
else if (absPaneRsc instanceof NsharpWitoPaneResource &&
(paneConfigurationName.equals(NsharpConstants.PANE_SPCWS_CFG_STR)||
paneConfigurationName.equals(NsharpConstants.PANE_DEF_CFG_1_STR)||
paneConfigurationName.equals(NsharpConstants.PANE_DEF_CFG_1_STR)||
paneConfigurationName.equals(NsharpConstants.PANE_DEF_CFG_2_STR))){
witoPaneRsc = (NsharpWitoPaneResource)absPaneRsc;
witoPaneRsc.setLinePropertyMap(linePropertyMap);
witoPaneRsc.setGraphConfigProperty(graphConfigProperty);
@ -2214,7 +2224,7 @@ public class NsharpResourceHandler {
insetPaneRsc.setLinePropertyMap(linePropertyMap);
insetPaneRsc.setGraphConfigProperty(graphConfigProperty);
insetPaneRsc.setNsharpNative(nsharpNative);
}
else if (absPaneRsc instanceof NsharpSpcGraphsPaneResource && paneConfigurationName.equals(NsharpConstants.PANE_SPCWS_CFG_STR)){
spcGraphsPaneRsc = (NsharpSpcGraphsPaneResource)absPaneRsc;
@ -2231,7 +2241,7 @@ public class NsharpResourceHandler {
}
else if (absPaneRsc instanceof NsharpTimeStnPaneResource &&
(paneConfigurationName.equals(NsharpConstants.PANE_SIMPLE_D2D_CFG_STR)||
paneConfigurationName.equals(NsharpConstants.PANE_DEF_CFG_1_STR)||
paneConfigurationName.equals(NsharpConstants.PANE_DEF_CFG_1_STR)||
paneConfigurationName.equals(NsharpConstants.PANE_DEF_CFG_2_STR))){
timeStnPaneRsc = (NsharpTimeStnPaneResource)absPaneRsc ;
timeStnPaneRsc.setLinePropertyMap(linePropertyMap);