Skip to content

Commit 88537d1

Browse files
authored
Implementing formatting rules. (NASAWorldWind#271)
1 parent f7ec97f commit 88537d1

File tree

3 files changed

+149
-145
lines changed

3 files changed

+149
-145
lines changed

src/gov/nasa/worldwind/AbstractSceneController.java

Lines changed: 49 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -2,25 +2,25 @@
22
* Copyright 2006-2009, 2017, 2020 United States Government, as represented by the
33
* Administrator of the National Aeronautics and Space Administration.
44
* All rights reserved.
5-
*
5+
*
66
* The NASA World Wind Java (WWJ) platform is licensed under the Apache License,
77
* Version 2.0 (the "License"); you may not use this file except in compliance
88
* with the License. You may obtain a copy of the License at
99
* http://www.apache.org/licenses/LICENSE-2.0
10-
*
10+
*
1111
* Unless required by applicable law or agreed to in writing, software distributed
1212
* under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
1313
* CONDITIONS OF ANY KIND, either express or implied. See the License for the
1414
* specific language governing permissions and limitations under the License.
15-
*
15+
*
1616
* NASA World Wind Java (WWJ) also contains the following 3rd party Open Source
1717
* software:
18-
*
18+
*
1919
* Jackson Parser – Licensed under Apache 2.0
2020
* GDAL – Licensed under MIT
2121
* JOGL – Licensed under Berkeley Software Distribution (BSD)
2222
* Gluegen – Licensed under Berkeley Software Distribution (BSD)
23-
*
23+
*
2424
* A complete listing of 3rd Party software notices and licenses included in
2525
* NASA World Wind Java (WWJ) can be found in the WorldWindJava-v2.2 3rd-party
2626
* notices and licenses PDF found in code directory.
@@ -112,7 +112,7 @@ public AbstractSceneController()
112112
}
113113

114114
@Override
115-
public void reinitialize()
115+
public void reinitialize()
116116
{
117117
if (this.textRendererCache != null)
118118
this.textRendererCache.dispose();
@@ -121,7 +121,7 @@ public void reinitialize()
121121

122122
/** Releases resources associated with this scene controller. */
123123
@Override
124-
public void dispose()
124+
public void dispose()
125125
{
126126
if (this.lastPickedObjects != null)
127127
this.lastPickedObjects.clear();
@@ -139,13 +139,13 @@ public void dispose()
139139
}
140140

141141
@Override
142-
public GpuResourceCache getGpuResourceCache()
142+
public GpuResourceCache getGpuResourceCache()
143143
{
144144
return this.gpuResourceCache;
145145
}
146146

147147
@Override
148-
public void setGpuResourceCache(GpuResourceCache gpuResourceCache)
148+
public void setGpuResourceCache(GpuResourceCache gpuResourceCache)
149149
{
150150
this.gpuResourceCache = gpuResourceCache;
151151
}
@@ -156,19 +156,19 @@ public TextRendererCache getTextRendererCache()
156156
}
157157

158158
@Override
159-
public Model getModel()
159+
public Model getModel()
160160
{
161161
return this.model;
162162
}
163163

164164
@Override
165-
public View getView()
165+
public View getView()
166166
{
167167
return this.view;
168168
}
169169

170170
@Override
171-
public void setModel(Model model)
171+
public void setModel(Model model)
172172
{
173173
if (this.model != null)
174174
this.model.removePropertyChangeListener(this);
@@ -181,7 +181,7 @@ public void setModel(Model model)
181181
}
182182

183183
@Override
184-
public void setView(View view)
184+
public void setView(View view)
185185
{
186186
if (this.view != null)
187187
this.view.removePropertyChangeListener(this);
@@ -195,50 +195,50 @@ public void setView(View view)
195195
}
196196

197197
@Override
198-
public void setVerticalExaggeration(double verticalExaggeration)
198+
public void setVerticalExaggeration(double verticalExaggeration)
199199
{
200200
Double oldVE = this.verticalExaggeration;
201201
this.verticalExaggeration = verticalExaggeration;
202202
this.firePropertyChange(AVKey.VERTICAL_EXAGGERATION, oldVE, verticalExaggeration);
203203
}
204204

205205
@Override
206-
public double getVerticalExaggeration()
206+
public double getVerticalExaggeration()
207207
{
208208
return this.verticalExaggeration;
209209
}
210210

211211
/** {@inheritDoc} */
212212
@Override
213-
public void setPickPoint(Point pickPoint)
213+
public void setPickPoint(Point pickPoint)
214214
{
215-
this.pickPoint = pickPoint;
215+
this.pickPoint = pickPoint;
216216
}
217217

218218
/** {@inheritDoc} */
219219
@Override
220-
public Point getPickPoint()
220+
public Point getPickPoint()
221221
{
222222
return this.pickPoint;
223223
}
224224

225225
/** {@inheritDoc} */
226226
@Override
227-
public void setPickRectangle(Rectangle pickRect)
227+
public void setPickRectangle(Rectangle pickRect)
228228
{
229229
this.pickRect = pickRect;
230230
}
231231

232232
/** {@inheritDoc} */
233233
@Override
234-
public Rectangle getPickRectangle()
234+
public Rectangle getPickRectangle()
235235
{
236236
return this.pickRect;
237237
}
238238

239239
/** {@inheritDoc} */
240240
@Override
241-
public PickedObjectList getPickedObjectList()
241+
public PickedObjectList getPickedObjectList()
242242
{
243243
return this.lastPickedObjects;
244244
}
@@ -250,49 +250,49 @@ protected void setPickedObjectList(PickedObjectList pol)
250250

251251
/** {@inheritDoc} */
252252
@Override
253-
public PickedObjectList getObjectsInPickRectangle()
253+
public PickedObjectList getObjectsInPickRectangle()
254254
{
255255
return this.lastObjectsInPickRect;
256256
}
257257

258258
@Override
259-
public void setDeepPickEnabled(boolean tf)
259+
public void setDeepPickEnabled(boolean tf)
260260
{
261261
this.deepPick = tf;
262262
}
263263

264264
@Override
265-
public boolean isDeepPickEnabled()
265+
public boolean isDeepPickEnabled()
266266
{
267267
return this.deepPick;
268268
}
269269

270270
@Override
271-
public SectorGeometryList getTerrain()
271+
public SectorGeometryList getTerrain()
272272
{
273273
return this.dc.getSurfaceGeometry();
274274
}
275275

276276
@Override
277-
public DrawContext getDrawContext()
277+
public DrawContext getDrawContext()
278278
{
279279
return this.dc;
280280
}
281281

282282
@Override
283-
public double getFramesPerSecond()
283+
public double getFramesPerSecond()
284284
{
285285
return this.framesPerSecond;
286286
}
287287

288288
@Override
289-
public double getFrameTime()
289+
public double getFrameTime()
290290
{
291291
return this.frameTime;
292292
}
293293

294294
@Override
295-
public void setPerFrameStatisticsKeys(Set<String> keys)
295+
public void setPerFrameStatisticsKeys(Set<String> keys)
296296
{
297297
this.perFrameStatisticsKeys.clear();
298298
if (keys == null)
@@ -306,39 +306,39 @@ public void setPerFrameStatisticsKeys(Set<String> keys)
306306
}
307307

308308
@Override
309-
public Collection<PerformanceStatistic> getPerFrameStatistics()
309+
public Collection<PerformanceStatistic> getPerFrameStatistics()
310310
{
311311
return perFrameStatistics;
312312
}
313313

314314
@Override
315-
public Collection<Throwable> getRenderingExceptions()
315+
public Collection<Throwable> getRenderingExceptions()
316316
{
317317
return this.renderingExceptions;
318318
}
319319

320320
@Override
321-
public ScreenCreditController getScreenCreditController()
321+
public ScreenCreditController getScreenCreditController()
322322
{
323323
return screenCreditController;
324324
}
325325

326326
@Override
327-
public void setScreenCreditController(ScreenCreditController screenCreditController)
327+
public void setScreenCreditController(ScreenCreditController screenCreditController)
328328
{
329329
this.screenCreditController = screenCreditController;
330330
}
331331

332332
/** {@inheritDoc} */
333333
@Override
334-
public GLRuntimeCapabilities getGLRuntimeCapabilities()
334+
public GLRuntimeCapabilities getGLRuntimeCapabilities()
335335
{
336336
return this.glRuntimeCaps;
337337
}
338338

339339
/** {@inheritDoc} */
340340
@Override
341-
public void setGLRuntimeCapabilities(GLRuntimeCapabilities capabilities)
341+
public void setGLRuntimeCapabilities(GLRuntimeCapabilities capabilities)
342342
{
343343
if (capabilities == null)
344344
{
@@ -441,7 +441,7 @@ public void setDeferOrderedRendering(boolean deferOrderedRendering)
441441
}
442442

443443
@Override
444-
public int repaint()
444+
public int repaint()
445445
{
446446
this.frameTime = System.currentTimeMillis();
447447

@@ -665,8 +665,8 @@ protected void preRender(DrawContext dc)
665665

666666
protected void pickTerrain(DrawContext dc)
667667
{
668-
if (dc.isPickingMode() && dc.getVisibleSector() != null && dc.getSurfaceGeometry() != null &&
669-
dc.getSurfaceGeometry().size() > 0)
668+
if (dc.isPickingMode() && dc.getVisibleSector() != null && dc.getSurfaceGeometry() != null
669+
&& dc.getSurfaceGeometry().size() > 0)
670670
{
671671
this.pickPoints.clear();
672672
if (dc.getPickPoint() != null)
@@ -787,7 +787,10 @@ else if (pol != null && pol.size() > 1)
787787
// used to cull the number of colors that the draw context must consider with identifying the unique
788788
// pick colors in the specified screen rectangle.
789789
if (minAndMaxColorCodes == null)
790-
minAndMaxColorCodes = new int[] {colorCode, colorCode};
790+
minAndMaxColorCodes = new int[]
791+
{
792+
colorCode, colorCode
793+
};
791794
else
792795
{
793796
if (minAndMaxColorCodes[0] > colorCode)
@@ -839,8 +842,8 @@ protected void pick(DrawContext dc)
839842
this.lastPickedObjects = new PickedObjectList(dc.getPickedObjects());
840843
this.lastObjectsInPickRect = new PickedObjectList(dc.getObjectsInPickRectangle());
841844

842-
if (this.isDeepPickEnabled() &&
843-
(this.lastPickedObjects.hasNonTerrainObjects() || this.lastObjectsInPickRect.hasNonTerrainObjects()))
845+
if (this.isDeepPickEnabled()
846+
&& (this.lastPickedObjects.hasNonTerrainObjects() || this.lastObjectsInPickRect.hasNonTerrainObjects()))
844847
{
845848
this.doDeepPick(dc);
846849
}
@@ -987,8 +990,8 @@ protected void draw(DrawContext dc)
987990
dc.setOrderedRenderingMode(false);
988991

989992
// Draw the diagnostic displays.
990-
if (dc.getSurfaceGeometry() != null && dc.getModel() != null && (dc.getModel().isShowWireframeExterior() ||
991-
dc.getModel().isShowWireframeInterior() || dc.getModel().isShowTessellationBoundingVolumes()))
993+
if (dc.getSurfaceGeometry() != null && dc.getModel() != null && (dc.getModel().isShowWireframeExterior()
994+
|| dc.getModel().isShowWireframeInterior() || dc.getModel().isShowTessellationBoundingVolumes()))
992995
{
993996
Model model = dc.getModel();
994997

@@ -1039,7 +1042,6 @@ protected void checkGLErrors(DrawContext dc)
10391042
//**************************************************************//
10401043
//******************** Ordered Surface Renderable ************//
10411044
//**************************************************************//
1042-
10431045
protected void preRenderOrderedSurfaceRenderables(DrawContext dc)
10441046
{
10451047
if (dc.getOrderedSurfaceRenderables().isEmpty())
@@ -1154,9 +1156,9 @@ protected void drawCompositeSurfaceObjects(DrawContext dc)
11541156
if (tileCount == 0)
11551157
return;
11561158

1157-
int attributeMask =
1158-
GL2.GL_COLOR_BUFFER_BIT // For alpha test enable, blend enable, alpha func, blend func, blend ref.
1159-
| GL2.GL_POLYGON_BIT; // For cull face enable, cull face, polygon mode.
1159+
int attributeMask
1160+
= GL2.GL_COLOR_BUFFER_BIT // For alpha test enable, blend enable, alpha func, blend func, blend ref.
1161+
| GL2.GL_POLYGON_BIT; // For cull face enable, cull face, polygon mode.
11601162

11611163
GL2 gl = dc.getGL().getGL2(); // GL initialization checks for GL2 compatibility.
11621164
OGLStackHandler ogsh = new OGLStackHandler();

0 commit comments

Comments
 (0)