private void respondToMouseClick(int x, int y, int button) {
		actionPainter.clearActions();
		if (x < leftMargin || x > rightMargin || 
			y < topMargin || y > bottomMargin) {
			System.out.println("Click outside boundaries: " + x + ", " + y);
		} else {
			x = x - leftMargin;
			y = y - topMargin;
			int xSquare = x / CELL_SIZE;
			int ySquare = y / CELL_SIZE;
			Point p = new Point(xSquare, ySquare);
			List<Action> acts = actions.getActions(p);
			if (acts != null && acts.size() > 0) {
				if (button == MouseEvent.BUTTON1) {
					for (Action a : acts) {
						if (a.getType() == DEFAULT_ACTION) {
							performAction(a);
							return;
						}
					}
				}			
				showActionMenu(acts, x, y);
			}
		}
	}