Thread: [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-04-30 21:06:38
|
Update of /cvsroot/ejtools/libraries/adwt/src/main/net/sourceforge/ejtools/awt/editors In directory usw-pr-cvs1:/tmp/cvs-serv3195/libraries/adwt/src/main/net/sourceforge/ejtools/awt/editors Modified Files: DateTimeEditor.java NumberEditor.java ObjectNameEditor.java PropertiesEditor.java URLEditor.java Log Message: Pretty print source code Index: DateTimeEditor.java =================================================================== RCS file: /cvsroot/ejtools/libraries/adwt/src/main/net/sourceforge/ejtools/awt/editors/DateTimeEditor.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** DateTimeEditor.java 18 Apr 2002 21:09:59 -0000 1.1 --- DateTimeEditor.java 30 Apr 2002 21:06:35 -0000 1.2 *************** *** 16,21 **** * Description of the Class * ! * @author letiembl * @created 2 janvier 2002 */ public class DateTimeEditor extends PropertyEditorSupport --- 16,23 ---- * Description of the Class * ! * @author letiemble * @created 2 janvier 2002 + * @version $Revision$ + * @todo Javadoc to complete */ public class DateTimeEditor extends PropertyEditorSupport Index: NumberEditor.java =================================================================== RCS file: /cvsroot/ejtools/libraries/adwt/src/main/net/sourceforge/ejtools/awt/editors/NumberEditor.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** NumberEditor.java 18 Apr 2002 21:09:59 -0000 1.1 --- NumberEditor.java 30 Apr 2002 21:06:35 -0000 1.2 *************** *** 8,19 **** import java.beans.PropertyEditorSupport; - import java.math.BigDecimal; - import java.math.BigInteger; /** * Description of the Class * ! * @author laurent * @created 6 avril 2002 */ public class NumberEditor extends PropertyEditorSupport --- 8,19 ---- import java.beans.PropertyEditorSupport; /** * Description of the Class * ! * @author letiemble * @created 6 avril 2002 + * @version $Revision$ + * @todo Javadoc to complete */ public class NumberEditor extends PropertyEditorSupport Index: ObjectNameEditor.java =================================================================== RCS file: /cvsroot/ejtools/libraries/adwt/src/main/net/sourceforge/ejtools/awt/editors/ObjectNameEditor.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** ObjectNameEditor.java 18 Apr 2002 21:09:59 -0000 1.1 --- ObjectNameEditor.java 30 Apr 2002 21:06:35 -0000 1.2 *************** *** 1,16 **** /* ! * EJT, the Enterprise Java Tools * ! * Distributable under LGPL license. ! * See terms of license at www.gnu.org. */ package net.sourceforge.ejtools.awt.editors; import java.awt.Component; - import java.awt.GridBagConstraints; - import java.awt.GridBagLayout; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.beans.PropertyEditorSupport; import javax.management.ObjectName; import javax.swing.Box; --- 1,15 ---- /* ! * EJT, the Enterprise Java Tools * ! * Distributable under LGPL license. ! * See terms of license at www.gnu.org. */ package net.sourceforge.ejtools.awt.editors; import java.awt.Component; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.beans.PropertyEditorSupport; + import javax.management.ObjectName; import javax.swing.Box; *************** *** 21,36 **** import javax.swing.JTextField; import javax.swing.SwingUtilities; - import net.sourceforge.ejtools.jmx.ObjectNameFinder; /** * Description of the Class * ! * @author laurent * @created 6 avril 2002 */ public class ObjectNameEditor extends PropertyEditorSupport { /** Description of the Field */ protected JButton button; /** Description of the Field */ --- 20,39 ---- import javax.swing.JTextField; import javax.swing.SwingUtilities; + import net.sourceforge.ejtools.jmx.ObjectNameFinder; /** * 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 */ *************** *** 40,45 **** /** Description of the Field */ protected Object value; - /** Description of the Field */ - protected static ImageIcon icon = new ImageIcon(ObjectNameEditor.class.getResource("/toolbarButtonGraphics/general/Bookmarks16.gif")); --- 43,46 ---- *************** *** 81,145 **** /** ! * 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(); } --- 82,146 ---- /** ! * 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; } Index: PropertiesEditor.java =================================================================== RCS file: /cvsroot/ejtools/libraries/adwt/src/main/net/sourceforge/ejtools/awt/editors/PropertiesEditor.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** PropertiesEditor.java 18 Apr 2002 21:09:59 -0000 1.1 --- PropertiesEditor.java 30 Apr 2002 21:06:35 -0000 1.2 *************** *** 7,75 **** package net.sourceforge.ejtools.awt.editors; - import java.beans.PropertyEditorSupport; import java.awt.Component; import java.util.Properties; import javax.swing.JTable; - import javax.swing.table.AbstractTableModel; /** *Description of the Class * ! * @author letiembl * @created 19 octobre 2001 */ ! public class PropertiesEditor extends PropertyEditorSupport { ! protected Object value; - public PropertiesEditor() { - value = new Properties(); - } ! public void setAsText(String s) { ! firePropertyChange(); ! } - public void setValue(Object obj) { - firePropertyChange(); - } ! public String getAsText() { ! return value.toString(); ! } - 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() { ! return true; ! } ! /** ! *Description of the Class ! * ! * @author letiembl ! * @created 19 octobre 2001 ! */ ! class PropertiesView extends JTable { ! } } --- 7,113 ---- package net.sourceforge.ejtools.awt.editors; import java.awt.Component; + import java.beans.PropertyEditorSupport; import java.util.Properties; + import javax.swing.JTable; /** *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() ! { ! value = new Properties(); ! } ! /** ! * 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() ! { ! return true; ! } ! ! ! /** ! *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.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** URLEditor.java 18 Apr 2002 21:09:59 -0000 1.1 --- URLEditor.java 30 Apr 2002 21:06:35 -0000 1.2 *************** *** 1,7 **** /* ! * EJT, the Enterprise Java Tools * ! * Distributable under LGPL license. ! * See terms of license at www.gnu.org. */ package net.sourceforge.ejtools.awt.editors; --- 1,7 ---- /* ! * EJT, the Enterprise Java Tools * ! * Distributable under LGPL license. ! * See terms of license at www.gnu.org. */ package net.sourceforge.ejtools.awt.editors; *************** *** 13,18 **** * Description of the Class * ! * @author laurent * @created 6 avril 2002 */ public class URLEditor extends PropertyEditorSupport --- 13,20 ---- * Description of the Class * ! * @author letiemble * @created 6 avril 2002 + * @version $Revision$ + * @todo Javadoc to complete */ public class URLEditor extends PropertyEditorSupport *************** *** 23,48 **** /** 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; } --- 25,30 ---- /** Constructor */ ! public URLEditor() { } *************** *** 75,78 **** --- 57,82 ---- 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; } } |