kirill-grouchnikov / radiance

Building modern, elegant and fast Swing applications
BSD 3-Clause "New" or "Revised" License
807 stars 89 forks source link

[Component] Allow adding BaseProjection to JFlowRibbonBand.addFlowComponent #476

Closed MichaelWDenney closed 3 months ago

MichaelWDenney commented 3 months ago

Version of Radiance (latest release is 8.0-SNAPSHOT)

7.5-SNAPSHOT

Sub-project (Common, Animation, Theming, Component, ...)

Ribbon

Version of Java (current minimum is 9)

21.0.1

Version of OS

Windows 11

The issue you're experiencing (expected vs actual, screenshot, stack trace etc)

There does not appear to be an (obvious?) means of adding a CommandStripProjection to a JRibbonBand.

kirill-grouchnikov commented 3 months ago

That is correct. RibbonBand has a lot of flexibility built into it for resizability, and button strips don't really work within those constraints. Command strips can be added to JFlowRibbonBand as shown in the main BasicCheckRibbon demo.

MichaelWDenney commented 3 months ago

Thanks for the quick response. Ok. So then how can a simple component like a button be added to the JFlowRibbonBand? That is, what is the equivalent of addRibbonCommand in JFlowRibbonBand? (JFlowRibbonBand.addFlowComponent does not support BaseCommandButtonProjection.)

kirill-grouchnikov commented 3 months ago

Ah, looks like I messed it up a bit in one of the two places:

kirill-grouchnikov commented 3 months ago

JFlowRibbonBand API has been updated. If you want to use it to add command button projections, you will need to explicitly set the presentation state on the presentation model.