本文整理汇总了Java中javafx.beans.property.BooleanPropertyBase类的典型用法代码示例。如果您正苦于以下问题:Java BooleanPropertyBase类的具体用法?Java BooleanPropertyBase怎么用?Java BooleanPropertyBase使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
BooleanPropertyBase类属于javafx.beans.property包,在下文中一共展示了BooleanPropertyBase类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: objectEvent
import javafx.beans.property.BooleanPropertyBase; //导入依赖的package包/类
private void objectEvent(final ObservableDataContainer container)
{
dataContainer = container;
Platform.runLater( () -> {
PropertyListener propertyListener = new PropertyListener();
List<BooleanPropertyBase> leftList = dataContainer.getLeftPropertyList();
List<BooleanPropertyBase> rightList = dataContainer.getRigtPropertyList();
dupTableView.setItems(container.getObservableList());
for(int i = 0; i < leftList.size(); i++)
{
leftList.get(i).addListener(propertyListener);
rightList.get(i).addListener(propertyListener);
}
});
}
示例2: QualityGauge
import javafx.beans.property.BooleanPropertyBase; //导入依赖的package包/类
public QualityGauge() {
aspectRatio = PREFERRED_HEIGHT / PREFERRED_WIDTH;
backgroundPaint = Color.TRANSPARENT;
borderPaint = Color.TRANSPARENT;
borderWidth = 0d;
model = GaugeBuilder.create()
.minValue(0)
.maxValue(10)
.startAngle(0)
.angleRange(180)
.sectionsVisible(true)
.sections(NORMAL_ORDER)
.build();
reverseOrder = new BooleanPropertyBase(false) {
@Override protected void invalidated() { model.setSections(get() ? REVERSE_ORDER : NORMAL_ORDER); }
@Override public Object getBean() { return QualityGauge.this; }
@Override public String getName() { return "reverseOrder"; }
};
setAlignment(Pos.TOP_CENTER);
init();
initGraphics();
registerListeners();
}
示例3: Btn
import javafx.beans.property.BooleanPropertyBase; //导入依赖的package包/类
public Btn(final String TEXT) {
getStyleClass().setAll("btn");
rounded = new BooleanPropertyBase(false) {
@Override public Object getBean() { return Btn.this; }
@Override public String getName() { return "rounded"; }
};
buttonColor = new ObjectPropertyBase<Color>(Color.WHITE) {
@Override public Object getBean() { return Btn.this; }
@Override public String getName() { return "buttonColor"; }
};
thumbColor = new ObjectPropertyBase<Color>(Color.WHITE) {
@Override public Object getBean() { return Btn.this; }
@Override public String getName() { return "thumbColor"; }
};
textColor = new ObjectPropertyBase<Color>(Color.WHITE) {
@Override public Object getBean() { return Btn.this; }
@Override public String getName() { return "textColor"; }
};
text = new StringPropertyBase(TEXT) {
@Override public Object getBean() { return Btn.this; }
@Override public String getName() { return "textOn"; }
};
disabledProperty().addListener(o -> setOpacity(isDisabled() ? 0.4 : 1.0));
}
示例4: CardBox
import javafx.beans.property.BooleanPropertyBase; //导入依赖的package包/类
public CardBox(final Card... CARDS) {
super(CARDS);
cards = FXCollections.observableArrayList();
cards.addAll(CARDS);
firstTime = true;
open = new BooleanPropertyBase(false) {
@Override protected void invalidated() { handleState(get()); }
@Override public Object getBean() { return CardBox.this; }
@Override public String getName() { return "open"; }
};
cardHandler = e -> handleCardSelect((Card) e.getSource());
selectedCard = cards.size() == 0 ? null : cards.get(cards.size() - 1);
openTransition = new ParallelTransition();
closeTransition = new SequentialTransition();
initGraphics();
registerListeners();
}
示例5: QualityGauge
import javafx.beans.property.BooleanPropertyBase; //导入依赖的package包/类
public QualityGauge() {
aspectRatio = PREFERRED_HEIGHT / PREFERRED_WIDTH;
backgroundPaint = Color.TRANSPARENT;
borderPaint = Color.TRANSPARENT;
borderWidth = 0d;
model = GaugeBuilder.create()
.minValue(0)
.maxValue(10)
.startAngle(0)
.angleRange(180)
.sectionsVisible(true)
.sections(NORMAL_ORDER)
.build();
reverseOrder = new BooleanPropertyBase(false) {
@Override protected void invalidated() { model.setSections(get() ? REVERSE_ORDER : NORMAL_ORDER); }
@Override public Object getBean() { return QualityGauge.this; }
@Override public String getName() { return "reverseOrder"; }
};
init();
initGraphics();
registerListeners();
}
示例6: includePseudoClassWhen
import javafx.beans.property.BooleanPropertyBase; //导入依赖的package包/类
public static void includePseudoClassWhen(Node node, PseudoClass pseudoClass, ObservableValue<? extends Boolean> condition) {
BooleanProperty pseudoClassState = new BooleanPropertyBase(false) {
@Override
protected void invalidated() {
node.pseudoClassStateChanged(pseudoClass, get());
}
@Override
public Object getBean() {
return node;
}
@Override
public String getName() {
return pseudoClass.getPseudoClassName();
}
};
pseudoClassState.bind(condition);
}
示例7: Alarm
import javafx.beans.property.BooleanPropertyBase; //导入依赖的package包/类
public Alarm() {
getStyleClass().add("alarm");
currentValue = new BooleanPropertyBase(false) {
@Override
public Object getBean() {
return Alarm.this;
}
@Override
public String getName() {
return "currentValue";
}
};
name = new SimpleStringProperty(Alarm.this, "name", "");
}
示例8: call
import javafx.beans.property.BooleanPropertyBase; //导入依赖的package包/类
@Override
public Void call(Pair<ObservableList<Integer>, Boolean> pair)
{
List<BooleanPropertyBase> leftList = dataContainer.getLeftPropertyList();
for(Integer index : pair.first)
{
if(pair.second.booleanValue())
leftList.get(index.intValue()).set(true);
else if(leftList.get(index.intValue()).get())
leftList.get(index.intValue()).set(false);
}
return null;
}
示例9: ObservableDataContainer
import javafx.beans.property.BooleanPropertyBase; //导入依赖的package包/类
public ObservableDataContainer(ObservableList<DupData> list, List<BooleanPropertyBase> leftList, List<BooleanPropertyBase> rightList, Map<BooleanPropertyBase, BooleanPropertyBase> propertyMap, Map<String, String> deviceMap)
{
this.observableList = list;
this.booleanLeftPropertyList = leftList;
this.booleanRightPropertyList = rightList;
this.booleanPropertyMap = propertyMap;
this.deviceMap = deviceMap;
}
示例10: Segment
import javafx.beans.property.BooleanPropertyBase; //导入依赖的package包/类
public Segment(final boolean ACTIVE) {
getStylesheets().add(Segment.class.getResource("styles.css").toExternalForm());
getStyleClass().add("segment");
timeline = new Timeline();
active = new BooleanPropertyBase(ACTIVE) {
@Override public Object getBean() { return Segment.this; }
@Override public String getName() { return "active"; }
};
init();
initGraphics();
registerListeners();
}
示例11: MyControl
import javafx.beans.property.BooleanPropertyBase; //导入依赖的package包/类
public MyControl() {
getStyleClass().add("my-control");
on = new BooleanPropertyBase(false) {
@Override protected void invalidated() { pseudoClassStateChanged(ON_PSEUDO_CLASS, get()); }
@Override public Object getBean() { return MyControl.this; }
@Override public String getName() { return "on"; }
};
color = new SimpleStyleableObjectProperty<>(COLOR, MyControl.this, "color");
_value = 0;
}
示例12: Led
import javafx.beans.property.BooleanPropertyBase; //导入依赖的package包/类
public Led() {
on = new BooleanPropertyBase(false) {
@Override protected void invalidated() { pseudoClassStateChanged(ON_PSEUDO_CLASS, get()); }
@Override public Object getBean() { return this; }
@Override public String getName() { return "on"; }
};
color = new SimpleStyleableObjectProperty<>(COLOR, this, "color");
initGraphics();
registerListeners();
}
示例13: CustomControl
import javafx.beans.property.BooleanPropertyBase; //导入依赖的package包/类
public CustomControl(final SkinType SKIN_TYPE) {
getStyleClass().add("custom-control");
skinType = SKIN_TYPE;
on = new BooleanPropertyBase(false) {
@Override protected void invalidated() { pseudoClassStateChanged(ON_PSEUDO_CLASS, get()); }
@Override public Object getBean() { return this; }
@Override public String getName() { return "on"; }
};
color = new SimpleStyleableObjectProperty<>(COLOR, this, "color");
}
示例14: ChannelCell
import javafx.beans.property.BooleanPropertyBase; //导入依赖的package包/类
/**
* Channelist ChannelCell
*/
public ChannelCell() {
this.isOnline = new BooleanPropertyBase() {
@Override
public void invalidated() {
pseudoClassStateChanged(ONLINE_PSEUDOCLASS, get());
}
@Override
public String getName() {
return "online";
}
@Override
public Object getBean() {
return ChannelCell.this;
}
};
getStyleClass().add("channel-cell");
this.isPlaylist = new BooleanPropertyBase() {
@Override
public void invalidated() {
pseudoClassStateChanged(PLAYLIST_PSEUDOCLASS, get());
}
@Override
public String getName() {
return "isPlaylist";
}
@Override
public Object getBean() {
return ChannelCell.this;
}
};
getStyleClass().add("channel-cell");
this.hasReminder = new SimpleBooleanProperty();
}
示例15: createMainMenuVisibleProperty
import javafx.beans.property.BooleanPropertyBase; //导入依赖的package包/类
private BooleanProperty createMainMenuVisibleProperty() {
BooleanProperty mainMenuVisibleProperty = new BooleanPropertyBase(true) {
@Override
public String getName() {
return "mainMenuVisibleProperty";
}
@Override
public Object getBean() {
return this;
}
};
mainMenuVisibleProperty.addListener(new ChangeListener<Boolean>() {
@Override
public void changed(ObservableValue<? extends Boolean> observable, Boolean oldValue,
Boolean newValue) {
if (newValue) {
onMainMenuShow();
} else if (tabsProperty.size() > 0) {
onMainMenuHide();
}
}
});
return mainMenuVisibleProperty;
}