src/codeandchords/MenuTemplate.java
protected Controller[] addColorWheelGroup(int x, int y, int buttonWidth, String buttonLabel, Color color, String tab)
	{
		Button		button;
		ColorWheel	colorWheel;
		Textfield	textfield;

		if(buttonLabel == null) {
			throw new IllegalArgumentException("ModuleTemplate.addColorWheelGroup: String parameter is null.");
		}
		// Add Button:
		button	= this.controlP5.addButton("button" + this.nextButtonId)
				.setPosition(x, y)
				.setWidth(buttonWidth)
				.setLabel(buttonLabel)
				.setId(this.nextButtonId)
				.moveTo(tab);
		button.getCaptionLabel().toUpperCase(false);

		this.nextButtonId = this.nextButtonId + 1;

		colorWheel	= this.controlP5.addColorWheel("colorWheel" + this.nextColorWheelId)
				.setPosition(x, y - 200)
				.setRGB(color.getRGB())
				.setLabelVisible(false)
				.setVisible(false)
				.setId(this.nextColorWheelId)
				.moveTo(tab);

		this.nextColorWheelId = this.nextColorWheelId + 1;					

		textfield	= this.controlP5.addTextfield("textfield" + this.nextCWTextfieldId)
				.setPosition(x + buttonWidth + this.spacer, y)
				.setAutoClear(false)
				.setVisible(false)
				.setText("rgb(" + color.getRed() + ", " + color.getGreen() + ", " + color.getBlue() + ")")
				.setId(this.nextCWTextfieldId)
				.moveTo(tab);
		textfield.getCaptionLabel().setVisible(false);

		this.nextCWTextfieldId = this.nextCWTextfieldId + 1;

		return new Controller[] { button, colorWheel, textfield };
	}
/**
	 * Adds a connected Button, ColorWheel, and Textfield to this.controlP5.
	 * 
	 * @param x	x value of Button and ColorWheel
	 * @param y	y value of Button
	 * @param buttonWidth	width of Button
	 * @param buttonLabel	text to put on the Button
	 * @param color	Color to set the ColorWheel and Textfield ("rgb([red], [green], [blue])")
	 * @param tab	String indicating the tab to which this ColorWheel group will belong
	 */
Adds a connected Button, ColorWheel, and Textfield to this.controlP5.


Adds a connected Button ColorWheel and Textfield to this . controlP5 .
protected Controller[] addColorWheelGroup(int x, int y, int buttonWidth, String buttonLabel, Color color, String tab)
	{
		Button		button;
		ColorWheel	colorWheel;
		Textfield	textfield;
		if(buttonLabel == null) {
			throw new IllegalArgumentException("ModuleTemplate.addColorWheelGroup: String parameter is null.");
		}
		button	= this.controlP5.addButton("button" + this.nextButtonId)
				.setPosition(x, y)
				.setWidth(buttonWidth)
				.setLabel(buttonLabel)
				.setId(this.nextButtonId)
				.moveTo(tab);
		button.getCaptionLabel().toUpperCase(false);
		this.nextButtonId = this.nextButtonId + 1;
		colorWheel	= this.controlP5.addColorWheel("colorWheel" + this.nextColorWheelId)
				.setPosition(x, y - 200)
				.setRGB(color.getRGB())
				.setLabelVisible(false)
				.setVisible(false)
				.setId(this.nextColorWheelId)
				.moveTo(tab);
		this.nextColorWheelId = this.nextColorWheelId + 1;					
		textfield	= this.controlP5.addTextfield("textfield" + this.nextCWTextfieldId)
				.setPosition(x + buttonWidth + this.spacer, y)
				.setAutoClear(false)
				.setVisible(false)
				.setText("rgb(" + color.getRed() + ", " + color.getGreen() + ", " + color.getBlue() + ")")
				.setId(this.nextCWTextfieldId)
				.moveTo(tab);
		textfield.getCaptionLabel().setVisible(false);
		this.nextCWTextfieldId = this.nextCWTextfieldId + 1;
		return new Controller[] { button, colorWheel, textfield };
	}
protected Controller [ ] addColorWheelGroup ( int x , int y , int buttonWidth , String buttonLabel , Color color , String tab ) { Button button ; ColorWheel colorWheel ; Textfield textfield ; if ( buttonLabel == null ) { throw new IllegalArgumentException ( "ModuleTemplate.addColorWheelGroup: String parameter is null." ) ; } button = this . controlP5 . addButton ( "button" + this . nextButtonId ) . setPosition ( x , y ) . setWidth ( buttonWidth ) . setLabel ( buttonLabel ) . setId ( this . nextButtonId ) . moveTo ( tab ) ; button . getCaptionLabel ( ) . toUpperCase ( false ) ; this . nextButtonId = this . nextButtonId + 1 ; colorWheel = this . controlP5 . addColorWheel ( "colorWheel" + this . nextColorWheelId ) . setPosition ( x , y - 200 ) . setRGB ( color . getRGB ( ) ) . setLabelVisible ( false ) . setVisible ( false ) . setId ( this . nextColorWheelId ) . moveTo ( tab ) ; this . nextColorWheelId = this . nextColorWheelId + 1 ; textfield = this . controlP5 . addTextfield ( "textfield" + this . nextCWTextfieldId ) . setPosition ( x + buttonWidth + this . spacer , y ) . setAutoClear ( false ) . setVisible ( false ) . setText ( "rgb(" + color . getRed ( ) + ", " + color . getGreen ( ) + ", " + color . getBlue ( ) + ")" ) . setId ( this . nextCWTextfieldId ) . moveTo ( tab ) ; textfield . getCaptionLabel ( ) . setVisible ( false ) ; this . nextCWTextfieldId = this . nextCWTextfieldId + 1 ; return new Controller [ ] { button , colorWheel , textfield } ; }
Adds a connected Button, ColorWheel, and Textfield to this.controlP5.
Adds a connected Button ColorWheel and Textfield to this . controlP5 .
// Add Button: