* @param name Name of the form
*/
public VarForm(String name, Translator translator, boolean showMenu, boolean showNavButtons, String height, boolean isAssessable, int cutValue) {
super(name, translator);
showMenuEl = new CheckBoxElement("showmenu.label", showMenu);
addFormElement("showmenu", showMenuEl);
showNavButtonsEl = new CheckBoxElement("shownavbuttons.label", showNavButtons);
addFormElement("shownavbuttons", showNavButtonsEl);
String[] keys = new String[]{ ScormEditController.CONFIG_HEIGHT_AUTO, "460", "480",
"500", "520", "540", "560", "580",
"600", "620", "640", "660", "680",
"700", "720", "730", "760", "780",
"800", "820", "840", "860", "880",
"900", "920", "940", "960", "980",
"1000", "1020", "1040", "1060", "1080",
"1100", "1120", "1140", "1160", "1180",
"1200", "1220", "1240", "1260", "1280",
"1300", "1320", "1340", "1360", "1380" };
String[] values = new String[]{ translator.translate("height.auto"), "460px", "480px",
"500px", "520px", "540px", "560px", "580px",
"600px", "620px", "640px", "660px", "680px",
"700px", "720px", "730px", "760px", "780px",
"800px", "820px", "840px", "860px", "880px",
"900px", "920px", "940px", "960px", "980px",
"1000px", "1020px", "1040px", "1060px", "1080px",
"1100px", "1120px", "1140px", "1160px", "1180px",
"1200px", "1220px", "1240px", "1260px", "1280px",
"1300px", "1320px", "1340px", "1360px", "1380px" };
heightEl = new StaticSingleSelectionElement("height.label", keys, values);
addFormElement("height", heightEl);
// preselect given height. Check first if this height is selectable,
// otherwhise just use the auto height (in case this list is modified somewhen later)
if (Arrays.asList(keys).contains(height)) {
heightEl.select(height, true);
} else {
heightEl.select(ScormEditController.CONFIG_HEIGHT_AUTO, true);
}
isAssessableEl = new CheckBoxElement("assessable.label", isAssessable);
addFormElement("isassessable", isAssessableEl);
cutValueEl = new IntegerElement("cutvalue.label", cutValue);
addFormElement("cutvalue", cutValueEl);