📄 combolistvaluesbean.java
字号:
/* ComboListValuesBean.java
* Created on Dec 16, 2004
*
* A bean to store the current values.
*/
package com.ibm.samples.comboListBox;
/**
* @author cmjaun
*/
public class ComboListValuesBean {
private String color; // string to hold the value from the combo box
private String[] shape; // an array of Strings to hold the value from the multi-select list box
private String month; // a string to hold the value from the single-select list box
private String selected;
/**
* @return Returns the color.
*/
public String getColor() {
return color;
}
/**
* @param color The color to set.
*/
public void setColor(String color) {
this.color = color;
}
/**
* @return Returns the shape.
*/
public String[] getShape() {
return shape;
}
/**
* @param shape The shape to set.
*/
public void setShape(String[] shape) {
this.shape = shape;
}
/**
* @return Returns the month.
*/
public String getMonth() {
if( month == null) {
month = "Jan";
}
return month;
}
/**
* @param month The month to set.
*/
public void setMonth(String month) {
this.month = month;
}
/**
* Returns the shape array as a String to display on page.
*
* @return Returns the selected.
*/
public String getSelected() {
if( shape != null ) {
for( int i = 0; i < shape.length; i++ ) {
if( i == 0 ) {
selected = shape[i] + " ";
} else {
selected = selected + shape[i] + " ";
}
}
}
return selected;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -