Skip to content

Commit

Permalink
Remove an unused client property
Browse files Browse the repository at this point in the history
  • Loading branch information
kirill-grouchnikov committed Sep 11, 2022
1 parent 6eda2d9 commit 0a0c2e4
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -99,11 +99,6 @@ public class RadianceButtonUI extends BasicButtonUI implements
*/
static final String LOCK_OPACITY = "radiance.theming.internal.lockopacity";

/**
* Internal property used to mark close buttons on title panes.
*/
public static final String IS_TITLE_CLOSE_BUTTON = "radiance.theming.internal.isTitleCloseButton";

/**
* Painting delegate.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -440,8 +440,6 @@ protected void createButtons() {
RadianceCoreUtilities.markButtonAsFlat(this.maxButton);
RadianceCoreUtilities.markButtonAsFlat(this.closeButton);

this.closeButton.putClientProperty(RadianceButtonUI.IS_TITLE_CLOSE_BUTTON, Boolean.TRUE);

this.enableActions();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -475,8 +475,6 @@ public Dimension getIconDimension() {
RadianceThemingCortex.ComponentOrParentScope.setBackgroundAppearanceStrategy(this.closeButton,
RadianceThemingSlices.BackgroundAppearanceStrategy.FLAT);

this.closeButton.putClientProperty(RadianceButtonUI.IS_TITLE_CLOSE_BUTTON, Boolean.TRUE);

if (this.getWindowDecorationStyle() == JRootPane.FRAME) {
this.minimizeButton = this.createTitleButton();
this.minimizeButton.setAction(this.iconifyAction);
Expand Down

4 comments on commit 0a0c2e4

@ed-erwin-tf
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was unused by you, but used by me.
I have a work-around (hack), but this constant was useful.

I have some JTabbedPane instances where I allow a user to detach the tab and open it in a new window. When they press the close button, it goes back into a tab. For this use, it is nice to change the icon and tooltip so the user can know the contents of the window aren't going to go away forever if they press the close button.

@kirill-grouchnikov
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This always was an internal client property. I'd love to see a couple of screenshots of how it looks like on your side to see how such a flow can be enabled in a more official fashion.

@ed-erwin-tf
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

re-dock
tabs

Sadly our toolbar icons are not the best! But you can get the idea here. Downward triangle causes a window to close and go back into the tab pane.

@kirill-grouchnikov
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See #444 for customizing title pane buttons

Please sign in to comment.