private void addInsideAFieldLayoutExamples() {
		add(new WHeading(HeadingLevel.H3, "WCheckBoxSelect inside a WFieldLayout"));
		add(new ExplanatoryText("When a WCheckBoxSelect is inside a WField its label is exposed in a way which appears and behaves like a regular "
				+ "HTML label. This allows WCheckBoxSelects to be used in a layout with simple form controls (such as WTextField) and produce a "
				+ "consistent and predicatable interface. The third example in this set uses a null label and a toolTip to hide the labelling "
				+ "element. This can lead to user confusion and is not recommended."));
		WFieldLayout layout = new WFieldLayout();
		layout.setLabelWidth(25);
		add(layout);
		String[] options = new String[]{"Dog", "Cat", "Bird", "Turtle"};
		WCheckBoxSelect select = new WCheckBoxSelect(options);
		layout.addField("Select some animals", select);
		String[] options2 = new String[]{"Parrot", "Galah", "Cockatoo", "Lyre"};

		select = new WCheckBoxSelect(options2);
		layout.addField("Select some birds", select);
		select.setFrameless(true);

		// a tooltip can be used as a label stand-in even in a WField
		String[] options3 = new String[]{"Carrot", "Beet", "Brocolli", "Bacon - the perfect vegetable"};
		select = new WCheckBoxSelect(options3);
		layout.addField((WLabel) null, select);
		select.setToolTip("Veggies");

		select = new WCheckBoxSelect("australian_state");
		layout.addField("Select a state", select).getLabel().setHint("This is an ajax trigger");
		add(new WAjaxControl(select, layout));
	}
private void addInsideAFieldLayoutExamples ( ) { add ( new WHeading ( HeadingLevel . H3 , "WCheckBoxSelect inside a WFieldLayout" ) ) ; add ( new ExplanatoryText ( "When a WCheckBoxSelect is inside a WField its label is exposed in a way which appears and behaves like a regular " + "HTML label. This allows WCheckBoxSelects to be used in a layout with simple form controls (such as WTextField) and produce a " + "consistent and predicatable interface. The third example in this set uses a null label and a toolTip to hide the labelling " + "element. This can lead to user confusion and is not recommended." ) ) ; WFieldLayout layout = new WFieldLayout ( ) ; layout . setLabelWidth ( 25 ) ; add ( layout ) ; String [ ] options = new String [ ] { "Dog" , "Cat" , "Bird" , "Turtle" } ; WCheckBoxSelect select = new WCheckBoxSelect ( options ) ; layout . addField ( "Select some animals" , select ) ; String [ ] options2 = new String [ ] { "Parrot" , "Galah" , "Cockatoo" , "Lyre" } ; select = new WCheckBoxSelect ( options2 ) ; layout . addField ( "Select some birds" , select ) ; select . setFrameless ( true ) ; String [ ] options3 = new String [ ] { "Carrot" , "Beet" , "Brocolli" , "Bacon - the perfect vegetable" } ; select = new WCheckBoxSelect ( options3 ) ; layout . addField ( ( WLabel ) null , select ) ; select . setToolTip ( "Veggies" ) ; select = new WCheckBoxSelect ( "australian_state" ) ; layout . addField ( "Select a state" , select ) . getLabel ( ) . setHint ( "This is an ajax trigger" ) ; add ( new WAjaxControl ( select , layout ) ) ; }
When a WCheckBoxSelect is added to a WFieldLayout the legend is moved. The first CheckBoxSelect has a frame, the
second doesn't