本文整理汇总了Java中com.jgoodies.looks.plastic.PlasticXPLookAndFeel类的典型用法代码示例。如果您正苦于以下问题:Java PlasticXPLookAndFeel类的具体用法?Java PlasticXPLookAndFeel怎么用?Java PlasticXPLookAndFeel使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
PlasticXPLookAndFeel类属于com.jgoodies.looks.plastic包,在下文中一共展示了PlasticXPLookAndFeel类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: main
import com.jgoodies.looks.plastic.PlasticXPLookAndFeel; //导入依赖的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();
}
示例2: initUI
import com.jgoodies.looks.plastic.PlasticXPLookAndFeel; //导入依赖的package包/类
public static void initUI() {
try {
for (UIManager.LookAndFeelInfo info : UIManager.getInstalledLookAndFeels()) {
if ("Nimbus".equals(info.getName())) {
UIManager.setLookAndFeel(info.getClassName());
break;
}
}
} catch (Exception e) {
// If Nimbus is not available, you can set the GUI to another look and feel.
try {
UIManager.setLookAndFeel(new PlasticXPLookAndFeel());
} catch (Throwable t) {
log.error("Error setting look and feel", t);
}
}
}
示例3: createInstance
import com.jgoodies.looks.plastic.PlasticXPLookAndFeel; //导入依赖的package包/类
public static void createInstance() {
try {
Toolkit.getDefaultToolkit().setDynamicLayout(true);
System.setProperty("sun.awt.noerasebackground","true");
// JGoodies
Options.setDefaultIconSize(new Dimension(16, 16)); // menu icons
Options.setUseNarrowButtons(false);
Options.setPopupDropShadowEnabled(true);
UIManager.setLookAndFeel(System.getProperty("os.name").toLowerCase().startsWith("windows")
? new WindowsLookAndFeel() : new PlasticXPLookAndFeel());
_instance = new MainFrame();
} catch (Exception e) {
System.err.println(e);
}
}
示例4: main
import com.jgoodies.looks.plastic.PlasticXPLookAndFeel; //导入依赖的package包/类
public static void main(String[] args) throws UnsupportedLookAndFeelException {
UIManager.setLookAndFeel(new PlasticXPLookAndFeel());
// OtrosApplication otrosApplication = new OtrosApplication();
// otrosApplication.setConfiguration(new DataConfiguration(new BaseConfiguration()));
// DataConfiguration configuration = otrosApplication.getConfiguration();
DataConfiguration configuration = new DataConfiguration(new BaseConfiguration());
ConfigurationProvider configurationProvider = new ConfigurationProviderImpl(configuration, new File(System.getProperty("java.io.tmpdir")));
configuration.setProperty("view1.text", "ASD ASD");
configuration.setProperty("view2.text", "sdf\nd\ndf\ns");
JFrame f = new JFrame("CV");
f.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
f.getContentPane().setLayout(new BorderLayout());
ConfigView[] configViews = {
new View1(), //
new View2(), //
new ViewTable(),//
new DateFormatView(),//
new ValidationView(),
new ValidationView2()//
};
f.getContentPane().add(new ConfigComponent(configurationProvider, configViews));
f.pack();
f.setVisible(true);
}
示例5: configureUI
import com.jgoodies.looks.plastic.PlasticXPLookAndFeel; //导入依赖的package包/类
private static void configureUI() {
String lcOSName = System.getProperty("os.name").toLowerCase();
boolean MAC_OS_X = lcOSName.startsWith("mac os x");
if (MAC_OS_X) {
configureUI_MacOS();
return;
}
try {
UIManager.setLookAndFeel(new PlasticXPLookAndFeel());
} catch (Exception e) {
e.printStackTrace();
}
}
示例6: main
import com.jgoodies.looks.plastic.PlasticXPLookAndFeel; //导入依赖的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);
}
示例7: createDefault
import com.jgoodies.looks.plastic.PlasticXPLookAndFeel; //导入依赖的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;
}
示例8: createInstance
import com.jgoodies.looks.plastic.PlasticXPLookAndFeel; //导入依赖的package包/类
public static void createInstance() {
try {
Toolkit.getDefaultToolkit().setDynamicLayout(true);
System.setProperty("sun.awt.noerasebackground","true");
// JGoodies
Options.setDefaultIconSize(new Dimension(16, 16)); // menu icons
Options.setUseNarrowButtons(false);
Options.setPopupDropShadowEnabled(true);
UIManager.setLookAndFeel(new PlasticXPLookAndFeel());
_instance = new MainFrame();
} catch (Exception e) {
System.err.println(e);
}
}
示例9: main
import com.jgoodies.looks.plastic.PlasticXPLookAndFeel; //导入依赖的package包/类
public static void main(String[] args) {
try {
UIManager.setLookAndFeel(new PlasticXPLookAndFeel());
} catch (UnsupportedLookAndFeelException e) {
throw new RuntimeException(e);
}
boolean loaded = configureDocking();
JFrame frame = new JFrame("FlexPortalMaximized");
frame.setContentPane(createContentPane(loaded));
DemoUtility.setCloseOperation(frame);
frame.setSize(500, 500);
SwingUtility.centerOnScreen(frame);
// frame.pack();
frame.setVisible(true);
}
示例10: setLookAndFeel
import com.jgoodies.looks.plastic.PlasticXPLookAndFeel; //导入依赖的package包/类
private void setLookAndFeel() {
// Set look-and-feel.
try {
UIManager.setLookAndFeel(new PlasticXPLookAndFeel());
} catch (Throwable x) {
System.err.println("Failed to set look-and-feel.\n" + x);
}
}
示例11: setLookAndFeel
import com.jgoodies.looks.plastic.PlasticXPLookAndFeel; //导入依赖的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;
}
示例12: setLookAndFeel
import com.jgoodies.looks.plastic.PlasticXPLookAndFeel; //导入依赖的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) {
}
}
示例13: configureUI
import com.jgoodies.looks.plastic.PlasticXPLookAndFeel; //导入依赖的package包/类
public static void configureUI() {
String lcOSName = System.getProperty("os.name").toLowerCase();
try {
UIManager.setLookAndFeel(new PlasticXPLookAndFeel());
} catch (Exception e) {
e.printStackTrace();
}
}
示例14: setLookAndFeel
import com.jgoodies.looks.plastic.PlasticXPLookAndFeel; //导入依赖的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;
}
示例15: setLaF
import com.jgoodies.looks.plastic.PlasticXPLookAndFeel; //导入依赖的package包/类
public void setLaF() {
try {
PlasticLookAndFeel.setMyCurrentTheme(new ExperienceBlue());
UIManager.setLookAndFeel(new PlasticXPLookAndFeel());
}
catch (Exception e) {
// Gibts eben vorerst kein L&F
e.printStackTrace();
}
}