private void stateDraw(int x,int y){
					if(!sedna.getSelected() ||sedna.getSelection(x,y)){ 
						
						if(statefillflag){
							switch(sft){
								case 0: mainBrain.setCellState(x,y,1);viewer.setAState(x,y,1); break;
								case 1:  mainBrain.getCell(x, y).setOption(toolstring[1], opval[1]); break;
								case 2:  mainBrain.getCell(x, y).setParameter(toolstring[1], paramval[1]); break;
								default: mainBrain.setCellState(x,y,1);viewer.setAState(x,y,1); break;}
							}
							else{
								switch(sdt){
									case 0: mainBrain.setCellState(x,y,1);viewer.setAState(x,y,1); break;
									case 1: mainBrain.getCell(x, y).setOption(toolstring[0], opval[0]); break;
									case 2: mainBrain.getCell(x, y).setParameter(toolstring[0], paramval[0]); break;
									default: mainBrain.setCellState(x,y,1);viewer.setAState(x,y,1); break;}
								}
							}
						}