1 |
/* UIManager.java -- |
/* UIManager.java -- |
2 |
Copyright (C) 2002 Free Software Foundation, Inc. |
Copyright (C) 2002, 2003 Free Software Foundation, Inc. |
3 |
|
|
4 |
This file is part of GNU Classpath. |
This file is part of GNU Classpath. |
5 |
|
|
168 |
/** |
/** |
169 |
* Returns the default values for this look and feel. |
* Returns the default values for this look and feel. |
170 |
*/ |
*/ |
171 |
static UIDefaults getDefaults() |
public static UIDefaults getDefaults() |
172 |
{ |
{ |
173 |
return getLookAndFeel().getDefaults(); |
return getLookAndFeel().getDefaults(); |
174 |
} |
} |
176 |
/** |
/** |
177 |
* Returns a dimension from the defaults table. |
* Returns a dimension from the defaults table. |
178 |
*/ |
*/ |
179 |
static Dimension getDimension(Object key) |
public static Dimension getDimension(Object key) |
180 |
{ |
{ |
181 |
System.out.println("UIManager.getDim"); |
System.out.println("UIManager.getDim"); |
182 |
return new Dimension(200,100); |
return new Dimension(200,100); |
195 |
return (Font) getLookAndFeel().getDefaults().get(key); |
return (Font) getLookAndFeel().getDefaults().get(key); |
196 |
} |
} |
197 |
|
|
198 |
static Icon getIcon(Object key) |
public static Icon getIcon(Object key) |
199 |
// Returns an Icon from the defaults table. |
// Returns an Icon from the defaults table. |
200 |
{ |
{ |
201 |
return (Icon) getLookAndFeel().getDefaults().get(key); |
return (Icon) getLookAndFeel().getDefaults().get(key); |
202 |
} |
} |
203 |
|
|
204 |
static Insets getInsets(Object key) |
public static Insets getInsets(Object key) |
205 |
// Returns an Insets object from the defaults table. |
// Returns an Insets object from the defaults table. |
206 |
{ |
{ |
207 |
return (Insets) getLookAndFeel().getDefaults().getInsets(key); |
return (Insets) getLookAndFeel().getDefaults().getInsets(key); |
208 |
} |
} |
209 |
|
|
210 |
static LookAndFeelInfo[] getInstalledLookAndFeels() |
public static LookAndFeelInfo[] getInstalledLookAndFeels() |
211 |
{ |
{ |
212 |
return installed; |
return installed; |
213 |
} |
} |
214 |
|
|
215 |
static int getInt(Object key) |
public static int getInt(Object key) |
216 |
{ |
{ |
217 |
Integer x = (Integer) getLookAndFeel().getDefaults().get(key); |
Integer x = (Integer) getLookAndFeel().getDefaults().get(key); |
218 |
if (x == null) |
if (x == null) |
220 |
return x.intValue(); |
return x.intValue(); |
221 |
} |
} |
222 |
|
|
223 |
static LookAndFeel getLookAndFeel() |
public static LookAndFeel getLookAndFeel() |
224 |
{ |
{ |
225 |
return look_and_feel; |
return look_and_feel; |
226 |
} |
} |
234 |
return getLookAndFeel().getDefaults(); |
return getLookAndFeel().getDefaults(); |
235 |
} |
} |
236 |
|
|
237 |
static String getString(Object key) |
public static String getString(Object key) |
238 |
// Returns a string from the defaults table. |
// Returns a string from the defaults table. |
239 |
{ |
{ |
240 |
return (String) getLookAndFeel().getDefaults().get(key); |
return (String) getLookAndFeel().getDefaults().get(key); |
241 |
} |
} |
242 |
|
|
243 |
static String getSystemLookAndFeelClassName() |
public static String getSystemLookAndFeelClassName() |
244 |
// Returns the name of the LookAndFeel class that implements the native systems look and feel if there is one, otherwise the name of the default cross platform LookAndFeel class. |
// Returns the name of the LookAndFeel class that implements the native systems look and feel if there is one, otherwise the name of the default cross platform LookAndFeel class. |
245 |
{ |
{ |
246 |
return getCrossPlatformLookAndFeelClassName(); |
return getCrossPlatformLookAndFeelClassName(); |