⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 combolistvaluesbean.java

📁 IBM RSA下的JSF开发示例
💻 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 + -