@@ -54,7 +54,7 @@ public class HyperViewSequence
5454//---------------------------------------------------------------------------
5555//---------------------------------------------------------------------------
5656
57- private int curNdx = -1 ;
57+ private int cursorNdx = -1 ;
5858 private Instant lastArrowKey = Instant .EPOCH ;
5959 private final List <HyperView <? extends HDT_Record >> slots = new ArrayList <>();
6060 private final TabPane tabPane ;
@@ -104,7 +104,7 @@ public class HyperViewSequence
104104//---------------------------------------------------------------------------
105105//---------------------------------------------------------------------------
106106
107- HyperView <? extends HDT_Record > getViewInCurrentSlot () { return slots .get (curNdx ); }
107+ HyperView <? extends HDT_Record > getViewInCurrentSlot () { return slots .get (cursorNdx ); }
108108 HyperTab <? extends HDT_Record , ? extends HDT_Record > tabOfViewInCurrentSlot () { return getViewInCurrentSlot ().getHyperTab (); }
109109 TabEnum tabEnumOfViewInCurrentSlot () { return getViewInCurrentSlot ().getTabEnum (); }
110110 boolean isEmpty () { return slots .isEmpty (); }
@@ -179,8 +179,8 @@ void stepBack()
179179 {
180180 saveViewFromUItoCurrentSlotAndTab ();
181181
182- if (--curNdx < 0 )
183- curNdx = 0 ;
182+ if (--cursorNdx < 0 )
183+ cursorNdx = 0 ;
184184
185185 showCurrentViewInUI ();
186186 }
@@ -219,12 +219,12 @@ void saveViewFromUItoSlotAdvanceCursorAndLoadNewViewToUI(HyperView<? extends HDT
219219 }
220220
221221 // delete any later slots
222- while (slots .size () > (curNdx + 1 ))
223- slots .remove (curNdx + 1 );
222+ while (slots .size () > (cursorNdx + 1 ))
223+ slots .remove (cursorNdx + 1 );
224224
225225 // advance the slot cursor (if we were already on a record tab that previously had a record)
226226 if (advance )
227- goForward (true ); // This only changes curNdx
227+ goForward (true ); // This only changes cursorNdx
228228
229229 // Save the new view to the current slot
230230 saveViewToCurrentSlot (hyperView );
@@ -247,8 +247,8 @@ private void showCurrentViewInUI()
247247
248248 ui .setSelectorTab (ui .tabOmniSelector );
249249
250- chbBack .setDisable (curNdx < 1 );
251- chbForward .setDisable (curNdx >= (slots .size () - 1 ));
250+ chbBack .setDisable (cursorNdx < 1 );
251+ chbForward .setDisable (cursorNdx >= (slots .size () - 1 ));
252252
253253 HDT_Record activeRecord = (curHyperTab .getTabEnum () == treeTabEnum ) || (curHyperTab .getTabEnum () == queryTabEnum ) ?
254254 curView .getViewRecord ()
@@ -294,18 +294,18 @@ void init(TabEnum activeTabEnum)
294294 public void clear ()
295295 {
296296 slots .clear ();
297- curNdx = -1 ;
297+ cursorNdx = -1 ;
298298 }
299299
300300//---------------------------------------------------------------------------
301301//---------------------------------------------------------------------------
302302
303303 private void goForward (boolean okToAddSlotIfNeeded )
304304 {
305- curNdx ++;
305+ cursorNdx ++;
306306
307- if ((okToAddSlotIfNeeded == false ) && (curNdx >= slots .size ()))
308- curNdx = slots .size () - 1 ;
307+ if ((okToAddSlotIfNeeded == false ) && (cursorNdx >= slots .size ()))
308+ cursorNdx = slots .size () - 1 ;
309309 }
310310
311311//---------------------------------------------------------------------------
@@ -317,12 +317,12 @@ private void goForward(boolean okToAddSlotIfNeeded)
317317 */
318318 private void saveViewToCurrentSlot (HyperView <? extends HDT_Record > view )
319319 {
320- if (curNdx == -1 ) curNdx = 0 ;
320+ if (cursorNdx == -1 ) cursorNdx = 0 ;
321321
322- if (curNdx == slots .size ())
322+ if (cursorNdx == slots .size ())
323323 slots .add (view );
324324 else
325- slots .set (curNdx , view );
325+ slots .set (cursorNdx , view );
326326
327327 // This next part prevents duplicate adjacent entries
328328
@@ -337,7 +337,7 @@ private void saveViewToCurrentSlot(HyperView<? extends HDT_Record> view)
337337 if ((lastView != null ) && (view .getTabEnum () == lastView .getTabEnum ()) && (view .getViewRecord () == lastView .getViewRecord ()))
338338 {
339339 it .remove ();
340- if (ndx <= curNdx ) curNdx --;
340+ if (ndx <= cursorNdx ) cursorNdx --;
341341 view = null ;
342342 }
343343
@@ -360,12 +360,12 @@ private void rebuildNavMenu(List<MenuItem> menu, boolean isForward)
360360
361361 if (isForward )
362362 {
363- for (int ndx = curNdx + 1 ; ndx < slots .size (); ndx ++)
363+ for (int ndx = cursorNdx + 1 ; ndx < slots .size (); ndx ++)
364364 if (addMenuItem (menu , ndx )) return ;
365365 }
366366 else
367367 {
368- for (int ndx = curNdx - 1 ; ndx >= 0 ; ndx --)
368+ for (int ndx = cursorNdx - 1 ; ndx >= 0 ; ndx --)
369369 if (addMenuItem (menu , ndx )) return ;
370370 }
371371 }
@@ -409,7 +409,7 @@ private boolean addMenuItem(List<MenuItem> menu, int ndx)
409409 if (ui .cantSaveRecord ()) return ;
410410
411411 saveViewFromUItoCurrentSlotAndTab ();
412- curNdx = ndx ;
412+ cursorNdx = ndx ;
413413 showCurrentViewInUI ();
414414 });
415415
@@ -422,14 +422,14 @@ private boolean addMenuItem(List<MenuItem> menu, int ndx)
422422
423423 void removeRecord (HDT_Record record )
424424 {
425- // Do not change the following code to use ArrayList.removeIf. The line that checks whether curNdx should be decremented will not work
425+ // Do not change the following code to use ArrayList.removeIf. The line that checks whether cursorNdx should be decremented will not work
426426 // because the ArrayList does not actually get modified until all of the removeIf checks are completed.
427427
428428 Iterators .removeIf (slots .iterator (), view ->
429429 {
430430 if (view .getViewRecord () != record ) return false ;
431431
432- if (curNdx >= slots .indexOf (view )) curNdx --;
432+ if (cursorNdx >= slots .indexOf (view )) cursorNdx --;
433433 return true ;
434434 });
435435 }
@@ -442,7 +442,7 @@ RecordType lastActiveRecordType()
442442 if (slots .isEmpty ())
443443 return hdtNone ;
444444
445- for (int ndx = curNdx ; ndx >= 0 ; ndx --)
445+ for (int ndx = cursorNdx ; ndx >= 0 ; ndx --)
446446 {
447447 RecordType recordType = slots .get (ndx ).getTabRecordType ();
448448 if (recordType != hdtNone )
0 commit comments