HP Integrity NonStop H-Series User Manual
Page 273
package coreservlets;
import javax.faces.model.*;
import javax.faces.event.*;
import java.io.*;
public class ResumeBean implements Serializable {
private String name = "";
private String jobTitle = "";
private String fgColor = "BLACK";
private String bgColor = "WHITE";
private SelectItem[] availableColorNames =
{ new SelectItem("BLACK"),
new SelectItem("WHITE"),
new SelectItem("SILVER"),
new SelectItem("RED"),
new SelectItem("GREEN"),
new SelectItem("BLUE") };
private SelectItem[] availableColorValues =
{ new SelectItem("#000000"),
new SelectItem("#FFFFFF"),
new SelectItem("#C0C0C0"),
new SelectItem("#FF0000"),
new SelectItem("#00FF00"),
new SelectItem("#0000FF") };
private boolean isColorSupported = true;
private boolean isUsingColorNames = true;
public String getName() { return(name); }
public void setName(String name) {
this.name = name;
}
public String getJobTitle() { return(jobTitle); }
public void setJobTitle(String jobTitle) {
this.jobTitle = jobTitle;
}
public String getFgColor() { return(fgColor); }
public void setFgColor(String fgColor) {
this.fgColor = fgColor;
}
public String getBgColor() { return(bgColor); }
public void setBgColor(String bgColor) {
this.bgColor = bgColor;
}
public SelectItem[] getAvailableColors() {
if (isUsingColorNames) {
return(availableColorNames);
} else {
return(availableColorValues);
}
}
public boolean isColorSupported() { return(isColorSupported); }
public void toggleColorSupport(ActionEvent event) {
isColorSupported = !isColorSupported;
}
Overview of SkinSelector
273