blob: 9371463e9a790eb40aa9ebbf5134d11b743e35e5 [file] [log] [blame]
Andreas Gampe5cb89982016-11-28 13:15:10 -08001package com.android.preload.ui;
2
3import com.android.ddmlib.Client;
4import java.io.File;
5import java.util.List;
6import javax.swing.Action;
7import javax.swing.ListModel;
8import javax.swing.table.TableModel;
9
10/**
11 * UI abstraction for the tool. This allows a graphical mode, command line mode,
12 * or silent mode.
13 */
14public interface IUI {
15
16 void prepare(ListModel<Client> clientListModel, TableModel dataTableModel,
17 List<Action> actions);
18
19 void ready();
20
Andreas Gampe3bf65c92016-11-28 15:06:35 -080021 boolean isSingleThreaded();
22
Andreas Gampe5cb89982016-11-28 13:15:10 -080023 Client getSelectedClient();
24
25 int getSelectedDataTableRow();
26
27 void showWaitDialog();
28
29 void updateWaitDialog(String s);
30
31 void hideWaitDialog();
32
33 void showMessageDialog(String s);
34
35 boolean showConfirmDialog(String title, String message);
36
37 String showInputDialog(String message);
38
39 <T> T showChoiceDialog(String title, String message, T[] choices);
40
41 File showSaveDialog();
42
43 File[] showOpenDialog(boolean multi);
44
45}