Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
GrxUIonEclipse-project-0.9.8
src
com
generalrobotix
ui
util
IconProperties.java
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2008, AIST, the University of Tokyo and General Robotix Inc.
3
* All rights reserved. This program is made available under the terms of the
4
* Eclipse Public License v1.0 which accompanies this distribution, and is
5
* available at http://www.eclipse.org/legal/epl-v10.html
6
* Contributors:
7
* General Robotix Inc.
8
* National Institute of Advanced Industrial Science and Technology (AIST)
9
*/
10
package
com.generalrobotix.ui.util;
11
12
import
java.util.*;
13
import
java.net.*;
14
import
javax.swing.ImageIcon;
15
16
public
class
IconProperties
{
17
protected
static
IconProperties
this_
;
18
protected
static
ResourceBundle
resource_
;
19
20
public
static
final
int
WIDTH
= 27;
21
public
static
final
int
HEIGHT
= 27;
22
23
private
IconProperties
() {
24
resource_ = ResourceBundle.getBundle(
"resources.icon"
);
25
}
26
27
public
static
ImageIcon
get
(String key) {
28
if
(this_ ==
null
) {
29
this_ =
new
IconProperties
();
30
}
31
32
String str = resource_.getString(key);
33
if
(str.equals(
"none"
)) {
34
return
new
ImageIcon();
35
}
else
{
36
URL url =
IconProperties
.class.getResource(str);
37
if
(url ==
null
) {
38
return
new
ImageIcon();
39
}
40
return
new
ImageIcon(url);
41
}
42
}
43
}
44
com.generalrobotix.ui.util.IconProperties.WIDTH
static final int WIDTH
Definition:
IconProperties.java:20
null
#define null
our own NULL pointer
Definition:
IceTypes.h:57
com.generalrobotix.ui.util.IconProperties.resource_
static ResourceBundle resource_
Definition:
IconProperties.java:18
com.generalrobotix.ui.util.IconProperties
Definition:
IconProperties.java:16
com.generalrobotix.ui.util.IconProperties.HEIGHT
static final int HEIGHT
Definition:
IconProperties.java:21
com.generalrobotix.ui.util.IconProperties.IconProperties
IconProperties()
Definition:
IconProperties.java:23
com.generalrobotix.ui.util.IconProperties.this_
static IconProperties this_
Definition:
IconProperties.java:17
openhrp3
Author(s): AIST, General Robotix Inc., Nakamura Lab of Dept. of Mechano Informatics at University of Tokyo
autogenerated on Sat May 8 2021 02:42:38