Changeset 684


Ignore:
Timestamp:
01/13/14 10:38:41 (10 years ago)
Author:
jts21
Message:

Add help text for Text items

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/expeditee/gui/Help.java

    r683 r684  
    11package org.expeditee.gui;
    2 
    3 import java.util.Arrays;
    42
    53import org.expeditee.items.Item;
    64import org.expeditee.items.Line;
     5import org.expeditee.items.Text;
    76import org.expeditee.settings.experimental.ExperimentalFeatures;
    87
     
    4645                if((mod & (control | shift)) != 0) return "Go forward";
    4746                return "Go back";
    48                 case line:
    49                 case item:
     47                default:
    5048                        if((other & action) != 0 && (mod & control) == 0) return "Run action";
    5149                        return "Follow link";
    5250                }
    53                 return null;
    5451        }
    5552       
     
    6158                case line:
    6259                        if((mod & shift) != 0) return "Extend shape";
    63                 case item:
     60                case text:
     61                        if((other & cursor) != 0 && FrameUtils.getCurrentItem() instanceof Text) return "Merge text";
     62                default:
    6463                        if((other & cursor) != 0) return "Place item(s)";
    6564                if((mod & shift) != 0) return "Create arrow";
    6665                        return "Pickup";
    6766                }
    68                 return null;
    6967        }
    7068       
     
    7674                case line:
    7775                        if((mod & shift) != 0) return "Add line";
    78                 case item:
     76                default:
    7977                        if((other & cursor) != 0) return "Stamp item(s)";
    8078                        if((mod & shift) != 0) return "Create rectangle";
    8179                        return "Copy";
    8280                }
    83                 return null;
    8481        }
    8582       
     
    9087        private static final String left_right(int context, int mod, int other) {
    9188                switch(context) {
    92                 case line:
    93                 case item:
     89                default:
    9490                        if((other & cursor) == 0) return "Extract attributes";
    9591                case background:
    9692                        return "Auto format";
    9793                }
    98                 return null;
    9994        }
    10095       
    10196        private static final String middle_right(int context, int mod, int other) {
    10297                switch(context) {
     98                case text:
     99                        if((other & cursor) != 0 && FrameUtils.getCurrentItem() instanceof Text) return "Swap text";
    103100                case background:
    104101                        if((other & cursor) == 0) return "Undo";
    105                 case line:
    106                 case item:
     102                default:
    107103                        return "Delete";
    108104                }
    109                 return null;
    110105        }
    111106       
     
    114109                case background:
    115110                if((mod & shift) != 0 && (other & cursor) == 0) return "Drag to pan";
     111                case text:
     112                        if((other & cursor) == 0) return "Select region";
    116113                }
    117114                return null;
     
    119116       
    120117        private static final String drag_middle(int context, int mod, int other) {
     118                switch(context) {
     119                case text:
     120                        if((other & cursor) == 0) return "Cut region";
     121                }
    121122                return null;
    122123        }
     
    126127                case line:
    127128                        return "Extrude shape";
     129                case text:
     130                        if((other & cursor) == 0) return "Copy region";
    128131                }
    129132                return null;
     
    137140                        if(current instanceof Line) {
    138141                                context = line;
     142                        } else if(current instanceof Text) {
     143                                context = text;
    139144                        } else {
    140145                                context = item;
Note: See TracChangeset for help on using the changeset viewer.