Merge "Issue #1217 commit code from Ncep to fix the problem" into development

Former-commit-id: 60868059ba [formerly c6d678651e] [formerly c733e73c7f [formerly ab9e8885bf94b04ee686c81ef379c36fe76f91f7]]
Former-commit-id: c733e73c7f
Former-commit-id: 3f56312c36
This commit is contained in:
Nate Jensen 2012-10-10 08:57:30 -05:00 committed by Gerrit Code Review
commit 32fef7405e
3 changed files with 36 additions and 9 deletions

View file

@ -869,8 +869,8 @@ public class NsharpDataPaneResource extends NsharpAbstractPaneResource{
//font10.dispose(); //font10.dispose();
} }
@SuppressWarnings("deprecation") @SuppressWarnings("deprecation")
private void drawPanel2(IGraphicsTarget target, Rectangle rect) private void drawPanel2(IGraphicsTarget target, Rectangle rect) throws VizException
throws VizException { {
/* /*
* Chin's NOTE:::: * Chin's NOTE::::
* This pages based on BigNsharp * This pages based on BigNsharp
@ -1070,7 +1070,7 @@ public class NsharpDataPaneResource extends NsharpAbstractPaneResource{
nsharpNative.nsharpLib.get_lpvaluesData(lpvls); nsharpNative.nsharpLib.get_lpvaluesData(lpvls);
} }
// set parcel back to user selection // set parcel back to user selection
if (oldlplchoice == 1) /*if (oldlplchoice == 1)
pres = 0; pres = 0;
else if (oldlplchoice == 2) else if (oldlplchoice == 2)
pres = 0; pres = 0;
@ -1081,11 +1081,30 @@ public class NsharpDataPaneResource extends NsharpAbstractPaneResource{
else if (oldlplchoice == 5) else if (oldlplchoice == 5)
pres = NsharpNativeConstants.USER_LAYER; pres = NsharpNativeConstants.USER_LAYER;
else if (oldlplchoice == 6) else if (oldlplchoice == 6)
pres = NsharpNativeConstants.MU_LAYER; pres = NsharpNativeConstants.MU_LAYER;*/
//System.out.println("drawPanel2-2 called define_parcel pType="+oldlplchoice+" pre="+ pres); //System.out.println("drawPanel2-2 called define_parcel pType="+oldlplchoice+" pre="+ pres);
try{
if(oldlplchoice == NsharpNativeConstants.PARCELTYPE_USER_DEFINED){
if(NsharpParcelDialog.getAccess() != null){
pres = NsharpParcelDialog.getAccess().getUserDefdParcelMb();
}
else
pres = NsharpNativeConstants.parcelToLayerMap.get(oldlplchoice);
}
else
pres = NsharpNativeConstants.parcelToLayerMap.get(oldlplchoice);
nsharpNative.nsharpLib.define_parcel(oldlplchoice, pres); //reset and define oldchoice parcel
} nsharpNative.nsharpLib.define_parcel(oldlplchoice,pres);
}
catch (NullPointerException e) {
// when in changing pane configuration situation, an odd scenario may happened that
// "oldlplchoice" may be a null, and parcelToLayerMap.get(oldlplchoice); throws a
// NullPointerException. In that case, we do not re-define_parcel and continue on
e.printStackTrace();
}
}
else { else {
h1 = NsharpNativeConstants.STORM_MOTION_HEIGHT2[i][0]; h1 = NsharpNativeConstants.STORM_MOTION_HEIGHT2[i][0];
h2 = NsharpNativeConstants.STORM_MOTION_HEIGHT2[i][1]; h2 = NsharpNativeConstants.STORM_MOTION_HEIGHT2[i][1];
@ -3267,6 +3286,10 @@ public class NsharpDataPaneResource extends NsharpAbstractPaneResource{
//Chin Note; ext size is its view size Not canvas size //Chin Note; ext size is its view size Not canvas size
IExtent ext = getDescriptor().getRenderableDisplay().getExtent(); IExtent ext = getDescriptor().getRenderableDisplay().getExtent();
ext.reset(); ext.reset();
this.rectangle = new Rectangle((int)ext.getMinX(), (int) ext.getMinY(),
(int) ext.getWidth(), (int) ext.getHeight());
pe = new PixelExtent(this.rectangle);
getDescriptor().setNewPe(pe);
defineCharHeight(font10); defineCharHeight(font10);
float prevHeight = dataPaneHeight; float prevHeight = dataPaneHeight;
float prevWidth = dataPaneWidth; float prevWidth = dataPaneWidth;

View file

@ -1535,7 +1535,8 @@ public class NsharpResourceHandler {
if(soundMap.size() <=0 || (skewtPaneRsc==null)){ if(soundMap.size() <=0 || (skewtPaneRsc==null)){
return; return;
} }
if(timeLineStateList.isEmpty() || stnStateList.isEmpty()){ if(timeLineStateList.isEmpty() || stnStateList.isEmpty() ||
currentTimeLineStateListIndex < 0 || currentStnStateListIndex < 0){
//if no data was loaded since, then display this data any way //if no data was loaded since, then display this data any way
displayNewData = true; displayNewData = true;
} }

View file

@ -443,7 +443,10 @@ public class NsharpTimeStnPaneResource extends NsharpAbstractPaneResource{
super.handleResize(); super.handleResize();
IExtent ext = getDescriptor().getRenderableDisplay().getExtent(); IExtent ext = getDescriptor().getRenderableDisplay().getExtent();
ext.reset(); ext.reset();
this.rectangle = new Rectangle((int)ext.getMinX(), (int) ext.getMinY(),
(int) ext.getWidth(), (int) ext.getHeight());
pe = new PixelExtent(this.rectangle);
getDescriptor().setNewPe(pe);
defineCharHeight(font10); defineCharHeight(font10);
//rscHandler.setCharHeight(charHeight); //rscHandler.setCharHeight(charHeight);
float prevHeight = paneHeight; float prevHeight = paneHeight;