Ignore:
Timestamp:
05/27/19 13:50:07 (5 years ago)
Author:
bln4
Message:

Functionality for tab index. When a user is cursored over a text item with a _tabIndex property and hits tab (or shift tab), instead of adding a tab to the text item, it will find another text item on the frame with the next highest (or lowerest) _tabIndex property and move the cursor to it.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/expeditee/gio/gesture/StandardGestureActions.java

    r1319 r1382  
    12771277                if (c == '\t') {
    12781278                        if (isShiftDown) {
    1279                                 newMouse = text.removeTab(c, oldX, oldY);
     1279                                Text tabPrevious = text.getTabPrevious();
     1280                                if (tabPrevious == null) {
     1281                                        newMouse = text.removeTab(c, oldX, oldY);
     1282                                } else {
     1283                                        StandardGestureActions.moveCursorAndFreeItems(tabPrevious.getX(), tabPrevious.getY());
     1284                                        return text;
     1285                                }
    12801286                        } else {
    1281                                 newMouse = text.insertTab(c, oldX, oldY);
     1287                                Text tabNext = text.getTabNext();
     1288                                if (tabNext == null) {
     1289                                        newMouse = text.insertTab(c, oldX, oldY);
     1290                                } else {
     1291                                        StandardGestureActions.moveCursorAndFreeItems(tabNext.getX(), tabNext.getY());
     1292                                        return text;
     1293                                }
    12821294                        }
    12831295                } else {
Note: See TracChangeset for help on using the changeset viewer.