[Thinlet-development] thinlet/src/java/thinlet Thinlet.java,1.19,1.20
Brought to you by:
bajzat
From: Andrzej B. <ab...@us...> - 2004-10-11 19:43:58
|
Update of /cvsroot/thinlet/thinlet/src/java/thinlet In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12644 Modified Files: Thinlet.java Log Message: Add missing getColor and getFont methods. Index: Thinlet.java =================================================================== RCS file: /cvsroot/thinlet/thinlet/src/java/thinlet/Thinlet.java,v retrieving revision 1.19 retrieving revision 1.20 diff -u -d -r1.19 -r1.20 --- Thinlet.java 5 Oct 2004 21:02:44 -0000 1.19 +++ Thinlet.java 11 Oct 2004 19:43:48 -0000 1.20 @@ -6306,9 +6306,21 @@ } /** + * Get custom font of a component. This method may return null if the + * default font is used. + * @param component a component + * @param key the identifier of the parameter, e.g. "font" + * @return + */ + public Font getFont(Object component, String key) { + return (Font) get(component, key, "font"); + } + + /** * Set custom font on a component * * @param component component to use the custom font + * @param key currently only "font" is supported * @param font custom font to use, or null to reset component to use default * font */ @@ -6340,6 +6352,17 @@ } /** + * Get custom color of a component. This method may return null if the + * default color is used. + * @param component a component + * @param key the identifier of the parameter, e.g. "foreground" + * @return value of the custom color, or null if default color is used + */ + public Color getColor(Object component, String key) { + return (Color) get(component, key, "color"); + } + + /** * Set the AWT component for the given (currently <i>bean </i>) widget * * @param component a <i>bean </i> widget |