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/items/Text.java

    r1414 r1415  
    409409                        Item primary = getPrimary();
    410410                        if (subjectToInheritanceCheckOnSave(DefaultFrameWriter.WIDTH_TO_SAVE_STR)) {
    411                                 primary.primaryPropertyEncryption.put(DefaultFrameWriter.WIDTH_TO_SAVE_STR, EncryptionDetail.InheritanceCheckOnSave);
     411                                EncryptionDetail inheritanceCheckOnSave = new EncryptionDetail(EncryptionDetail.Type.InheritanceCheckOnSave);
     412                                primary.primaryPropertyEncryption.put(DefaultFrameWriter.WIDTH_TO_SAVE_STR, inheritanceCheckOnSave);
    412413                        }
    413414                }
     
    432433                        Item primary = getPrimary();
    433434                        if (subjectToInheritanceCheckOnSave(DefaultFrameWriter.MIN_WIDTH_TO_SAVE_STR)) {
    434                                 primary.primaryPropertyEncryption.put(DefaultFrameWriter.MIN_WIDTH_TO_SAVE_STR, EncryptionDetail.InheritanceCheckOnSave);
     435                                EncryptionDetail inheritanceCheckOnSave = new EncryptionDetail(EncryptionDetail.Type.InheritanceCheckOnSave);
     436                                primary.primaryPropertyEncryption.put(DefaultFrameWriter.MIN_WIDTH_TO_SAVE_STR, inheritanceCheckOnSave);
    435437                        }
    436438                }
     
    453455                        return this.getPrimary().getWidth();
    454456                } else {
     457                        if (_width == null || _width <= 0)
     458                                return null;
    455459                        return _width;
    456460                }
     
    458462
    459463        public Integer getAbsoluteWidth() {
    460                 if (_width == null) {
     464                if (_width == null || _width == Integer.MIN_VALUE) {
     465                        // When absoluting Integer.MIN_VALUE, the java API is defined to give you back Integer.MIN_VALUE!!?!
     466                        // This is because of the asymmetry of two's complement integer representation.
     467                        // We would prefer to use Integer.MAX_VALUE in this circumstance.
    461468                        return Integer.MAX_VALUE;
    462469                }
    463 
     470               
    464471                return Math.abs(_width);
    465472        }
     
    469476                        return this.getPrimary().getMinWidth();
    470477                } else {
     478                        if (_minWidth == null || _minWidth <= 0)
     479                                return null;
    471480                        return _minWidth;
    472481                }
     
    513522                        Item primary = getPrimary();
    514523                        if (subjectToInheritanceCheckOnSave(DefaultFrameWriter.JUSTIFICATION_STR)) {
    515                                 primary.primaryPropertyEncryption.put(DefaultFrameWriter.JUSTIFICATION_STR, EncryptionDetail.InheritanceCheckOnSave);
     524                                EncryptionDetail inheritanceCheckOnSave = new EncryptionDetail(EncryptionDetail.Type.InheritanceCheckOnSave);
     525                                primary.primaryPropertyEncryption.put(DefaultFrameWriter.JUSTIFICATION_STR, inheritanceCheckOnSave);
    516526                        }
    517527                }
     
    694704                        Item primary = getPrimary();
    695705                        if (subjectToInheritanceCheckOnSave(DefaultFrameWriter.TEXT_STR)) {
    696                                 primary.primaryPropertyEncryption.put(DefaultFrameWriter.TEXT_STR, EncryptionDetail.InheritanceCheckOnSave);
     706                                EncryptionDetail inheritanceCheckOnSave = new EncryptionDetail(EncryptionDetail.Type.InheritanceCheckOnSave);
     707                                primary.primaryPropertyEncryption.put(DefaultFrameWriter.TEXT_STR, inheritanceCheckOnSave);
    697708                        }
    698709                }
     
    13271338
    13281339                invalidateAll();
    1329                
     1340                               
    13301341                if (isSurrogate()) {
    13311342                        surrogatePropertyInheritance.put(DefaultFrameWriter.FONT_STR, false);
    13321343                        Item primary = getPrimary();
    13331344                        if (subjectToInheritanceCheckOnSave(DefaultFrameWriter.FONT_STR)) {
    1334                                 primary.primaryPropertyEncryption.put(DefaultFrameWriter.FONT_STR, EncryptionDetail.InheritanceCheckOnSave);
     1345                                EncryptionDetail inheritanceCheckOnSave = new EncryptionDetail(EncryptionDetail.Type.InheritanceCheckOnSave);
     1346                                primary.primaryPropertyEncryption.put(DefaultFrameWriter.FONT_STR, inheritanceCheckOnSave);
    13351347                        }
    13361348                }
     
    15541566                        Item primary = getPrimary();
    15551567                        if (subjectToInheritanceCheckOnSave(DefaultFrameWriter.SPACING_STR)) {
    1556                                 primary.primaryPropertyEncryption.put(DefaultFrameWriter.SPACING_STR, EncryptionDetail.InheritanceCheckOnSave);
     1568                                EncryptionDetail inheritanceCheckOnSave = new EncryptionDetail(EncryptionDetail.Type.InheritanceCheckOnSave);
     1569                                primary.primaryPropertyEncryption.put(DefaultFrameWriter.SPACING_STR, inheritanceCheckOnSave);
    15571570                        }
    15581571                }
     
    15951608                        Item primary = getPrimary();
    15961609                        if (subjectToInheritanceCheckOnSave(DefaultFrameWriter.WORD_SPACING_STR)) {
    1597                                 primary.primaryPropertyEncryption.put(DefaultFrameWriter.WORD_SPACING_STR, EncryptionDetail.InheritanceCheckOnSave);
     1610                                EncryptionDetail inheritanceCheckOnSave = new EncryptionDetail(EncryptionDetail.Type.InheritanceCheckOnSave);
     1611                                primary.primaryPropertyEncryption.put(DefaultFrameWriter.WORD_SPACING_STR, inheritanceCheckOnSave);
    15981612                        }
    15991613                }
     
    16261640                        Item primary = getPrimary();
    16271641                        if (subjectToInheritanceCheckOnSave(DefaultFrameWriter.LETTER_SPACING_STR)) {
    1628                                 primary.primaryPropertyEncryption.put(DefaultFrameWriter.LETTER_SPACING_STR, EncryptionDetail.InheritanceCheckOnSave);
     1642                                EncryptionDetail inheritanceCheckOnSave = new EncryptionDetail(EncryptionDetail.Type.InheritanceCheckOnSave);
     1643                                primary.primaryPropertyEncryption.put(DefaultFrameWriter.LETTER_SPACING_STR, inheritanceCheckOnSave);
    16291644                        }
    16301645                }
     
    16501665                        Item primary = getPrimary();
    16511666                        if (subjectToInheritanceCheckOnSave(DefaultFrameWriter.INITIAL_SPACING_STR)) {
    1652                                 primary.primaryPropertyEncryption.put(DefaultFrameWriter.INITIAL_SPACING_STR, EncryptionDetail.InheritanceCheckOnSave);
     1667                                EncryptionDetail inheritanceCheckOnSave = new EncryptionDetail(EncryptionDetail.Type.InheritanceCheckOnSave);
     1668                                primary.primaryPropertyEncryption.put(DefaultFrameWriter.INITIAL_SPACING_STR, inheritanceCheckOnSave);
    16531669                        }
    16541670                }
     
    17771793
    17781794                int minX = Integer.MAX_VALUE;
    1779                 int maxX = Integer.MIN_VALUE;
     1795                int maxX = Integer.MIN_VALUE + 1; // +1 makes it safe to do math.abs on
    17801796
    17811797                int minY = Integer.MAX_VALUE;
    1782                 int maxY = Integer.MIN_VALUE;
     1798                int maxY = Integer.MIN_VALUE + 1; // +1 makes it safe to do math.abs on
    17831799
    17841800                float y = -1;
     
    18921908                                return;
    18931909                        }
    1894                         for (Item item : DisplayController.getCurrentFrame().getItems()) {
     1910                        for (Item item : DisplayController.getCurrentFrame().getSortedItems()) {
    18951911                                if (item instanceof Line) {
    18961912                                        lines.add(new org.expeditee.core.Line(((Line) item).getStartItem().getPosition(),
     
    19141930                }
    19151931
    1916                 float width = Float.MAX_VALUE;
     1932                float width = (float) Integer.MAX_VALUE;
    19171933                if (limitWidth) {
    19181934                        if (_width == null) {
     
    19451961                                                        paintFont,
    19461962                                                        new Point(getX(), getY()), lines != null ? lines.toArray(new org.expeditee.core.Line[1]) : null,
    1947                                                         paintFont.getSize() > MINIMUM_FONT_SIZE ? (int) width : (int) Float.MAX_VALUE,
     1963                                                        paintFont.getSize() > MINIMUM_FONT_SIZE ? (int) width : Integer.MAX_VALUE,
    19481964                                                        (int) getSpacing(),
    19491965                                                        true,
     
    25532569                                Integer width = getWidth();
    25542570                                if (width == null || width < 0) {
    2555                                         setWidth(Integer.MIN_VALUE + 1);
     2571                                        setWidth(Integer.MIN_VALUE + 1); // +1 makes it safe to do math.abs on
    25562572                                }
    25572573                        } else if (frameWidth - getX() > ADJUST_WIDTH_THRESHOLD) {
     
    28662882                        Item primary = getPrimary();
    28672883                        if (subjectToInheritanceCheckOnSave(DefaultFrameWriter.ANCHOR_LEFT_STR)) {
    2868                                 primary.primaryPropertyEncryption.put(DefaultFrameWriter.ANCHOR_LEFT_STR, EncryptionDetail.InheritanceCheckOnSave);
     2884                                EncryptionDetail inheritanceCheckOnSave = new EncryptionDetail(EncryptionDetail.Type.InheritanceCheckOnSave);
     2885                                primary.primaryPropertyEncryption.put(DefaultFrameWriter.ANCHOR_LEFT_STR, inheritanceCheckOnSave);
    28692886                        }
    28702887                }
     
    29002917                        Item primary = getPrimary();
    29012918                        if (subjectToInheritanceCheckOnSave(DefaultFrameWriter.ANCHOR_RIGHT_STR)) {
    2902                                 primary.primaryPropertyEncryption.put(DefaultFrameWriter.ANCHOR_RIGHT_STR, EncryptionDetail.InheritanceCheckOnSave);
     2919                                EncryptionDetail inheritanceCheckOnSave = new EncryptionDetail(EncryptionDetail.Type.InheritanceCheckOnSave);
     2920                                primary.primaryPropertyEncryption.put(DefaultFrameWriter.ANCHOR_RIGHT_STR, inheritanceCheckOnSave);
    29032921                        }
    29042922                }
     
    29412959                        Item primary = getPrimary();
    29422960                        if (subjectToInheritanceCheckOnSave(DefaultFrameWriter.ANCHOR_TOP_STR)) {
    2943                                 primary.primaryPropertyEncryption.put(DefaultFrameWriter.ANCHOR_TOP_STR, EncryptionDetail.InheritanceCheckOnSave);
     2961                                EncryptionDetail inheritanceCheckOnSave = new EncryptionDetail(EncryptionDetail.Type.InheritanceCheckOnSave);
     2962                                primary.primaryPropertyEncryption.put(DefaultFrameWriter.ANCHOR_TOP_STR, inheritanceCheckOnSave);
    29442963                        }
    29452964                }
     
    29873006                        Item primary = getPrimary();
    29883007                        if (subjectToInheritanceCheckOnSave(DefaultFrameWriter.ANCHOR_BOTTOM_STR)) {
    2989                                 primary.primaryPropertyEncryption.put(DefaultFrameWriter.ANCHOR_BOTTOM_STR, EncryptionDetail.InheritanceCheckOnSave);
     3008                                EncryptionDetail inheritanceCheckOnSave = new EncryptionDetail(EncryptionDetail.Type.InheritanceCheckOnSave);
     3009                                primary.primaryPropertyEncryption.put(DefaultFrameWriter.ANCHOR_BOTTOM_STR, inheritanceCheckOnSave);
    29903010                        }
    29913011                }
     
    31013121        //
    31023122        // int min_xl = Integer.MAX_VALUE;
    3103         // int max_xr = Integer.MIN_VALUE;
     3123        // int max_xr = Integer.MIN_VALUE + 1; // +1 makes it safe to do math.abs on
    31043124        //
    31053125        // int min_yt = Integer.MAX_VALUE;
    3106         // int max_yb = Integer.MIN_VALUE;
     3126        // int max_yb = Integer.MIN_VALUE + 1; // +1 makes it safe to do math.abs on
    31073127        //
    31083128        //
     
    31683188                        Item primary = getPrimary();
    31693189                        if (subjectToInheritanceCheckOnSave(DefaultFrameWriter.AUTO_WRAP_TO_SAVE_STR)) {
    3170                                 primary.primaryPropertyEncryption.put(DefaultFrameWriter.AUTO_WRAP_TO_SAVE_STR, EncryptionDetail.InheritanceCheckOnSave);
     3190                                EncryptionDetail inheritanceCheckOnSave = new EncryptionDetail(EncryptionDetail.Type.InheritanceCheckOnSave);
     3191                                primary.primaryPropertyEncryption.put(DefaultFrameWriter.AUTO_WRAP_TO_SAVE_STR, inheritanceCheckOnSave);
    31713192                        }
    31723193                }
     
    33073328                        Item primary = getPrimary();
    33083329                        if (subjectToInheritanceCheckOnSave(DefaultFrameWriter.MASK_STR)) {
    3309                                 primary.primaryPropertyEncryption.put(DefaultFrameWriter.MASK_STR, EncryptionDetail.InheritanceCheckOnSave);
     3330                                EncryptionDetail inheritanceCheckOnSave = new EncryptionDetail(EncryptionDetail.Type.InheritanceCheckOnSave);
     3331                                primary.primaryPropertyEncryption.put(DefaultFrameWriter.MASK_STR, inheritanceCheckOnSave);
    33103332                        }
    33113333                }
     
    33303352                        Item primary = getPrimary();
    33313353                        if (subjectToInheritanceCheckOnSave(DefaultFrameWriter.PLACEHOLDER_STR)) {
    3332                                 primary.primaryPropertyEncryption.put(DefaultFrameWriter.PLACEHOLDER_STR, EncryptionDetail.InheritanceCheckOnSave);
     3354                                EncryptionDetail inheritanceCheckOnSave = new EncryptionDetail(EncryptionDetail.Type.InheritanceCheckOnSave);
     3355                                primary.primaryPropertyEncryption.put(DefaultFrameWriter.PLACEHOLDER_STR, inheritanceCheckOnSave);
    33333356                        }
    33343357                }
     
    33603383                        Item primary = getPrimary();
    33613384                        if (subjectToInheritanceCheckOnSave(DefaultFrameWriter.SINGLE_LINE_ONLY_STR)) {
    3362                                 primary.primaryPropertyEncryption.put(DefaultFrameWriter.SINGLE_LINE_ONLY_STR, EncryptionDetail.InheritanceCheckOnSave);
     3385                                EncryptionDetail inheritanceCheckOnSave = new EncryptionDetail(EncryptionDetail.Type.InheritanceCheckOnSave);
     3386                                primary.primaryPropertyEncryption.put(DefaultFrameWriter.SINGLE_LINE_ONLY_STR, inheritanceCheckOnSave);
    33633387                        }
    33643388                }
     
    33803404                        Item primary = getPrimary();
    33813405                        if (subjectToInheritanceCheckOnSave(DefaultFrameWriter.TAB_INDEX_STR)) {
    3382                                 primary.primaryPropertyEncryption.put(DefaultFrameWriter.TAB_INDEX_STR, EncryptionDetail.InheritanceCheckOnSave);
     3406                                EncryptionDetail inheritanceCheckOnSave = new EncryptionDetail(EncryptionDetail.Type.InheritanceCheckOnSave);
     3407                                primary.primaryPropertyEncryption.put(DefaultFrameWriter.TAB_INDEX_STR, inheritanceCheckOnSave);
    33833408                        }
    33843409                }
Note: See TracChangeset for help on using the changeset viewer.