Ignore:
Timestamp:
05/16/08 10:25:28 (16 years ago)
Author:
ra33
Message:

A whole day of big changes.
Adding the ability to have Text at the end of Lines.
Also a lot of refactoring to improve the quality of code relating to constraints and lines

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/expeditee/gui/AttributeUtils.java

    r48 r50  
    6666                        _GetMethods = new LinkedList<Method>();
    6767                        _GetMethods.add(Item.class.getMethod("getDateCreated", param));
    68                        
     68
    6969                        _GetMethods.add(Item.class.getMethod("getColor", param));
    7070                        _GetMethods.add(Item.class.getMethod("getBackgroundColor", param));
     
    7474                        _GetMethods.add(Item.class.getMethod("getFillPattern", param));
    7575                        _GetMethods.add(Item.class.getMethod("getThickness", param));
    76                        
     76
    7777                        _GetMethods.add(Item.class.getMethod("getOwner", param));
    7878                        _GetMethods.add(Item.class.getMethod("getLinkMark", param));
     
    9999                        _GetMethods.add(Text.class.getMethod("getJustification", param));
    100100                        _GetMethods.add(Text.class.getMethod("getWidth", param));
    101                         _GetMethods.add(Text.class.getMethod("getSize", param));
     101                        _GetMethods.add(Item.class.getMethod("getSize", param));
    102102
    103103                        _GetMethods.add(Frame.class.getMethod("getOwner", param));
     
    111111                        Class[] pString = { String.class };
    112112                        Class[] pInt = { int.class };
     113                        Class[] pFloat = { float.class };
    113114                        Class[] pColor = { Color.class };
    114115                        Class[] pBool = { boolean.class };
     
    119120                        _SetMethods = new HashMap<String, Method>();
    120121
    121                         _SetMethods.put("size", Item.class.getMethod("setSize", pInt));
    122                         _SetMethods.put("s", Item.class.getMethod("setSize", pInt));
     122                        _SetMethods.put("thickness", Item.class.getMethod("setThickness",
     123                                        pFloat));
     124                        _SetMethods.put("t", Item.class.getMethod("setThickness", pFloat));
    123125
    124126                        _SetMethods.put("color", Item.class.getMethod("setColor", pColor));
     
    173175                        _SetMethods.put("family", Text.class
    174176                                        .getMethod("setFamily", pString));
    175                         _SetMethods.put("face", Text.class.getMethod("setFontStyle", pString));
    176                         _SetMethods.put("fontstyle", Text.class.getMethod("setFontStyle", pString));
     177                        _SetMethods.put("face", Text.class.getMethod("setFontStyle",
     178                                        pString));
     179                        _SetMethods.put("fontstyle", Text.class.getMethod("setFontStyle",
     180                                        pString));
    177181                        _SetMethods.put("justification", Text.class.getMethod(
    178182                                        "setJustification", pInt));
    179183                        _SetMethods.put("width", Text.class.getMethod("setWidth", pInt));
     184                        _SetMethods.put("size", Item.class.getMethod("setSize", pInt));
     185                        _SetMethods.put("s", Item.class.getMethod("setSize", pInt));
    180186
    181187                        _SetMethods.put("foregroundcolor", Frame.class.getMethod(
     
    548554
    549555                        try {
    550                                 Object[] params = Conversion.Convert(possible, value,
    551                                                 current);
     556                                Object[] params = Conversion.Convert(possible, value, current);
    552557
    553558                                try {
     
    561566                                        e.printStackTrace();
    562567                                } catch (InvocationTargetException e) {
    563                                         // TODO Auto-generated catch block
    564                                         e.printStackTrace();
     568                                        FrameGraphics.DisplayMessage(toSet.getClass()
     569                                                        .getSimpleName()
     570                                                        + " type does not support that attribute.");
     571                                        // e.printStackTrace();
    565572                                }
    566573                        } catch (NumberFormatException e) {
     
    620627        public static void setSingleValue(Text text, String value) {
    621628                assert (value != null);
    622                
     629
    623630                String oldText = text.getTextNoList();
    624631                String attribute = stripAttribute(oldText);
Note: See TracChangeset for help on using the changeset viewer.