summaryrefslogtreecommitdiff
path: root/src/net/tuschhcm/routercontrol/ui/UserInterface.java
blob: 465028875fed042add870b489b9b10df09d00df5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
package net.tuschhcm.routercontrol.ui;

/**
 * Interface specification for the view.
 */
public interface UserInterface {
    /**
     * Tell the user interface about a preset.
     * 
     * @param number Preset number
     * @param name Preset name
     */
    public void addPreset(final int number, final String name);
    
    /**
     * Set the action handler called when a preset is selected.
     * @param action
     */
    public void setPresetSelectionAction(final Action action);
    
    /**
     * @return the selected preset.
     */
    public int getSelectedPreset();
    
    /**
     * Handle toggling the control lock
     */
    public void setToggleControlLockAction(final Action action);

    /**
     * Get the status of the control lock.
     * @return true if the lock is enabled.
     */
    public boolean getControlLockStatus();

    /**
     * Set the control lock status on the UI.
     * @param enabled true to set the controls lock.
     */
    public void setControlLockStatus(boolean enabled);
    
    /**
     * Start the user interface.
     */
    public void run();
    
    /**
     * Interface specification for an action handler.
     */
    public interface Action {
        public void onAction();
    }
}