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/io/DefaultFrameReader.java

    r919 r1102  
    1919package org.expeditee.io;
    2020
    21 import java.awt.Color;
    22 import java.awt.Font;
    23 import java.awt.Point;
    2421import java.io.BufferedReader;
    2522import java.io.FileInputStream;
     
    3229import java.util.LinkedList;
    3330
     31import org.expeditee.core.Colour;
     32import org.expeditee.core.Font;
     33import org.expeditee.core.Point;
    3434import org.expeditee.gui.Frame;
    3535import org.expeditee.items.Constraint;
     36import org.expeditee.items.Dot;
    3637import org.expeditee.items.DotType;
    3738import org.expeditee.items.Item;
     
    4243
    4344public abstract class DefaultFrameReader implements FrameReader {
     45       
    4446        protected static LinkedHashMap<Character, Method> _ItemTags = null;
    4547       
     
    5355        protected static Class[] pFloat = { float.class };
    5456        protected static Class[] pFloatO = { Float.class };
    55         protected static Class[] pColor = { Color.class };
     57        protected static Class[] pDouble = { double.class };
     58        protected static Class[] pColor = { Colour.class };
    5659        protected static Class[] pBool = { boolean.class };
    5760        protected static Class[] pFont = { Font.class };
     
    6366        protected static Class[] pJustification = { Justification.class };
    6467        protected static Class[] pPermission = { PermissionPair.class };
     68        protected static Class[] pDotType = { DotType.class };
    6569       
    6670        public DefaultFrameReader(){
     
    100104                                        pColor));
    101105
    102                         _ItemTags.put('R', Item.class.getMethod("setAnchorLeft", pFloatO));
    103                         _ItemTags.put('H', Item.class.getMethod("setAnchorRight", pFloatO));
    104                         _ItemTags.put('N', Item.class.getMethod("setAnchorTop", pFloatO));
    105                         _ItemTags.put('I', Item.class.getMethod("setAnchorBottom", pFloatO));
     106                        _ItemTags.put('R', Item.class.getMethod("setAnchorLeft", pIntO));
     107                        _ItemTags.put('H', Item.class.getMethod("setAnchorRight", pIntO));
     108                        _ItemTags.put('N', Item.class.getMethod("setAnchorTop", pIntO));
     109                        _ItemTags.put('I', Item.class.getMethod("setAnchorBottom", pIntO));
    106110
    107111                        _ItemTags.put('P', Item.class.getMethod("setPosition", pPoint));
     
    123127                        _ItemTags.put('e', Item.class.getMethod("setFillColor", pColor));
    124128                        _ItemTags.put('E', Item.class.getMethod("setGradientColor", pColor));
    125                         _ItemTags.put('Q', Item.class.getMethod("setGradientAngle", pInt));
     129                        _ItemTags.put('Q', Item.class.getMethod("setGradientAngle", pDouble));
    126130                       
    127131                        _ItemTags.put('i', Item.class.getMethod("setFillPattern", pString));
     
    136140                        _ItemTags.put('j', Item.class.getMethod("setArrow", pArrow));
    137141
    138                         _ItemTags.put('v', Item.class.getMethod("setDotType", new Class[]{DotType.class}));
    139                         _ItemTags.put('z', Item.class.getMethod("setFilled", pBool));
     142                        _ItemTags.put('v', Dot.class.getMethod("setDotType", pDotType));
     143                        _ItemTags.put('z', Dot.class.getMethod("setFilled", pBool));
    140144                       
    141145                        _ItemTags.put('f', Text.class.getMethod("setFont", pFont));
Note: See TracChangeset for help on using the changeset viewer.