1 /***
2 * Ambient - A music player for the Android platform
3 Copyright (C) 2007 Martin Vysny
4
5 This program is free software: you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation, either version 3 of the License, or
8 (at your option) any later version.
9
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
14
15 You should have received a copy of the GNU General Public License
16 along with this program. If not, see <http://www.gnu.org/licenses/>.
17 */
18
19 package sk.baka.ambient.activity.main;
20
21 import java.util.Arrays;
22 import java.util.List;
23
24 import android.graphics.Point;
25
26 import sk.baka.ambient.ActionsEnum;
27 import sk.baka.ambient.R;
28 import sk.baka.ambient.views.ButtonBar;
29
30 /***
31 * Controls the three window buttons.
32 *
33 * @author Martin Vysny
34 */
35 public final class WindowButtonsController extends AbstractController {
36 /***
37 * Creates the controller
38 *
39 * @param mainActivity
40 * the activity
41 */
42 public WindowButtonsController(MainActivity mainActivity) {
43 super(R.id.mainButtons, mainActivity);
44 final List<ActionsEnum> actions = Arrays.asList(ActionsEnum.About,
45 ActionsEnum.Minimize, ActionsEnum.Quit);
46 final ButtonBar bar = (ButtonBar) mainView;
47 bar.setBitmaps(new int[] { R.drawable.button_i,
48 R.drawable.button_minimize, R.drawable.button_close }, null,
49 new Point(30, 19), new Point(45, 28));
50 bar.setTag(actions);
51 bar.listener = listener;
52 }
53
54 @Override
55 protected void performZoom(boolean zoom) {
56
57 }
58 }