Ignore:
Timestamp:
11/17/08 15:43:36 (16 years ago)
Author:
ra33
Message:

Added auto colour wheel... when drawing rectangles...
Fixed computeTree bug
Added TDFC for rectangles.

File:
1 edited

Legend:

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

    r376 r390  
    131131        private Collection<Item> _vectorItems = new LinkedHashSet<Item>();
    132132
     133        private Text _dotTemplate = UserSettings.DotTemplate.copy();
     134
    133135        /**
    134136         * Default constructor, nothing is set.
    135137         */
    136138        public Frame() {
     139        }
     140
     141        public void reset() {
     142                refreshItemPermissions(Permission.full);
     143
     144                resetDot();
     145        }
     146       
     147        private void resetDot() {
     148                _dotTemplate.setColor(Item.COLOR_WHEEL[1]);
     149                _dotTemplate.setFillColor(Item.FILL_COLOR_WHEEL[0]);
     150        }
     151
     152        public void nextDot() {
     153                _dotTemplate.setFillColor(ColorUtils.getNextColor(_dotTemplate
     154                                .getFillColor(), Item.FILL_COLOR_WHEEL, null));
     155                _dotTemplate.setColor(ColorUtils.getNextColor(_dotTemplate.getColor(),
     156                                Item.COLOR_WHEEL, null));
     157               
     158                if(_dotTemplate.getColor().equals(Color.white)){
     159                        resetDot();
     160                }
    137161        }
    138162
     
    219243        }
    220244
    221         //private static int updateCount = 0;
     245        // private static int updateCount = 0;
    222246
    223247        /**
     
    229253         */
    230254        public void notifyObservers(boolean bRecalculate) {
    231                 if(bRecalculate){
     255                if (bRecalculate) {
    232256                        recalculate();
    233257                }
     
    241265                Collection<FrameObserver> observersCopy = new LinkedList<FrameObserver>(
    242266                                _observers);
    243                 //System.out.println(++updateCount + " update");
     267                // System.out.println(++updateCount + " update");
    244268
    245269                for (FrameObserver fl : observersCopy) {
     
    15081532                                getNextItemID());
    15091533
    1510                 Item template = getTemplate(UserSettings.DotTemplate,
    1511                                 ItemUtils.TAG_DOT_TEMPLATE);
     1534                Item template = getTemplate(_dotTemplate, ItemUtils.TAG_DOT_TEMPLATE);
    15121535                float thickness = template.getThickness();
    15131536                if (thickness > 0)
Note: See TracChangeset for help on using the changeset viewer.