public class MultiSelectModel<T> extends Object
Modifier and Type | Class and Description |
---|---|
static class |
MultiSelectModel.Trumped<T,U>
A MultiSelectModel-ish which represents two trumped selections.
|
Modifier and Type | Field and Description |
---|---|
protected PublishSubject<T> |
clicked |
protected boolean |
isCtrl |
protected RxBox<Optional<T>> |
mouseOver |
protected RxBox<ImmutableSet<T>> |
selection |
Constructor and Description |
---|
MultiSelectModel()
Creates an MultiSelectModel from scratch.
|
MultiSelectModel(RxBox<Optional<T>> mouseOver,
RxBox<ImmutableSet<T>> selection,
PublishSubject<T> clicked)
Creates a MultiSelectModel from the given SelectionModels.
|
Modifier and Type | Method and Description |
---|---|
PublishSubject<T> |
clicked()
A publish subject which responds to clicks.
|
boolean |
isCtrl() |
void |
isCtrl(boolean isCtrl) |
RxBox<Optional<T>> |
mouseOver()
Returns the mouseOver selection.
|
static <T,U> Optional<Either<T,U>> |
optEitherFrom(Either<Optional<T>,Optional<U>> either)
Creates an Optional
|
RxBox<ImmutableSet<T>> |
selection()
Returns the current selection.
|
<U> MultiSelectModel.Trumped<T,U> |
trump(MultiSelectModel<U> other)
Mouseover and selection in this model will trump whatever is in the other.
|
protected final RxBox<ImmutableSet<T>> selection
protected final PublishSubject<T> clicked
protected boolean isCtrl
public MultiSelectModel(RxBox<Optional<T>> mouseOver, RxBox<ImmutableSet<T>> selection, PublishSubject<T> clicked)
public MultiSelectModel()
public RxBox<ImmutableSet<T>> selection()
public PublishSubject<T> clicked()
public boolean isCtrl()
public void isCtrl(boolean isCtrl)
public <U> MultiSelectModel.Trumped<T,U> trump(MultiSelectModel<U> other)