1 14 package org.compiere.swing; 15 16 import java.awt.Component ; 17 18 import javax.swing.ComboBoxEditor ; 19 import javax.swing.JTextField ; 20 21 28 public class CFieldEditor extends JTextField implements ComboBoxEditor  29 { 30 33 public CFieldEditor() 34 { 35 } 36 37 41 public Component getEditorComponent() 42 { 43 return this; 44 } 46 50 public void setItem (Object anObject) 51 { 52 if (anObject == null) 53 setText(""); 54 else 55 setText(anObject.toString()); 56 } 58 62 public Object getItem() 63 { 64 return getText(); 65 } 67 71 public Object getFormat() 72 { 73 return null; 74 } 76 } | Popular Tags |