Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tabbed pane rendering enhancements #35

Closed
mgarin opened this issue Sep 5, 2013 · 2 comments
Closed

Tabbed pane rendering enhancements #35

mgarin opened this issue Sep 5, 2013 · 2 comments

Comments

@mgarin
Copy link
Owner

mgarin commented Sep 5, 2013

There are currently multiple issues with tabbed pane:

  • It is not rendered properly with RTL orientation
  • Only TOP tab location properly supported
  • Incorrect old-style focus rendering
  • Scroll layout is not properly supported
  • Tab title pads are not properly visually connected to the content area

On top of that it is still not using decorations and painters properly.
Some major improvements and changes are required.

@ghost ghost assigned mgarin Sep 5, 2013
@mgarin mgarin modified the milestone: Small issues Sep 30, 2014
@mgarin mgarin added this to the v1.29 milestone May 13, 2016
@mgarin
Copy link
Owner Author

mgarin commented Jun 9, 2016

Here is what I am planning to do to fix tabbed pane rendering once and for all:

  1. Remove all redundant default spacings and borders
  2. Replace messy tab titles layout with a custom customizable one
  3. Replace messy scroll layout elements with custom ones
  4. Replace tabbed pane painter with a new clean one which:
    • Will be based on decoration painter
    • Will support section painter for tabs area
    • Will support section painter for tab titles
    • Will support section painter for content area
  5. Provide clean and easily replaceable styles for all new parts of tabbed pane

This should fix all of the issues mentioned above and also allow deep customization options for tabbed pane component similar to other components I have already switched to styling and decorations usage.

@mgarin mgarin added enhancement and removed bug labels Sep 27, 2016
@mgarin mgarin changed the title Tabbed pane rendering issues Tabbed pane rendering enhancements Sep 27, 2016
@mgarin mgarin modified the milestones: v1.2.9, v1.3.0 Aug 5, 2019
@mgarin mgarin modified the milestones: v1.3.0, v1.2.10 Aug 5, 2019
mgarin added a commit that referenced this issue Sep 19, 2019
- WTabbedPaneUI.java - Brand new basic `JTabbedPane` UI implementation based on components instead of workarounds
- WebTabbedPaneUI.java - Streamlined and simplified, all important elements are now defined in `WTabbedPaneUI`
- TabbedPaneLayout.java - New layout that aligns UI elements within `JTabbedPane` itself according to it's settings
- TabbedPaneInputListener.java - Base interface for custom `UIInputListener`s for `JTabbedPane`
- WTabbedPaneInputListener.java - Default `TabbedPaneInputListener` implementation
- TabArea.java - New component representing whole tab area in `JTabbedPane`
- TabAreaLayout.java - New layout that aligns UI elements in `TabArea` according to `JTabbedPane` settings
- TabViewport.java - New component representing tabs viewport in `JTabbedPane`
- TabContainer.java - New component representing tabs container in `JTabbedPane`
- TabContainerLayout.java - New layout that aligns UI elements in `TabContainer` according to `JTabbedPane` settings
- Tab.java - New component representing a single tab in `JTabbedPane`
- TabMenuButton.java - New component representing menu button for `JTabbedPane.SCROLL_TAB_LAYOUT`
- TabMenuItem.java - New component representing menu item for a single tab in `JTabbedPane`
- TabbedPanePainter.java - Added `tabContentPainter` for customizing content area background
- WebTabbedPane.java - Removed unnecessary forceful tab title translation
- WebLookAndFeel.java - Added new `Alt+Left`/`Alt+Right` key bindings for navigating to previous/next tabs
- tabbedpane.xml - Completely revamped to provide styles for all new UI elements in `JTabbedPane`
- language.xml - Added translation for the default fallback tab name in tabs menu
- WebTabbedPaneStyle.java, WebBasicTabbedPaneUI.java - Removed as deprecated and redundant
- NeoTabbedPaneUI.java - Removed as redundant, was only used as a UI test example before

DocumentPane
- TabTitleComponent.java - New custom `WebPanel`-based component that represents default `WebDocumentPane` tab title
- DefaultTabTitleComponentProvider.java, TabTitleComponent.java - Adjusted to provide better customization through styles
- DocumentData.java - Replaced list of `DocumentDataListener`s with a proper `EventListenerList` usage
- DocumentData.java - Made foreground and background `@Nullable` and `null` by default instead of fixed values

Popup [ #538 ]
- WebPopup.java - Fixed possible incorrect popup state, it will now always dispose properly upon window being closed
- WebPopup.java - Added `opaque` property change fix for some JDK versions

Label [ #542 ]
- WLabelInputListener.java, WLabelUI.java - Restored functionality of mnemonics on all label components
- LabelInputListener.java - Base interface for custom label `UIInputListener`s

ScrollPane
- ScrollPaneLayout.java, ViewportLayout.java - Renamed for consistency with other custom layout managers
- scrollpane.xml - Fixed `undecorated` style to properly hide corners decoration
- scrollpane.xml - Adjusted according to name changes

Tree
- WebTree.java - Fixed `getAvailableNodes(...)` method not using provided parent
- WebTree.java - Changed `private` modifier on a few older methods to `protected` to make them overridable

InterfaceTree
- InterfaceTreeDataProvider.java - Added fix for AWT components
- AWTComponentPreview.java, WComponentPreview.java - Added better name rendering solution for component classes

Styling
- AbstractDecorationPainter.java - Added new `has-children` and `has-no-children` states pointing at existence or absence of child components
- AbstractDecorationPainter.java - Fixed initial state of `in-focused-parent` and `in-hovered-parent` not being updated on component display
- AbstractSectionDecorationPainter.java - Disabled listeners for container states
- Icons.java, web.xml, dark.xml - Added `menu`, `menu-dimmed` and `menu-hover` general icons

Language
- UILanguageManager.java - Fixed dictionary listeners constant for component client properties
- UILanguageManager.java - Removed unnecessary language data size check

LookAndFeel
- WebLookAndFeel.java - Added key bindings for all fully revamped components with proper action name references
- NativeFonts.java - Added proper native fonts support for JDK7+ under Windows OS
- NativeFonts.java - Replaced global debug flag with a local configurable one, it is now also enabled by default
- LafLookup.java - Added support for RTL bindings for `getInputMap` method

Utilities
- SizeCache.java - New utility for `Component` sizes caching convenience for various layout calculations
- ProprietaryUtils.java - Fixed mixing cutout shape support for JDK9+
- DebugUtils.java - Removed mostly unused debug flag
- HtmlUtils.java - Removed all deprecated methods, HTML shouldn't be used for text highlight anymore
- JarStructure.java - Is now a self-sufficient class that can generate JAR structure
- JarUtils.java - Removed as redundant, `JarStructure` is now self-sufficient, a few useful methods moved to `FileUtils`
- ArrayUtils.java, CollectionUtils.java - Added method for round-robin element retrieval
- HoverAdapter.java - Removed as redundant for a single-method interface

DemoApplication
- JTabbedPaneExample.java - New example for `JTabbedPane` component
- WebDocumentPaneExample.java - New example for `WebDocumentPane` component

Other
- LibraryInfoDialog.java - Removed unnecessary custom tab separator component
- info-extension.xml - Updated according to `tabbedpane` style changes
- StyleEditor.java - Slightly improved used styles and UI elements, big revamp is coming in next updates
- styleeditor.xml - Adjusted styles according to UI changes

Project
- intellij-idea-inspections.xml - Updated inspection profile
@mgarin
Copy link
Owner Author

mgarin commented Sep 19, 2019

All of the issues mentioned here have been addressed with the recent commit. JTabbedPane now uses a brand new UI implementation written without relying on a messy BasicTabbedPaneUI.

There could still be some issues with state changes and visual updates lurking in the code so I will be testing these changes on a few projects before the final release.

@mgarin mgarin closed this as completed Sep 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant