Ignore:
Timestamp:
07/24/19 11:23:45 (5 years ago)
Author:
bln4
Message:

Renamed Frame.getItems() to Frame.getSortedItems() to better represent its functionality.

-> org.apollo.ApolloGestureActions
-> org.apollo.ApolloSystem
-> org.expeditee.actions.Actions
-> org.expeditee.actions.Debug
-> org.expeditee.actions.ExploratorySearchActions
-> org.expeditee.actions.JfxBrowserActions
-> org.expeditee.actions.Misc
-> org.expeditee.actions.Navigation
-> org.expeditee.actions.ScriptBase
-> org.expeditee.actions.Simple
-> org.expeditee.agents.ComputeTree
-> org.expeditee.agents.CopyTree
-> org.expeditee.agents.DisplayComet
-> org.expeditee.agents.DisplayTree
-> org.expeditee.agents.DisplayTreeLeaves
-> org.expeditee.agents.GraphFramesetLinks
-> org.expeditee.agents.TreeProcessor
-> org.expeditee.gio.gesture.StandardGestureActions
-> org.expeditee.gui.DisplayController
-> org.expeditee.gui.FrameCreator
-> org.expeditee.gui.FrameIO
-> org.expeditee.io.DefaultTreeWriter
-> org.expeditee.io.JavaWriter
-> org.expeditee.io.PDF2Writer
-> org.expeditee.io.TXTWriter
-> org.expeditee.io.WebParser
-> org.expeditee.io.flowlayout.XGroupItem
-> org.expeditee.items.Dot
-> org.expeditee.items.Item
-> org.expeditee.items.ItemUtils
-> org.expeditee.network.FrameShare
-> org.expeditee.stats.TreeStats


Created ItemsList class to wrap ArrayList<Item>. Frames now use this new class to store its body list (used for display) as well as its primaryBody and surrogateBody.

-> org.expeditee.agents.Format
-> org.expeditee.agents.HFormat
-> org.expeditee.gio.gesture.StandardGestureActions
-> org.expeditee.gui.Frame
-> org.expeditee.gui.FrameUtils


Refactorted Frame.setResort(bool) to Frame.invalidateSorted() to better function how it is intended to with a more accurate name.

-> org.expeditee.agents.Sort


When writing out .exp files and getting attributes to respond to LEFT + RIGHT click, boolean items are by default true. This has always been the case. An ammendment to this is that defaults can now be established.
Also added 'EnterClick' functionality. If cursored over a item with this property and you press enter, it acts as if you have clicked on it instead.

-> org.expeditee.assets.resources-public.framesets.authentication.1.exp to 6.exp
-> org.expeditee.gio.gesture.StandardGestureActions
-> org.expeditee.gio.input.KBMInputEvent
-> org.expeditee.gio.javafx.JavaFXConversions
-> org.expeditee.gio.swing.SwingConversions
-> org.expeditee.gui.AttributeUtils
-> org.expeditee.io.Conversion
-> org.expeditee.io.DefaultFrameWriter
-> org.expeditee.items.Item


Fixed a bug caused by calling Math.abs on Integer.MIN_VALUE returning unexpected result. Due to zero being a thing, you cannot represent Math.abs(Integer.MIN_VALUE) in a Integer object. The solution is to use Integer.MIN_VALUE + 1 instead of Integer.MIN_VALUE.

-> org.expeditee.core.bounds.CombinationBounds
-> org.expeditee.io.flowlayout.DimensionExtent


Recoded the contains function in EllipticalBounds so that intersection tests containing circles work correctly.

-> org.expeditee.core.bounds.EllipticalBounds


Added toString() to PolygonBounds to allow for useful printing during debugging.

-> org.expeditee.core.bounds.PolygonBounds

Implemented Surrogate Mode!

-> org.expeditee.encryption.io.EncryptedExpReader
-> org.expeditee.encryption.io.EncryptedExpWriter
-> org.expeditee.encryption.items.surrogates.EncryptionDetail
-> org.expeditee.encryption.items.surrogates.Label
-> org.expeditee.gui.FrameUtils
-> org.expeditee.gui.ItemsList
-> org.expeditee.items.Item
-> org.expeditee.items.Text


???? Use Integer.MAX_VALUE cast to a float instead of Float.MAX_VALUE. This fixed some bug which I cannot remember.

-> org.expeditee.gio.TextLayoutManager
-> org.expeditee.gio.swing.SwingTextLayoutManager


Improved solution for dealing with the F10 key taking focus away from Expeditee due to it being a assessibility key.

-> org.expeditee.gio.swing.SwingInputManager


Renamed variable visibleItems in FrameGraphics.paintFrame to itemsToPaintCanditates to better represent functional intent.

-> org.expeditee.gui.FrameGraphics


Improved checking for if personal resources exist before recreating them

-> org.expeditee.gui.FrameIO


Repeated messages to message bay now have a visual feedback instead of just a beep. This visual feedback is in the form of a count of the amount of times it has repeated.

-> org.expeditee.gui.MessageBay


Updated comment on the Vector class to explain what vectors are.

-> org.expeditee.gui.Vector


Added constants to represent all of the property keys in DefaultFrameReader and DefaultFrameWriter.

-> org.expeditee.io.DefaultFrameReader
-> org.expeditee.io.DefaultFrameWriter


Updated the KeyList setting to be more heirarcial with how users will store their Secrets.

-> org.expeditee.settings.identity.secrets.KeyList

Location:
trunk/src/org/expeditee/gio/gesture
Files:
2 edited

Legend:

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

    r1413 r1415  
    77import org.expeditee.gio.EcosystemManager;
    88import org.expeditee.gio.TimeoutQueue.TimeoutHandle;
     9import org.expeditee.gio.gesture.Gesture.GestureType;
    910import org.expeditee.gio.gesture.StandardGestureActions.StandardGestureType;
    1011import org.expeditee.gio.gesture.data.ChangeColourGestureData;
     
    100101                                        return null;
    101102                                }
     103                               
    102104                                //System.err.println("ExpediteeKBMGestureTranslator::" + details() + ": " + kbmEvent.getCharTyped());
    103105                                // Generate a INSERT_STRING gesture
     
    130132                addTranslator(new InputEventToGestureTranslator(InputType.KBM)
    131133                {
    132                         private static final int NO_CONSTRAINT = 0;
     134                        //private static final int NO_CONSTRAINT = 0;
    133135                        private SelectAreaGestureData _draggedFromData = null;
    134                         private int _constrainedDirection = NO_CONSTRAINT;
     136                        //private int _constrainedDirection = NO_CONSTRAINT;
    135137                       
    136138                        @Override
     
    210212                                        newMousePos.add(1, 1);
    211213                                } else*/ {
    212                                         _constrainedDirection = NO_CONSTRAINT;
     214                                        //_constrainedDirection = NO_CONSTRAINT;
    213215                                        newMousePos = kbmEvent.getMouseMove().getSecondEnd().clone();
    214216                                }
     
    682684               
    683685                // Add the F10 -> TOGGLE_XRAY_MODE gesture recogniser
    684                 addTranslator(new InputEventToGestureTranslator(InputType.KBM)
    685                 {
     686                addTranslator(new InputEventToGestureTranslator(InputType.KBM) {
     687                       
    686688                        @Override
    687689                        public String details() { return "F10 -> TOGGLE_XRAY_MODE"; }
    688 
    689                         @Override
    690                         public List<Gesture> onInputEvent(InputEvent event) {
    691                                 // Cast to keyboard/mouse event
    692                                 KBMInputEvent kbmEvent = (KBMInputEvent) event;
    693 
     690                       
     691                        @Override
     692                        public List<Gesture> onInputEvent(InputEvent event) {
     693                                // Cast to keyboard/mouse event
     694                                KBMInputEvent kbmEvent = (KBMInputEvent) event;
     695                               
    694696                                // Must be pressing F10 to xray mode
    695                                 if (kbmEvent.getKeyDown() != KBMInputEvent.Key.F10) {
    696                                         return null;
    697                                 }
    698                                
    699                                 // Return the gesture
    700                                 if (kbmTranslator.isKeyDown(Key.SHIFT)) {
    701                                         UndoGestureData data = new UndoGestureData(kbmTranslator.isKeyDown(Key.CTRL));
    702                                         return Gesture.single(StandardGestureActions.getInstance().gestureType(StandardGestureType.TOGGLE_SURROGATE_MODE), data);
    703                                 } else {
    704                                         return Gesture.single(StandardGestureActions.getInstance().gestureType(StandardGestureType.TOGGLE_XRAY_MODE), null);
    705                                 }
     697                                if (kbmEvent.getKeyDown() != KBMInputEvent.Key.F10 || kbmTranslator.isKeyDown(Key.SHIFT)) {
     698                                        return null;
     699                                }
     700                               
     701                                return Gesture.single(StandardGestureActions.getInstance().gestureType(StandardGestureType.TOGGLE_XRAY_MODE), null);
     702                        }
     703                });
     704               
     705                // Add the F10 -> CYCLE_SURROGATE_MODE gesture recogniser
     706                addTranslator(new InputEventToGestureTranslator(InputType.KBM) {
     707                        @Override
     708                        public String details() { return "F10 -> CYCLE_SURROGATE_MODE"; }
     709                       
     710                        @Override
     711                        public List<Gesture> onInputEvent(InputEvent event) {
     712                                // Case to keyboard/mouse event
     713                                KBMInputEvent kbmEvent = (KBMInputEvent) event;
     714                               
     715                                // Must be pressing F10 to surrogate mode
     716                                if (kbmEvent.getKeyDown() != KBMInputEvent.Key.F10 || !kbmTranslator.isKeyDown(Key.SHIFT)) {
     717                                        return null;
     718                                }
     719                               
     720                                UndoGestureData data = new UndoGestureData(kbmTranslator.isKeyDown(Key.CTRL));
     721                                return Gesture.single(StandardGestureActions.getInstance().gestureType(StandardGestureType.CYCLE_SURROGATE_MODE), data);
    706722                        }
    707723                });
     
    21902206                                        return Gesture.single(vFormat);
    21912207                                }
     2208                        }
     2209                });
     2210               
     2211                // Add the ENTER_CHAR_TYPED -> ACTIVATE BUTTON -> FORMAT gesture recogniser
     2212                addTranslator(new InputEventToGestureTranslator(InputType.KBM)
     2213                {
     2214                        @Override
     2215                        public String details() { return "ENTER_CHAR_TYPED -> ACTIVATE BUTTON"; }
     2216
     2217                        @Override
     2218                        public List<Gesture> onInputEvent(InputEvent event) {
     2219                                // Cast to keyboard/mouse event
     2220                                KBMInputEvent kbmEvent = (KBMInputEvent) event;
     2221                       
     2222                                if (kbmEvent.getKeyDown() != Key.ENTER) {
     2223                                        return null;
     2224                                }
     2225                               
     2226                                GestureType gestureType = StandardGestureActions.getInstance().gestureType(StandardGestureType.ACTIVATE_BUTTON);
     2227                                ItemSpecificGestureData data = new ClickGestureData(false);
     2228                                return Gesture.single(gestureType, data);
    21922229                        }
    21932230                });
  • trunk/src/org/expeditee/gio/gesture/StandardGestureActions.java

    r1413 r1415  
    5454import org.expeditee.gui.FreeItems;
    5555import org.expeditee.gui.MessageBay;
     56import org.expeditee.gui.ItemsList;
    5657import org.expeditee.gui.Vector;
    5758import org.expeditee.io.ExpClipReader;
     
    123124                TOGGLE_ITEMS_MARK, // Show/hide the little circle indicating the item has a link and/or action
    124125                TOGGLE_XRAY_MODE, // F10
    125                 TOGGLE_SURROGATE_MODE, // Shift + F10
     126                CYCLE_SURROGATE_MODE, // Shift + F10
    126127                UNDO,
    127                 ZOOM
     128                ZOOM,
     129                ACTIVATE_BUTTON // Enter while over Item with _acceptsKeyboardEnter set to true
    128130        }
    129131        //@formatter:on
     
    420422                        public void exec(Gesture gesture) {
    421423                                InsertStringGestureData data = (InsertStringGestureData) gesture.getData();
    422                                 for (char c : data.getString().toCharArray()) {
     424                               
     425                                Item currentItem = data.getCurrentItem();
     426                                char[] charArray = data.getString().toCharArray();
     427                               
     428                                if (currentItem != null) {
     429                                        // If we are over a item taht accepts keyboard enter and the only
     430                                        // character being entered is the enter key then we do not insert it.
     431                                        boolean keyboardEnter = data.getCurrentItem().acceptsKeyboardEnter();
     432                                        if (keyboardEnter && charArray.length == 1 && charArray[0] == (char) 10) {
     433                                                return;
     434                                        }
     435                                }
     436                                                               
     437                                for (char c : charArray) {
    423438                                        processChar(c, data.isShiftDown());
    424439                                }
     
    967982                });
    968983               
    969                 setGestureAction(gestureType(StandardGestureType.TOGGLE_SURROGATE_MODE), new GestureAction() {
     984                // Set the ACTIVATE BUTTON action
     985                setGestureAction(gestureType(StandardGestureType.ACTIVATE_BUTTON), new GestureAction() {
     986                        @Override
     987                        public void exec(Gesture gesture) {
     988                                ItemSpecificGestureData data = (ItemSpecificGestureData) gesture.getData();
     989                                if (data.getCurrentItem().acceptsKeyboardEnter()) {
     990                                        getGestureAction(Gesture.GestureType.get("CLICK")).exec(gesture);
     991                                }
     992                        }                       
     993                });
     994               
     995                setGestureAction(gestureType(StandardGestureType.CYCLE_SURROGATE_MODE), new GestureAction() {
    970996                        @Override
    971997                        public void exec(Gesture gesture) {
     
    17451771                        if (_lastHoldsHighlight) {
    17461772                                _lastHoldsHighlight = false;
    1747                                 for (Item i : DisplayController.getCurrentFrame().getItems()) {
     1773                                for (Item i : DisplayController.getCurrentFrame().getSortedItems()) {
    17481774                                        if (i.isHighlighted() && i != on) {
    17491775                                                FrameGraphics.changeHighlightMode(i, Item.HighlightMode.None);
     
    18241850
    18251851                if (checkEnclosure) {
    1826                         ItemUtils.EnclosedCheck(toAnchor.getParentOrCurrentFrame().getItems());
     1852                        ItemUtils.EnclosedCheck(toAnchor.getParentOrCurrentFrame().getSortedItems());
    18271853                        DisplayController.requestRefresh(true);
    18281854                }
     
    19361962                                }
    19371963                        } else if (!toUndo.contains(i)) {
    1938                                 if (addToUndo)
    1939                                  {
     1964                                if (addToUndo) {
    19401965                                        toUndo.add(i); // Why was is this a copy
    19411966                                }
     
    19511976                // the current frame as well as the overlay frame
    19521977                Frame currentFrame = DisplayController.getCurrentFrame();
    1953                 currentFrame.addToUndoDelete(itemList);
     1978                currentFrame.addToUndoDelete(new ItemsList(itemList));
    19541979                itemList.clear();
    19551980                if (bReparse) {
     
    32683293                        SessionStats.DeletedItems(toUndo);
    32693294                        if (parent != null) {
    3270                                 parent.addToUndoDelete(toUndo);
     3295                                parent.addToUndoDelete(new ItemsList(toUndo));
    32713296                                parent.removeAllItems(toUndo); // toDelete.getConnected()
    32723297                        }
     
    36103635                                                        DisplayController.setCursorPosition(toDisconnect.getPosition(), false);
    36113636                                                        pickup(newPoint);
    3612                                                         ItemUtils.EnclosedCheck(toDisconnect.getParentOrCurrentFrame().getItems());
     3637                                                        ItemUtils.EnclosedCheck(toDisconnect.getParentOrCurrentFrame().getSortedItems());
    36133638                                                }
    36143639                                        }
     
    39263951                mergee.getParent().setChanged(true);
    39273952
    3928                 ItemUtils.EnclosedCheck(mergee.getParent().getItems());
     3953                ItemUtils.EnclosedCheck(mergee.getParent().getSortedItems());
    39293954                // Mike: Why does parse frame have to be called?!?
    39303955                FrameUtils.Parse(mergee.getParent());
     
    43864411                        int mouseY = position.getY();
    43874412                        // System.out.println(mouseX + "," + mouseY);
    4388                         for (Item i : DisplayController.getCurrentFrame().getItems()) {
     4413                        for (Item i : DisplayController.getCurrentFrame().getSortedItems()) {
    43894414                                // System.out.println(i.getName().toString());
    43904415                                if (i instanceof Text) {
Note: See TracChangeset for help on using the changeset viewer.