Skip to content

WebLaF v1.2.11

Compare
Choose a tag to compare
@mgarin mgarin released this 05 Dec 16:31
· 64 commits to master since this release

Release Notes

Styling

  • Any padding or margin set from code won't ever be replaced by the styles now [ #546 ]
  • Any background or foreground colors set from code won't ever be replaced by the styles now [ #562 ]
  • Added new decorationBorder property used in AbstractDecorationPainter which change can be fired on JComponent to forcefully update borders
  • Fixed NPEs and rendering issues for <hr> and possibly some other HTML elements [ #561 ]
  • Fixed style application for cases when previous component skin is different from uninstalled one [ #591 ]
  • Added new AbstractProgressShape which is an IShape implementation for simple custom progress shapes
  • Renamed WebSkin to WebLightSkin and DarkSkin to WebDarkSkin for consistency
  • WebLightSkin identifier changed from weblaf.web.skin to weblaf.light.skin for consistency
  • All XML files of different skins and extensions renamed from skin.xml and extension.xml to more specific names

IconManager [ wiki guide ]

  • Added support for replaceable icons [ #348 ]
  • Simplified IconSet addition and removal in IconManager
  • Any find* methods in IconManager can now return null, while any get* methods will either return non-null value or throw an exception
  • Changed IconSet into a proper base interface for any icon sets, it is now used across all related classes instead of AbstractIconSet
  • Added new RuntimeIconSet for convenient runtime icon set creation
  • Renamed IconData to IconSource for consistency
  • Renamed ImageIconData to ImageIconSource and SvgIconData to SvgIconSource for consistency
  • Added various constructors to ImageIconSource and SvgIconSource for convenient runtime icon data creation
  • Added IconSetExtension for providing skin-related IconSets exclusively

TaskManager [ #576 ]

  • This is a new manager that handles all concurrent tasks within library except for animation which is currently handled by AnimationManager
  • There are a few predefined TaskGroups available that are used by various WebLaF parts, but they can be reconfigured
  • Each TaskGroup is an object with unique identifier that represents a specific group of tasks
  • Multiple classes like ThumbnailGenerator or AsyncTreeModel now use TaskManager for concurrent tasks execution

General API

  • Added new Resource interface for any custom resource that can provide InputStream
  • Fully replaced old inconvenient Resource class, all related places across the code have been adjusted accordingly
  • Added DisabledCopySupplier and TransparentCopySupplier interfaces for convenient modified Icons retrieval
  • Added SvgGrayscale, SvgOpacity and AbstractSvgAdjustment adjustments for SvgIcon
  • Changed SVG Salamander Maven dependency to v1.1.2.2 release from my own fork (see mgarin/svgSalamander)

SVG

  • Removed universe setting from all SvgIcons, completely separate SVGUniverse will be used for each SvgIcon
  • Added method for attribute removal in SvgIcon

LazyContent [ #577 ]

  • This a new custom utility allowing convenient UI initialization involving heavy data loading
  • LazyLoadTrigger represents trigger types for data and UI loading start
  • LazyState represents all possible data and UI states
  • LazyContentListener can be used for listening to data and UI events

LazyPanel [ #577 ]

  • This is a custom Container that provides means for more convenient LazyContent feature usage

Overlay [ #568 ]

  • WebOverlay was fully reworked and now has more convenient API for custom overlay locations and styling support
  • Overlay is a new interface for overlays to be added to WebOverlay component
  • FillOverlay and AlignedOverlay are two basic Overlay implementations for most common use cases
  • WebProgressOverlay have also been reworked, it is based on new WebOverlay and it can display indeterminate progress on a custom canvas overlay

MemoryBar [ #589 ]

  • WebMemoryBar was fully reworked and now fully supports styling

ScrollPane

  • Added two new styles hovering-extending and transparent-hovering-extending with both bars in extending mode
  • Fixed styles initialization order and incorrect corners removal [ #563 ]
  • Fixed issues with hovering and extending scroll pane options
  • Fixed issues with layout when RTL component orientation is used

DockablePane

  • WebDockablePane now supports grouping between it's frames and has a new compact flat style that uses it
  • Multiple WebDockablePane layout improvements to size distribution across visible frames
  • Added support for areaPainter in WebDockablePane style, it allows restyling nine different areas of dockable pane
  • Maximized WebDockableFrame will now cover the whole WebDockablePane area including sidebars
  • WebDockableFrame cannot be dragged anymore when maximized
  • Added support for RTL orientation in all dockable elements

TabbedPane

  • Added support for leading and trailing TabArea components [ #539 ]
  • Added possibility to hide single tab in JTabbedPane [ #74 ]
  • Added support for custom StyleIds for each particular tab in JTabbedPane [ #578 ]
  • Added tabSize setting in TabContainerLayout that can be used to equalize sizes of all tabs [ #554 ]
  • Added new equal style for tabbedpane that keeps all tab sizes equal [ #554 ]
  • Renamed rotated style to vertical for consistency with other components
  • TabMenuItem now extends WebRadioButtonMenuItem instead of WebMenuItem and is now checked if represented tab is selected
  • Improved tab menu style for better representation of available and selected tabs
  • Modified tab background and foreground colors will now be properly used for tab titles
  • Added workaround for endless revalidation loop when tabbed pane is used in some custom layouts like MigLayout
  • Fixed issue with adding new tab when there are existing tabs with null tab component
  • Added forceful hide for other tab components when tab with null component is selected
  • Fixed exception that occurs when using mouse wheel on top of tabbed pane with zero tabs
  • Disabled icons will only receive updates if tab is disabled to avoid preemptively generating them

Menus

  • Added support for check box and radio button menu item icons separate from the state icon [ #573 ]
  • JMenuBar now uses a fully custom UI class as base - WMenuBarUI - instead of the basic Swing one
  • Solved JMenuBar disappearance issue on newer JDK issues [ #545 ]
  • JPopupMenu shadow have been slightly reduced and JMenuBar layout was adjusted to offset first menu
  • Added default child style popupmenu for all JPopupMenus created by JMenu
  • Added base styled style for styled text support in all menu item components

ProgressBar

  • Added new ProgressShape for JProgressBar progress based on AbstractProgressShape
  • Removed hardcoded progress bounds from ProgressBarPainter

StyledLabel

  • Added maximum preferred text width setting support

Link

  • Fixed WebLink translation of LinkAction text if it is a language key [ #547 ]

Accordion

  • Added support for expanded, expanding, collapsed and collapsing states in AccordionPane and it's header
  • WebAccordion animations can now be disabled through new animated setting
  • Added QoL constructors and methods to WebAccordion component
  • Fixed issues appearing when incomplete states are being provided into WebAccordionModel

CollapsiblePane

  • Added support for expanded, expanding, collapsed and collapsing states in WebCollapsiblePane and it's header [ #552 ]
  • WebCollapsiblePane animations can now be disabled through new animated setting

Tree

  • Massively improved performance of tree state restoration in TreeUtils for large trees
  • Added some missing WebTree node-related methods and streamlined expand and collapse methods
  • Fixed various issues with drop location painting that appeared on edge cases
  • Node selection will not occur on disabled tree with line selection mode anymore
  • Removed redundand renderer disabled icon logic, it will now be provided by Look and Feel implementation

DateField

  • Methods setFont, setBackground and setForeground are now forwarded from WebDateField to it's text field [ #580 ]
  • Added a better calculation of potential preferred field size [ #580 ]
  • Calendar popup will not be closed anymore when date or date format is changed while it's open [ #579 ]
  • Now creates a copy of provided Date and returns a copy of selected Date when requested to avoid dealing with it's modification [ #579 ]
  • Replaced raster hardcoded button icon with configurable calendar and calendar-hover icons from IconManager
  • Displayed date text will now be properly adjusted upon pattern change
  • Fixed possible NPEs upon initialization and null date usage

Calendar

  • Replaced raster hardcoded button icons with configurable double-left-big, left-big, right-big and double-right-big icons from IconManager

Switch

  • ActionListener will not fire upon selection change from the code anymore, it will only fire evens when user is interacting with the component [ #400 ]
  • ItemListener can be used to detect all selection change events instead of ActionListener [ #400 ] [ #587 ]

ColorChooser

  • Now uses Color.RED in case null color is passed through, old color will be displayed as none in that case
  • Added support for either color being null in DoubleColorField, null colors will have a special representation
  • Added support for null color in WebColorChooserField, it can be set as null or user can erase text in the field to change color to null
  • WebColorChooserField default selected color is now null instead of Color.WHITE
  • Added support for color's alpha in WebColorChooserField, popup chooser will have that support added later
  • Added a small fix for picker window disposal exceptions in WebColorChooserField

ComboBox

  • Fixed wide popup width not calculating correctly when combobox preferred size is fixed [ #588 ]
  • Replaced widePopup UI property with client property usage, it can now be easily applied to JComboBox as well
  • Improved popup menu size and location calculations

FileChooser

  • Fixed missing "cancel" button

TextArea

  • Fixed size calculation issue in AbstractTextEditorPainter for JDK 9+ [ #558 ]

SyntaxArea

  • Added fix for opacity preservation upon theme change (see bobbylight/RSyntaxTextArea#320 for more information)
  • Renamed transparent preset to nonOpaque for consistency, removed unnecessary colors provision from it
  • Added syntaxarea-scroll-transparent-hovering style and slightly adjusted overall style structure

OptionPane

  • Fixed some inconsistencies between light and dark skins

MultiSplitPane

  • Added orientation state support

InterfaceInspector

  • Fixed some issues with InterfaceInspector behavior

PluginManager

  • Replaced ImageIcon usage with simple Icon for wider icon types support

WebLookAndFeel

  • Simplified disabled icon retrieval, cache is now implemented in revamped ImageUtils class

Utilities

  • Completely revamped ImageUtils and removed a lot of outdated methods and features, streamlined work with Icons and Images
  • Converted NetUtils to fail-fast approach to avoid hiding any exceptions
  • Removed redundant color cache from ColorUtils, there is no point to cache colors as it only makes their usage slower
  • Added new ClientProperty and NullableClientProperty utilities for convenient JComponent client property usage
  • Improved VisibilityBehavior API to provide tracked Component of generic type and have no abstract methods
  • ArrayListAggregator have been replaced with ArrayListBuilder that is a slightly better implementation
  • Added HashSetBuilder similar to ArrayListBuilder and abstract CollectionBuilder as their base class
  • Added new ColorIcon to be used instead of static ImageUtils methods
  • Added new data class Scale for convenient use of double X/Y axis scale values

Clone

  • Added new preconfigured reflective option for cloning any chaotic object structures, Cloneable or not
  • Removed preconfigured adaptive option as redundant

JavaDoc

  • Fixed JavaDoc incorrect and inner class references [ #518 ]

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

Modules

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

  • 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.11</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 v1.2.11 update here:
https://github.com/mgarin/weblaf/tree/v1.2.11/lib

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

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

Renamed:

  • com.alee.skin.web.WebSkin was renamed & moved to com.alee.skin.light.WebLightSkin
  • com.alee.skin.dark.DarkSkin was renamed to com.alee.skin.dark.WebDarkSkin
  • com.alee.extended.dock.SidebarVisibility was renamed to com.alee.extended.dock.SidebarButtonVisibility

Removed/replaced:

  • com.alee.utils.xml.Resource class have been replaced with com.alee.api.resource.Resource interface that is now used for any resource-dependent features like Dictionary or XmlSkin, and it also has three new basic implementations - ClassResource, FileResource and UrlResource

Other changes:

  • WebLightSkin identifier was changed from weblaf.web.skin to weblaf.light.skin for consistency