Ignore:
Timestamp:
08/08/08 10:33:15 (16 years ago)
Author:
ra33
Message:

Added functionality allowing users to do PieCharts, also charts now listen for changes on the dataFrame and refresh when needed

File:
1 edited

Legend:

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

    r198 r199  
    198198        public void setChanged(boolean value) {
    199199                // System.out.println(getName() + " " + value);
     200                boolean oldValue = _change;
     201               
     202                if(oldValue == value)
     203                        return;
     204               
    200205                _change = value;
    201206
    202207                if (_change) {
     208                        //Notify the frame listeners that the frame has changed
     209                        for(FrameListener fl: _listeners){
     210                                fl.change();
     211                        }
     212                       
    203213                        setBufferValid(false);
    204214                        _saved = false;
     
    288298                        }
    289299                }
    290                 if(removeTitle){
     300                if (removeTitle) {
    291301                        items.remove(getTitleItem());
    292302                }
     
    17611771                                        String value = "";
    17621772                                        if (text.length() > 1 + i) {
    1763                                                 value = text.substring(i + 1).trim().toLowerCase();
     1773                                                value = text.substring(i + 1).trim();
    17641774                                        }
    17651775                                        item.setProcessedText(new String[] { attribute, value });
     
    17841794        }
    17851795
     1796        /**
     1797         * Returns the annotation value in full case.
     1798         *
     1799         * @param annotation
     1800         *            the annotation to retrieve the value of.
     1801         * @return the annotation item value in full case or null if the annotation
     1802         *         is not on the frame or has no value.
     1803         */
    17861804        public String getAnnotationValue(String annotation) {
    17871805                if (_annotations == null)
     
    17991817
    18001818        Map<String, Text> _annotations = null;
     1819
     1820        private Collection<FrameListener> _listeners = new LinkedList<FrameListener>();
    18011821
    18021822        public void clearAnnotations() {
     
    19261946                }
    19271947        }
     1948
     1949        public void removeListener(FrameListener listener) {
     1950                _listeners.remove(listener);
     1951        }
     1952       
     1953        public void addListener(FrameListener listener) {
     1954                _listeners.add(listener);
     1955        }
    19281956}
Note: See TracChangeset for help on using the changeset viewer.