/[classpath]/classpath/javax/swing/UIManager.java
ViewVC logotype

Diff of /classpath/javax/swing/UIManager.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.1 by rveldema, Mon Mar 11 15:48:06 2002 UTC revision 1.2 by rveldema, Tue Mar 12 11:36:22 2002 UTC
# Line 44  public class UIManager implements Serial Line 44  public class UIManager implements Serial
44      {      {
45      }      }
46    
47      static  void addPropertyChangeListener(PropertyChangeListener listener)      public static  void addPropertyChangeListener(PropertyChangeListener listener)
48      {      {
49          //      Add a PropertyChangeListener to the listener list.          //      Add a PropertyChangeListener to the listener list.
50      }      }
51    
52      static  void addAuxiliaryLookAndFeel(LookAndFeel l)      public static  void addAuxiliaryLookAndFeel(LookAndFeel l)
53      {      {
54          //          Add a LookAndFeel to the list of auxiliary look and feels.          //          Add a LookAndFeel to the list of auxiliary look and feels.
55          if (aux_installed == null)          if (aux_installed == null)
# Line 67  public class UIManager implements Serial Line 67  public class UIManager implements Serial
67          aux_installed[aux_installed.length-1] = l;          aux_installed[aux_installed.length-1] = l;
68      }      }
69            
70      static  boolean removeAuxiliaryLookAndFeel(LookAndFeel laf)      public static  boolean removeAuxiliaryLookAndFeel(LookAndFeel laf)
71      {      {
72          if (aux_installed == null)          if (aux_installed == null)
73              return false;              return false;
# Line 89  public class UIManager implements Serial Line 89  public class UIManager implements Serial
89          return false;          return false;
90      }      }
91    
92      static  LookAndFeel[] getAuxiliaryLookAndFeels()      public static  LookAndFeel[] getAuxiliaryLookAndFeels()
93      {   return aux_installed;    }      {   return aux_installed;    }
94    
95    
96      static  Object get(Object key)      public static  Object get(Object key)
97      {   return getLookAndFeel().getDefaults().get(key);    }      {   return getLookAndFeel().getDefaults().get(key);    }
98            
99      static  Border getBorder(Object key)      /**
100      //      Returns a border from the defaults table.       * Returns a border from the defaults table.
101         */
102        public static  Border getBorder(Object key)
103      {      {
104          return (Border) getLookAndFeel().getDefaults().get(key);          return (Border) getLookAndFeel().getDefaults().get(key);
105      }      }
106        
107      static  Color getColor(Object key)      /**
108      //      Returns a drawing color from the defaults table.       * Returns a drawing color from the defaults table.
109         */
110        public static  Color getColor(Object key)
111      {      {
112          return (Color) getLookAndFeel().getDefaults().get(key);          return (Color) getLookAndFeel().getDefaults().get(key);
113      }      }
114      static  String getCrossPlatformLookAndFeelClassName()  
115      {      /**
116          // this string can be passed to Class.forName()       * this string can be passed to Class.forName()
117         */
118        public static  String getCrossPlatformLookAndFeelClassName()
119        {  
120          return "javax.swing.plaf.metal.MetalLookAndFeel";          return "javax.swing.plaf.metal.MetalLookAndFeel";
121      }      }
122    
123        /**
124         * Returns the default values for this look and feel.
125         */
126      static  UIDefaults getDefaults()      static  UIDefaults getDefaults()
127      {      {
         //      Returns the default values for this look and feel.  
128          return getLookAndFeel().getDefaults();          return getLookAndFeel().getDefaults();
129      }      }
130    
131        /**
132         * Returns a dimension from the defaults table.
133         */
134      static  Dimension getDimension(Object key)      static  Dimension getDimension(Object key)
     //      Returns a dimension from the defaults table.  
135      {      {
136          System.out.println("UIManager.getDim");          System.out.println("UIManager.getDim");
137          return new Dimension(200,100);          return new Dimension(200,100);
# Line 175  public class UIManager implements Serial Line 186  public class UIManager implements Serial
186      }      }
187    
188    
189      static  ComponentUI getUI(JComponent target)      public static  ComponentUI getUI(JComponent target)
190      //      Returns the L&F object that renders the target component.      //      Returns the L&F object that renders the target component.
191      {      {
192          ComponentUI ui = getDefaults().getUI(target);          ComponentUI ui = getDefaults().getUI(target);
# Line 184  public class UIManager implements Serial Line 195  public class UIManager implements Serial
195      }      }
196    
197    
198      static  void installLookAndFeel(String name, String className)      public static  void installLookAndFeel(String name, String className)
199      //      Creates a new look and feel and adds it to the current array.      //      Creates a new look and feel and adds it to the current array.
200      {      {
201      }      }
202      static  void installLookAndFeel(LookAndFeelInfo info)      public static  void installLookAndFeel(LookAndFeelInfo info)
203      //      Adds the specified look and feel to the current array and then calls setInstalledLookAndFeels(javax.swing.UIManager.LookAndFeelInfo[]).      //      Adds the specified look and feel to the current array and then calls setInstalledLookAndFeels(javax.swing.UIManager.LookAndFeelInfo[]).
204      {      {
205      }      }
206      static  Object put(Object key, Object value)      public static  Object put(Object key, Object value)
207      //      Stores an object in the defaults table.      //      Stores an object in the defaults table.
208      {      {
209          return getLookAndFeel().getDefaults().put(key,value);          return getLookAndFeel().getDefaults().put(key,value);
210      }      }
211      static  void removePropertyChangeListener(PropertyChangeListener listener)      public static  void removePropertyChangeListener(PropertyChangeListener listener)
212      //      Remove a PropertyChangeListener from the listener list.      //      Remove a PropertyChangeListener from the listener list.
213      {      {
214      }      }
215      static  void setInstalledLookAndFeels(UIManager.LookAndFeelInfo[] infos)      public static  void setInstalledLookAndFeels(UIManager.LookAndFeelInfo[] infos)
216      //      Replaces the current array of installed LookAndFeelInfos.      //      Replaces the current array of installed LookAndFeelInfos.
217      {      {
218      }      }
219      static  void setLookAndFeel(LookAndFeel newLookAndFeel)      public static  void setLookAndFeel(LookAndFeel newLookAndFeel)
220      {      {
221          if (look_and_feel != null)          if (look_and_feel != null)
222              look_and_feel.uninitialize();              look_and_feel.uninitialize();
# Line 217  public class UIManager implements Serial Line 228  public class UIManager implements Serial
228          //      revalidate();          //      revalidate();
229          //      repaint();          //      repaint();
230      }      }
231      static  void setLookAndFeel(String className)  
232        public static  void setLookAndFeel(String className)
233          throws ClassNotFoundException,          throws ClassNotFoundException,
234                 InstantiationException,                 InstantiationException,
235                 IllegalAccessException,                 IllegalAccessException,

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26