Coder Social home page Coder Social logo

pirola / substance Goto Github PK

View Code? Open in Web Editor NEW

This project forked from kirill-grouchnikov/substance

0.0 1.0 0.0 131.11 MB

A modern and high-performant Swing look-and-feel library

License: BSD 3-Clause "New" or "Revised" License

Shell 0.16% Java 66.62% HTML 32.98% JavaScript 0.17% CSS 0.07%

substance's Introduction

Substance look and feel

Getting started

If you are new to Swing, start with the general Swing tutorial. If you are new to look-and-feels, read the getting started first.

To use Substance in your applications, choose one of the following options:

  • Use one of the skin-based look-and-feel classes (light or dark).
  • Extend the SubstanceLookAndFeel class and pass a SubstanceSkin instance to the super constructor.
  • Use the static setSkin(SubstanceSkin) or setSkin(String) APIs in SubstanceCortex.GlobalScope to set the specific skin.

In any case, add the latest substance.jar and the matching trident.jar to your classpath.

The main test application is in the substance-demo uses the FormLayout and components from SwingLabs. In addition, substance-samples has a collection of self-contained samples that show more advanced usage of Substance APIs for custom application skinning.

Have a question? See the FAQ and the list of known issues, and if you don't see an answer there, file a bug or get in touch.

Adding Substance to your application

If you've skipped getting started page, to add Substance to your app follow these steps:

  • Go to the main project page.
  • Navigate to the drop folder. This should take you to the sub-folder that contains the downloads for the latest / earlier releases.
  • Click on the specific X.Y.ZZ row. It's highly recommended to always use the latest stable release.
  • Download substance-X.Y.ZZ.jar file from there.
  • Also download trident-L.M.NN.jar file from there - this is the Trident animation library that is a required runtime dependency.

Configure and customize

You can use Substance-specific APIs to add custom functionality to your components. See the list of [API calls](www/docs/api.md), [client properties](www/docs/client-properties.md) and [VM flags](www/docs/vmflags.md) for more information. To configure the animations, consult the [animation overview](www/docs/animations.md).

Substance can be customized to fit your visual needs. The overall visuals are controlled by skins, with each skin defined by color scheme bundles and painters. The skinning primer has a few tips on how to use the different Substance painters in applications that wish to paint custom components in a way that is consistent with other Substance visuals. The substance-samples project provides additional self-contained samples that show more advanced usage of Substance APIs for custom application skinning.

Plugins

While the core Swing components cover the base UI functionality that most applications require, modern UIs need modern UI components. To address this need, Substance comes with a built-in support to define and load plugins that provide consistent appearance and interaction for third-party components.

During the initialization of your application in the main() method - before creating your first window - use these SubstanceCortex.GlobalScope APIs to register plugins:

  • registerComponentPlugin() for registering the specific component plugin
  • registerSkinPlugin() for registering the specific skin plugin

Substance plugin for Flamingo components is the only actively developed and fully supported first-party component plugin.

Substance plugin for SwingX components is being kept in sync with the latest core Substance library. However, since the core SwingX project is effectively dead (last official 1.6.4 release is from July 2013), there is no more active new development in that plugin.

Substance Extras pack provides additional watermarks, color schemes and skins and is another example of a Substance plugin.

substance's People

Contributors

chaddiller avatar ivanrf avatar kirill-grouchnikov avatar martinec avatar pirola avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.