Examples of LookAndFeel


Examples of com.sun.dtv.lwuit.plaf.LookAndFeel

     * @inheritDoc
     */
    void initComponentImpl() {
        super.initComponentImpl();
        if(hasFocus()) {
            LookAndFeel lf = UIManager.getInstance().getLookAndFeel();
            if(lf instanceof DefaultLookAndFeel) {
                ((DefaultLookAndFeel)lf).focusGained(this);
            }
        }
    }
View Full Code Here

Examples of com.sun.dtv.lwuit.plaf.LookAndFeel

        style = UIManager.getInstance().getComponentStyle(getUIID());
        if (style != null) {
            style.addStyleListener(this);
            style.setBgPainter(new BGPainter());
        }
        LookAndFeel laf = UIManager.getInstance().getLookAndFeel();
        animationSpeed = laf.getDefaultSmoothScrollingSpeed();
        setSmoothScrolling(laf.isDefaultSmoothScrolling());
    }
View Full Code Here

Examples of com.sun.dtv.lwuit.plaf.LookAndFeel

        private Style menuStyle;

        public MenuBar() {
            menuStyle = UIManager.getInstance().getComponentStyle("Menu");
            menuCommand = new Command(UIManager.getInstance().localize("menu", "Menu"));
            LookAndFeel lf = UIManager.getInstance().getLookAndFeel();
            // use the slide transition by default
            if (lf.getDefaultMenuTransitionIn() != null || lf.getDefaultMenuTransitionOut() != null) {
                transitionIn = lf.getDefaultMenuTransitionIn();
                transitionOut = lf.getDefaultMenuTransitionOut();
            } else {
                transitionIn = CommonTransitions.createSlide(CommonTransitions.SLIDE_VERTICAL, true, 300, true);
                transitionOut = CommonTransitions.createSlide(CommonTransitions.SLIDE_VERTICAL, false, 300, true);
            }
View Full Code Here

Examples of com.sun.dtv.lwuit.plaf.LookAndFeel

        super.addComponent(BorderLayout.NORTH, title);
        super.addComponent(BorderLayout.CENTER, contentPane);
        super.addComponent(BorderLayout.SOUTH, menuBar);
        contentPane.setScrollableY(true);
        focusCycleRoot = contentPane;
        LookAndFeel laf = UIManager.getInstance().getLookAndFeel();
        initLaf(laf);
        tintColor = laf.getDefaultFormTintColor();

        // hardcoded, anything else is just pointless...
        getStyle().setBgTransparency(0xFF);
    }
View Full Code Here

Examples of javax.swing.LookAndFeel

      if (name.equals("apply")) {
        LnF lnf = (LnF) dataModel.getValue("lnf.value");
        Theme theme = (Theme) dataModel.getValue("theme.value");
        String licenseCode = (String) dataModel.getValue("license");

        LookAndFeel lnfInstance = lnf.create(theme == null ? null : theme.clazz, licenseCode);
        UIManager.setLookAndFeel(lnfInstance);
        GUIUtils.updateAllWidgets();
      } else if (name.equals("close")) {
        frame.dispose();
      }
View Full Code Here

Examples of javax.swing.LookAndFeel

    }

    public LookAndFeel create(String themeClass, String licenseCode) throws GUIException {
      try {
        Class lnfClass = Class.forName(clazz);
        LookAndFeel lnfInstance = (LookAndFeel) lnfClass.newInstance();
        return lnfInstance;
      } catch (Exception e) {
        throw new GUIException("Error while creating Look And Feel", e);
      }
    }
View Full Code Here

Examples of javax.swing.LookAndFeel

        Method method = lnfClass.getMethod("setProperty", new Class[] { String.class, String.class });
        method.invoke(null, new Object[] { "alloy.licenseCode", licenseCode });

        Constructor constructor =
          lnfClass.getConstructor(new Class[] { Class.forName("com.incors.plaf.alloy.AlloyTheme")});
        LookAndFeel lnfInstance =
          (LookAndFeel) constructor.newInstance(new Object[] { Class.forName(themeClass).newInstance()});

        return lnfInstance;
      } catch (Exception e) {
        throw new GUIException("Error while setting theme", e);
View Full Code Here

Examples of javax.swing.LookAndFeel

        }
        // do not install already installed LAF.
        if (skip) continue;
        try {
          Class c = Class.forName(classname);
          LookAndFeel laf = (LookAndFeel)c.newInstance();
          UIManager.installLookAndFeel(laf.getName(), classname);
          // Skip this laf on error
        } catch (ClassNotFoundException e) {
        } catch (InstantiationException e) {
        } catch (IllegalAccessException e) {
        }
      }
    }

    String laf = Run.getProperties().getString("plugin.lookandfeel.default","");
    if (laf.equals("")) laf = "com.incors.plaf.kunststoff.KunststoffLookAndFeel";
    try {
      UIManager.setLookAndFeel((LookAndFeel)Class.forName(laf).newInstance());
      // Keep default look and feel on error, otherwise apply it imediately
      if (JSynoptic.gui!=null) SwingUtilities.updateComponentTreeUI(JSynoptic.gui.getOwner());
    } catch (UnsupportedLookAndFeelException e) {
View Full Code Here

Examples of javax.swing.LookAndFeel

      for (int i=0; i<infos.length; ++i) {
        if (classname.equals(infos[i].getClassName())) skip = true;
      }
      // do not install already installed LAF.
      if (skip) continue;
      LookAndFeel laf = null;
      try {
        Class c = Class.forName(classname);
        laf = (LookAndFeel)c.newInstance();
      } catch (ClassNotFoundException e) {
        // should not happen since we precisely looked in the classpath
      } catch (InstantiationException e) {
        // skip this laf
      } catch (IllegalAccessException e) {
        // skip this laf
      }
      if (laf==null) continue;
      // Now check if the laf installed itself...
      infos = UIManager.getInstalledLookAndFeels();
      skip = false;
      for (int i=0; i<infos.length; ++i) {
        if (classname.equals(infos[i].getClassName())) skip = true;
      }
      // do not install already installed LAF.
      if (skip) continue;
      UIManager.installLookAndFeel(laf.getName(), classname);
    }
   
    // Save in the user properties
    infos = UIManager.getInstalledLookAndFeels();
    String property = null;
View Full Code Here

Examples of javax.swing.LookAndFeel

    int indexCounter = 0;
    while (it.hasNext()) {
      LookAndFeelAdapter current = (LookAndFeelAdapter)it.next();
      boolean gotIt = false;
      try {
        LookAndFeel lf = (LookAndFeel) Class.forName(current.getClassName()).newInstance();
        gotIt = lf.isSupportedLookAndFeel();
      }
      catch (Exception e) {}
      current.installed = gotIt;
      if (currClsName.equalsIgnoreCase(current.getClassName()))
        result =  indexCounter;
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.