ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/i-scream/projects/cms/source/conient/uk/org/iscream/cms/conient/datacomponents/StringDataComponent.java
(Generate patch)

Comparing projects/cms/source/conient/uk/org/iscream/cms/conient/datacomponents/StringDataComponent.java (file contents):
Revision 1.14 by ajm, Thu Mar 15 01:05:46 2001 UTC vs.
Revision 1.15 by ajm, Sun Mar 18 14:43:39 2001 UTC

# Line 6 | Line 6 | import javax.swing.JLabel;
6   import javax.swing.JTextField;
7   import java.awt.GridLayout;
8   import javax.swing.SwingUtilities;
9 + import uk.org.iscream.util.XMLPacket;
10  
11   /**
12   * This is the most basic of DataComponents.
# Line 63 | Line 64 | public class StringDataComponent extends VisibleDataCo
64       * run this method.
65       */
66      public void run() {
67 <        _item.setText(_cache);
67 >        _item.setText(_cache);
68      }
69      
70      /**
# Line 81 | Line 82 | public class StringDataComponent extends VisibleDataCo
82   //---ACCESSOR/MUTATOR METHODS---
83  
84      /**
85 <     * This takes the String value of the parameter that this component
85 <     * is monitoring direct from the packet, it then performs all
85 >     * This takes the packet to obtain the value from, it then performs all
86       * approriate conversions and adds this class to the Swing Event
87       * Dispatching queue.
88       *
89 <     * @param value the value for this data component
89 >     * @param packet the XMLPacket to get the data from
90       * @throws DataFormatException if there was a problem converting the data for display
91       */
92 <    public void setValue(String value) throws DataFormatException {
92 >    public void setValue(XMLPacket packet) throws DataFormatException {
93 >        String value = packet.getParam(_attribute);
94          try {
95              if(!_cache.equals(value)) {
96                  _cache = value;
# Line 138 | Line 139 | public class StringDataComponent extends VisibleDataCo
139      protected JLabel _label;
140      
141      /**
142 <     * Remebers what the last value was, so we
142 >     * Remembers what the last value was, so we
143       * only update if we have to.
144       */    
145 <    String _cache = "";
145 >    protected String _cache = "";
146      
147      /**
148       * The length of the JTextField

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines