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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/expeditee/encryption/io/EncryptedExpWriter.java

    r1414 r1415  
    2323import org.expeditee.encryption.CryptographyConstants;
    2424import org.expeditee.encryption.items.surrogates.EncryptionDetail;
     25import org.expeditee.encryption.items.surrogates.EncryptionDetail.Type;
    2526import org.expeditee.encryption.items.surrogates.Label;
    2627import org.expeditee.encryption.items.surrogates.Label.LabelResult;
    2728import org.expeditee.gui.Frame;
     29import org.expeditee.gui.Frame.BodyType;
    2830import org.expeditee.gui.MessageBay;
    2931import org.expeditee.io.Conversion;
     
    6264                        }
    6365                } else {
    64                         LabelResult res = Label.resolveKey(label);
     66                        LabelResult res = Label.getLabel(label);
    6567                        if (res == LabelResult.SuccessResolveLabelToKey) {
    6668                                byte[] keyBytes = res.key;
     
    9496               
    9597                // write item
    96                 writeItemData(frame);
     98                writeItemData(frame, true);
    9799                writeTerminator();
    98                
    99100                // write lines and constraints
    100101                writeLineData();
    101102                writeTerminator();
    102103                writeConstraintData();
    103                 writeTerminator();
    104                
     104               
     105                // write surrogate items
     106                if (frame.hasSurrogates()) {
     107                        writeSurrogateTerminator();
     108                        writeItemData(frame, false);
     109                        writeTerminator();
     110                } else {
     111                        writeTerminator();
     112                }
     113                               
    105114                writeLine(SessionStats.getFrameEventList(frame));
    106115        }
     
    126135       
    127136        protected void writeClass(Item toWrite) throws IOException {
     137                if (toWrite instanceof Text && toWrite.getText().equals("Content for Label Two")) {
     138                        System.err.println("EncryptedExpWriter::writeClass::breakpoint");
     139                } else if (toWrite instanceof Text && toWrite.getText().equals("Encrypted") && toWrite.getPrimary().getText().equals("Content for Label One")) {
     140                        System.err.println("EncryptedExpWriter::writeClass::breakpoint");
     141                }
     142               
    128143                LinkedHashMap<Character,Method> itemTags = new LinkedHashMap<Character, Method>(getItemTags());
    129144                LinkedHashMap<String,Method> itemTagsExt = new LinkedHashMap<String, Method>(getItemTagsExt());
     
    149164                }
    150165                EncryptionDetail encryptionDetail = toWrite.getEncryptionDetailForTag(tag + "");
    151                                
    152                 switch(encryptionDetail) {
     166                Type encryptionDetailType = encryptionDetail.getEncryptionDetailType();
     167                               
     168                switch(encryptionDetailType) {
    153169                case UnencryptedOnSave:
    154170                        writeTagUnencryptedOnSave(toWrite, param, tags, tag);
     
    166182        }
    167183       
    168         private void writeItemData(Frame frame) throws IOException {
     184        private void writeItemData(Frame frame, boolean primaryItems) throws IOException {
    169185                // write each item in the frame
    170                 for (Item i : frame.getItemsToSave()) {
     186                BodyType bodyType = primaryItems ? BodyType.PrimaryBody : BodyType.SurrogateBody;
     187                for (Item i : frame.getItemsToSave(bodyType)) {
    171188                        assert (!(i instanceof Line));
    172189                        writeItem(i);
     
    176193                        assert (!(i instanceof Line));
    177194                        writeItem(i);
    178                 }
    179                
    180                 // write out the surrogates
    181                 List<Item> surrogates = frame.getSurrogateItemsToSave();
    182                 if (!surrogates.isEmpty()) {
    183                         writeSurrogateTerminator();
    184                         for (Item i: surrogates) {
    185                                 assert (!(i instanceof Line));
    186                                 writeItem(i);
    187                         }
    188195                }
    189196        }
     
    194201                BinaryOperator<Boolean> trueExists = (a, b) -> a || b;
    195202                boolean surrogatesInherit = surrogateItems.stream().map(isTagInherited).collect(Collectors.reducing(trueExists)).get();
    196                 if (surrogatesInherit &&
    197                                 Label.resolveKey(toWrite.getEncryptionLabel()) == LabelResult.SuccessResolveLabelToKey) {
    198                         toWrite.setEncryptionDetailForTag(tag + "", EncryptionDetail.UnencryptedOnSave);
     203                boolean userHasKey = Label.getLabel(toWrite.getEncryptionLabel()) == LabelResult.SuccessResolveLabelToKey;
     204               
     205                if (!surrogatesInherit && userHasKey) {
     206                        EncryptionDetail reencryptOnSave = new EncryptionDetail(EncryptionDetail.Type.ReencryptOnSave);
     207                        toWrite.setEncryptionDetailForTag(tag + "", reencryptOnSave);
     208                        writeTagReencryptOnSave(toWrite, tags, tag);
     209                } else {
     210                        EncryptionDetail unencryptedOnSave = new EncryptionDetail(EncryptionDetail.Type.UnencryptedOnSave);
     211                        toWrite.setEncryptionDetailForTag(tag + "", unencryptedOnSave);
    199212                        writeTagUnencryptedOnSave(toWrite, new Object[] {}, tags, tag);
    200                 } else {
    201                         toWrite.setEncryptionDetailForTag(tag + "", EncryptionDetail.ReencryptOnSave);
    202                         writeTagReencryptOnSave(toWrite, tags, tag);
    203213                }
    204214        }
     
    207217                Method toRun = tags.get(tag);
    208218                Class<?> declarer = toRun.getDeclaringClass();
    209                 LabelResult res = Label.resolveKey(toWrite.getEncryptionLabel());
     219                LabelResult res = Label.getLabel(toWrite.getEncryptionLabel());
    210220                if (declarer.isAssignableFrom(toWrite.getClass()) && res == LabelResult.SuccessResolveLabelToKey) {
    211221                        try {
Note: See TracChangeset for help on using the changeset viewer.