Package javax.swing

Examples of javax.swing.UIDefaults.keys()


        Map components = new TreeMap();
        UIDefaults defaults = UIManager.getLookAndFeelDefaults();

        //  Build of Map of attributes for each component

        for ( Enumeration e = defaults.keys(); e.hasMoreElements(); )
        {
            Object key = e.nextElement();
            Object value = defaults.get( key );

            Map componentMap = getComponentMap( components, key.toString() );
View Full Code Here


    for (UIManager.LookAndFeelInfo info : looks) {
      UIManager.setLookAndFeel(info.getClassName());

      UIDefaults defaults = UIManager.getDefaults();
      Enumeration newKeys = defaults.keys();

      while (newKeys.hasMoreElements()) {
        Object obj = newKeys.nextElement();
        System.out.printf("%50s : %s\n", obj, UIManager.get(obj));
      }
View Full Code Here

    }
   
    public static void setLookAndFeel(int fontSize) throws Exception {
        UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
        UIDefaults defaults = UIManager.getDefaults();
        Enumeration<Object> keys = defaults.keys();
        while (keys.hasMoreElements()) {
            Object key = keys.nextElement();

            if ((key instanceof String) && (((String) key).endsWith(".font"))) {
                FontUIResource font = (FontUIResource) UIManager.get(key);
View Full Code Here

    }

    // Does not work: cl.getClass().equals(JarClassLoader.class)
    if (cl.getClass().getName().equals(JarClassLoader.class.getName())) {
      UIDefaults uidef = UIManager.getDefaults();
      Enumeration<?> en = uidef.keys();
      while (en.hasMoreElements()) {
        String sClass = (String) en.nextElement();
        if (sClass.endsWith("UI")) {
          Object obj = uidef.get(sClass);
          // If the obj is java.lang.String load the class,
View Full Code Here

    }

    // Does not work: cl.getClass().equals(JarClassLoader.class)
    if (cl.getClass().getName().equals(JarClassLoader.class.getName())) {
      UIDefaults uidef = UIManager.getDefaults();
      Enumeration<?> en = uidef.keys();
      while (en.hasMoreElements()) {
        String sClass = (String) en.nextElement();
        if (sClass.endsWith("UI")) {
          Object obj = uidef.get(sClass);
          // If the obj is java.lang.String load the class,
View Full Code Here

        public UIDefaultsTableModel() {
            // make a local copy of the defaults table in case the look and feel changes
            defaults = new UIDefaults();
            keys = new ArrayList<Object>();
            UIDefaults realDefaults = UIManager.getDefaults();
            Enumeration keysEnum = realDefaults.keys();
            while (keysEnum.hasMoreElements()) {
                Object key = keysEnum.nextElement();
                if (!defaults.containsKey(key)) {
                    keys.add(key);
                    defaults.put(key, realDefaults.get(key));
View Full Code Here

   *
   * @param f  The new Font value
   */
  public static void setFont(Font f) {
    UIDefaults defs = UIManager.getDefaults();
    for (Enumeration keys = defs.keys(); keys.hasMoreElements();) {
      Object o = keys.nextElement();
      if (o instanceof String) {
        String aKey = (String) o;
        if (aKey.endsWith(".font")
            || aKey.endsWith(".titleFont")
View Full Code Here

    }
  }

  private Icon findIcon() {
    UIDefaults defaults = UIManager.getDefaults();
    Enumeration<Object> iterator = defaults.keys();

    while (iterator.hasMoreElements()) {
      Object key = iterator.nextElement();

      if (key.toString().equals("Table.descendingSortIcon")) {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.