KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > calipso > reportgenerator > userinterface > UPStringTextField


1 package com.calipso.reportgenerator.userinterface;
2
3 import javax.swing.text.Document JavaDoc;
4
5 /**
6  * Representa un componente <code>JTextField</code> a incluirse en una instancia
7  * de <code>UPRangePanel</code> o <code>UPValuePanel</code>.
8  * Devuele el texto del componente en un objeto <code>String</code>
9  */

10
11 public class UPStringTextField extends UPTextField {
12
13   public UPStringTextField() {
14   }
15
16   public UPStringTextField(String JavaDoc text) {
17     super(text);
18   }
19
20   public UPStringTextField(int columns) {
21     super(columns);
22   }
23
24   public UPStringTextField(String JavaDoc text, int columns) {
25     super(text, columns);
26   }
27
28   public UPStringTextField(Document JavaDoc doc, String JavaDoc text, int columns) {
29     super(doc, text, columns);
30   }
31
32   public boolean isLessThan(UPTextField upTextField) {
33     String JavaDoc text = super.getText();
34     if(text.compareToIgnoreCase(upTextField.getComponentValue().toString()) > 0) {
35       return false;
36     }
37     return true;
38   }
39
40   public Object JavaDoc getComponentValue() {
41     return super.getText();
42   }
43 }
44
Popular Tags