[REVIEW REQUEST] RT-24088 Add API to JavaFX to allow vetoing the closing of a Tab in a TabPane

Tom Schindl tom.schindl at bestsolution.at
Wed Dec 5 16:57:06 PST 2012


Hi,

On behalf of Jonathan Giles and myself I'd like to request the review
for a new api we'd like to add to javafx.scene.control.Tab.

The API we propose is to allow developers to veto the closing of a Tab
we'd like you to comment also on our naming pattern the new API we
propose is:

+ ObjectProperty<Callback<Tab, Boolean>> onClosingVetoHandlerProperty()
+ Callback<Tab, Boolean> getOnClosingVetoHandler()
+ void setOnClosingVetoHandler(Callback<Tab, Boolean> callback)

Usage of the API would look like this:

Tab tab1 = new Tab("Hello");
tab1.setOnClosingVetoHandler(new Callback<Tab, Boolean>() {

  @Override
  public Boolean call(Tab param) {
    // Veto the closing
    return Boolean.TRUE;
  }
});


Tom

-- 
B e s t S o l u t i o n . a t                        EDV Systemhaus GmbH
------------------------------------------------------------------------
tom schindl                 geschäftsführer/CEO
------------------------------------------------------------------------
eduard-bodem-gasse 5-7/1   A-6020 innsbruck     fax      ++43 512 935833
http://www.BestSolution.at                      phone    ++43 512 935834


More information about the openjfx-dev mailing list