]> git.basschouten.com Git - openhab-addons.git/blob
df09f78fb79c7d79b61bb9da44b63a6c75275893
[openhab-addons.git] /
1 /**
2  * Copyright 2017-2018 Gregory Moyer and contributors.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *     http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 package org.openhab.binding.lametrictime.api.model;
17
18 import java.io.File;
19 import java.net.URI;
20 import java.nio.file.Path;
21
22 import org.openhab.binding.lametrictime.api.impl.DataIcon;
23 import org.openhab.binding.lametrictime.api.impl.FileIcon;
24 import org.openhab.binding.lametrictime.api.impl.HTTPIcon;
25 import org.openhab.binding.lametrictime.api.impl.KeyIcon;
26
27 public class Icons
28 {
29     public static Icon key(String key)
30     {
31         return new KeyIcon(key);
32     }
33
34     public static Icon http(String uri)
35     {
36         return http(URI.create(uri));
37     }
38
39     public static Icon http(URI uri)
40     {
41         return new HTTPIcon(uri);
42     }
43
44     public static Icon path(Path path)
45     {
46         return new FileIcon(path);
47     }
48
49     public static Icon file(File file)
50     {
51         return new FileIcon(file);
52     }
53
54     public static Icon data(String mimeType, byte[] data)
55     {
56         return new DataIcon(mimeType, data);
57     }
58
59     // @formatter:off
60     public static Icon dollar() { return key("i34"); }
61     public static Icon gmail() { return key("i43"); }
62     public static Icon confirm() { return key("i59"); }
63     public static Icon goOut() { return key("a68"); }
64     public static Icon dog() { return key("a76"); }
65     public static Icon clock() { return key("a82"); }
66     public static Icon smile() { return key("a87"); }
67     public static Icon lightning() { return key("i95"); }
68     public static Icon facebook() { return key("a128"); }
69     public static Icon home() { return key("i96"); }
70     public static Icon girl() { return key("a178"); }
71     public static Icon stop() { return key("i184"); }
72     public static Icon heart() { return key("a230"); }
73     public static Icon fade() { return key("a273"); }
74     public static Icon terminal() { return key("a315"); }
75     public static Icon usa() { return key("a413"); }
76     public static Icon switzerland() { return key("i469"); }
77     public static Icon attention() { return key("i555"); }
78     public static Icon theMatrix() { return key("a653"); }
79     public static Icon pizza() { return key("i1324"); }
80     public static Icon christmasTree() { return key("a1782"); }
81     public static Icon night() { return key("a2285"); }
82     public static Icon fireworks() { return key("a2867"); }
83     public static Icon beer() { return key("i3253"); }
84     public static Icon tetris() { return key("a3793"); }
85     public static Icon halloween() { return key("a4033"); }
86     public static Icon pacman() { return key("a4584"); }
87
88     private Icons() {}
89     // @formatter:on
90 }