Commit | Line | Data |
---|---|---|
df8de03f KL |
1 | /** |
2 | * Jexer - Java Text User Interface | |
3 | * | |
4 | * Version: $Id$ | |
5 | * | |
6 | * Author: Kevin Lamonte, <a href="mailto:kevin.lamonte@gmail.com">kevin.lamonte@gmail.com</a> | |
7 | * | |
8 | * License: LGPLv3 or later | |
9 | * | |
10 | * Copyright: This module is licensed under the GNU Lesser General | |
11 | * Public License Version 3. Please see the file "COPYING" in this | |
12 | * directory for more information about the GNU Lesser General Public | |
13 | * License Version 3. | |
14 | * | |
15 | * Copyright (C) 2015 Kevin Lamonte | |
16 | * | |
17 | * This program is free software; you can redistribute it and/or | |
18 | * modify it under the terms of the GNU Lesser General Public License | |
19 | * as published by the Free Software Foundation; either version 3 of | |
20 | * the License, or (at your option) any later version. | |
21 | * | |
22 | * This program is distributed in the hope that it will be useful, but | |
23 | * WITHOUT ANY WARRANTY; without even the implied warranty of | |
24 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
25 | * General Public License for more details. | |
26 | * | |
27 | * You should have received a copy of the GNU Lesser General Public | |
28 | * License along with this program; if not, see | |
29 | * http://www.gnu.org/licenses/, or write to the Free Software | |
30 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA | |
31 | * 02110-1301 USA | |
32 | */ | |
33 | package jexer.session; | |
34 | ||
35 | /** | |
36 | * TSessionInfo provides a default session implementation. The username is | |
37 | * blank, language is "en_US", with a 80x24 text window. | |
38 | */ | |
39 | public class TSessionInfo implements SessionInfo { | |
40 | ||
41 | /** | |
42 | * User name | |
43 | */ | |
44 | private String username = ""; | |
45 | ||
46 | /** | |
47 | * Language | |
48 | */ | |
49 | private String language = "en_US"; | |
50 | ||
51 | /** | |
52 | * Text window width | |
53 | */ | |
54 | private int windowWidth = 80; | |
55 | ||
56 | /** | |
57 | * Text window height | |
58 | */ | |
59 | private int windowHeight = 24; | |
60 | ||
61 | /** | |
62 | * Username getter | |
63 | * | |
64 | * @return the username | |
65 | */ | |
66 | public String getUsername() { | |
67 | return this.username; | |
68 | } | |
69 | ||
70 | /** | |
71 | * Username setter | |
72 | * | |
73 | * @param username the value | |
74 | */ | |
75 | public void setUsername(String username) { | |
76 | this.username = username; | |
77 | } | |
78 | ||
79 | /** | |
80 | * Language getter | |
81 | * | |
82 | * @return the language | |
83 | */ | |
84 | public String getLanguage() { | |
85 | return this.language; | |
86 | } | |
87 | ||
88 | /** | |
89 | * Language setter | |
90 | * | |
91 | * @param language the value | |
92 | */ | |
93 | public void setLanguage(String language) { | |
94 | this.language = language; | |
95 | } | |
96 | ||
97 | /** | |
98 | * Text window width getter | |
c8496dac KL |
99 | * |
100 | * @return the window width | |
df8de03f KL |
101 | */ |
102 | public int getWindowWidth() { | |
103 | return windowWidth; | |
104 | } | |
105 | ||
106 | /** | |
107 | * Text window height getter | |
c8496dac KL |
108 | * |
109 | * @return the window height | |
df8de03f KL |
110 | */ |
111 | public int getWindowHeight() { | |
112 | return windowHeight; | |
113 | } | |
c8496dac KL |
114 | |
115 | /** | |
116 | * Re-query the text window size | |
117 | */ | |
118 | public void queryWindowSize() { | |
119 | // NOP | |
120 | } | |
121 | ||
df8de03f | 122 | } |