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/gui/FrameIO.java

    r1406 r1415  
    8888 */
    8989
    90 
    9190public class FrameIO {
    9291
     
    214213        }
    215214       
    216 //      public static void changeParentAndSubFolders(String newFolder) {
    217 //              // Partial Paths.
    218 //              PARENT_FOLDER = newFolder;     
    219 //              String resourcesPublicPath = PARENT_FOLDER + "resources-public" + File.separator;
    220 //              String resourcesPrivateIndividualPath = PARENT_FOLDER + "resources-" + UserSettings.UserName.get() + File.separator;
    221 //
    222 //              // Standard paths.
    223 //              PUBLIC_PATH = PARENT_FOLDER + "public" + File.separator;
    224 //              TRASH_PATH = PARENT_FOLDER + "trash" + File.separator;
    225 //              HELP_PATH = PARENT_FOLDER + "documentation" + File.separator;
    226 //              PROFILE_PATH = PARENT_FOLDER + "profiles" + File.separator;
    227 //              EXPORTS_PATH = PARENT_FOLDER + "exports" + File.separator;
    228 //              STATISTICS_PATH = PARENT_FOLDER + "statistics" + File.separator;
    229 //              LOGS_PATH = PARENT_FOLDER + "logs" + File.separator;
    230 //                             
    231 //             
    232 //              // Conditional paths
    233 //              if (UserSettings.PublicAndPrivateResources) {
    234 //                      // Work with a system of public and private folders
    235 //                     
    236 //                      FONT_PATH = resourcesPublicPath + "fonts" + File.separator;
    237 //                      DICT_PATH = resourcesPublicPath + "dict" + File.separator;
    238 //                      IMAGES_PATH = resourcesPublicPath + "images" + File.separator;
    239 //                      AUDIO_PATH = resourcesPublicPath + "audio" + File.separator;
    240 //                      FRAME_PATH = resourcesPublicPath + "framesets" + File.separator;
    241 //              } else {
    242 //                      FONT_PATH = PARENT_FOLDER + "fonts" + File.separator;
    243 //                      DICT_PATH = PARENT_FOLDER + "dict" + File.separator;
    244 //                      IMAGES_PATH = PARENT_FOLDER + "images" + File.separator;
    245 //                      AUDIO_PATH = PARENT_FOLDER + "audio" + File.separator;
    246 //                      FRAME_PATH = PARENT_FOLDER + "framesets" + File.separator;
    247 //                      DEAD_DROPS_PATH = PARENT_FOLDER + "deaddrops" + File.separator;
    248 //              }
    249 //             
    250 //              if (!UserSettings.PublicAndPrivateResources || (AuthenticatorBrowser.isAuthenticationRequired() && !AuthenticatorBrowser.isAuthenticated())) {
    251 //                     
    252 //                      if (UserSettings.UserName.get().equals(AuthenticatorBrowser.USER_NOBODY)) {
    253 //                              System.err.println("**** FrameIO::changeParentAndSubFolders(): Not setting subfolders for user '"+AuthenticatorBrowser.USER_NOBODY+"'");
    254 //                      }
    255 //                     
    256 //                      // If we are using the old regime, or user.name set to Browser.USER_NOBODY
    257 //                      // => then these paths should not be used.
    258 //                      RESOURCES_PATH = null;
    259 //                      SHARED_FRAMESETS_PATH = null;
    260 //                      RESOURCES_PRIVATE_PATH = null;         
    261 //                      FRAME_PRIVATE_PATH = null;
    262 //                      IMAGES_PRIVATE_PATH = null;
    263 //                      AUDIO_PRIVATE_PATH = null;
    264 //                      CONTACTS_PATH = null;
    265 //                      HELP_PRIVATE_PATH = null;
    266 //                     
    267 //                      if (!UserSettings.PublicAndPrivateResources) {
    268 //                              MESSAGES_PATH = PARENT_FOLDER + "messages" + File.separator;
    269 //                      } else {
    270 //                              MESSAGES_PATH = resourcesPrivateIndividualPath + "messages" + File.separator;
    271 //                      }
    272 //                     
    273 //              } else {
    274 //                      RESOURCES_PATH = resourcesPublicPath + "documentation" + File.separator;
    275 //                      SHARED_FRAMESETS_PATH = resourcesPrivateIndividualPath + "framesets-shared" + File.separator;
    276 //                     
    277 //                      RESOURCES_PRIVATE_PATH = PARENT_FOLDER + "resources-private" + File.separator;
    278 //                      FRAME_PRIVATE_PATH = resourcesPrivateIndividualPath + "framesets" + File.separator;
    279 //                      IMAGES_PRIVATE_PATH = resourcesPrivateIndividualPath + "images" + File.separator;
    280 //                      AUDIO_PRIVATE_PATH = resourcesPrivateIndividualPath + "audio" + File.separator;
    281 //                      CONTACTS_PATH = resourcesPrivateIndividualPath + "contacts" + File.separator;
    282 //                      HELP_PRIVATE_PATH = resourcesPrivateIndividualPath + "documentation" + File.separator;
    283 //                      MESSAGES_PATH = resourcesPrivateIndividualPath + "messages" + File.separator;
    284 //                      MAIL_PATH = resourcesPrivateIndividualPath + "mail" + File.separator;
    285 //                      DEAD_DROPS_PATH = resourcesPrivateIndividualPath + "deaddrops" + File.separator;
    286 //              }
    287 //                     
    288 //             
    289 //              System.err.println("**** FrameIO::changeParentAndSubFolder(): Calling AudioPathManger.changeParentAndSubFolder()");
    290 //              AudioPathManager.changeParentAndSubFolders(newFolder);
    291 //      }
    292        
    293215        // All methods are static, this should not be instantiated
    294216        private FrameIO() {
     
    1001923                template.resetDateCreated();
    1002924
    1003                 for (Item i : template.getItems()) {
     925                for (Item i : template.getSortedItems()) {
    1004926                        if (ItemUtils.startsWithTag(i, ItemUtils.TAG_PARENT)) {
    1005927                                i.setLink(null);
     
    1009931                // do auto shrinking of the title IF not in twin frames mode and the title is not centred
    1010932                Item titleItem = template.getTitleItem();
    1011 
    1012                 if (!DisplayController.isTwinFramesOn() && !Justification.center.equals(((Text)titleItem).getJustification())) {
     933                if (titleItem == null) {
     934                        return template;
     935                }
     936               
     937                boolean titleItemJustified = titleItem == null || !Justification.center.equals(((Text)titleItem).getJustification());
     938                if (!DisplayController.isTwinFramesOn() && titleItemJustified) {
    1013939                        if ((titleItem.getX() + 1) < template.getNameItem().getX()) {
    1014940                                int title_item_xr = titleItem.getX() + titleItem.getBoundsWidth(); // should really be '... -1'
     
    13071233                                EcosystemManager.getMiscManager().beep();
    13081234                        } else if (checkBackup
    1309                                         && ItemUtils.ContainsExactTag(toSave.getItems(),
     1235                                        && ItemUtils.ContainsExactTag(toSave.getSortedItems(),
    13101236                                                        ItemUtils.TAG_BACKUP)) {
    13111237                                SuspendCache();
     
    13381264                                }
    13391265
    1340                                 Item i = ItemUtils.FindExactTag(toSave.getItems(),
     1266                                Item i = ItemUtils.FindExactTag(toSave.getSortedItems(),
    13411267                                                ItemUtils.TAG_BACKUP);
    13421268                                i.setLink(original.getName());
     
    14801406        }
    14811407
    1482         public static Frame CreateNewProfile(String username, Map<String, Setting> initialSettings, Map<String, Consumer<Frame>> toNotifyOnSet) throws InvalidFramesetNameException, ExistingFramesetException  {
     1408        public static Frame CreateNewProfile(String username, Map<String, Setting> initialSettings, Map<String, Consumer<Frame>> toNotifyOnSet) throws InvalidFramesetNameException, ExistingFramesetException {
    14831409                Frame profile = CreateFrameset(username, PROFILE_PATH, true);
    14841410                if (profile != null) {
     
    21102036        }
    21112037       
     2038        public static boolean personalResourcesExist(String username) {
     2039                Path personalResources = Paths.get(FrameIO.PARENT_FOLDER).resolve("resources-" + username);
     2040                File personalResourcesFile = personalResources.toFile();
     2041                boolean directoryExists = personalResourcesFile.exists() && personalResourcesFile.isDirectory();
     2042                return directoryExists;
     2043        }
     2044       
    21122045        public static Path setupPersonalResources(String username) {
    21132046                Path personalResources = Paths.get(FrameIO.PARENT_FOLDER).resolve("resources-" + username);
Note: See TracChangeset for help on using the changeset viewer.