本文整理汇总了Java中javafx.beans.property.ReadOnlyBooleanWrapper类的典型用法代码示例。如果您正苦于以下问题:Java ReadOnlyBooleanWrapper类的具体用法?Java ReadOnlyBooleanWrapper怎么用?Java ReadOnlyBooleanWrapper使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
ReadOnlyBooleanWrapper类属于javafx.beans.property包,在下文中一共展示了ReadOnlyBooleanWrapper类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: DockNode
import javafx.beans.property.ReadOnlyBooleanWrapper; //导入依赖的package包/类
private DockNode() {
station = new SimpleObjectProperty<>(null);
floatableProperty = new SimpleBooleanProperty(true);
closeableProperty = new SimpleBooleanProperty(true);
resizableProperty = new SimpleBooleanProperty(true);
maximizableProperty = new SimpleBooleanProperty(true);
floatingProperty = new ReadOnlyBooleanWrapper(false);
draggingProperty = new ReadOnlyBooleanWrapper(false);
resizingProperty = new ReadOnlyBooleanWrapper(false);
maximizingProperty = new ReadOnlyBooleanWrapper(false);
container = new ReadOnlyObjectWrapper<>(null);
}
示例2: getAuthenticatedConnection
import javafx.beans.property.ReadOnlyBooleanWrapper; //导入依赖的package包/类
@Test
public void getAuthenticatedConnection() throws IOException {
webserver.requireLogin = true;
AuthHandler handler = new AuthHandler(
new ReadOnlyStringWrapper("localhost:"+webserver.port),
new ReadOnlyBooleanWrapper(false),
new ReadOnlyStringWrapper(TEST_USER),
new ReadOnlyStringWrapper(TEST_PASSWORD)
);
CloseableHttpClient client = handler.getAuthenticatedClient();
assertNotNull(client);
HttpUriRequest request = new HttpGet("http://localhost:"+webserver.port+"/testUri");
client.execute(request);
Header authHeader = webserver.lastRequest.getFirstHeader("Authorization");
assertNotNull(authHeader);
String compareToken = "Basic "+Base64.getEncoder().encodeToString((TEST_USER + ":" + TEST_PASSWORD).getBytes());
assertEquals("Auth token should be expected format", authHeader.getValue(), compareToken);
}
示例3: isPolylineProperty
import javafx.beans.property.ReadOnlyBooleanWrapper; //导入依赖的package包/类
/** Replies the isPolyline property.
*
* @return the isPolyline property.
*/
public BooleanProperty isPolylineProperty() {
if (this.isPolyline == null) {
this.isPolyline = new ReadOnlyBooleanWrapper(this, MathFXAttributeNames.IS_POLYLINE, false);
this.isPolyline.bind(Bindings.createBooleanBinding(() -> {
boolean first = true;
boolean hasOneLine = false;
for (final PathElementType type : innerTypesProperty()) {
if (first) {
if (type != PathElementType.MOVE_TO) {
return false;
}
first = false;
} else if (type != PathElementType.LINE_TO) {
return false;
} else {
hasOneLine = true;
}
}
return hasOneLine;
}, innerTypesProperty()));
}
return this.isPolyline;
}
示例4: isMultiPartsProperty
import javafx.beans.property.ReadOnlyBooleanWrapper; //导入依赖的package包/类
/** Replies the isMultiParts property.
*
* @return the isMultiParts property.
*/
public BooleanProperty isMultiPartsProperty() {
if (this.isMultipart == null) {
this.isMultipart = new ReadOnlyBooleanWrapper(this, MathFXAttributeNames.IS_MULTIPARTS, false);
this.isMultipart.bind(Bindings.createBooleanBinding(() -> {
boolean foundOne = false;
for (final PathElementType type : innerTypesProperty()) {
if (type == PathElementType.MOVE_TO) {
if (foundOne) {
return true;
}
foundOne = true;
}
}
return false;
}, innerTypesProperty()));
}
return this.isMultipart;
}
示例5: isPolygonProperty
import javafx.beans.property.ReadOnlyBooleanWrapper; //导入依赖的package包/类
/** Replies the isPolygon property.
*
* @return the isPolygon property.
*/
public BooleanProperty isPolygonProperty() {
if (this.isPolygon == null) {
this.isPolygon = new ReadOnlyBooleanWrapper(this, MathFXAttributeNames.IS_POLYGON, false);
this.isPolygon.bind(Bindings.createBooleanBinding(() -> {
boolean first = true;
boolean lastIsClose = false;
for (final PathElementType type : innerTypesProperty()) {
lastIsClose = false;
if (first) {
if (type != PathElementType.MOVE_TO) {
return false;
}
first = false;
} else if (type == PathElementType.MOVE_TO) {
return false;
} else if (type == PathElementType.CLOSE) {
lastIsClose = true;
}
}
return lastIsClose;
}, innerTypesProperty()));
}
return this.isPolygon;
}
示例6: isEmptyProperty
import javafx.beans.property.ReadOnlyBooleanWrapper; //导入依赖的package包/类
@Pure
@Override
public BooleanProperty isEmptyProperty() {
if (this.isEmpty == null) {
this.isEmpty = new ReadOnlyBooleanWrapper(this, MathFXAttributeNames.IS_EMPTY);
this.isEmpty.bind(Bindings.createBooleanBinding(() ->
fromXProperty().get() == toXProperty().get()
&& fromYProperty().get() == toYProperty().get()
&& ctrlX1Property().get() == toXProperty().get()
&& ctrlY1Property().get() == toYProperty().get()
&& ctrlX2Property().get() == toXProperty().get()
&& ctrlY2Property().get() == toYProperty().get(),
fromXProperty(), toXProperty(), fromYProperty(), toYProperty()));
}
return this.isEmpty;
}
示例7: isEmptyProperty
import javafx.beans.property.ReadOnlyBooleanWrapper; //导入依赖的package包/类
@Pure
@Override
public BooleanProperty isEmptyProperty() {
if (this.isEmpty == null) {
this.isEmpty = new ReadOnlyBooleanWrapper(this, MathFXAttributeNames.IS_EMPTY);
this.isEmpty.bind(Bindings.createBooleanBinding(() ->
MathUtil.isEpsilonEqual(fromXProperty().get(), toXProperty().get())
&& MathUtil.isEpsilonEqual(fromYProperty().get(), toYProperty().get())
&& MathUtil.isEpsilonEqual(ctrlX1Property().get(), toXProperty().get())
&& MathUtil.isEpsilonEqual(ctrlY1Property().get(), toYProperty().get())
&& MathUtil.isEpsilonEqual(ctrlX2Property().get(), toXProperty().get())
&& MathUtil.isEpsilonEqual(ctrlY2Property().get(), toYProperty().get()),
fromXProperty(), toXProperty(), fromYProperty(), toYProperty()));
}
return this.isEmpty;
}
示例8: isPolylineProperty
import javafx.beans.property.ReadOnlyBooleanWrapper; //导入依赖的package包/类
/** Replies the isPolyline property.
*
* @return the isPolyline property.
*/
public BooleanProperty isPolylineProperty() {
if (this.isPolyline == null) {
this.isPolyline = new ReadOnlyBooleanWrapper(this, MathFXAttributeNames.IS_POLYLINE, false);
this.isPolyline.bind(Bindings.createBooleanBinding(() -> {
boolean first = true;
boolean hasOneLine = false;
for (final PathElementType type : innerTypesProperty()) {
if (first) {
if (type != PathElementType.MOVE_TO) {
return false;
}
first = false;
} else if (type != PathElementType.LINE_TO) {
return false;
} else {
hasOneLine = true;
}
}
return hasOneLine;
},
innerTypesProperty()));
}
return this.isPolyline;
}
示例9: isCurvedProperty
import javafx.beans.property.ReadOnlyBooleanWrapper; //导入依赖的package包/类
/** Replies the isCurved property.
*
* @return the isCurved property.
*/
public BooleanProperty isCurvedProperty() {
if (this.isCurved == null) {
this.isCurved = new ReadOnlyBooleanWrapper(this, MathFXAttributeNames.IS_CURVED, false);
this.isCurved.bind(Bindings.createBooleanBinding(() -> {
for (final PathElementType type : innerTypesProperty()) {
if (type == PathElementType.CURVE_TO || type == PathElementType.QUAD_TO) {
return true;
}
}
return false;
},
innerTypesProperty()));
}
return this.isCurved;
}
示例10: isMultiPartsProperty
import javafx.beans.property.ReadOnlyBooleanWrapper; //导入依赖的package包/类
/** Replies the isMultiParts property.
*
* @return the isMultiParts property.
*/
public BooleanProperty isMultiPartsProperty() {
if (this.isMultiparts == null) {
this.isMultiparts = new ReadOnlyBooleanWrapper(this, MathFXAttributeNames.IS_MULTIPARTS, false);
this.isMultiparts.bind(Bindings.createBooleanBinding(() -> {
boolean foundOne = false;
for (final PathElementType type : innerTypesProperty()) {
if (type == PathElementType.MOVE_TO) {
if (foundOne) {
return true;
}
foundOne = true;
}
}
return false;
},
innerTypesProperty()));
}
return this.isMultiparts;
}
示例11: isPolygonProperty
import javafx.beans.property.ReadOnlyBooleanWrapper; //导入依赖的package包/类
/** Replies the isPolygon property.
*
* @return the isPolygon property.
*/
public BooleanProperty isPolygonProperty() {
if (this.isPolygon == null) {
this.isPolygon = new ReadOnlyBooleanWrapper(this, MathFXAttributeNames.IS_POLYGON, false);
this.isPolygon.bind(Bindings.createBooleanBinding(() -> {
boolean first = true;
boolean lastIsClose = false;
for (final PathElementType type : innerTypesProperty()) {
lastIsClose = false;
if (first) {
if (type != PathElementType.MOVE_TO) {
return false;
}
first = false;
} else if (type == PathElementType.MOVE_TO) {
return false;
} else if (type == PathElementType.CLOSE) {
lastIsClose = true;
}
}
return lastIsClose;
},
innerTypesProperty()));
}
return this.isPolygon;
}
示例12: isEmptyProperty
import javafx.beans.property.ReadOnlyBooleanWrapper; //导入依赖的package包/类
@Pure
@Override
public BooleanProperty isEmptyProperty() {
if (this.isEmpty == null) {
this.isEmpty = new ReadOnlyBooleanWrapper(this, MathFXAttributeNames.IS_EMPTY);
this.isEmpty.bind(Bindings.createBooleanBinding(() ->
MathUtil.isEpsilonEqual(fromXProperty().get(), toXProperty().get())
&& MathUtil.isEpsilonEqual(fromYProperty().get(), toYProperty().get())
&& MathUtil.isEpsilonEqual(fromZProperty().get(), toZProperty().get())
&& MathUtil.isEpsilonEqual(ctrlX1Property().get(), toXProperty().get())
&& MathUtil.isEpsilonEqual(ctrlY1Property().get(), toYProperty().get())
&& MathUtil.isEpsilonEqual(ctrlZ1Property().get(), toZProperty().get()),
fromXProperty(), toXProperty(), fromYProperty(), toYProperty(), fromZProperty(), toZProperty()));
}
return this.isEmpty;
}
示例13: isMultiPartsProperty
import javafx.beans.property.ReadOnlyBooleanWrapper; //导入依赖的package包/类
/** Replies the isMultiParts property.
*
* @return the isMultiParts property.
*/
public BooleanProperty isMultiPartsProperty() {
if (this.isMultipart == null) {
this.isMultipart = new ReadOnlyBooleanWrapper(this, MathFXAttributeNames.IS_MULTIPARTS, false);
this.isMultipart.bind(Bindings.createBooleanBinding(() -> {
boolean foundOne = false;
for (final PathElementType type : innerTypesProperty()) {
if (type == PathElementType.MOVE_TO) {
if (foundOne) {
return true;
}
foundOne = true;
}
}
return false;
},
innerTypesProperty()));
}
return this.isMultipart;
}
示例14: isEmptyProperty
import javafx.beans.property.ReadOnlyBooleanWrapper; //导入依赖的package包/类
@Pure
@Override
public BooleanProperty isEmptyProperty() {
if (this.isEmpty == null) {
this.isEmpty = new ReadOnlyBooleanWrapper(this, MathFXAttributeNames.IS_EMPTY);
this.isEmpty.bind(Bindings.createBooleanBinding(() ->
MathUtil.isEpsilonEqual(fromXProperty().get(), toXProperty().get())
&& MathUtil.isEpsilonEqual(fromYProperty().get(), toYProperty().get())
&& MathUtil.isEpsilonEqual(fromZProperty().get(), toZProperty().get())
&& MathUtil.isEpsilonEqual(ctrlX1Property().get(), toXProperty().get())
&& MathUtil.isEpsilonEqual(ctrlY1Property().get(), toYProperty().get())
&& MathUtil.isEpsilonEqual(ctrlZ1Property().get(), toZProperty().get()),
fromXProperty(), toXProperty(), fromYProperty(), toYProperty(), fromZProperty(), toZProperty()));
}
return this.isEmpty;
}
示例15: setUp
import javafx.beans.property.ReadOnlyBooleanWrapper; //导入依赖的package包/类
@Before
public void setUp() {
ApplicationState.getInstance().runningProperty().set(true);
handler = new AuthHandler(
new ReadOnlyStringWrapper("localhost:" + webserver.port),
new ReadOnlyBooleanWrapper(false),
new ReadOnlyStringWrapper(TEST_USER),
new ReadOnlyStringWrapper(TEST_PASSWORD)
);
client = handler.getAuthenticatedClient();
}