当前位置: 首页>>代码示例>>Java>>正文


Java PlasticLookAndFeel类代码示例

本文整理汇总了Java中com.jgoodies.looks.plastic.PlasticLookAndFeel的典型用法代码示例。如果您正苦于以下问题:Java PlasticLookAndFeel类的具体用法?Java PlasticLookAndFeel怎么用?Java PlasticLookAndFeel使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


PlasticLookAndFeel类属于com.jgoodies.looks.plastic包,在下文中一共展示了PlasticLookAndFeel类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: main

import com.jgoodies.looks.plastic.PlasticLookAndFeel; //导入依赖的package包/类
/**
 * Initial method called by the operation system to execute this program.
 * 
 * @param args
 *            arguments to the program
 */
public static void main(String[] args) {
	try {
		/*
		 * // set SkinLF to execute Skin theSkinToUse =
		 * SkinLookAndFeel.loadThemePack("aquathemepack.zip");
		 * SkinLookAndFeel.setSkin(theSkinToUse);
		 * 
		 * UIManager.setLookAndFeel(new SkinLookAndFeel());
		 */
		PlasticLookAndFeel.setCurrentTheme(new Silver());
		UIManager.setLookAndFeel(new PlasticXPLookAndFeel());
	} catch (Exception exc) {
		exc.printStackTrace();
	}

	UIFacade.getInstance().loadUI();
}
 
开发者ID:guilhebl,项目名称:routerapp,代码行数:24,代码来源:Main.java

示例2: initComponentDefaults

import com.jgoodies.looks.plastic.PlasticLookAndFeel; //导入依赖的package包/类
/**
 *  For overwriting Component defaults
 *  @param table
 */
@Override
protected void initComponentDefaults (final UIDefaults table)
{
	super.initComponentDefaults(table);

	//  ComboBox defaults
	final Color c = table.getColor("TextField.background");
	table.put("ComboBox.background", c);
	table.put("ComboBox.listBackground", c);
	
	// globalqss
	final Class<?> lf = com.jgoodies.looks.plastic.PlasticLookAndFeel.class;
	table.put("Tree.openIcon", makeIcon(lf, "icons/TreeOpen.gif"));
	table.put("Tree.closedIcon", makeIcon(lf, "icons/TreeClosed.gif"));
	table.put("Tree.leafIcon", makeIcon(lf, "icons/TreeLeaf.gif"));
}
 
开发者ID:metasfresh,项目名称:metasfresh,代码行数:21,代码来源:AdempiereLookAndFeel.java

示例3: MenuBar

import com.jgoodies.looks.plastic.PlasticLookAndFeel; //导入依赖的package包/类
private MenuBar()
{
    putClientProperty(Options.HEADER_STYLE_KEY, HeaderStyle.BOTH);
    putClientProperty(PlasticLookAndFeel.BORDER_STYLE_KEY, BorderStyle.SEPARATOR);

    //
    // File menu
    //
    JMenu fileMenu = new JMenu("File");
    fileMenu.setMnemonic(java.awt.event.KeyEvent.VK_F);
    add(fileMenu);
    fileMenu.add(_login);
    fileMenu.add(_logout);
    if(!System.getProperty("os.name").startsWith("Mac OS"))
    {
        fileMenu.add(_exit);
    }

    //
    // Help menu
    //
    JMenu helpMenu = new JMenu("Help");
    helpMenu.setMnemonic(java.awt.event.KeyEvent.VK_H);
    add(helpMenu);
    helpMenu.add(_about);
}
 
开发者ID:zeroc-ice,项目名称:ice-demos,代码行数:27,代码来源:MainView.java

示例4: main

import com.jgoodies.looks.plastic.PlasticLookAndFeel; //导入依赖的package包/类
public static void main(String[] args)
{
    LOGGER.info("Starting JFreeStock version: " + VERSION);

    try
    {
        PlasticLookAndFeel.setPlasticTheme(new Silver());
        UIManager.setLookAndFeel(new PlasticXPLookAndFeel());
    }
    catch (Exception e)
    {
        LOGGER.error("Failed to set look and feel", e);
        System.exit(1);
    }

    JFreeStockFrame frame = new JFreeStockFrame();
    frame.setVisible(true);
}
 
开发者ID:joshpassenger,项目名称:jfreestock,代码行数:19,代码来源:JFreeStockApp.java

示例5: createDefault

import com.jgoodies.looks.plastic.PlasticLookAndFeel; //导入依赖的package包/类
public static Settings createDefault() {
	Settings settings = new Settings();
	settings.setSelectedLookAndFeel(new PlasticXPLookAndFeel());
	settings.setSelectedTheme(PlasticLookAndFeel.createMyDefaultTheme());
	settings.setUseNarrowButtons(true);
	settings.setTabIconsEnabled(true);
	settings.setPlasticTabStyle("default");
	settings.setPlasticHighContrastFocusEnabled(false);
	settings.setPopupDropShadowEnabled(null);
	settings.setMenuBarHeaderStyle(null);
	settings.setMenuBarPlasticBorderStyle(null);
	settings.setMenuBarWindowsBorderStyle(null);
	settings.setMenuBar3DHint(null);
	settings.setToolBarHeaderStyle(null);
	settings.setToolBarPlasticBorderStyle(null);
	settings.setToolBarWindowsBorderStyle(null);
	settings.setToolBar3DHint(null);
	return settings;
}
 
开发者ID:javachen,项目名称:IBMDataMovementTool,代码行数:20,代码来源:Settings.java

示例6: main

import com.jgoodies.looks.plastic.PlasticLookAndFeel; //导入依赖的package包/类
public static void main(String args[]) {
    	// set look and feel
    	PlasticLookAndFeel laf = new Plastic3DLookAndFeel();
    	PlasticLookAndFeel.setCurrentTheme(new ExperienceBlue());
    	try {
			UIManager.setLookAndFeel(laf);
		} catch (UnsupportedLookAndFeelException e) {
			e.printStackTrace();
		}

        JFrame frame = new JFrame("Wizard Demo");
        frame.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
        Wizard wizard = new Wizard(new WelcomeWizardPanel());
        wizard.addWizardListener(new WizardDemo());
        frame.setContentPane(wizard);
//        frame.pack();
        frame.setSize(450, 400);
        frame.setLocationRelativeTo(null);
        frame.setVisible(true);
    }
 
开发者ID:nextreports,项目名称:nextreports-designer,代码行数:21,代码来源:WizardDemo.java

示例7: setLookAndTheme

import com.jgoodies.looks.plastic.PlasticLookAndFeel; //导入依赖的package包/类
public static void setLookAndTheme(LookAndFeel laf, Object theme)
/* 134:    */     throws UnsupportedLookAndFeelException
/* 135:    */   {
/* 136:419 */     if (((laf instanceof PlasticLookAndFeel)) && (theme != null) && ((theme instanceof PlasticTheme))) {
/* 137:422 */       PlasticLookAndFeel.setPlasticTheme((PlasticTheme)theme);
/* 138:    */     }
/* 139:424 */     UIManager.setLookAndFeel(laf);
/* 140:    */   }
 
开发者ID:xiwc,项目名称:confluence.keygen,代码行数:9,代码来源:LookUtils.java

示例8: setLookAndFeel

import com.jgoodies.looks.plastic.PlasticLookAndFeel; //导入依赖的package包/类
/**
 * Sets the look and feel to the default utilities look and feel. First
 * tries to use Nimbus, if Nimbus is not supported then PlasticXPLookAndFeel
 * is used.
 * 
 * @exception IOException exception somehow thrown when starting from a zip file
 * @return true if the Nimbus look and feel is used, false otherwise
 */
public static boolean setLookAndFeel() throws IOException {

    boolean nimbusLookAndFeelFound = false;

    try {
        for (LookAndFeelInfo info : UIManager.getInstalledLookAndFeels()) {
            if ("Nimbus".equals(info.getName())) {
                UIManager.setLookAndFeel(info.getClassName());
                nimbusLookAndFeelFound = true;
                break;
            }
        }
    } catch (Exception e) {
        // ignore error, use look and feel below
    }

    if (!nimbusLookAndFeelFound) {
        try {
            PlasticLookAndFeel.setPlasticTheme(new SkyKrupp());
            UIManager.setLookAndFeel(new PlasticXPLookAndFeel());
        } catch (Exception ex) {
            // this should not be possible...
            // use default look and feel
        }
    }

    return nimbusLookAndFeelFound;
}
 
开发者ID:compomics,项目名称:compomics-utilities,代码行数:37,代码来源:UtilitiesGUIDefaults.java

示例9: setCurrentTheme

import com.jgoodies.looks.plastic.PlasticLookAndFeel; //导入依赖的package包/类
/**
 *  Set Current Theme
 *  @param theme metal theme
 */
public static void setCurrentTheme (final PlasticTheme theme)
{
	if (theme != null)
	{
		THEME_CURRENT = theme;
		PlasticLookAndFeel.setCurrentTheme(THEME_CURRENT);
	}
}
 
开发者ID:metasfresh,项目名称:metasfresh,代码行数:13,代码来源:AdempiereLookAndFeel.java

示例10: setLookAndFeel

import com.jgoodies.looks.plastic.PlasticLookAndFeel; //导入依赖的package包/类
/**
 * Sets the look and feel for the application
 */
private static void setLookAndFeel() {
	PlasticLookAndFeel.setMyCurrentTheme(new Silver());
	try {
		UIManager.setLookAndFeel(new PlasticXPLookAndFeel());
	} catch (Exception e) {
	}
}
 
开发者ID:mongkoy,项目名称:c-logger,代码行数:11,代码来源:LogView4J.java

示例11: init

import com.jgoodies.looks.plastic.PlasticLookAndFeel; //导入依赖的package包/类
/**
 * Initialize the toolbar
 */
protected void init() {
	setOpaque(false);
	setBorder(BorderFactory.createEmptyBorder());
	setFloatable(false);
	setMargin(new Insets(0, 0, 0, 0));
	putClientProperty("JToolBar.isRollover", Boolean.TRUE);
	putClientProperty(PlasticLookAndFeel.IS_3D_KEY, Boolean.FALSE);
}
 
开发者ID:mongkoy,项目名称:c-logger,代码行数:12,代码来源:MinimalJToolBar.java

示例12: initializeLookAndFeels

import com.jgoodies.looks.plastic.PlasticLookAndFeel; //导入依赖的package包/类
/**
 * Installs the JGoodies Look & Feels, if available, in classpath.
 */
public final void initializeLookAndFeels() {
	// if in classpath thry to load JGoodies Plastic Look & Feel
	try {
		LookAndFeelInfo[] lnfs = UIManager.getInstalledLookAndFeels();
		boolean found = false;
		for (int i = 0; i < lnfs.length; i++) {
			if (lnfs[i].getName().equals("JGoodies Plastic 3D")) {
				found = true;
			}
		}
		if (!found) {
			UIManager.installLookAndFeel("JGoodies Plastic 3D",
					"com.jgoodies.looks.plastic.Plastic3DLookAndFeel");
		}
		String os = System.getProperty("os.name");
		FontSet fontSet = null;
		if (os.startsWith("Windows")) {
			fontSet = FontSets.createDefaultFontSet(new Font(
					"arial unicode MS", Font.PLAIN, 12));
		} else {
			fontSet = FontSets.createDefaultFontSet(new Font(
					"arial unicode", Font.PLAIN, 12));				
		}
		FontPolicy fixedPolicy = FontPolicies.createFixedPolicy(fontSet);
		PlasticLookAndFeel.setFontPolicy(fixedPolicy);

		UIManager
				.setLookAndFeel("com.jgoodies.looks.plastic.Plastic3DLookAndFeel");
	} catch (Throwable t) {
		try {
			UIManager.setLookAndFeel(UIManager
					.getSystemLookAndFeelClassName());
		} catch (Exception e) {
			e.printStackTrace();
		}
	}
}
 
开发者ID:hinsenchan,项目名称:fil_project_mgmt_app_v2,代码行数:41,代码来源:JCalendarDemo.java

示例13: init

import com.jgoodies.looks.plastic.PlasticLookAndFeel; //导入依赖的package包/类
/**
 * Initialize the toolbar
 */
protected void init()
{
    setOpaque(false);
    setBorder(BorderFactory.createEmptyBorder());
    setFloatable(false);
    setMargin(new Insets(0, 0, 0, 0));
    putClientProperty("JToolBar.isRollover", Boolean.TRUE);
    putClientProperty(PlasticLookAndFeel.IS_3D_KEY, Boolean.FALSE);
}
 
开发者ID:joshpassenger,项目名称:jfreestock,代码行数:13,代码来源:MinimalJToolBar.java

示例14: setLookAndFeel

import com.jgoodies.looks.plastic.PlasticLookAndFeel; //导入依赖的package包/类
/**
 * Sets the look and feel. First tries to use Nimbus, if Nimbus is not
 * supported then PlasticXPLookAndFeel is used.
 *
 * @return true if the Nimbus look and feel is used, false otherwise
 */
public static boolean setLookAndFeel() {

    boolean nimbusLookAndFeelFound = false;

    try {
        for (LookAndFeelInfo info : UIManager.getInstalledLookAndFeels()) {
            if ("Nimbus".equals(info.getName())) {
                UIManager.setLookAndFeel(info.getClassName());
                nimbusLookAndFeelFound = true;
                break;
            }
        }
    } catch (Exception e) {
        // ignore error, use look and feel below
    }

    if (!nimbusLookAndFeelFound) {
        try {
            PlasticLookAndFeel.setPlasticTheme(new SkyKrupp());
            UIManager.setLookAndFeel(new PlasticXPLookAndFeel());
        } catch (UnsupportedLookAndFeelException ex) {
            // this should not be possible...
        }
    }

    return nimbusLookAndFeelFound;
}
 
开发者ID:compomics,项目名称:mitraq,代码行数:34,代码来源:MiTRAQ.java

示例15: initializeLookAndFeels

import com.jgoodies.looks.plastic.PlasticLookAndFeel; //导入依赖的package包/类
/**
 * Installs the JGoodies Look & Feels, if available, in classpath.
 */
static public final void initializeLookAndFeels() {
	// if in classpath try to load JGoodies Plastic Look & Feel
	try {
		LookAndFeelInfo[] lnfs = UIManager.getInstalledLookAndFeels();
		boolean found = false;
		for (int i = 0; i < lnfs.length; i++) {
			if (lnfs[i].getName().equals("JGoodies Plastic 3D")) {
				found = true;
			}
		}
		if (!found) {
			UIManager.installLookAndFeel("JGoodies Plastic 3D",
					"com.jgoodies.looks.plastic.Plastic3DLookAndFeel");
		}
		String os = System.getProperty("os.name");
		FontSet fontSet = null;
		if (os.startsWith("Windows")) {
			fontSet = FontSets.createDefaultFontSet(new Font(
					"arial unicode MS", Font.PLAIN, 12));
		} else {
			fontSet = FontSets.createDefaultFontSet(new Font(
					"arial unicode", Font.PLAIN, 12));				
		}
		FontPolicy fixedPolicy = FontPolicies.createFixedPolicy(fontSet);
		PlasticLookAndFeel.setFontPolicy(fixedPolicy);

		UIManager
				.setLookAndFeel("com.jgoodies.looks.plastic.Plastic3DLookAndFeel");
	} catch (Throwable t) {
		try {
			UIManager.setLookAndFeel(UIManager
					.getSystemLookAndFeelClassName());
		} catch (Exception e) {
			e.printStackTrace();
		}
	}
}
 
开发者ID:empeeoh,项目名称:JCalendar,代码行数:41,代码来源:JCalendarDemo.java


注:本文中的com.jgoodies.looks.plastic.PlasticLookAndFeel类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。