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