I implemented two missing methods in the UIManager: 2006-03-28 Roman Kennke <[EMAIL PROTECTED]>
* javax/swing/UIManager.java
(installLookAndFeel): Implemented.
(setInstalledLookAndFeels): Implemented.
/Roman
--
“Improvement makes straight roads, but the crooked roads, without
Improvement, are roads of Genius.” - William Blake
Index: javax/swing/UIManager.java
===================================================================
RCS file: /cvsroot/classpath/classpath/javax/swing/UIManager.java,v
retrieving revision 1.32
diff -u -1 -0 -r1.32 UIManager.java
--- javax/swing/UIManager.java 23 Mar 2006 10:42:30 -0000 1.32
+++ javax/swing/UIManager.java 28 Mar 2006 22:13:59 -0000
@@ -607,44 +607,45 @@
public static void installLookAndFeel(String name, String className)
{
installLookAndFeel(new LookAndFeelInfo(name, className));
}
/**
* Adds the specified look and feel to the current array and then calls
* setInstalledLookAndFeels(javax.swing.UIManager.LookAndFeelInfo[]).
*/
public static void installLookAndFeel(LookAndFeelInfo info)
- throws NotImplementedException
{
- // FIXME: not yet implemented
+ LookAndFeelInfo[] newInstalled = new LookAndFeelInfo[installed.length + 1];
+ System.arraycopy(installed, 0, newInstalled, 0, installed.length);
+ newInstalled[newInstalled.length - 1] = info;
+ setInstalledLookAndFeels(newInstalled);
}
/**
* Stores an object in the defaults table.
*/
public static Object put(Object key, Object value)
{
Object old = get(key);
if (userUIDefaults == null)
userUIDefaults = new UIDefaults();
userUIDefaults.put(key, value);
return old;
}
/**
* Replaces the current array of installed LookAndFeelInfos.
*/
public static void setInstalledLookAndFeels(UIManager.LookAndFeelInfo[] infos)
- throws NotImplementedException
{
- // FIXME: not yet implemented.
+ installed = infos;
}
/**
* Sets the current [EMAIL PROTECTED] LookAndFeel}.
*
* @param newLookAndFeel the new look and feel (<code>null</code> permitted).
*
* @throws UnsupportedLookAndFeelException if the look and feel is not
* supported on the current platform.
*
signature.asc
Description: Dies ist ein digital signierter Nachrichtenteil
