summaryrefslogtreecommitdiffstats
path: root/src/com/itmill/toolkit/terminal/Terminal.java
blob: 573130dee43a3d40ba5e4463c592aec102e8010a (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
55
56
57
58
59
60
61
62
63
/* 
@ITMillApache2LicenseForJavaFiles@
 */

package com.itmill.toolkit.terminal;

/**
 * Interface for different terminal types.
 * 
 * @author IT Mill Ltd.
 * @version
 * @VERSION@
 * @since 3.0
 */
public interface Terminal {

    /**
     * Gets the name of the default theme.
     * 
     * @return the Name of the terminal window.
     */
    public String getDefaultTheme();

    /**
     * Gets the width of the terminal window in pixels.
     * 
     * @return the Width of the terminal window.
     */
    public int getScreenWidth();

    /**
     * Gets the height of the terminal window in pixels.
     * 
     * @return the Height of the terminal window.
     */
    public int getScreenHeight();

    /**
     * Terminal error event.
     */
    public interface ErrorEvent {

        /**
         * Gets the contained throwable.
         */
        public Throwable getThrowable();

    }

    /**
     * Terminal error listener interface.
     */
    public interface ErrorListener {

        /**
         * Invoked when terminal error occurs.
         * 
         * @param event
         *                the fired event.
         */
        public void terminalError(Terminal.ErrorEvent event);
    }
}