SDL_Android/SmartDeviceLinkAndroidProxy - added the correct version of the proxy
[profile/ivi/smartdevicelink.git] / SDL_Android / SmartDeviceLinkProxyAndroid / src / com / smartdevicelink / proxy / rpc / TextField.java
index 33a5c40..6802081 100755 (executable)
-//
-// Copyright (c) 2013 Ford Motor Company
-//
-package com.smartdevicelink.proxy.rpc;
-
-import java.util.Hashtable;
-
-import com.smartdevicelink.proxy.RPCStruct;
-import com.smartdevicelink.proxy.constants.Names;
-import com.smartdevicelink.proxy.rpc.enums.CharacterSet;
-import com.smartdevicelink.proxy.rpc.enums.TextFieldName;
-import com.smartdevicelink.util.DebugTool;
-
-public class TextField extends RPCStruct {
-
-    public TextField() { }
-    public TextField(Hashtable hash) {
-        super(hash);
-    }
-    public TextFieldName getName() {
-        Object obj = store.get(Names.name);
-        if (obj instanceof TextFieldName) {
-            return (TextFieldName) obj;
-        } else if (obj instanceof String) {
-            TextFieldName theCode = null;
-            try {
-                theCode = TextFieldName.valueForString((String) obj);
-            } catch (Exception e) {
-               DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + Names.name, e);
-            }
-            return theCode;
-        }
-        return null;
-    }
-    public void setName( TextFieldName name ) {
-        if (name != null) {
-            store.put(Names.name, name );
-        }
-    }
-    public CharacterSet getCharacterSet() {
-        Object obj = store.get(Names.characterSet);
-        if (obj instanceof CharacterSet) {
-            return (CharacterSet) obj;
-        } else if (obj instanceof String) {
-            CharacterSet theCode = null;
-            try {
-                theCode = CharacterSet.valueForString((String) obj);
-            } catch (Exception e) {
-               DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + Names.characterSet, e);
-            }
-            return theCode;
-        }
-        return null;
-    }
-    public void setCharacterSet( CharacterSet characterSet ) {
-        if (characterSet != null) {
-            store.put(Names.characterSet, characterSet );
-        }
-    }
-    public Integer getWidth() {
-        return (Integer) store.get( Names.width );
-    }
-    public void setWidth( Integer width ) {
-        if (width != null) {
-            store.put(Names.width, width );
-        }
-    }
-    public Integer getRows() {
-        return (Integer) store.get( Names.rows );
-    }
-    public void setRows( Integer rows ) {
-        if (rows != null) {
-            store.put(Names.rows, rows );
-        }
-    }
-}
+package com.smartdevicelink.proxy.rpc;\r
+\r
+import java.util.Hashtable;\r
+\r
+import com.smartdevicelink.proxy.RPCStruct;\r
+import com.smartdevicelink.proxy.constants.Names;\r
+import com.smartdevicelink.proxy.rpc.enums.CharacterSet;\r
+import com.smartdevicelink.proxy.rpc.enums.TextFieldName;\r
+import com.smartdevicelink.util.DebugTool;\r
+\r
+/**\r
+ * Struct defining the characteristics of a displayed field on the HMI.\r
+ * <p><b> Parameter List\r
+ * <table border="1" rules="all">\r
+ *             <tr>\r
+ *                     <th>Name</th>\r
+ *                     <th>Type</th>\r
+ *                     <th>Description</th>\r
+ *                     <th>SmartDeviceLink Ver. Available</th>\r
+ *             </tr>\r
+ *             <tr>\r
+ *                     <td>name</td>\r
+ *                     <td>TextFieldName</td>\r
+ *                     <td>Enumeration identifying the field.  </td>\r
+ *                     <td>SmartDeviceLink 1.0</td>\r
+ *             </tr>\r
+ *             <tr>\r
+ *                     <td>characterSet</td>\r
+ *                     <td>CharacterSet</td>\r
+ *                     <td>The character set that is supported in this field.  </td>\r
+ *                     <td>SmartDeviceLink 1.0</td>\r
+ *             </tr>\r
+ *             <tr>\r
+ *                     <td>width</td>\r
+ *                     <td>Int16</td>\r
+ *                     <td>The number of characters in one row of this field.\r
+ *                                     <ul>\r
+ *                                     <li>Minvalue="1"</li>\r
+ *                                     <li>maxvalue="500"</li>\r
+ *                                     </ul>\r
+ *                     </td>\r
+ *                     <td>SmartDeviceLink 1.0</td>\r
+ *             </tr>\r
+ *             <tr>\r
+ *                     <td>rows</td>\r
+ *                     <td>Int16</td>\r
+ *                     <td>The number of rows for this text field.\r
+ *                                     <ul>\r
+ *                                     <li>Minvalue="1"</li>\r
+ *                                     <li>maxvalue="3"</li>\r
+ *                                     </ul>\r
+ *                     </td>\r
+ *                     <td>SmartDeviceLink 1.0</td>\r
+ *             </tr>\r
+ *  </table>\r
+ * @since SmartDeviceLink 1.0\r
+ */\r
+public class TextField extends RPCStruct {\r
+       /**\r
+        * Constructs a newly allocated TextField object\r
+        */\r
+    public TextField() { }\r
+    /**\r
+     * Constructs a newly allocated TextField object indicated by the Hashtable parameter\r
+     * @param hash The Hashtable to use\r
+     */    \r
+    public TextField(Hashtable hash) {\r
+        super(hash);\r
+    }\r
+    /**\r
+     * Get the enumeration identifying the field.      \r
+     * @return the name of TextField\r
+     */    \r
+    public TextFieldName getName() {\r
+        Object obj = store.get(Names.name);\r
+        if (obj instanceof TextFieldName) {\r
+            return (TextFieldName) obj;\r
+        } else if (obj instanceof String) {\r
+            TextFieldName theCode = null;\r
+            try {\r
+                theCode = TextFieldName.valueForString((String) obj);\r
+            } catch (Exception e) {\r
+               DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + Names.name, e);\r
+            }\r
+            return theCode;\r
+        }\r
+        return null;\r
+    }\r
+    /**\r
+     * Set the enumeration identifying the field.      \r
+     * @param name the name of TextField\r
+     */    \r
+    public void setName( TextFieldName name ) {\r
+        if (name != null) {\r
+            store.put(Names.name, name );\r
+        }\r
+    }\r
+    /**\r
+     * Get the character set that is supported in this field.\r
+     * @return the character set\r
+     */    \r
+    public CharacterSet getCharacterSet() {\r
+        Object obj = store.get(Names.characterSet);\r
+        if (obj instanceof CharacterSet) {\r
+            return (CharacterSet) obj;\r
+        } else if (obj instanceof String) {\r
+            CharacterSet theCode = null;\r
+            try {\r
+                theCode = CharacterSet.valueForString((String) obj);\r
+            } catch (Exception e) {\r
+               DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + Names.characterSet, e);\r
+            }\r
+            return theCode;\r
+        }\r
+        return null;\r
+    }\r
+    /**\r
+     * Set the character set that is supported in this field.\r
+     * @param characterSet - the character set\r
+     */    \r
+    public void setCharacterSet( CharacterSet characterSet ) {\r
+        if (characterSet != null) {\r
+            store.put(Names.characterSet, characterSet );\r
+        }\r
+    }\r
+    /**\r
+     * Get the number of characters in one row of this field.\r
+     *                                         <ul>\r
+     *                                 <li>Minvalue="1"</li>\r
+     *                                 <li>maxvalue="500"</li>\r
+     *                                 </ul>\r
+     * @return the number of characters in one row of this field\r
+     */    \r
+    public Integer getWidth() {\r
+        return (Integer) store.get( Names.width );\r
+    }\r
+    /**\r
+     * Set the number of characters in one row of this field.\r
+     *                                         <ul>\r
+     *                                 <li>Minvalue="1"</li>\r
+     *                                 <li>maxvalue="500"</li>\r
+     *                                 </ul>\r
+     * @param width  the number of characters in one row of this field\r
+     */    \r
+    public void setWidth( Integer width ) {\r
+        if (width != null) {\r
+            store.put(Names.width, width );\r
+        }\r
+    }\r
+    /**\r
+     *Get the number of rows for this text field.\r
+     *                                         <ul>\r
+     *                                 <li>Minvalue="1"</li>\r
+     *                                 <li>maxvalue="3"</li>\r
+     *                                 </ul>\r
+     * @return  the number of rows for this text field\r
+     */    \r
+    public Integer getRows() {\r
+        return (Integer) store.get( Names.rows );\r
+    }\r
+    public void setRows( Integer rows ) {\r
+        if (rows != null) {\r
+            store.put(Names.rows, rows );\r
+        }\r
+    }\r
+}\r