Merge branch 'ss_builds' (13.2.1-7) into development

Former-commit-id: de437bb4fc [formerly 62e4a9045e32eaaf1a52ff06d86f82d2693021bd]
Former-commit-id: cc2757790c
This commit is contained in:
Steve Harris 2013-02-12 15:29:47 -06:00
commit 760be15f59
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>
*
@ -1529,7 +1532,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
@ -1840,7 +1842,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())) {
@ -1888,6 +1891,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());
@ -1997,6 +2001,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);