radiance 2.0 介绍 及 最新库下载 2019-3-30

 

radiance

A set of libraries for building modern, elegant and fast Swing applications

一套用于构建现代、优雅和快速应用程序的库

radiance 现在由   kirill-grouchnikov  维护,github 地址  https://github.com/kirill-grouchnikov/radiance

其中几个核心的库:

Trident 

Trident提供了强大而灵活的动画API,可以从简单的单一属性案例扩展到涉及多个动画的复杂场景。三叉戟为辐射库中的所有动画提供动力。

Substance

Substance提供了一套强大而灵活的API,可用于皮肤Swing 应用程序,以满足最苛刻的现代设计要求。它具有对所有核心Swing组件的内置支持,以及用于一致呈现第三方/应用程序组件的综合API集。

 

一些效果

radiance 2.0 介绍 及 最新库下载 2019-3-30_第1张图片                     radiance 2.0 介绍 及 最新库下载 2019-3-30_第2张图片

 

import javax.swing.JFrame;
import javax.swing.JScrollPane;
import javax.swing.UIManager;
import javax.swing.UnsupportedLookAndFeelException;

import org.pushingpixels.substance.api.SubstanceCortex;

import org.pushingpixels.substance.api.SubstanceSkin;
import org.pushingpixels.substance.api.SubstanceSlices.ImageWatermarkKind;
import org.pushingpixels.substance.api.skin.GraphiteSkin;
import org.pushingpixels.substance.api.skin.SubstanceGraphiteLookAndFeel;
import org.pushingpixels.substance.api.watermark.SubstanceImageWatermark;
import org.pushingpixels.substance.api.*;
import org.pushingpixels.substance.api.SubstanceSlices.*;

//import org.pushingpixels.substance.extras.api.skinpack.OfficeSilver2007Skin;
import org.pushingpixels.substance.api.SubstanceCortex;
import org.pushingpixels.substance.api.skin.BusinessBlackSteelSkin;


       //在主界面类的Main函数增加以下代码
    public static void main(String[] args)
    {

        JFrame.setDefaultLookAndFeelDecorated(true); //界面会改变
        JDialog.setDefaultLookAndFeelDecorated(true); //对话框会改变

        Runnable updateAComponent = new Runnable() //需要开启一个线程
        {
            public void run()
            {
                try
                {
                    //UIManager.setLookAndFeel("org.pushingpixels.substance.api.skin.SubstanceGraphiteLookAndFeel");
                    //UIManager.setLookAndFeel("org.pushingpixels.substance.api.skin.SubstanceCeruleanLookAndFeel");
                    //UIManager.setLookAndFeel("org.pushingpixels.substance.api.skin.SubstanceMarinerLookAndFeel");
                    UIManager.setLookAndFeel("org.pushingpixels.substance.api.skin.SubstanceGeminiLookAndFeel");//We Used
                    //UIManager.setLookAndFeel("org.pushingpixels.substance.api.skin.SubstanceMistSilverLookAndFeel");
                    //UIManager.setLookAndFeel("org.pushingpixels.substance.api.skin.SubstanceGraphiteChalkLookAndFeel");
                    //UIManager.setLookAndFeel("org.pushingpixels.substance.api.skin.SubstanceCremeLookAndFeel");
                    //UIManager.setLookAndFeel("org.pushingpixels.substance.api.skin.SubstanceSaharaLookAndFeel");
                    //UIManager.setLookAndFeel("org.pushingpixels.substance.api.skin.SubstanceDustLookAndFeel");
                    //UIManager.setLookAndFeel("org.pushingpixels.substance.api.skin.SubstanceBusinessLookAndFeel");
                    //UIManager.setLookAndFeel("org.pushingpixels.substance.api.skin.SubstanceDustCoffeeLookAndFeel");
                    //UIManager.setLookAndFeel("org.pushingpixels.substance.api.skin.SubstanceCremeCoffeeLookAndFeel");
                    //UIManager.setLookAndFeel("org.pushingpixels.substance.api.skin.SubstanceBusinessBlackSteelLookAndFeel");
                    //UIManager.setLookAndFeel("org.pushingpixels.substance.api.skin.SubstanceCeruleanLookAndFeel");
                    //UIManager.setLookAndFeel("org.pushingpixels.substance.api.skin.SubstanceNebulaBrickWallLookAndFeel");
                    //UIManager.setLookAndFeel("org.pushingpixels.substance.api.skin.SubstanceNebulaLookAndFeel");
                    //UIManager.setLookAndFeel("org.pushingpixels.substance.api.skin.SubstanceMagellanLookAndFeel");
                    //UIManager.setLookAndFeel("org.pushingpixels.substance.api.skin.SubstanceMistSilverLookAndFeel");
                    //UIManager.setLookAndFeel("org.pushingpixels.substance.extras.api.skinpack.SubstanceOfficeBlue2007LookAndFeel");
                    //UIManager.setLookAndFeel("com.jgoodies.looks.windows.WindowsLookAndFeel");
                    //UIManager.setLookAndFeel("com.jgoodies.looks.plastic.PlasticXPLookAndFeel");
                    //UIManager.setLookAndFeel("com.jgoodies.looks.plastic.Plastic3DLookAndFeel");
                    //SubstanceCortex.GlobalScope.setFocusKind(SubstanceSlices.FocusKind.NONE);
                    //SubstanceCortex.GlobalScope.setSkin(new OfficeSilver2007Skin());
                }
                catch (Exception e)
                {
                    System.out.println("Substance Graphite failed to initialize");
                }

                MainUI MUI = new MainUI();//一个显示主界面,自己定义。
                MUI.setVisible(true);
            }
        };
    }

 

    使用的时候建议编译App 也用 Java8编译,最新的radiance 是用Java8编译的。

    

    编译环境:

        Eclipse IDE for Java Developers

        Version: 2019-03 (4.11.0)

        Build id: 20190314-1200

 

        Java版本:

        C:\Users\Michael>java -version

        java version "1.8.0_201"

        Java(TM) SE Runtime Environment (build 1.8.0_201-b09)

        Java HotSpot(TM) 64-Bit Server VM (build 25.201-b09, mixed mode)

 

    下图是 Java 原生界面 和 Radiance 美化后的界面,是不是高大上了许多。   代码中还有一些不错的主题,可以尝试下,我就是喜欢这一款  SubstanceGeminiLookAndFeel

    Eclipse 导出Jar包,在 ubuntu 下面验证过,界面基本和windows下一致,完美跨平台。

没有美化的原生界面:

 radiance 2.0 介绍 及 最新库下载 2019-3-30_第3张图片     

使用radiance 主题后:

radiance 2.0 介绍 及 最新库下载 2019-3-30_第4张图片

 

        radiance Java8 2019-3-30编译 jar包 下载地址如下:

  

     radiance-substance

       https://download.csdn.net/download/yinggegege/11147651

       

     radiance-substance-extras

       https://download.csdn.net/download/yinggegege/11147654

  

      radiance-trident

      https://download.csdn.net/download/yinggegege/11147656

 

 

 

你可能感兴趣的:(radiance 2.0 介绍 及 最新库下载 2019-3-30)