public boolean stateCollapse(State state) {
		if (currentStep != COLLAPSE_STATES) {
			outOfOrder();
			return false;
		}
		if (automaton.getInitialState() == state) {
			JOptionPane.showMessageDialog(frame,
					"The initial state cannot be removed!",
					"Initial State Selected", JOptionPane.ERROR_MESSAGE);
			return false;
		}
		if (automaton.getFinalStates()[0] == state) {
			JOptionPane.showMessageDialog(frame,
					"The final state cannot be removed!",
					"Final State Selected", JOptionPane.ERROR_MESSAGE);
			return false;
		}
		collapseState = state;
		drawer.clearSelected();
		drawer.addSelected(collapseState);
		transitionWindow = new TransitionWindow(this);
		transitionWindow.setTransitions(FSAToRegularExpressionConverter.getTransitionsForRemoveState(
				state, automaton));
		transitionWindow.setVisible(true);
		// transitionWindow.show();
		return true;
	}