Ignore:
Timestamp:
08/29/08 08:17:54 (16 years ago)
Author:
ra33
Message:
 
Location:
trunk/src/org/expeditee/items
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/expeditee/items/Item.java

    r284 r286  
    192192                dest._overlay = source._overlay;
    193193                dest._mode = source._mode;// SelectedMode.None;
     194                //dest._highlightColor = source._highlightColor;
     195                //dest.setHighlight(source.getHighlight());
     196               
    194197                dest._visible = source._visible;
    195198                Frame parent = source.getParentOrCurrentFrame();
     
    234237
    235238        private int _id;
     239
     240        private Item _editTarget = this;
    236241
    237242        private String _creationDate = null;
     
    18311836
    18321837        public int setHighlightColor(Color c) {
     1838                if (!this.isVisible() && this.hasVector()) {
     1839                        for (Item i : this.getParentOrCurrentFrame().getVectorItems()) {
     1840                                if (i.getEditTarget() == this) {
     1841                                        i.setHighlightColor(c);
     1842                                }
     1843                        }
     1844                }
    18331845
    18341846                _highlightThickness = DEFAULT_HIGHLIGHT_THICKNESS;
     
    18901902        public void setHighlightMode(HighlightMode mode, Color color) {
    18911903                setHighlightColor(color);
    1892                 if (hasPermission(Permission.followLinks)) {
     1904                if (hasPermission(Permission.followLinks)
     1905                                || getEditTarget().hasPermission(Permission.followLinks)) {
    18931906                        if (_mode != mode) {
    18941907                                _mode = mode;
     
    26662679                }
    26672680        }
     2681
     2682        /**
     2683         * Sets the item to be pickup when the user attempts to pick this item up.
     2684         * EditTarget has a value of 'this' by default but may be set to other
     2685         * values if this item is on a vector.
     2686         *
     2687         * @param target
     2688         *            the item to be copied or picked up when the user attempts to
     2689         *            edit this item.
     2690         */
     2691        public void setEditTarget(Item target) {
     2692                _editTarget = target;
     2693        }
     2694
     2695        public Item getEditTarget() {
     2696                return _editTarget;
     2697        }
    26682698}
  • trunk/src/org/expeditee/items/ItemUtils.java

    r247 r286  
    457457
    458458                for (Item i : toCopy) {
    459 
     459                        //Dont copy parts of a vector
     460                        if(!i.hasPermission(Permission.copy))
     461                                continue;
     462                       
    460463                        // BROOK
    461464                        if (i instanceof WidgetCorner) { // dont add these
  • trunk/src/org/expeditee/items/Text.java

    r282 r286  
    275275
    276276        public void setAttributeValue(String value) {
    277 
     277                AttributeValuePair avp = new AttributeValuePair(getText(),false);
     278                avp.setValue(value);
     279                setText(avp.toString());
    278280        }
    279281
  • trunk/src/org/expeditee/items/widgets/DataFrameWidget.java

    r228 r286  
    11package org.expeditee.items.widgets;
    22
     3import java.awt.Color;
     4import java.awt.Graphics;
    35import java.util.Collection;
    46import java.util.HashSet;
    57
    68import javax.swing.JComponent;
    7 import javax.swing.JPanel;
    89
    910import org.expeditee.gui.Frame;
     
    131132                }
    132133        }
    133        
    134         //STUFF FROM HEAVY_DUTY_INTERACTIVE_WIDGET CLASS
    135        
    136 //      @Override
    137 //      public int getLoadDelayTime() {
    138 //              // TODO Auto-generated method stub
    139 //              return 0;
    140 //      }
    141 //
    142 //      @Override
    143 //      protected float loadWidgetData() {
    144 //              // TODO Auto-generated method stub
    145 //              return 0;
    146 //      }
    147 //
    148 //      @Override
    149 //      protected void saveWidgetData() {
    150 //              // TODO Auto-generated method stub
    151 //             
    152 //      }
    153 //
    154 //      @Override
    155 //      protected void tempUnloadWidgetData() {
    156 //              // TODO Auto-generated method stub
    157 //             
    158 //      }
    159 //
    160 //      @Override
    161 //      protected void unloadWidgetData() {
    162 //              // TODO Auto-generated method stub
    163 //             
    164 //      }
    165 //
    166 //      public boolean doesNeedSaving() {
    167 //              // TODO Auto-generated method stub
    168 //              return false;
    169 //      }
    170 //
    171 //      public String getSaveName() {
    172 //              // TODO Auto-generated method stub
    173 //              return null;
    174 //      }
     134
     135        protected void paintInFreeSpace(Graphics g) {
     136                super.paintInFreeSpace(g);
     137                g.setFont(((Text)getSource()).getFont());
     138                g.setColor(Color.WHITE);
     139                g.drawString(this.getClass().getSimpleName(), getX() + 10, getY() + 20);
     140
     141        }
    175142}
  • trunk/src/org/expeditee/items/widgets/InteractiveWidget.java

    r282 r286  
    1919import javax.swing.SwingUtilities;
    2020
    21 import org.expeditee.gui.AttributeUtils;
     21import org.expeditee.actions.Actions;
    2222import org.expeditee.gui.Browser;
    2323import org.expeditee.gui.DisplayIO;
     
    184184                String classname = tokens[0];
    185185                if (classname.charAt(0) == '$')
    186                         classname = "org.expeditee.items.widgets." + classname.substring(1);
     186                        classname = Actions.getClassName(classname.substring(1));
    187187                // Attempt to locate the class using reflection
    188188                Class<?> iwclass = findIWidgetClass(classname);
  • trunk/src/org/expeditee/items/widgets/charts/TimeSeries.java

    r284 r286  
    211211                                .length()) {
    212212                        df = new SimpleDateFormat(FrameKeyboardActions.LONG_DATE_FORMAT);
    213                 } else {
     213                } else if (dateString.length() <= FrameKeyboardActions.TIME_DATE_FORMAT.length()) {
     214                        df = new SimpleDateFormat(FrameKeyboardActions.TIME_DATE_FORMAT);
     215                }else {
    214216                        df = new SimpleDateFormat(FrameKeyboardActions.SHORT_DATE_FORMAT);
    215217                }
Note: See TracChangeset for help on using the changeset viewer.