blob: c82b4c4813c9b6996891221d971b4f969b93feb5 (
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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
|
package com.smartdevicelink.proxy.rpc;
import androidx.annotation.NonNull;
import com.smartdevicelink.proxy.RPCStruct;
import java.util.Hashtable;
/**
* Used to set an alternate template layout to a window.
* @since 6.0
*/
public class TemplateConfiguration extends RPCStruct {
public static final String KEY_TEMPLATE = "template";
public static final String KEY_DAY_COLOR_SCHEME = "dayColorScheme";
public static final String KEY_NIGHT_COLOR_SCHEME = "nightColorScheme";
/**
* Constructs a new TemplateConfiguration object
* @param template Predefined or dynamically created window template.
* Currently only predefined window template layouts are defined.
*/
public TemplateConfiguration(@NonNull String template) {
this();
setTemplate(template);
}
/**
* Constructs a new TemplateConfiguration object indicated by the Hashtable
* parameter
*
* @param hash The Hashtable to use
*/
public TemplateConfiguration(Hashtable<String, Object> hash) {
super(hash);
}
/**
* Constructs a new TemplateConfiguration object
*/
public TemplateConfiguration() {
}
/**
* Gets the template.
*
* @return String -an Predefined or dynamically created window template. Currently only predefined window template layouts are defined.
*/
public String getTemplate() {
return getString(KEY_TEMPLATE);
}
/**
* Sets the template. It can be Predefined or dynamically created window template. Currently only predefined window template layouts are defined.
*
* @param template Predefined or dynamically created window template. Currently only predefined window template layouts are defined.
*/
public void setTemplate(@NonNull String template) {
setValue(KEY_TEMPLATE, template);
}
/**
* Gets the dayColorScheme.
*
* @return TemplateColorScheme
*/
@SuppressWarnings("unchecked")
public TemplateColorScheme getDayColorScheme() {
return (TemplateColorScheme) getObject(TemplateColorScheme.class, KEY_DAY_COLOR_SCHEME);
}
/**
* Sets the dayColorScheme.
*
* @param dayColorScheme TemplateColorScheme for the day
*/
public void setDayColorScheme(TemplateColorScheme dayColorScheme) {
setValue(KEY_DAY_COLOR_SCHEME, dayColorScheme);
}
/**
* Gets the nightColorScheme.
*
* @return TemplateColorScheme
*/
@SuppressWarnings("unchecked")
public TemplateColorScheme getNightColorScheme() {
return (TemplateColorScheme) getObject(TemplateColorScheme.class, KEY_NIGHT_COLOR_SCHEME);
}
/**
* Sets the nightColorScheme.
*
* @param nightColorScheme TemplateColorScheme for the night
*/
public void setNightColorScheme(TemplateColorScheme nightColorScheme) {
setValue(KEY_NIGHT_COLOR_SCHEME, nightColorScheme);
}
}
|