Changeset 1532
- Timestamp:
- 08/31/20 16:26:59 (4 years ago)
- Location:
- trunk/src/org
- Files:
-
- 26 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/apollo/ApolloKBMGestureTranslator.java
r1133 r1532 142 142 143 143 // Return the gesture 144 return apolloSingle(ApolloGestureType.CREATE_LINKED_TRACKS, new ItemSpecificGestureData()); 144 boolean isShiftDown = StandardInputEventListeners.kbmStateListener.isKeyDown(Key.SHIFT); 145 return apolloSingle(ApolloGestureType.CREATE_LINKED_TRACKS, new ItemSpecificGestureData(isShiftDown)); 145 146 } 146 147 }); -
trunk/src/org/apollo/gio/gesture/data/TrackAdjustmentGestureData.java
r1097 r1532 9 9 public TrackAdjustmentGestureData(long adjustment) 10 10 { 11 super(false); 11 12 _adjustment = adjustment; 12 13 } -
trunk/src/org/expeditee/actions/ScriptBase.java
r1415 r1532 213 213 errorFrame = FrameIO.CreateFrame(ERROR_FRAMESET, title, null); 214 214 } else { 215 errorFrame = FrameIO.CreateFrameset(ERROR_FRAMESET, FrameIO.FRAME_PATH );215 errorFrame = FrameIO.CreateFrameset(ERROR_FRAMESET, FrameIO.FRAME_PATH, null); 216 216 errorFrame.setTitle(title); 217 217 } -
trunk/src/org/expeditee/actions/Simple.java
r1415 r1532 2187 2187 try { 2188 2188 FrameIO.CreateFrameset(freshCopy.getFramesetName(), 2189 frameToCopy.getPath() );2189 frameToCopy.getPath(), null); 2190 2190 nextNumber = 1; 2191 2191 } catch (Exception e) { -
trunk/src/org/expeditee/agents/CopyTree.java
r1415 r1532 56 56 // get the last used frame in the destination frameset 57 57 _lastNumber = FrameIO.getLastNumber(_nameTo); 58 Frame one = FrameIO.CreateFrameset(_nameTo, init.getPath() );58 Frame one = FrameIO.CreateFrameset(_nameTo, init.getPath(), null); 59 59 60 60 _framePath = one.getPath(); -
trunk/src/org/expeditee/agents/GraphFramesetLinks.java
r1415 r1532 82 82 try { 83 83 // Creating frameset that is used to hold any generated link graphs 84 FrameIO.CreateNewFrameset(resultsFramesetName );84 FrameIO.CreateNewFrameset(resultsFramesetName, null); 85 85 } catch (Exception e2) { 86 86 // frameset already exists -
trunk/src/org/expeditee/gio/gesture/ExpediteeKBMGestureTranslator.java
r1502 r1532 573 573 } 574 574 575 // Return the gesture 576 return Gesture.single(StandardGestureActions.getInstance().gestureType(StandardGestureType.TOGGLE_ANNOTATION), new ItemSpecificGestureData()); 575 boolean isShiftDown = kbmTranslator.isKeyDown(Key.SHIFT); 576 577 // Return the gesture 578 return Gesture.single(StandardGestureActions.getInstance().gestureType(StandardGestureType.TOGGLE_ANNOTATION), new ItemSpecificGestureData(isShiftDown)); 577 579 } 578 580 }); … … 594 596 } 595 597 596 // Return the gesture 597 return Gesture.single(StandardGestureActions.getInstance().gestureType(StandardGestureType.INSERT_DATE), new ItemSpecificGestureData()); 598 boolean isShiftDown = kbmTranslator.isKeyDown(Key.SHIFT); 599 600 // Return the gesture 601 return Gesture.single(StandardGestureActions.getInstance().gestureType(StandardGestureType.INSERT_DATE), new ItemSpecificGestureData(isShiftDown)); 598 602 } 599 603 }); … … 615 619 } 616 620 617 // Return the gesture 618 return Gesture.single(StandardGestureActions.getInstance().gestureType(StandardGestureType.NEW_FRAMESET), new ItemSpecificGestureData()); 621 boolean isShiftDown = kbmTranslator.isKeyDown(Key.SHIFT); 622 623 // Return the gesture 624 return Gesture.single(StandardGestureActions.getInstance().gestureType(StandardGestureType.NEW_FRAMESET), new ItemSpecificGestureData(isShiftDown)); 619 625 } 620 626 }); … … 636 642 } 637 643 638 // Return the gesture 639 return Gesture.single(StandardGestureActions.getInstance().gestureType(StandardGestureType.ROTATE_FONT_STYLE), new ItemSpecificGestureData()); 644 boolean isShiftDown = kbmTranslator.isKeyDown(Key.SHIFT); 645 646 // Return the gesture 647 return Gesture.single(StandardGestureActions.getInstance().gestureType(StandardGestureType.ROTATE_FONT_STYLE), new ItemSpecificGestureData(isShiftDown)); 640 648 } 641 649 }); … … 657 665 } 658 666 659 // Return the gesture 660 return Gesture.single(StandardGestureActions.getInstance().gestureType(StandardGestureType.ROTATE_FONT_FAMILY), new ItemSpecificGestureData()); 667 boolean isShiftDown = kbmTranslator.isKeyDown(Key.SHIFT); 668 669 // Return the gesture 670 return Gesture.single(StandardGestureActions.getInstance().gestureType(StandardGestureType.ROTATE_FONT_FAMILY), new ItemSpecificGestureData(isShiftDown)); 661 671 } 662 672 }); … … 816 826 } 817 827 818 // Return the gesture 819 return Gesture.single(StandardGestureActions.getInstance().gestureType(StandardGestureType.CALCULATE), new ItemSpecificGestureData()); 828 boolean isShiftDown = kbmTranslator.isKeyDown(Key.SHIFT); 829 830 // Return the gesture 831 return Gesture.single(StandardGestureActions.getInstance().gestureType(StandardGestureType.CALCULATE), new ItemSpecificGestureData(isShiftDown)); 820 832 } 821 833 }); … … 843 855 844 856 // Return the gesture 845 return Gesture.single(StandardGestureActions.getInstance().gestureType(StandardGestureType.CALCULATE), new ItemSpecificGestureData( ));857 return Gesture.single(StandardGestureActions.getInstance().gestureType(StandardGestureType.CALCULATE), new ItemSpecificGestureData(false)); 846 858 } 847 859 }); … … 920 932 } 921 933 922 // Return the gesture 923 return Gesture.single(StandardGestureActions.getInstance().gestureType(StandardGestureType.ACTION), new ItemSpecificGestureData()); 934 boolean isShiftDown = kbmTranslator.isKeyDown(Key.SHIFT); 935 936 // Return the gesture 937 return Gesture.single(StandardGestureActions.getInstance().gestureType(StandardGestureType.ACTION), new ItemSpecificGestureData(isShiftDown)); 924 938 } 925 939 }); … … 946 960 } 947 961 948 // Return the gesture 949 return Gesture.single(StandardGestureActions.getInstance().gestureType(StandardGestureType.TOGGLE_BOLD), new ItemSpecificGestureData()); 962 boolean isShiftDown = kbmTranslator.isKeyDown(Key.SHIFT); 963 964 // Return the gesture 965 return Gesture.single(StandardGestureActions.getInstance().gestureType(StandardGestureType.TOGGLE_BOLD), new ItemSpecificGestureData(isShiftDown)); 950 966 } 951 967 }); … … 973 989 974 990 // Return the gesture 975 return Gesture.single(StandardGestureActions.getInstance().gestureType(StandardGestureType.TOGGLE_ITALICS), new ItemSpecificGestureData( ));991 return Gesture.single(StandardGestureActions.getInstance().gestureType(StandardGestureType.TOGGLE_ITALICS), new ItemSpecificGestureData(false)); 976 992 } 977 993 }); … … 1025 1041 1026 1042 // Return the gesture 1027 return Gesture.single(StandardGestureActions.getInstance().gestureType(StandardGestureType.COPY), new ItemSpecificGestureData( ));1043 return Gesture.single(StandardGestureActions.getInstance().gestureType(StandardGestureType.COPY), new ItemSpecificGestureData(false)); 1028 1044 } 1029 1045 }); … … 1056 1072 1057 1073 // Return the gesture 1058 return Gesture.single(StandardGestureActions.getInstance().gestureType(StandardGestureType.MAKE_CIRCLE), new ItemSpecificGestureData( ));1074 return Gesture.single(StandardGestureActions.getInstance().gestureType(StandardGestureType.MAKE_CIRCLE), new ItemSpecificGestureData(false)); 1059 1075 } 1060 1076 }); … … 1108 1124 1109 1125 // Return the gesture 1110 return Gesture.single(StandardGestureActions.getInstance().gestureType(StandardGestureType.TOGGLE_ITEMS_MARK), new ItemSpecificGestureData( ));1126 return Gesture.single(StandardGestureActions.getInstance().gestureType(StandardGestureType.TOGGLE_ITEMS_MARK), new ItemSpecificGestureData(false)); 1111 1127 } 1112 1128 }); … … 1372 1388 1373 1389 // Return the gesture 1374 return Gesture.single(StandardGestureActions.getInstance().gestureType(StandardGestureType.SPLIT_TEXT), new ItemSpecificGestureData( ));1390 return Gesture.single(StandardGestureActions.getInstance().gestureType(StandardGestureType.SPLIT_TEXT), new ItemSpecificGestureData(false)); 1375 1391 } 1376 1392 }); … … 2067 2083 } 2068 2084 2069 return Gesture.single(StandardGestureActions.getInstance().gestureType(StandardGestureType.TOGGLE_ARROWHEAD), new ItemSpecificGestureData(line ));2085 return Gesture.single(StandardGestureActions.getInstance().gestureType(StandardGestureType.TOGGLE_ARROWHEAD), new ItemSpecificGestureData(line, false)); 2070 2086 } 2071 2087 … … 2151 2167 2152 2168 // Return the gesture 2153 return standardSingle(StandardGestureType.EXTRACT_ATTRIBUTES, new ItemSpecificGestureData( ));2169 return standardSingle(StandardGestureType.EXTRACT_ATTRIBUTES, new ItemSpecificGestureData(false)); 2154 2170 } 2155 2171 }); -
trunk/src/org/expeditee/gio/gesture/StandardGestureActions.java
r1513 r1532 669 669 ItemSpecificGestureData data = (ItemSpecificGestureData) gesture.getData(); 670 670 if (data.getCurrentItem() != null) { 671 CreateFrameset(data.getCurrentItem() );671 CreateFrameset(data.getCurrentItem(), data.isShiftDown()); 672 672 } 673 673 } … … 2947 2947 /** 2948 2948 * Creates a new Frameset with the name given by the Item 2949 * 2950 * @param name2949 * @param useLinkForZeroFrame if true, will try to use the content from 2950 * the frame specified by the link as the zero frame for new frameset 2951 2951 */ 2952 private static void CreateFrameset(Item item ) {2952 private static void CreateFrameset(Item item, boolean useLinkForZeroFrame) { 2953 2953 if (item == null) { 2954 2954 MessageBay.displayMessage("There is no selected item to use for the frameset name"); … … 2961 2961 } 2962 2962 2963 // Collect Items to place on new zero frame. 2964 Collection<Item> zeroLinkItems = null; 2963 2965 // Don't create frameset if the item is linked 2964 if (item.getLink() != null ) {2965 MessageBay.displayMessage("A frameset can not be created from a linked item ");2966 if (item.getLink() != null && !useLinkForZeroFrame) { 2967 MessageBay.displayMessage("A frameset can not be created from a linked item without holding shift. Hold shift while pressing F6 to use items on linked frame to populate zero frame."); 2966 2968 return; 2969 } else if (item.getLink() != null && useLinkForZeroFrame) { 2970 Frame frameToUseForZeroFrameCreation = FrameIO.LoadFrame(item.getLink()); 2971 if (frameToUseForZeroFrameCreation != null) { 2972 zeroLinkItems = frameToUseForZeroFrameCreation.getBody(true).cloneList(); 2973 } 2967 2974 } 2968 2975 … … 2980 2987 String groupName = name.substring(7); 2981 2988 // create the new group 2982 linkTo = FrameIO.CreateNewGroup(groupName );2989 linkTo = FrameIO.CreateNewGroup(groupName, zeroLinkItems); 2983 2990 } else { 2984 2991 // create the new frameset 2985 linkTo = FrameIO.CreateNewFrameset(name );2992 linkTo = FrameIO.CreateNewFrameset(name, zeroLinkItems); 2986 2993 } 2987 2994 DisplayController.setCursor(Item.DEFAULT_CURSOR); -
trunk/src/org/expeditee/gio/gesture/data/ChangeColourGestureData.java
r1097 r1532 8 8 public ChangeColourGestureData(boolean setTransparent, boolean setSecondaryColour) 9 9 { 10 super( );10 super(false); 11 11 _setTransparent = setTransparent; 12 12 _setSecondaryColour = setSecondaryColour; -
trunk/src/org/expeditee/gio/gesture/data/ClickGestureData.java
r1097 r1532 7 7 public ClickGestureData(boolean longClick) 8 8 { 9 super( );9 super(false); 10 10 _longClick = longClick; 11 11 } -
trunk/src/org/expeditee/gio/gesture/data/CreateItemGestureData.java
r1097 r1532 12 12 public CreateItemGestureData(ItemType itemType) 13 13 { 14 super( );14 super(false); 15 15 _itemType = itemType; 16 16 } -
trunk/src/org/expeditee/gio/gesture/data/DeleteGestureData.java
r1097 r1532 7 7 public DeleteGestureData(boolean alternateMode) 8 8 { 9 super( );9 super(false); 10 10 _alternateMode = alternateMode; 11 11 } -
trunk/src/org/expeditee/gio/gesture/data/InsertStringGestureData.java
r1097 r1532 4 4 5 5 private String _string; 6 private boolean _shiftDown; // Required for Shift+Tab7 8 6 public InsertStringGestureData(String string, boolean shiftDown) 9 7 { 10 super( );8 super(false); 11 9 _string = string; 12 10 _shiftDown = shiftDown; … … 15 13 public InsertStringGestureData(char c, boolean shiftDown) 16 14 { 17 super( );15 super(false); 18 16 _string = new String("" + c); 19 17 _shiftDown = shiftDown; … … 32 30 } 33 31 34 public boolean isShiftDown()35 {36 return _shiftDown;37 }38 39 32 @Override 40 33 public GestureData clone() -
trunk/src/org/expeditee/gio/gesture/data/ItemSpecificGestureData.java
r1097 r1532 14 14 protected Collection<Item> _currentItems; 15 15 protected Collection<Item> _enclosure; 16 protected boolean _shiftDown; 16 17 17 public ItemSpecificGestureData(Item item )18 public ItemSpecificGestureData(Item item, boolean isShiftDown) 18 19 { 19 20 super(); 20 21 _currentItem = item; 22 _shiftDown = isShiftDown; 21 23 } 22 24 23 public ItemSpecificGestureData( )25 public ItemSpecificGestureData(boolean isShiftDown) 24 26 { 25 27 super(); 26 28 init(); 29 _shiftDown = isShiftDown; 27 30 } 28 31 … … 83 86 return new ItemSpecificGestureData(this); 84 87 } 88 89 public boolean isShiftDown() { 90 return _shiftDown; 91 } 85 92 } -
trunk/src/org/expeditee/gio/gesture/data/JustifyGestureData.java
r1097 r1532 11 11 public JustifyGestureData(boolean resetWidth) 12 12 { 13 super( );13 super(false); 14 14 _frame = DisplayController.getCurrentFrame(); 15 15 _resetWidth = resetWidth; … … 18 18 public JustifyGestureData(Frame frame, boolean resetWidth) 19 19 { 20 super( );20 super(false); 21 21 _frame = frame; 22 22 _resetWidth = resetWidth; -
trunk/src/org/expeditee/gio/gesture/data/LinkGestureData.java
r1097 r1532 7 7 public LinkGestureData(boolean follow) 8 8 { 9 super( );9 super(false); 10 10 _follow = follow; 11 11 } -
trunk/src/org/expeditee/gio/gesture/data/NavigateTextGestureData.java
r1097 r1532 23 23 public NavigateTextGestureData(NavigateTo navigateTo, boolean selecting) 24 24 { 25 super( );25 super(false); 26 26 _navigateTo = navigateTo; 27 27 _selecting = selecting; -
trunk/src/org/expeditee/gio/gesture/data/ScaleGestureData.java
r1097 r1532 14 14 public ScaleGestureData(int scaleFactor) 15 15 { 16 super( );16 super(false); 17 17 _scaleFactor = scaleFactor; 18 18 } -
trunk/src/org/expeditee/gio/gesture/data/SelectAreaGestureData.java
r1097 r1532 27 27 public SelectAreaGestureData() 28 28 { 29 super( );29 super(false); 30 30 _draggedFrom = null; 31 31 _finishedDragging = true; -
trunk/src/org/expeditee/gui/FrameCreator.java
r1505 r1532 169 169 toUse = FrameIO.CreateFrame(framesetName, frameTitle, null); 170 170 } else { 171 toUse = FrameIO.CreateFrameset(framesetName, path.toAbsolutePath().toString() + File.separator, true );171 toUse = FrameIO.CreateFrameset(framesetName, path.toAbsolutePath().toString() + File.separator, true, null); 172 172 } 173 173 -
trunk/src/org/expeditee/gui/FrameIO.java
r1505 r1532 816 816 // create the new frameset 817 817 Frame one = FrameIO.CreateFrameset(DELETED_FRAMES, toDelete 818 .getPath() );818 .getPath(), null); 819 819 framePath = one.getPath(); 820 820 lastNumber = 0; … … 1015 1015 * @param frameset 1016 1016 * The name of the Frameset to create 1017 * @param zeroFrameItems TODO 1017 1018 * @return The first Frame of the new Frameset (Frame.1) 1018 1019 */ 1019 public static Frame CreateFrameset(String frameset, String path )1020 public static Frame CreateFrameset(String frameset, String path, Collection<Item> zeroFrameItems) 1020 1021 throws Exception { 1021 return CreateFrameset(frameset, path, false );1022 return CreateFrameset(frameset, path, false, zeroFrameItems); 1022 1023 } 1023 1024 … … 1257 1258 } catch (RuntimeException e) { 1258 1259 try { 1259 CreateFrameset(oldFramesetName, toSave.getPath() );1260 CreateFrameset(oldFramesetName, toSave.getPath(), null); 1260 1261 nextnum = 1; 1261 1262 } catch (Exception e1) { … … 1584 1585 * @param name 1585 1586 * The Frameset name to use 1587 * @param zeroFrameItems TODO 1586 1588 * @return The name of the first Frame in the newly created Frameset (the .1 1587 1589 * frame) 1588 1590 */ 1589 public static Frame CreateNewFrameset(String name ) throws Exception {1591 public static Frame CreateNewFrameset(String name, Collection<Item> zeroFrameItems) throws Exception { 1590 1592 String path = DisplayController.getCurrentFrame().getPath(); 1591 1593 … … 1595 1597 } 1596 1598 1597 Frame newFrame = FrameIO.CreateFrameset(name, path );1599 Frame newFrame = FrameIO.CreateFrameset(name, path, zeroFrameItems); 1598 1600 1599 1601 if (newFrame == null) { 1600 1602 // Cant create directories if the path is readonly or there is no 1601 1603 // space available 1602 newFrame = FrameIO.CreateFrameset(name, FrameIO.FRAME_PATH );1604 newFrame = FrameIO.CreateFrameset(name, FrameIO.FRAME_PATH, zeroFrameItems); 1603 1605 } 1604 1606 … … 1610 1612 } 1611 1613 1612 public static Frame CreateNewGroup(String name ) {1614 public static Frame CreateNewGroup(String name, Collection<Item> zeroFrameItems) { 1613 1615 try { 1614 Frame oneFrame = FrameIO.CreateFrameset(name, FrameIO.GROUP_PATH );1616 Frame oneFrame = FrameIO.CreateFrameset(name, FrameIO.GROUP_PATH, zeroFrameItems); 1615 1617 oneFrame.setPermission(new PermissionTriple(UserAppliedPermission.full, UserAppliedPermission.none, UserAppliedPermission.none)); 1616 1618 … … 1694 1696 } 1695 1697 1696 public static Frame CreateFrameset(String frameset, String path, boolean recreate ) throws InvalidFramesetNameException, ExistingFramesetException {1698 public static Frame CreateFrameset(String frameset, String path, boolean recreate, Collection<Item> zeroFrameItems) throws InvalidFramesetNameException, ExistingFramesetException { 1697 1699 String conversion = frameset + " --> "; 1698 1700 … … 1772 1774 base.setPath(path); 1773 1775 base.change(); 1776 if (zeroFrameItems != null) { 1777 base.addAllItems(zeroFrameItems); 1778 } 1774 1779 SaveFrame(base, false); 1775 1780 -
trunk/src/org/expeditee/gui/management/ProfileManager.java
r1465 r1532 39 39 40 40 try { 41 Frame profile = FrameIO.CreateFrameset(profileFor, FrameIO.PROFILE_PATH, true );41 Frame profile = FrameIO.CreateFrameset(profileFor, FrameIO.PROFILE_PATH, true, null); 42 42 profileOne = profile; 43 43 profile.setTitle(profileFor + "'s Profile"); … … 148 148 private static void createDefaultProfile() { 149 149 try { 150 Frame profile = FrameIO.CreateFrameset(DEFAULT, FrameIO.PROFILE_PATH, true );150 Frame profile = FrameIO.CreateFrameset(DEFAULT, FrameIO.PROFILE_PATH, true, null); 151 151 152 152 // Give the first frame in the new profile an appropriate title. -
trunk/src/org/expeditee/importer/pdfImporter.java
r1441 r1532 72 72 try 73 73 { 74 frameset = FrameIO.CreateNewFrameset(name );74 frameset = FrameIO.CreateNewFrameset(name, null); 75 75 } 76 76 catch(Exception e) -
trunk/src/org/expeditee/io/WebParser.java
r1415 r1532 335 335 final Progress progressBar = MessageBay.displayProgress("Converting web page"); 336 336 337 final Frame frameset = FrameIO.CreateNewFrameset(FrameIO.ConvertToValidFramesetName((new SimpleDateFormat("yy-MM-dd-HH-mm-ss").format(new Date())) + pageTitle) );337 final Frame frameset = FrameIO.CreateNewFrameset(FrameIO.ConvertToValidFramesetName((new SimpleDateFormat("yy-MM-dd-HH-mm-ss").format(new Date())) + pageTitle), null); 338 338 339 339 frameset.setTitle(pageTitle); -
trunk/src/org/expeditee/simple/Context.java
r919 r1532 275 275 // Get the values to be set 276 276 framesetName = primitives_.getStringValue(framesetNameVar); 277 Frame firstFrame = FrameIO.CreateNewFrameset(framesetName );277 Frame firstFrame = FrameIO.CreateNewFrameset(framesetName, null); 278 278 success = firstFrame != null; 279 279 } catch (Exception e) { -
trunk/src/org/expeditee/stats/StatsLogger.java
r1274 r1532 79 79 Frame statsFrame = null; 80 80 if (FrameIO.LoadFrame(statsFrameset + "0") == null) { 81 statsFrame = FrameIO.CreateNewFrameset(statsFrameset );81 statsFrame = FrameIO.CreateNewFrameset(statsFrameset, null); 82 82 statsFrame.setTitle(Formatter.getDateTime()); 83 83 } else {
Note:
See TracChangeset
for help on using the changeset viewer.