home *** CD-ROM | disk | FTP | other *** search
/ Symantec Visual Cafe for Java 2.5 / symantec-visual-cafe-2.5-database-dev-edition.iso / VCafe / JCLASS.BIN / KLG.JAR / jclass / beans / StringEditor.class (.txt) < prev    next >
Encoding:
Java Class File  |  1997-12-05  |  904 b   |  19 lines

  1. package jclass.beans;
  2.  
  3. import java.beans.PropertyEditorSupport;
  4. import jclass.util.JCUtilConverter;
  5.  
  6. public class StringEditor extends PropertyEditorSupport {
  7.    public void setAsText(String var1) {
  8.       ((PropertyEditorSupport)this).setValue(JCUtilConverter.toNewLine(var1));
  9.    }
  10.  
  11.    public String getAsText() {
  12.       return ((PropertyEditorSupport)this).getValue() == null ? "" : JCUtilConverter.fromNewLine(((PropertyEditorSupport)this).getValue().toString());
  13.    }
  14.  
  15.    public String getJavaInitializationString() {
  16.       return "\"" + this.getAsText() + "\"";
  17.    }
  18. }
  19.