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

Leading and trailing components for JTabbedPane tab area #539

Closed
mgarin opened this issue Sep 19, 2019 · 1 comment
Closed

Leading and trailing components for JTabbedPane tab area #539

mgarin opened this issue Sep 19, 2019 · 1 comment
Assignees
Projects

Comments

@mgarin
Copy link
Owner

mgarin commented Sep 19, 2019

Once #35 is implemented in v1.2.10 update I'll be free to add new features to JTabbedPane and the first one that is often requested is possibility to add leading/trailing components to the tab run (before and after the tabs).

Since new JTabbedPane UI implementation will be using custom containers for all of it's parts - it will be pretty easy to add and will surely be worth it.

@mgarin mgarin added this to the v1.2.11 milestone Sep 19, 2019
@mgarin mgarin self-assigned this Sep 19, 2019
@mgarin mgarin added this to Planned in v1.2.11 via automation Sep 19, 2019
@mgarin mgarin changed the title Add support for leading and trailing components within JTabbedPane Leading and trailing components for JTabbedPane tab area Sep 19, 2019
mgarin added a commit that referenced this issue Nov 11, 2019
- WebTabbedPane.java - Added methods for configuring leading and trailing `TabArea` components
- WTabbedPaneUI.java, TabAreaLayout.java - Added support for leading and trailing `TabArea` components
- TabContainerLayout.java - Last tab run will now always adjust it's height to remaining space to avoid unused space in case of wide leading or trailing components

Utilities
- ClientProperty.java, NullableClientProperty.java - Added notes for future improvements
@mgarin
Copy link
Owner Author

mgarin commented Nov 11, 2019

Support for leading and trailing TabArea components have been added.

To setup/retrieve leading or trailing component you can use these methods of WebTabbedPane:

public JComponent getLeadingTabAreaComponent ()
public JComponent setLeadingTabAreaComponent ( JComponent )
public JComponent getTrailingTabAreaComponent ()
public JComponent setTrailingTabAreaComponent ( JComponent )

You can also use these properties with JTabbedPane as well through property constants:

WebTabbedPane.LEADING_TAB_AREA_COMPONENT_PROPERTY.get ( tabbedPane );
WebTabbedPane.LEADING_TAB_AREA_COMPONENT_PROPERTY.set ( tabbedPane, component );
WebTabbedPane.TRAILING_TAB_AREA_COMPONENT_PROPERTY.get ( tabbedPane );
WebTabbedPane.TRAILING_TAB_AREA_COMPONENT_PROPERTY.set ( tabbedPane, component );

These changes will be available in v1.2.11 update.

@mgarin mgarin closed this as completed Nov 11, 2019
v1.2.11 automation moved this from Planned to Completed Nov 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
v1.2.11
  
Completed
Development

No branches or pull requests

1 participant