Merge "Issue #1217 commit code from Ncep to fix the problem" into development
Former-commit-id:60868059ba
[formerlyc6d678651e
] [formerly60868059ba
[formerlyc6d678651e
] [formerlyc733e73c7f
[formerly ab9e8885bf94b04ee686c81ef379c36fe76f91f7]]] Former-commit-id:c733e73c7f
Former-commit-id:32fef7405e
[formerly3f56312c36
] Former-commit-id:c21cc0c495
This commit is contained in:
commit
9548488e07
3 changed files with 36 additions and 9 deletions
|
@ -869,8 +869,8 @@ public class NsharpDataPaneResource extends NsharpAbstractPaneResource{
|
|||
//font10.dispose();
|
||||
}
|
||||
@SuppressWarnings("deprecation")
|
||||
private void drawPanel2(IGraphicsTarget target, Rectangle rect)
|
||||
throws VizException {
|
||||
private void drawPanel2(IGraphicsTarget target, Rectangle rect) throws VizException
|
||||
{
|
||||
/*
|
||||
* Chin's NOTE::::
|
||||
* This pages based on BigNsharp
|
||||
|
@ -1070,7 +1070,7 @@ public class NsharpDataPaneResource extends NsharpAbstractPaneResource{
|
|||
nsharpNative.nsharpLib.get_lpvaluesData(lpvls);
|
||||
}
|
||||
// set parcel back to user selection
|
||||
if (oldlplchoice == 1)
|
||||
/*if (oldlplchoice == 1)
|
||||
pres = 0;
|
||||
else if (oldlplchoice == 2)
|
||||
pres = 0;
|
||||
|
@ -1081,11 +1081,30 @@ public class NsharpDataPaneResource extends NsharpAbstractPaneResource{
|
|||
else if (oldlplchoice == 5)
|
||||
pres = NsharpNativeConstants.USER_LAYER;
|
||||
else if (oldlplchoice == 6)
|
||||
pres = NsharpNativeConstants.MU_LAYER;
|
||||
pres = NsharpNativeConstants.MU_LAYER;*/
|
||||
//System.out.println("drawPanel2-2 called define_parcel pType="+oldlplchoice+" pre="+ pres);
|
||||
|
||||
nsharpNative.nsharpLib.define_parcel(oldlplchoice, 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);
|
||||
|
||||
//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 {
|
||||
h1 = NsharpNativeConstants.STORM_MOTION_HEIGHT2[i][0];
|
||||
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
|
||||
IExtent ext = getDescriptor().getRenderableDisplay().getExtent();
|
||||
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);
|
||||
float prevHeight = dataPaneHeight;
|
||||
float prevWidth = dataPaneWidth;
|
||||
|
|
|
@ -1535,7 +1535,8 @@ public class NsharpResourceHandler {
|
|||
if(soundMap.size() <=0 || (skewtPaneRsc==null)){
|
||||
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
|
||||
displayNewData = true;
|
||||
}
|
||||
|
|
|
@ -443,7 +443,10 @@ public class NsharpTimeStnPaneResource extends NsharpAbstractPaneResource{
|
|||
super.handleResize();
|
||||
IExtent ext = getDescriptor().getRenderableDisplay().getExtent();
|
||||
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);
|
||||
//rscHandler.setCharHeight(charHeight);
|
||||
float prevHeight = paneHeight;
|
||||
|
|
Loading…
Add table
Reference in a new issue