Changeset 1388 for trunk


Ignore:
Timestamp:
05/28/19 12:35:48 (5 years ago)
Author:
bln4
Message:

Data is now contained in its own object. Functionally nothing has changed, but perhaps it will be easier to make changes in the future!

Location:
trunk/src/org/expeditee/items
Files:
1 added
1 edited

Legend:

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

    r1377 r1388  
    273273
    274274        private List<String> _actions = null;
    275 
    276         private List<String> _data = null;
    277275         
    278276        private String _formula = null;
     
    310308        protected boolean _filled = true;
    311309       
    312         // NGIKM Attributes
    313         private List<String> _ngikmLabels = new ArrayList<String>();
    314         private List<String> _ngikmKeys = new ArrayList<String>();
     310        private Data _data = new Data();
    315311
    316312        /** Just calls source.duplicateOnto(dest). */
     
    384380
    385381                dest._visible = this._visible;
    386                
    387                 dest._ngikmKeys = new ArrayList<String>(this._ngikmKeys);
    388                 dest._ngikmLabels = new ArrayList<String>(this._ngikmLabels);
    389382
    390383                Frame parent = DisplayController.getCurrentFrame();
     
    652645         *         has been assigned.
    653646         */
    654         public List<String> getAction()
    655         {
     647        public List<String> getAction() {
    656648                return _actions;
    657649        }
    658650
    659         public List<String> getData()
    660         {
    661                 return _data;
    662         }
    663 
    664         public List<String> getActionCursorEnter()
    665         {
     651        public List<String> getData() {
     652                return _data.getData();
     653        }
     654
     655        public List<String> getActionCursorEnter() {
    666656                return _actionCursorEnter;
    667657        }
    668658
    669         public List<String> getActionCursorLeave()
    670         {
     659        public List<String> getActionCursorLeave() {
    671660                return _actionCursorLeave;
    672661        }
    673662
    674         public List<String> getActionEnterFrame()
    675         {
     663        public List<String> getActionEnterFrame() {
    676664                return _actionEnterFrame;
    677665        }
    678666
    679         public List<String> getActionLeaveFrame()
    680         {
     667        public List<String> getActionLeaveFrame() {
    681668                return _actionLeaveFrame;
    682         };
    683 
    684         public boolean getActionMark()
    685         {
     669        }
     670
     671        public boolean getActionMark() {
    686672                return _actionMark;
    687673        }
     
    16531639
    16541640        public void setData(List<String> data) {
    1655                 if (data == null || data.size() == 0)
    1656                         _data = null;
    1657                 else
    1658                         _data = new LinkedList<String>(data);
     1641                _data.setData(data);
    16591642        }
    16601643
    16611644        public void setData(String data) {
    1662                 if (data == null || data.length() == 0)
    1663                         _data = null;
    1664                 else {
    1665                         _data = new LinkedList<String>();
    1666                         _data.add(data);
    1667                 }
     1645                _data.setData(data);
    16681646        }
    16691647
    16701648        public void addToData(String dataItem) {
    1671                 if (dataItem != null) {
    1672                         if (_data == null)
    1673                                 _data = new LinkedList<String>();
    1674                         _data.add(dataItem);
    1675                 }
    1676         }
    1677        
    1678         public boolean hasData(final String dataItem) {
    1679                 if (_data != null && dataItem != null && dataItem.length() > 0) {
    1680                         for (final String d : _data) {
    1681                                 if (d.compareTo(dataItem) == 0) {
    1682                                         return true;
    1683                                 }
    1684                         }
    1685                 }
    1686                 return false;
     1649                _data.addToData(dataItem);
     1650        }
     1651       
     1652        public boolean hasData(String dataItem) {
     1653                return _data.hasData(dataItem);
    16871654        }
    16881655
Note: See TracChangeset for help on using the changeset viewer.