Changeset 1382


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.

Location:
trunk/src/org/expeditee
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/expeditee/assets/resources-public/framesets/authentication/1.exp

    r1380 r1382  
    1313P 105 65
    1414T Secure Expeditee:
    15 o nobody
     15o authadmin
    1616v S
    1717f Metamorphous_r36
     
    2626P 20 104
    2727T 🔒
    28 o nobody
     28o authadmin
    2929v S
    3030f tr74
     
    3939P 105 115
    4040T Sleek like Aphroditē–Wise like Athēnâ.
    41 o nobody
     41o authadmin
    4242v S
    4343f Metamorphous_r36
     
    5252P 364 185
    5353T Login to Expeditee
    54 o nobody
     54o authadmin
    5555v S
    5656f Amaranth_r36
     
    7979h 1.0
    8080p 44
     81_ph Username
     82_ti 1
    8183
    8284S T 61
     
    100102h 1.0
    101103p 44
     104_ph Password
     105_ti 2
    102106
    103107S T 62
     
    110114X AuthLogin
    111115x F
    112 o nobody
     116o authadmin
    113117n F
    114118v S
     
    126130P 602 435
    127131e 100 100 39 100
    128 o nobody
     132o authadmin
    129133v S
    130134h 2.0
     
    137141P 393 435
    138142e 100 100 39 100
    139 o nobody
     143o authadmin
    140144v S
    141145h 2.0
     
    149153T Create Account
    150154F 2
    151 o nobody
     155o authadmin
    152156n F
    153157v S
     
    164168T 
    165169F 2
    166 o nobody
     170o authadmin
    167171n F
    168172v S
     
    179183T Forgot Password
    180184F 4
    181 o nobody
     185o authadmin
    182186n F
    183187v S
     
    194198T 
    195199F 4
    196 o nobody
     200o authadmin
    197201n F
    198202v S
     
    208212P 393 526
    209213e 100 100 39 100
    210 o nobody
     214o authadmin
    211215v S
    212216h 2.0
     
    219223P 602 526
    220224e 100 100 39 100
    221 o nobody
     225o authadmin
    222226v S
    223227h 2.0
  • 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 {
  • trunk/src/org/expeditee/items/Text.java

    r1381 r1382  
    31923192                this._tabIndex = index;
    31933193        }
     3194       
     3195        public Text getTabNext() {
     3196                if (this._tabIndex >= 0) {
     3197                        Collection<Text> textItems = this.getParent().getTextItems();
     3198                        Text ret = null;
     3199                       
     3200                        for (Text t: textItems) {
     3201                                if (t._tabIndex > this._tabIndex) {
     3202                                        if (ret == null) {
     3203                                                ret = t;
     3204                                        } else if (t._tabIndex < ret._tabIndex) {
     3205                                                ret = t;
     3206                                        }
     3207                                }
     3208                        }
     3209                       
     3210                        return ret;
     3211                } else {
     3212                        return null;
     3213                }
     3214        }
     3215       
     3216        public Text getTabPrevious() {
     3217                if (this._tabIndex >= 0) {
     3218                        Collection<Text> textItems = this.getParent().getTextItems();
     3219                        Text ret = null;
     3220                       
     3221                        for (Text t: textItems) {
     3222                                if (t._tabIndex < this._tabIndex) {
     3223                                        if (ret == null) {
     3224                                                ret = t;
     3225                                        } else if (t._tabIndex > ret._tabIndex) {
     3226                                                ret = t;
     3227                                        }
     3228                                }
     3229                        }
     3230                       
     3231                        return ret;
     3232                } else {
     3233                        return null;
     3234                }
     3235        }
    31943236}
Note: See TracChangeset for help on using the changeset viewer.