Andreas Gampe | 5cb8998 | 2016-11-28 13:15:10 -0800 | [diff] [blame] | 1 | package com.android.preload.ui; |
| 2 | |
| 3 | import com.android.ddmlib.Client; |
| 4 | import java.io.File; |
| 5 | import java.util.List; |
| 6 | import javax.swing.Action; |
| 7 | import javax.swing.ListModel; |
| 8 | import 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 | */ |
| 14 | public interface IUI { |
| 15 | |
| 16 | void prepare(ListModel<Client> clientListModel, TableModel dataTableModel, |
| 17 | List<Action> actions); |
| 18 | |
| 19 | void ready(); |
| 20 | |
Andreas Gampe | 3bf65c9 | 2016-11-28 15:06:35 -0800 | [diff] [blame] | 21 | boolean isSingleThreaded(); |
| 22 | |
Andreas Gampe | 5cb8998 | 2016-11-28 13:15:10 -0800 | [diff] [blame] | 23 | 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 | } |