blob: 20c9a1e3a0bf99437f2927ddacf9fb82002c8373 (
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
|
package com.smartdevicelink.proxy.rpc;
import java.util.Hashtable;
import com.smartdevicelink.proxy.RPCStruct;
import com.smartdevicelink.proxy.constants.Names;
import com.smartdevicelink.util.DebugTool;
public class VrHelpItem extends RPCStruct {
public VrHelpItem() { }
public VrHelpItem(Hashtable hash) {
super(hash);
}
public void setText(String text) {
if (text != null) {
store.put(Names.text, text);
} else {
store.remove(Names.text);
}
}
public String getText() {
return (String) store.get(Names.text);
}
public void setImage(Image image) {
if (image != null) {
store.put(Names.image, image);
} else {
store.remove(Names.image);
}
}
public Image getImage() {
Object obj = store.get(Names.image);
if (obj instanceof Image) {
return (Image) obj;
} else if (obj instanceof Hashtable) {
try {
return new Image((Hashtable) obj);
} catch (Exception e) {
DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + Names.image, e);
}
}
return null;
}
public void setPosition(Integer position) {
if (position != null) {
store.put(Names.position, position);
} else {
store.remove(Names.position);
}
}
public Integer getPosition() {
return (Integer) store.get(Names.position);
}
}
|