Wouldn’t you still need to specify the “kind” of drag you are moderating?
With just a boolean on/off now, a later API where one needs to say what kinds of drags (reorder, between tabpanes and drag out) would be hard to create. One don’t want an API with a master switch AND one for each kind of drag IMO. Cheers, Mikael On 30 Jul 2014, at 10:47, Tom Schindl <[email protected]> wrote: > Hi, > > The proposed API only allows to turn on/off dragging all together. > > For your usecase I'd envision a future API which would allow one to > control the aspects you are asking for like. > > The API i currently have in mind is but I have not yet explored: > > // Would allow to cancel dragging of certain tabs > tabDndDragStartCallback: BiFunction<TabPane,Tab,Boolean> > > // Would allow to cancel the dragging of the tab outside the container > // == only allows reordering > tabDndDragExitedCallback: BiFunction<TabPane,Tab,Boolean> > > // Would allow the SOURCE to cancel the dragging to a specific target // > (could make tabDndDragExitedCallback obsolete) > tabDndDragOverTargetCallback: BiFunction<TabPane, Tab, Boolean> > > // Would allow to cancel the drag over in the TARGET > tabDndDragOverCallback: BiFunction<TabPane,Tab,Boolean> > > // Would allow to cancel the dropping of a tab in a container > tabDndDropCallback: BiFunction<TabPane,Tab,Boolean> > > Tom > > On 30.07.14 10:27, Mikael Grev wrote: >> That is decidedly awesome! >> >> Is there some other way of deciding whether to to do one or the other? I >> mean one might want to reorder but not drag to another pane. >> >> Cheers, >> Mikael >> >> On 30 Jul 2014, at 10:09, Tom Schindl <[email protected]> wrote: >> >>> No - it allows also to drag the tab to another TabPane as well and in >>> future outside the window to detach it. >>> >>> Tom >>> >>> On 30.07.14 10:07, Eric Le Ponner wrote: >>>> Hi Tom, >>>> >>>> I wonder if we should really use the wording « dnd ». >>>> The feature is really to enable the user to re-order the tabs >>>> inside a TabPane, right ? >>>> >>>> So may be: >>>> >>>> public boolean isTabReorderingEnabled(); >>>> public void setTabReorderingEnabled(boolean tabReorderingEnabled); >>>> public BooleanProperty tabReorderingEnabledProperty(); >>>> >>>> Eric >>>> >>>> PS: I’m assuming you don’t expect this gesture to work between two >>>> different TabPanes. >>>> >>>> >>>> >>>> Le 30 juil. 2014 à 09:35, Tom Schindl <[email protected]> a >>>> écrit : >>>> >>>>> Hi, >>>>> >>>>> I'd like you to review the API proposed to make TabPane Tabs draggable. >>>>> >>>>> The proposed public API only allows to put the TabPane in DnD mode: >>>>> >>>>> public boolean isDndEnabled() >>>>> public void setDndEnabled(boolean dndEnabled) >>>>> public BooleanProperty dndEnabledProperty() >>>>> >>>>> Tom >>>> >>> >> >
