src/codeandchords/ModuleMenu.java
public void colorWheelEvent(int id, Color color)
	{
//		System.out.println("ModuleMenu: got colorWheelEvent with id " + id + " and color array " + color);

		// Either do everything once for the currentInput or do it for all inputs:

		int	colorPos;
		int	colorPosStartHere;
		int	colorPosEndHere;

		// if from ColorSelect or canvasColorSelect:
		if(( id >= this.firstColorSelectCWId && id < (this.firstColorSelectCWId + this.colorSelect.length ) ) 
				|| (id == this.canvasColorSelectId) )
		{
			colorPos	= id - this.firstColorSelectCWId;
		} else if(id >= this.firstSpecialColorsCWId && id < (this.firstSpecialColorsCWId + this.specialColorsPos[0].length))
		{
			// if from specialColors:
			colorPos	= this.specialColorsPos[this.currentInput][id - this.firstSpecialColorsCWId];
		} else {
			throw new IllegalArgumentException("ModuleMenu.colorWheelEvent: CW with id " + id + " is not from colorSelect or specialColors;" + 
					"firstColorSelectCWID = " + this.firstColorSelectCWId + ".");
		}

		/*
		protected	final	int[][]	scaleDegreeColors	= new int[][] {
		// major:
		new int[] { 0, 0, 1, 2, 2, 3, 4, 4, 4, 5, 6, 6 },
		// minor:
		new int[] { 0, 0, 1, 2, 2, 3, 4, 4, 5, 5, 6, 6 },
		// chromatic:
		new int[] { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 }
	}; // scaleDegreeColors

	// Put them each in little arrays of { colorPosStartHere, colorPosEndHere }
		 */

		// Set the appropriate colors:
		for(int i = this.startHere; i < this.endBeforeThis; i++)
		{
			// canvas color (does not affect notes):
			if( ( id % 100 ) == ( this.canvasColorSelectId % 100 ) )
			{
				this.canvasColor[0]	= color.getRed();
				this.canvasColor[1]	= color.getGreen();
				this.canvasColor[2]	= color.getBlue();

				// Ensures that the shape doesn't have to fade to this color if the amp is below the threshold:
				if(this.nowBelow[i])
				{
					this.curHue[i][0]	= color.getRed();
					this.curHue[i][1]	= color.getGreen();
					this.curHue[i][2]	= color.getBlue();
				}
			} else {
				// colors that are not canvasColor:		
				colorPosStartHere	= colorPosStartEnd[this.majMinChrom][colorPos][0];
				colorPosEndHere		= colorPosStartEnd[this.majMinChrom][colorPos][1];


				for(int j = colorPosStartHere; j < (colorPosEndHere + 1); j++)
				{
					this.colors[i][j][0]	= color.getRed();
					this.colors[i][j][1]	= color.getGreen();
					this.colors[i][j][2]	= color.getBlue();
				}
			} // else - not canvas// Set the colorStyle if we got something from specialColors:

		} // for

		// If from specialColors CW, make sure that colorStyle gets updated:
		if(id >= this.firstSpecialColorsCWId && id < (this.firstSpecialColorsCWId + this.specialColorsPos[0].length))
		{
			// if from specialColors:
			for(int i = this.startHere; i < this.endBeforeThis; i++)
			{
				this.setColorStyle(this.curColorStyle[i], i);
			}
		} // specialColors

	}
/**
	 * Called from MenuTemplate for ColorWheels that were added by the addColorWheelGroup() method and are 
	 * connected to a Button and CWTextfield (MenuTemplate has already updated the Textfield value).
	 */
Called from MenuTemplate for ColorWheels that were added by the addColorWheelGroup() method and are
connected to a Button and CWTextfield (MenuTemplate has already updated the Textfield value).
Called from MenuTemplate for ColorWheels that were added by the addColorWheelGroup () method and are connected to a Button and CWTextfield ( MenuTemplate has already updated the Textfield value ) .
public void colorWheelEvent(int id, Color color)
	{
		int	colorPos;
		int	colorPosStartHere;
		int	colorPosEndHere;
		if(( id >= this.firstColorSelectCWId && id < (this.firstColorSelectCWId + this.colorSelect.length ) ) 
				|| (id == this.canvasColorSelectId) )
		{
			colorPos	= id - this.firstColorSelectCWId;
		} else if(id >= this.firstSpecialColorsCWId && id < (this.firstSpecialColorsCWId + this.specialColorsPos[0].length))
		{
			colorPos	= this.specialColorsPos[this.currentInput][id - this.firstSpecialColorsCWId];
		} else {
			throw new IllegalArgumentException("ModuleMenu.colorWheelEvent: CW with id " + id + " is not from colorSelect or specialColors;" + 
					"firstColorSelectCWID = " + this.firstColorSelectCWId + ".");
		}
		/*
		protected	final	int[][]	scaleDegreeColors	= new int[][] {
		// major:
		new int[] { 0, 0, 1, 2, 2, 3, 4, 4, 4, 5, 6, 6 },
		// minor:
		new int[] { 0, 0, 1, 2, 2, 3, 4, 4, 5, 5, 6, 6 },
		// chromatic:
		new int[] { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 }
	}; // scaleDegreeColors
	// Put them each in little arrays of { colorPosStartHere, colorPosEndHere }
		 */
		for(int i = this.startHere; i < this.endBeforeThis; i++)
		{
			if( ( id % 100 ) == ( this.canvasColorSelectId % 100 ) )
			{
				this.canvasColor[0]	= color.getRed();
				this.canvasColor[1]	= color.getGreen();
				this.canvasColor[2]	= color.getBlue();
				if(this.nowBelow[i])
				{
					this.curHue[i][0]	= color.getRed();
					this.curHue[i][1]	= color.getGreen();
					this.curHue[i][2]	= color.getBlue();
				}
			} else {
				colorPosStartHere	= colorPosStartEnd[this.majMinChrom][colorPos][0];
				colorPosEndHere		= colorPosStartEnd[this.majMinChrom][colorPos][1];
				for(int j = colorPosStartHere; j < (colorPosEndHere + 1); j++)
				{
					this.colors[i][j][0]	= color.getRed();
					this.colors[i][j][1]	= color.getGreen();
					this.colors[i][j][2]	= color.getBlue();
				}
			} 
		} 
		if(id >= this.firstSpecialColorsCWId && id < (this.firstSpecialColorsCWId + this.specialColorsPos[0].length))
		{
			for(int i = this.startHere; i < this.endBeforeThis; i++)
			{
				this.setColorStyle(this.curColorStyle[i], i);
			}
		} 
	}
public void colorWheelEvent ( int id , Color color ) { int colorPos ; int colorPosStartHere ; int colorPosEndHere ; if ( ( id >= this . firstColorSelectCWId && id < ( this . firstColorSelectCWId + this . colorSelect . length ) ) || ( id == this . canvasColorSelectId ) ) { colorPos = id - this . firstColorSelectCWId ; } else if ( id >= this . firstSpecialColorsCWId && id < ( this . firstSpecialColorsCWId + this . specialColorsPos [ 0 ] . length ) ) { colorPos = this . specialColorsPos [ this . currentInput ] [ id - this . firstSpecialColorsCWId ] ; } else { throw new IllegalArgumentException ( "ModuleMenu.colorWheelEvent: CW with id " + id + " is not from colorSelect or specialColors;" + "firstColorSelectCWID = " + this . firstColorSelectCWId + "." ) ; } /*
		protected	final	int[][]	scaleDegreeColors	= new int[][] {
		// major:
		new int[] { 0, 0, 1, 2, 2, 3, 4, 4, 4, 5, 6, 6 },
		// minor:
		new int[] { 0, 0, 1, 2, 2, 3, 4, 4, 5, 5, 6, 6 },
		// chromatic:
		new int[] { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 }
	}; // scaleDegreeColors

	// Put them each in little arrays of { colorPosStartHere, colorPosEndHere }
		 */ for ( int i = this . startHere ; i < this . endBeforeThis ; i ++ ) { if ( ( id % 100 ) == ( this . canvasColorSelectId % 100 ) ) { this . canvasColor [ 0 ] = color . getRed ( ) ; this . canvasColor [ 1 ] = color . getGreen ( ) ; this . canvasColor [ 2 ] = color . getBlue ( ) ; if ( this . nowBelow [ i ] ) { this . curHue [ i ] [ 0 ] = color . getRed ( ) ; this . curHue [ i ] [ 1 ] = color . getGreen ( ) ; this . curHue [ i ] [ 2 ] = color . getBlue ( ) ; } } else { colorPosStartHere = colorPosStartEnd [ this . majMinChrom ] [ colorPos ] [ 0 ] ; colorPosEndHere = colorPosStartEnd [ this . majMinChrom ] [ colorPos ] [ 1 ] ; for ( int j = colorPosStartHere ; j < ( colorPosEndHere + 1 ) ; j ++ ) { this . colors [ i ] [ j ] [ 0 ] = color . getRed ( ) ; this . colors [ i ] [ j ] [ 1 ] = color . getGreen ( ) ; this . colors [ i ] [ j ] [ 2 ] = color . getBlue ( ) ; } } } if ( id >= this . firstSpecialColorsCWId && id < ( this . firstSpecialColorsCWId + this . specialColorsPos [ 0 ] . length ) ) { for ( int i = this . startHere ; i < this . endBeforeThis ; i ++ ) { this . setColorStyle ( this . curColorStyle [ i ] , i ) ; } } }
Called from MenuTemplate for ColorWheels that were added by the addColorWheelGroup() method and are
 connected to a Button and CWTextfield (MenuTemplate has already updated the Textfield value).
Called from MenuTemplate for ColorWheels that were added by the addColorWheelGroup () method and are connected to a Button and CWTextfield ( MenuTemplate has already updated the Textfield value ) .
//		System.out.println("ModuleMenu: got colorWheelEvent with id " + id + " and color array " + color); // Either do everything once for the currentInput or do it for all inputs: // if from ColorSelect or canvasColorSelect: // if from specialColors: // Set the appropriate colors: // canvas color (does not affect notes): // Ensures that the shape doesn't have to fade to this color if the amp is below the threshold: // colors that are not canvasColor:		 // else - not canvas// Set the colorStyle if we got something from specialColors: // for // If from specialColors CW, make sure that colorStyle gets updated: // if from specialColors: // specialColors