-
Bug
-
Resolution: Fixed
-
P5
-
1.1.6
-
beta
-
sparc
-
solaris_2.6
In the return string from TextArea paramString there is a space before the
scrollbarVisibility setting. There should be no space between the different
settings.
paramString return: text1,0,0,0x0,invalid,hidden,disabled,text=paramString test,selection=0-0,rows=0,columns=0, scrollbarVisibility=both
/*
* @(#)paramStringTest.java
*
* TextArea paramString method tests
*/
import java.awt.*;
public class paramStringTest {
public static void main(String[] args) {
String sReturn;
String sGold;
myTextArea tf = new myTextArea("paramString test");
tf.setEditable(false);
tf.setEnabled(false);
tf.setVisible(false);
sGold = new String ((tf.getName()!=null?tf.getName():"") +
"," + tf.getLocation().x + "," + tf.getLocation().y +
"," + tf.getSize().width + "x" + tf.getSize().height +
(tf.isValid()?"":",invalid") +
(tf.isVisible()?"":",hidden") +
(tf.isEnabled()?"":",disabled") +
",text="+tf.getText() +
(tf.isEditable()?",editable":"") +
",selection="+tf.getSelectionStart()+"-"+tf.getSelectionEnd() +
",rows=" + tf.getRows() + ",columns=" + tf.getColumns() +
",scrollbarVisibility=both");
sReturn = tf.paramString();
System.out.println("paramString return: " + sReturn);
System.out.println("Expected: " + sGold);
// check return value
if (sReturn.equals(sGold)) {
System.out.println("Test Passed");
} else {
System.out.println("Test Failed");
}
}
}
class myTextArea extends TextArea {
public myTextArea (){
super();
}
public myTextArea (String text){
super(text);
}
public myTextArea (int rows, int cols){
super(rows, cols);
}
public myTextArea (String text, int rows, int cols){
super(text, rows, cols);
}
public myTextArea (String text, int rows, int cols, int scrollbarVis){
super(text, rows, cols, scrollbarVis);
}
public String paramString(){
return super.paramString();
}
}
scrollbarVisibility setting. There should be no space between the different
settings.
paramString return: text1,0,0,0x0,invalid,hidden,disabled,text=paramString test,selection=0-0,rows=0,columns=0, scrollbarVisibility=both
/*
* @(#)paramStringTest.java
*
* TextArea paramString method tests
*/
import java.awt.*;
public class paramStringTest {
public static void main(String[] args) {
String sReturn;
String sGold;
myTextArea tf = new myTextArea("paramString test");
tf.setEditable(false);
tf.setEnabled(false);
tf.setVisible(false);
sGold = new String ((tf.getName()!=null?tf.getName():"") +
"," + tf.getLocation().x + "," + tf.getLocation().y +
"," + tf.getSize().width + "x" + tf.getSize().height +
(tf.isValid()?"":",invalid") +
(tf.isVisible()?"":",hidden") +
(tf.isEnabled()?"":",disabled") +
",text="+tf.getText() +
(tf.isEditable()?",editable":"") +
",selection="+tf.getSelectionStart()+"-"+tf.getSelectionEnd() +
",rows=" + tf.getRows() + ",columns=" + tf.getColumns() +
",scrollbarVisibility=both");
sReturn = tf.paramString();
System.out.println("paramString return: " + sReturn);
System.out.println("Expected: " + sGold);
// check return value
if (sReturn.equals(sGold)) {
System.out.println("Test Passed");
} else {
System.out.println("Test Failed");
}
}
}
class myTextArea extends TextArea {
public myTextArea (){
super();
}
public myTextArea (String text){
super(text);
}
public myTextArea (int rows, int cols){
super(rows, cols);
}
public myTextArea (String text, int rows, int cols){
super(text, rows, cols);
}
public myTextArea (String text, int rows, int cols, int scrollbarVis){
super(text, rows, cols, scrollbarVis);
}
public String paramString(){
return super.paramString();
}
}