Package com.l2fprod.gui.plaf.skin

Examples of com.l2fprod.gui.plaf.skin.Skin


* @author Christopher Butler
*/
public class SkinLFResolver extends RefResolver {

    public String getRef(String plaf) {
        Skin skin = SkinLookAndFeel.getSkin();
        String skinName = skin==null? null: skin.getClass().getName();

        // redirect to the mapping for the skin, instead of the plaf itself
        String view = PlafMappingFactory.getPlafReference(skinName);
        return view==null? getDefaultRef(): view;
    }
View Full Code Here


            return null;

        // return a special case for SkinLF
        if(isSkinLFSupported()) {
            if(laf.getClass()==SkinLookAndFeel.class) {
                Skin skin = SkinLookAndFeel.getSkin();
                return skin==null? null: skin.getClass().getName();
            }
        }

        // return the className for the current plaf
        return laf.getClass().getName();
View Full Code Here

    private static boolean loadSkinLF(String themePack) {
        if(themePack==null || !themePack.endsWith(".zip") || !isSkinLFInstalled())
            return false;

        try {
            Skin skin = SkinLookAndFeel.loadThemePack(ResourceManager.getResource(themePack));
            SkinLookAndFeel.setSkin(skin);
            UIManager.setLookAndFeel(SkinLookAndFeel.class.getName());
            return true;
        } catch(Exception e) {
            System.err.println("Exception: " +e.getMessage());
View Full Code Here

    UIManager.put("JDesktopPane.backgroundEnabled",
        backgroundCheckBox.isSelected() ? Boolean.TRUE : null);
    UIManager.put("ScrollBar.alternateLayout",
        scrollBarCheckBox.isSelected() ? Boolean.TRUE : null);

    Skin skin = null;

    if (themePackMode) {
      skin = SkinLookAndFeel.loadThemePack((String) values[0]);
    }
    else {
View Full Code Here

  /**
   * Description of the Method
   */
  protected void showPreviewWindow() {
    Skin oldSkin = SkinLookAndFeel.getSkin();
    LookAndFeel oldLAF = UIManager.getLookAndFeel();

    try {
      Object[] values = skinList.getSelectedValues();
      if ((values == null) || (values.length != 2)) {
        return;
      }

      Skin skin = new CompoundSkin(SkinLookAndFeel.loadSkin((String) values[0]),
          SkinLookAndFeel.loadSkin((String) values[1]));

      SkinLookAndFeel.setSkin(skin);
      UIManager.setLookAndFeel("com.l2fprod.gui.plaf.skin.SkinLookAndFeel");

View Full Code Here

    else {
      // a themepack has been provided, relative to the codebase
      themepackURL = new URL(getCodeBase(), themepack);
    }

    Skin skin = SkinLookAndFeel.loadThemePack(themepackURL);
    SkinLookAndFeel.setSkin(skin);
    UIManager.setLookAndFeel(new SkinLookAndFeel());
  }
View Full Code Here

      MetalTheme theme = (MetalTheme)Class.forName(metaltheme).newInstance();
      MetalLookAndFeel metal = new MetalLookAndFeel();
      MetalLookAndFeel.setCurrentTheme(theme);
      UIManager.setLookAndFeel(metal);
    } else {
      Skin skin = null;
     
      if (packtheme != null) {
        if (SkinUtils.DEBUG) {
          System.out.println("Loading themepack " + packtheme);
        }
View Full Code Here

TOP

Related Classes of com.l2fprod.gui.plaf.skin.Skin

Copyright © 2018 www.massapicom. 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.