[Ejtools-cvs] CVS: libraries/adwt/src/main/net/sourceforge/ejtools/awt/editors DateTimeEditor.java,1
Brought to you by:
letiemble
From: Laurent E. <let...@us...> - 2002-05-05 20:13:50
|
Update of /cvsroot/ejtools/libraries/adwt/src/main/net/sourceforge/ejtools/awt/editors In directory usw-pr-cvs1:/tmp/cvs-serv8679/adwt/src/main/net/sourceforge/ejtools/awt/editors Modified Files: DateTimeEditor.java NumberEditor.java ObjectNameEditor.java PropertiesEditor.java URLEditor.java Log Message: Add some JavaDocs Index: DateTimeEditor.java =================================================================== RCS file: /cvsroot/ejtools/libraries/adwt/src/main/net/sourceforge/ejtools/awt/editors/DateTimeEditor.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** DateTimeEditor.java 30 Apr 2002 21:06:35 -0000 1.2 --- DateTimeEditor.java 5 May 2002 20:13:45 -0000 1.3 *************** *** 14,33 **** /** ! * Description of the Class * ! * @author letiemble ! * @created 2 janvier 2002 ! * @version $Revision$ ! * @todo Javadoc to complete */ public class DateTimeEditor extends PropertyEditorSupport { ! /** Description of the Field */ protected DateFormat fmts[]; ! /** Description of the Field */ private Date date; ! /** Constructor for the DateEditor object */ public DateTimeEditor() { --- 14,33 ---- /** ! * Description of the Class * ! * @author letiemble ! * @created 2 janvier 2002 ! * @version $Revision$ ! * @todo Javadoc to complete */ public class DateTimeEditor extends PropertyEditorSupport { ! /** Description of the Field */ protected DateFormat fmts[]; ! /** Description of the Field */ private Date date; ! /** Constructor for the DateEditor object */ public DateTimeEditor() { *************** *** 42,123 **** /** ! * Sets the asText attribute of the DateEditor object * ! * @param s The new asText value */ ! public void setAsText(String s) { ! if (s.equals("")) { ! date = null; ! return; } ! String s1 = null; ! for (int i = 0; i < fmts.length; i++) { ! try ! { ! date = fmts[i].parse(s); ! firePropertyChange(); ! return; ! } ! catch (ParseException parseexception) ! { ! s1 = parseexception.getMessage(); ! } } - - throw new IllegalArgumentException(s1); } /** ! * Sets the value attribute of the DateEditor object * ! * @param obj The new value value */ ! public void setValue(Object obj) { ! date = (Date) obj; } /** ! * Gets the asText attribute of the DateEditor object * ! * @return The asText value */ ! public String getAsText() { ! if (date != null) ! { ! return fmts[0].format(date); ! } ! else ! { ! return ""; ! } } /** ! * Gets the javaInitializationString attribute of the DateEditor object * ! * @return The javaInitializationString value */ ! public String getJavaInitializationString() { ! return "null"; } /** ! * Gets the value attribute of the DateEditor object * ! * @return The value value */ ! public Object getValue() { ! return date; } } --- 42,123 ---- /** ! * Gets the asText attribute of the DateEditor object * ! * @return The asText value */ ! public String getAsText() { ! if (date != null) { ! return fmts[0].format(date); } ! else { ! return ""; } } /** ! * Gets the javaInitializationString attribute of the DateEditor object * ! * @return The javaInitializationString value */ ! public String getJavaInitializationString() { ! return "null"; } /** ! * Gets the value attribute of the DateEditor object * ! * @return The value value */ ! public Object getValue() { ! return date; } /** ! * Sets the asText attribute of the DateEditor object * ! * @param s The new asText value */ ! public void setAsText(String s) { ! if (s.equals("")) ! { ! date = null; ! return; ! } ! String s1 = null; ! for (int i = 0; i < fmts.length; i++) ! { ! try ! { ! date = fmts[i].parse(s); ! firePropertyChange(); ! return; ! } ! catch (ParseException parseexception) ! { ! s1 = parseexception.getMessage(); ! } ! } ! ! throw new IllegalArgumentException(s1); } /** ! * Sets the value attribute of the DateEditor object * ! * @param obj The new value value */ ! public void setValue(Object obj) { ! date = (Date) obj; } } Index: NumberEditor.java =================================================================== RCS file: /cvsroot/ejtools/libraries/adwt/src/main/net/sourceforge/ejtools/awt/editors/NumberEditor.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** NumberEditor.java 30 Apr 2002 21:06:35 -0000 1.2 --- NumberEditor.java 5 May 2002 20:13:45 -0000 1.3 *************** *** 10,29 **** /** ! * Description of the Class * ! * @author letiemble ! * @created 6 avril 2002 ! * @version $Revision$ ! * @todo Javadoc to complete */ public class NumberEditor extends PropertyEditorSupport { ! /** Description of the Field */ protected Class clazz = Integer.class; ! /** Description of the Field */ protected Object value; ! /** Constructor */ public NumberEditor() { --- 10,29 ---- /** ! * Description of the Class * ! * @author letiemble ! * @created 6 avril 2002 ! * @version $Revision$ ! * @todo Javadoc to complete */ public class NumberEditor extends PropertyEditorSupport { ! /** Description of the Field */ protected Class clazz = Integer.class; ! /** Description of the Field */ protected Object value; ! /** Constructor */ public NumberEditor() { *************** *** 33,39 **** /** ! * Setter for the asText attribute * ! * @param s The new value */ public void setAsText(String s) --- 33,61 ---- /** ! * Getter for the asText attribute * ! * @return The value ! */ ! public String getAsText() ! { ! return value.toString(); ! } ! ! ! /** ! * Getter for the value attribute ! * ! * @return The value ! */ ! public Object getValue() ! { ! return value; ! } ! ! ! /** ! * Setter for the asText attribute ! * ! * @param s The new value */ public void setAsText(String s) *************** *** 86,92 **** /** ! * Setter for the value attribute * ! * @param obj The new value */ public void setValue(Object obj) --- 108,114 ---- /** ! * Setter for the value attribute * ! * @param obj The new value */ public void setValue(Object obj) *************** *** 95,120 **** clazz = obj.getClass(); firePropertyChange(); - } - - - /** - * Getter for the asText attribute - * - * @return The value - */ - public String getAsText() - { - return value.toString(); - } - - - /** - * Getter for the value attribute - * - * @return The value - */ - public Object getValue() - { - return value; } } --- 117,120 ---- Index: ObjectNameEditor.java =================================================================== RCS file: /cvsroot/ejtools/libraries/adwt/src/main/net/sourceforge/ejtools/awt/editors/ObjectNameEditor.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** ObjectNameEditor.java 30 Apr 2002 21:06:35 -0000 1.2 --- ObjectNameEditor.java 5 May 2002 20:13:45 -0000 1.3 *************** *** 24,49 **** /** ! * Description of the Class * ! * @author letiemble ! * @created 6 avril 2002 ! * @version $Revision$ ! * @todo Javadoc to complete */ public class ObjectNameEditor extends PropertyEditorSupport { ! /** Description of the Field */ ! protected static ImageIcon icon = new ImageIcon(ObjectNameEditor.class.getResource("/toolbarButtonGraphics/general/Bookmarks16.gif")); ! /** Description of the Field */ protected JButton button; ! /** Description of the Field */ protected JPanel panel; ! /** Description of the Field */ protected JTextField text; ! /** Description of the Field */ protected Object value; ! /** Constructor */ public ObjectNameEditor() { --- 24,49 ---- /** ! * Description of the Class * ! * @author letiemble ! * @created 6 avril 2002 ! * @version $Revision$ ! * @todo Javadoc to complete */ public class ObjectNameEditor extends PropertyEditorSupport { ! /** Description of the Field */ protected JButton button; ! /** Description of the Field */ protected JPanel panel; ! /** Description of the Field */ protected JTextField text; ! /** Description of the Field */ protected Object value; + /** Description of the Field */ + protected static ImageIcon icon = new ImageIcon(ObjectNameEditor.class.getResource("/toolbarButtonGraphics/general/Bookmarks16.gif")); ! /** Constructor */ public ObjectNameEditor() { *************** *** 82,153 **** /** ! * Setter for the asText attribute * ! * @param s The new value */ ! public void setAsText(String s) { ! try ! { ! value = new ObjectName(s); ! } ! catch (Exception e) ! { ! } ! text.setText(value.toString()); ! firePropertyChange(); } /** ! * Setter for the value attribute * ! * @param obj The new value */ ! public void setValue(Object obj) { ! value = obj; ! text.setText(value.toString()); ! firePropertyChange(); } /** ! * Getter for the asText attribute * ! * @return The value */ ! public String getAsText() { ! return value.toString(); } /** ! * Gets the customEditor attribute of the ObjectNameEditor object * ! * @return The customEditor value */ ! public Component getCustomEditor() { ! return panel; } /** ! * Getter for the value attribute * ! * @return The value */ ! public Object getValue() { ! return value; } /** ! * Description of the Method * ! * @return Description of the Return Value */ public boolean supportsCustomEditor() --- 82,153 ---- /** ! * Getter for the asText attribute * ! * @return The value */ ! public String getAsText() { ! return value.toString(); } /** ! * Gets the customEditor attribute of the ObjectNameEditor object * ! * @return The customEditor value */ ! public Component getCustomEditor() { ! return panel; } /** ! * Getter for the value attribute * ! * @return The value */ ! public Object getValue() { ! return value; } /** ! * Setter for the asText attribute * ! * @param s The new value */ ! public void setAsText(String s) { ! try ! { ! value = new ObjectName(s); ! } ! catch (Exception e) ! { ! } ! text.setText(value.toString()); ! firePropertyChange(); } /** ! * Setter for the value attribute * ! * @param obj The new value */ ! public void setValue(Object obj) { ! value = obj; ! text.setText(value.toString()); ! firePropertyChange(); } /** ! * Description of the Method * ! * @return Description of the Return Value */ public boolean supportsCustomEditor() Index: PropertiesEditor.java =================================================================== RCS file: /cvsroot/ejtools/libraries/adwt/src/main/net/sourceforge/ejtools/awt/editors/PropertiesEditor.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** PropertiesEditor.java 30 Apr 2002 21:06:35 -0000 1.2 --- PropertiesEditor.java 5 May 2002 20:13:45 -0000 1.3 *************** *** 14,32 **** /** ! *Description of the Class * ! * @author letiemble ! * @created 19 octobre 2001 ! * @version $Revision$ ! * @todo Javadoc to complete */ public class PropertiesEditor extends PropertyEditorSupport { ! /** Description of the Field */ protected Object value; ! /**Constructor for the PropertiesEditor object */ public PropertiesEditor() { --- 14,32 ---- /** ! * Description of the Class * ! * @author letiemble ! * @created 19 octobre 2001 ! * @version $Revision$ ! * @todo Javadoc to complete */ public class PropertiesEditor extends PropertyEditorSupport { ! /** Description of the Field */ protected Object value; ! /** Constructor for the PropertiesEditor object */ public PropertiesEditor() { *************** *** 36,97 **** /** ! * Setter for the asText attribute * ! * @param s The new value for asText attribute */ ! public void setAsText(String s) { ! firePropertyChange(); } /** ! * Setter for the value attribute * ! * @param obj The new value for value attribute */ ! public void setValue(Object obj) { ! firePropertyChange(); } /** ! * Getter for the asText attribute * ! * @return The value of asText attribute */ ! public String getAsText() { ! return value.toString(); } /** ! * Getter for the customEditor attribute * ! * @return The value of customEditor attribute */ ! public Component getCustomEditor() { ! return new PropertiesView(); } /** ! *Gets the value attribute of the FileEditor object * ! * @return The value value */ ! public Object getValue() { ! return value; } /** ! *Description of the Method * ! * @return Description of the Returned Value */ public boolean supportsCustomEditor() --- 36,97 ---- /** ! * Getter for the asText attribute * ! * @return The value of asText attribute */ ! public String getAsText() { ! return value.toString(); } /** ! * Getter for the customEditor attribute * ! * @return The value of customEditor attribute */ ! public Component getCustomEditor() { ! return new PropertiesView(); } /** ! * Gets the value attribute of the FileEditor object * ! * @return The value value */ ! public Object getValue() { ! return value; } /** ! * Setter for the asText attribute * ! * @param s The new value for asText attribute */ ! public void setAsText(String s) { ! firePropertyChange(); } /** ! * Setter for the value attribute * ! * @param obj The new value for value attribute */ ! public void setValue(Object obj) { ! firePropertyChange(); } /** ! * Description of the Method * ! * @return Description of the Returned Value */ public boolean supportsCustomEditor() *************** *** 102,109 **** /** ! *Description of the Class * ! * @author letiembl ! * @created 19 octobre 2001 */ class PropertiesView extends JTable --- 102,109 ---- /** ! * Description of the Class * ! * @author letiembl ! * @created 19 octobre 2001 */ class PropertiesView extends JTable Index: URLEditor.java =================================================================== RCS file: /cvsroot/ejtools/libraries/adwt/src/main/net/sourceforge/ejtools/awt/editors/URLEditor.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** URLEditor.java 30 Apr 2002 21:06:35 -0000 1.2 --- URLEditor.java 5 May 2002 20:13:45 -0000 1.3 *************** *** 11,82 **** /** ! * Description of the Class * ! * @author letiemble ! * @created 6 avril 2002 ! * @version $Revision$ ! * @todo Javadoc to complete */ public class URLEditor extends PropertyEditorSupport { ! /** Description of the Field */ protected Object value; ! /** Constructor */ ! public URLEditor() ! { ! } /** ! * Setter for the asText attribute * ! * @param s The new value */ ! public void setAsText(String s) { ! try ! { ! value = new URL(s); ! } ! catch (Exception e) ! { ! } ! firePropertyChange(); } /** ! * Setter for the value attribute * ! * @param obj The new value */ ! public void setValue(Object obj) { ! value = obj; ! firePropertyChange(); } /** ! * Getter for the asText attribute * ! * @return The value */ ! public String getAsText() { ! return value.toString(); } /** ! * Getter for the value attribute * ! * @return The value */ ! public Object getValue() { ! return value; } } --- 11,80 ---- /** ! * Description of the Class * ! * @author letiemble ! * @created 6 avril 2002 ! * @version $Revision$ ! * @todo Javadoc to complete */ public class URLEditor extends PropertyEditorSupport { ! /** Description of the Field */ protected Object value; ! /** Constructor */ ! public URLEditor() { } /** ! * Getter for the asText attribute * ! * @return The value */ ! public String getAsText() { ! return value.toString(); } /** ! * Getter for the value attribute * ! * @return The value */ ! public Object getValue() { ! return value; } /** ! * Setter for the asText attribute * ! * @param s The new value */ ! public void setAsText(String s) { ! try ! { ! value = new URL(s); ! } ! catch (Exception e) ! { ! } ! firePropertyChange(); } /** ! * Setter for the value attribute * ! * @param obj The new value */ ! public void setValue(Object obj) { ! value = obj; ! firePropertyChange(); } } |