Ignore:
Timestamp:
03/15/19 16:48:00 (5 years ago)
Author:
bln4
Message:

Support for new regime in the form of new fields and conditional setting of all paths fields.

Settings are now able to generate their own representation. This allows for the user to explicitly inspect the default values.

When profiles are created, an optional parameter may now be provided. If not null, the new map parameter can contain default values for settings to apply to this profile. This allows for the creation of profiles to that have (for example), their username set to an explicit value. Multiuser mode uses this functionality for usernames and key values among other things.

Frames can now be asked were they are located on the file system. Furthermore, frame indirection is now a thing. Rather than containing data to display, an exp file can contain a line in the format of "REDIRECT:<path>" to go looking for that data. Frames are able to return both their logical (their exp file) and real (the file actually containing the data) paths.

Frames can now store data.

Further fixes to how edits from other users are loaded in.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/expeditee/settings/folders/FolderSettings.java

    r919 r1242  
    2525import org.expeditee.setting.ListSetting;
    2626import org.expeditee.setting.Setting;
    27 import org.expeditee.settings.UserSettings;
    2827
    2928public class FolderSettings {
    3029
    31         public static final ListSetting<String> FrameDirs = new ListSetting<String>("Directories to look in for frames") {
     30        public static final ListSetting<String> FrameDirs = new ListSetting<String>("Directories to look in for frames", "FrameDirs") {
    3231                @Override
    3332                public boolean setSetting(Text text) {
     
    3635                }
    3736        };
    38         public static final Setting FramesetDir = new Setting("Adds a directory to look in for frames") {
     37        public static final Setting FramesetDir = new Setting("Adds a directory to look in for frames", "FramesetDir") {
    3938                @Override
    4039                public boolean setSetting(Text text) {
     
    5251                return false;
    5352                }
     53               
     54                @Override
     55                public Text generateRepresentation(String label, String frameset) {
     56                        Text t = new Text(label);
     57                        return t;
     58                }
    5459        };
    5560
    56         public static ListSetting<String> ImageDirs = new ListSetting<String>("Directories to look in for images") {
     61        public static ListSetting<String> ImageDirs = new ListSetting<String>("Directories to look in for images", "ImageDirs") {
    5762                @Override
    5863                public boolean setSetting(Text text) {
     
    6166                }
    6267        };
    63         public static final Setting ImageDir = new Setting("Adds a directory to look in for images") {
     68        public static final Setting ImageDir = new Setting("Adds a directory to look in for images", "ImageDir") {
    6469                @Override
    6570                public boolean setSetting(Text text) {
     
    7782                return false;
    7883                }
     84               
     85                @Override
     86                public Text generateRepresentation(String label, String frameset) {
     87                        Text t = new Text(label);
     88                        return t;
     89                }
    7990        };
    8091       
    81         public static final Setting LogDir = new Setting("Set the directory to save logs") {
     92        public static final Setting LogDir = new Setting("Set the directory to save logs", "LogDir") {
    8293                @Override
    8394                public boolean setSetting(Text text) {
     
    91102                return true;
    92103                }
     104               
     105                @Override
     106                public Text generateRepresentation(String label, String frameset) {
     107                        Text t = new Text(label);
     108                        return t;
     109                }
    93110        };
    94111}
Note: See TracChangeset for help on using the changeset viewer.