Skip to content

WebLaF v1.2.12

Compare
Choose a tag to compare
@mgarin mgarin released this 13 Jan 10:23
· 42 commits to master since this release

Release Notes

This update mostly includes internal code refactoring and polishing, minor visual improvements for various components and bug fixes for a few issues that were uncovered in previous updates.

You can find full list of issues resolved in this updated here:
https://github.com/mgarin/weblaf/milestone/23?closed=1

Styling

  • WebShape implementations of IShape have been reworked and will now properly support separate round values for different component corners for both border and background [ #598 ]
  • Styleable.getShape () method have been renamed to Styleable.getPainterShape () to avoid clashing with JDK7+ methods in Window components, this also fixes recently introduced problem with decorated Web-windows not being properly displayed on the screen under JDK7+

Dockable framework

  • Fixed WebDockableFrame sidebar button border color for default style [ #596 ]
  • Minor translation adjustments for WebDockableFrame header buttons [ #601 ]

PopupMenu

  • Fixed JPopupMenu window shape cleanup on menu becoming invisible, this should fix a set of issues that could appear on Linux and even Windows systems [ #602 ]
  • Setting popupMenuWay will now be preserved across multiple popup menu displays [ #603 ]

MemoryBar

  • Added support for MemoryBarListener in WebMemoryBar to provide a way to execute pre- and post- GC actions

HotkeyLabel

  • Improved dark skin colors

Calendar

  • Improved days separator gradient colors and positioning

ButtonPopup

  • ButtonPopup have been completely removed from the library due to conflicts with existing features and overall poor functioning of the component, it might get reworked and added back to the library in the future but for now I don't have any actual plans for that

Utilities

  • Fixed an issue with drives being identified as hidden in NonHiddenFilter implementation
  • Fixed vertical fill property usage in AlignLayout
  • Improved DirectoriesFilter to accept any directory-like Files
  • Added Clone.nonNullClone ( ... ) method allowing to always receive non-null result or an exception, adjusted all classes using Clone to use nonNullClone ( ... ) method if necessary
  • Added Merge.nonNullMerge ( ... ) methods for merging non-null objects and retrieving non-null merge result, adjusted all classes using Merge to use nonNullMerge ( ... ) method if necessary
  • Added TextUtils.collectionToString ( ... ) method

JavaDoc

  • ColorChooserListener.java - Removed reference to missing generic
  • Cleaned up some StyleId mentions across all classes
  • Fixed a few typos in JavaDoc of different classes

Internal changes

  • All component descriptors have been updated with complete information about component's Painters
  • Streamlined all UI implementations to use PainterSupport instead of custom code and calls
  • UI implementations do not own Painter instance anymore, those are stored in JComponent's client properties only
  • Removed some unnecessary method bridges from UI implementations
  • Streamlined all SpecificPainter implementations to implement ParameterizedPaint use PaintParameters instead of custom setup methods
  • PainterSupport.java - Can now be used to access painter settings (padding, margin, shape etc) of any particular component
  • PainterSupport.java - Added some of the missing margin and padding methods
  • Paintable.java - Removed and merged methods into Styleable API, also these methods might be changed soon
  • ShapeSupport.java, ShapeMethods.java, ShapeMethodsImpl.java - Removed and merged methods into Styleable API
  • MarginSupport.java, MarginMethods.java, MarginMethodsImpl.java - Removed and merged methods into Styleable API
  • PaddingSupport.java, PaddingMethods.java, PaddingMethodsImpl.java - Removed and merged methods into Styleable API
  • Removed shape, padding and margin bridge methods from all UI implementations as redundant, similar bridge methods remain in components API
  • ComponentStyle.java, ComponentStyleConverter.java - Adjusted margin and padding read and application
  • AbstractDecorationPainter.java, WebBreadcrumb.java - Replaced old way of retrieving component Painter
  • StyleManager.java - Simplified descriptor methods due to generics not being used
  • WebRootPaneUI.java - Removed unnecessary check from installWindowDecorations () method that caused issues with new Painter usage
  • WebFrame.java, WebDialog.java, WebWindow.java - Changed custom JRootPane implementations to use StyleId.auto for simplicity
  • WebFileChooserUI.java - Removed duplicate property check
  • WebOptionPaneUI.java - Simplified and refactored code
  • CheckIcon.java, CheckIcon.xsd, RadioIcon.java, RadioIcon.xsd, MixedIcon.java, MixedIcon.xsd - Removed redundant duplicate size setting
  • TextRanges.java - Removed redundant part of ranges parsing
  • AbstractMenuGenerator.java - Made grouping methods more strict
  • AbstractTextureBackground.java - Removed redundant check method, made texture availability as a requirement
  • AbstractTextureBackground.java - Fixed texture caching
  • ListMergeBehavior.java - Simplified internal merge condition
  • HotkeyLabelBackground.xsd, Backgrounds.xsd - Added missing XSD
  • TableHeaderPainter.java - Proper cleanup of renderer pane in some edge cases
  • PopupMenuPainter.java - Cleaned up the code and comments for future convenience
  • Added @NotNull and @Nullable annotations across all modified classes

Modules

There were no module changes in this update.
Here is a full list of modules available in v1.2.12:

  • weblaf-core - Module containing all basic managers, interfaces and classes
  • weblaf-ui - Module containing all components, UIs, painters, skins, managers and related classes
  • weblaf-plugin - Module containing PluginManager [ wiki guide ]
  • weblaf-ninepatch-editor - Module containing NinePatchEditor
  • weblaf-demo - Module containing DemoApplication

To use WebLaF as your application L&F you will need weblaf-core and weblaf-ui modules. Other modules are just extras for now.

Dependencies

To WebLaF in your Maven project you can use this dependency:

<dependency>
    <groupId>com.weblookandfeel</groupId>
    <artifactId>weblaf-ui</artifactId>
    <version>1.2.12</version>
</dependency>

It will automatically resolve all module and 3rd-party library dependencies.

Also WebLaF Maven artifact identifiers are equal to module names mentioned above, so if you need any of the optional modules - you can simply use them by their module name in Maven dependency.

If you're not using Maven - you can find all necessary dependencies for this update here:
https://github.com/mgarin/weblaf/tree/v1.2.12/lib

Migration notes [ v1.2.11 -> v1.2.12 ]

There were a few changes in v1.2.12 that break API.

Changed:

  • Clone usage removed from Merge constructor, ClonePolicy replaces it as one of constructor options
  • SkipClonePolicy and PerformClonePolicy are two basic implementations of ClonePolicy available
  • SkipClonePolicy is now used in Merge by default instead of null provided as Clone before
  • NodesDragViewHandler is not abstract anymore, nodesViewLimit can now simply be provided in constructor

Renamed:

  • Styleable.getShape () method have been renamed to Styleable.getPainterShape () to avoid clashing with JDK7+ methods in Window components, this also fixes recently introduced problem with decorated Web-windows not being properly displayed on the screen under JDK7+

Removed:

  • ShapeUtils rounded shape creation method have been removed as inconsistent and replaced with createBorderShape ( ... ) and createFillShape ( ... ) methods [ #598 ]
  • ButtonPopup have been completely removed from the library due to conflicts with existing features and overall poor functioning of the component, it might get reworked and added back to the library in the future but for now I don't have any actual plans for that