Ignore:
Timestamp:
05/10/18 16:04:51 (6 years ago)
Author:
davidb
Message:

Reworking of the code-base to separate logic from graphics. This version of Expeditee now supports a JFX graphics as an alternative to SWING

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/expeditee/settings/templates/TemplateSettings.java

    r919 r1102  
    1919package org.expeditee.settings.templates;
    2020
    21 import java.awt.Color;
    22 
    23 import org.expeditee.gui.DisplayIO;
     21import org.expeditee.core.Colour;
     22import org.expeditee.gui.DisplayController;
    2423import org.expeditee.gui.Frame;
    2524import org.expeditee.gui.FrameUtils;
     
    5049                                i.setParent(null);
    5150                        }
    52                         DisplayIO.setCursor(Item.HIDDEN_CURSOR);
    53                         DisplayIO.setCursor(Item.DEFAULT_CURSOR);
     51                        DisplayController.setCursor(Item.HIDDEN_CURSOR);
     52                        DisplayController.setCursor(Item.DEFAULT_CURSOR);
    5453                }
    5554        };
    5655       
    57         public static final ArraySetting<Color> ColorWheel = new ArraySetting<Color>("The colours of items in the child frame are used to populate the colour wheel",
    58                         new Color[] { Color.BLACK, Color.RED, Color.BLUE, Item.GREEN, Color.MAGENTA, Color.YELLOW.darker(), Color.WHITE }) {
     56        public static final ArraySetting<Colour> ColorWheel = new ArraySetting<Colour>("The colours of items in the child frame are used to populate the colour wheel",
     57                        new Colour[] { Colour.BLACK, Colour.RED, Colour.BLUE, Item.GREEN, Colour.MAGENTA, Colour.YELLOW.darker(), Colour.WHITE }) {
    5958                @Override
    6059                public boolean setSetting(Text text) {
     
    6867        };
    6968       
    70         public static final ArraySetting<Color> FillColorWheel = new ArraySetting<Color>("The colours of items in the child frame are used to populate the colour wheel",
    71                         new Color[] { new Color(255, 150, 150), new Color(150, 150, 255), new Color(150, 255, 150),
    72                         new Color(255, 150, 255), new Color(255, 255, 100), Color.WHITE, Color.BLACK }) {
     69        public static final ArraySetting<Colour> FillColorWheel = new ArraySetting<Colour>("The colours of items in the child frame are used to populate the colour wheel",
     70                        new Colour[] { Colour.FromRGB255(255, 150, 150), Colour.FromRGB255(150, 150, 255), Colour.FromRGB255(150, 255, 150),
     71                        Colour.FromRGB255(255, 150, 255), Colour.FromRGB255(255, 255, 100), Colour.WHITE, Colour.BLACK }) {
    7372                @Override
    7473                public boolean setSetting(Text text) {
     
    8281        };
    8382       
    84         public static final ArraySetting<Color> BackgroundColorWheel = new ArraySetting<Color>("The colours of items in the child frame are used to populate the colour wheel",
    85                         new Color[] { new Color(235, 235, 235), new Color(225, 225, 255), new Color(195, 255, 255),
    86                         new Color(225, 255, 225), new Color(255, 255, 195), new Color(255, 225, 225),
    87                         new Color(255, 195, 255), Color.WHITE, Color.GRAY, Color.DARK_GRAY, Color.BLACK, null }) {
     83        public static final ArraySetting<Colour> BackgroundColorWheel = new ArraySetting<Colour>("The colours of items in the child frame are used to populate the colour wheel",
     84                        new Colour[] { Colour.FromRGB255(235, 235, 235), Colour.FromRGB255(225, 225, 255), Colour.FromRGB255(195, 255, 255),
     85                                        Colour.FromRGB255(225, 255, 225), Colour.FromRGB255(255, 255, 195), Colour.FromRGB255(255, 225, 225),
     86                                        Colour.FromRGB255(255, 195, 255), Colour.WHITE, Colour.GREY, Colour.DARK_GREY, Colour.BLACK, null }) {
    8887                @Override
    8988                public boolean setSetting(Text text) {
     
    107106                public Text generateText() {
    108107                        Text t = new Text("AnnotationTemplate");
    109                 t.setColor(Color.gray);
     108                t.setColor(Colour.GREY);
    110109                return t;
    111110                }
     
    116115                public Text generateText() {
    117116                        Text t = new Text("CommentTemplate");
    118                 t.setColor(Color.green.darker());
     117                t.setColor(Colour.GREEN.darker());
    119118                return t;
    120119                }
     
    125124                public Text generateText() {
    126125                        Text t = new Text("StatsTemplate");
    127                 t.setColor(Color.BLACK);
    128                 t.setBackgroundColor(new Color(0.9F, 0.9F, 0.9F));
     126                t.setColor(Colour.BLACK);
     127                t.setBackgroundColor(new Colour(0.9F, 0.9F, 0.9F));
    129128                t.setFamily(Text.MONOSPACED_FONT);
    130129                t.setSize(14);
     
    140139                t.setFontStyle("Bold");
    141140                t.setFamily("SansSerif");
    142                 t.setColor(Color.BLUE);
     141                t.setColor(Colour.BLUE);
    143142                t.setPosition(25, 50);
    144143                return t;
     
    157156                public Text generateText() {
    158157                        Text t = new Text("TooltipTemplate");
    159                 t.setColor(Color.BLACK);
    160                 t.setBackgroundColor(new Color(0.7F, 0.7F, 0.9F));
     158                t.setColor(Colour.BLACK);
     159                t.setBackgroundColor(new Colour(0.7F, 0.7F, 0.9F));
    161160                // t.setFamily(Text.MONOSPACED_FONT);
    162161                t.setSize(14);
Note: See TracChangeset for help on using the changeset viewer.