@Override
public void init() {
super.init();
coords.get().initRegion(elementInfo);
if (elementInfo.isBroken()) {
// already broken by coords.get().initRegion();
return;
}
if (similarity.get() > 1 || similarity.get() <= 0) {
elementInfo.setAsBroken("Similarity parameter must be from 0 to 1.00");
return;
}
fileLister.get().initTemporaryFileList(elementInfo, "Target image files", null);
if (elementInfo.isBroken()) {
// already broken by fileLister.get().initTemporaryFileList() or null extension
return;
}
ReadOnlyListProperty<File> targetsList = fileLister.get().getTemporarySourceFileList();
targets = new ArrayList<Pattern>(targetsList.size());
for (File f : targetsList) {
Image.unCacheBundledImage(f.getAbsolutePath());
targets.add(new Pattern(f.toString()).similar(similarity.get()));
}
}
java类javafx.beans.property.ReadOnlyListProperty的实例源码
MultiTargetRegionChecker.java 文件源码
项目:StreamSis
阅读 32
收藏 0
点赞 0
评论 0
Path2ifxTest.java 文件源码
项目:afc
阅读 29
收藏 0
点赞 0
评论 0
@Test
public void coordinatesProperty() {
ReadOnlyListProperty<Point2ifx> property = this.shape.coordinatesProperty();
assertNotNull(property);
assertEquals(7, property.size());
assertEquals(0, property.get(0).ix());
assertEquals(0, property.get(0).iy());
assertEquals(2, property.get(1).ix());
assertEquals(2, property.get(1).iy());
assertEquals(3, property.get(2).ix());
assertEquals(0, property.get(2).iy());
assertEquals(4, property.get(3).ix());
assertEquals(3, property.get(3).iy());
assertEquals(5, property.get(4).ix());
assertEquals(-1, property.get(4).iy());
assertEquals(6, property.get(5).ix());
assertEquals(5, property.get(5).iy());
assertEquals(7, property.get(6).ix());
assertEquals(-5, property.get(6).iy());
}
Path2dfxTest.java 文件源码
项目:afc
阅读 37
收藏 0
点赞 0
评论 0
@Test
public void coordinatesProperty() {
ReadOnlyListProperty<Point2dfx> property = this.shape.coordinatesProperty();
assertNotNull(property);
assertEquals(7, property.size());
assertEpsilonEquals(0, property.get(0).getX());
assertEpsilonEquals(0, property.get(0).getY());
assertEpsilonEquals(1, property.get(1).getX());
assertEpsilonEquals(1, property.get(1).getY());
assertEpsilonEquals(3, property.get(2).getX());
assertEpsilonEquals(0, property.get(2).getY());
assertEpsilonEquals(4, property.get(3).getX());
assertEpsilonEquals(3, property.get(3).getY());
assertEpsilonEquals(5, property.get(4).getX());
assertEpsilonEquals(-1, property.get(4).getY());
assertEpsilonEquals(6, property.get(5).getX());
assertEpsilonEquals(5, property.get(5).getY());
assertEpsilonEquals(7, property.get(6).getX());
assertEpsilonEquals(-5, property.get(6).getY());
}
Path3ifxTest.java 文件源码
项目:afc
阅读 40
收藏 0
点赞 0
评论 0
@Test
@Ignore
public void coordinatesProperty() {
ReadOnlyListProperty<Point3ifx> property = this.shape.coordinatesProperty();
assertNotNull(property);
assertEquals(7, property.size());
assertEquals(0, property.get(0).ix());
assertEquals(0, property.get(0).iy());
assertEquals(2, property.get(1).ix());
assertEquals(2, property.get(1).iy());
assertEquals(3, property.get(2).ix());
assertEquals(0, property.get(2).iy());
assertEquals(4, property.get(3).ix());
assertEquals(3, property.get(3).iy());
assertEquals(5, property.get(4).ix());
assertEquals(-1, property.get(4).iy());
assertEquals(6, property.get(5).ix());
assertEquals(5, property.get(5).iy());
assertEquals(7, property.get(6).ix());
assertEquals(-5, property.get(6).iy());
}
Path3dfxTest.java 文件源码
项目:afc
阅读 38
收藏 0
点赞 0
评论 0
@Test
@Ignore
public void coordinatesProperty() {
ReadOnlyListProperty<Point3dfx> property = this.shape.coordinatesProperty();
assertNotNull(property);
assertEquals(7, property.size());
assertEpsilonEquals(0, property.get(0).getX());
assertEpsilonEquals(0, property.get(0).getY());
assertEpsilonEquals(1, property.get(1).getX());
assertEpsilonEquals(1, property.get(1).getY());
assertEpsilonEquals(3, property.get(2).getX());
assertEpsilonEquals(0, property.get(2).getY());
assertEpsilonEquals(4, property.get(3).getX());
assertEpsilonEquals(3, property.get(3).getY());
assertEpsilonEquals(5, property.get(4).getX());
assertEpsilonEquals(-1, property.get(4).getY());
assertEpsilonEquals(6, property.get(5).getX());
assertEpsilonEquals(5, property.get(5).getY());
assertEpsilonEquals(7, property.get(6).getX());
assertEpsilonEquals(-5, property.get(6).getY());
}
ExhibitionMapPresenter.java 文件源码
项目:javaone2016
阅读 38
收藏 0
点赞 0
评论 0
private void showExhibitor(String boothId) {
ReadOnlyListProperty<Exhibitor> exhibitors = service.retrieveExhibitors();
for (Exhibitor exhibitor : exhibitors) {
if(exhibitor.getBooth().equalsIgnoreCase(boothId)) {
OTNView.EXHIBITOR.switchView().ifPresent(presenter ->
((ExhibitorPresenter) presenter).setExhibitor(exhibitor));
break;
}
}
}
DummyService.java 文件源码
项目:javaone2016
阅读 38
收藏 0
点赞 0
评论 0
@Override
public ReadOnlyListProperty<News> retrieveNews() {
if (news == null) {
news = new ReadOnlyListWrapper<>(FXCollections.observableArrayList(readNews()));
}
return news.getReadOnlyProperty();
}
DummyService.java 文件源码
项目:javaone2016
阅读 45
收藏 0
点赞 0
评论 0
@Override
public ReadOnlyListProperty<Session> retrieveSessions() {
if (sessions == null) {
sessions = new ReadOnlyListWrapper<>(FXCollections.observableArrayList(readSessions()));
}
return sessions.getReadOnlyProperty();
}
DummyService.java 文件源码
项目:javaone2016
阅读 36
收藏 0
点赞 0
评论 0
@Override
public ReadOnlyListProperty<Speaker> retrieveSpeakers() {
if (speakers == null) {
speakers = new ReadOnlyListWrapper<>(FXCollections.observableArrayList(readSpeakers()));
}
return speakers.getReadOnlyProperty();
}
DummyService.java 文件源码
项目:javaone2016
阅读 37
收藏 0
点赞 0
评论 0
@Override
public ReadOnlyListProperty<Exhibitor> retrieveExhibitors() {
if (exhibitors == null) {
exhibitors = new ReadOnlyListWrapper<>(FXCollections.observableArrayList(readExhibitors()));
}
return exhibitors.getReadOnlyProperty();
}
DummyService.java 文件源码
项目:javaone2016
阅读 38
收藏 0
点赞 0
评论 0
@Override
public ReadOnlyListProperty<Sponsor> retrieveSponsors() {
if (sponsors == null) {
sponsors = new ReadOnlyListWrapper<>(FXCollections.observableArrayList(readSponsors()));
}
return sponsors.getReadOnlyProperty();
}
DummyService.java 文件源码
项目:javaone2016
阅读 28
收藏 0
点赞 0
评论 0
@Override
public ReadOnlyListProperty<Venue> retrieveVenues() {
if (venues == null) {
venues = new ReadOnlyListWrapper<>(FXCollections.observableArrayList(readVenues()));
}
return venues.getReadOnlyProperty();
}
DummyService.java 文件源码
项目:javaone2016
阅读 28
收藏 0
点赞 0
评论 0
@Override
public ReadOnlyListProperty<OTNCoffee> retrieveOTNCoffees() {
if (otnCoffees == null) {
List<OTNCoffee> coffees = new LinkedList<>();
coffees.add(new OTNCoffee("1", "Brazilian Coffee"));
coffees.add(new OTNCoffee("2", "Ethiopian Coffee"));
coffees.add(new OTNCoffee("3", "Taiwan Tea"));
otnCoffees = new ReadOnlyListWrapper<>(FXCollections.observableArrayList(coffees));
}
return otnCoffees;
}
DummyService.java 文件源码
项目:javaone2016
阅读 40
收藏 0
点赞 0
评论 0
@Override
public ReadOnlyListProperty<OTNGame> retrieveOTNGames() {
if (otnGames == null) {
List<OTNGame> games = new LinkedList<>();
games.add(new OTNGame("Tetris", "http://javahub.com/game/id1", "http://lorempixel.com/400/200"));
games.add(new OTNGame("PacMan", "http://javahub.com/game/id2", "http://lorempixel.com/400/200"));
games.add(new OTNGame("Brick Breaker", "http://javahub.com/game/id3", "http://lorempixel.com/400/200"));
otnGames = new ReadOnlyListWrapper<>(FXCollections.observableArrayList(games));
}
return otnGames;
}
DummyService.java 文件源码
项目:javaone2016
阅读 33
收藏 0
点赞 0
评论 0
@Override
public ReadOnlyListProperty<OTNEmbroidery> retrieveOTNEmbroideries() {
if (otnEmbroideries == null) {
List<OTNEmbroidery> embroideries = new LinkedList<>();
embroideries.add(new OTNEmbroidery("OTNEmbroidery 1", "http://javahub.com/embroidery/id1", "http://lorempixel.com/400/200"));
embroideries.add(new OTNEmbroidery("OTNEmbroidery 2", "http://javahub.com/embroidery/id2", "http://lorempixel.com/400/200"));
embroideries.add(new OTNEmbroidery("OTNEmbroidery 3", "http://javahub.com/embroidery/id3", "http://lorempixel.com/400/200"));
otnEmbroideries = new ReadOnlyListWrapper<>(FXCollections.observableArrayList(embroideries));
}
return otnEmbroideries;
}
DummyService.java 文件源码
项目:javaone2016
阅读 29
收藏 0
点赞 0
评论 0
@Override
public ReadOnlyListProperty<OTN3DModel> retrieveOTN3DModels() {
if (otn3DModels == null) {
List<OTN3DModel> models = new LinkedList<>();
models.add(new OTN3DModel("1", "Model 1", "http://lorempixel.com/400/200", true, 0));
models.add(new OTN3DModel("2", "Model 2", "http://lorempixel.com/400/200", false, 4));
models.add(new OTN3DModel("3", "Model 3", "http://lorempixel.com/400/200", false, 7));
models.add(new OTN3DModel("4", "Model 4", "http://lorempixel.com/400/200", false, 19));
otn3DModels = new ReadOnlyListWrapper<>(FXCollections.observableArrayList(models));
}
return otn3DModels;
}
CloudLinkService.java 文件源码
项目:javaone2016
阅读 33
收藏 0
点赞 0
评论 0
@Override
public ReadOnlyListProperty<News> retrieveNews() {
if (news == null) {
GluonObservableList<News> gluonNews = DataProvider.retrieveList(cloudGluonClient.createListDataReader("activityFeed", News.class, SyncFlag.LIST_READ_THROUGH));
SortedList<News> sortedNews = new SortedList<>(gluonNews);
sortedNews.setComparator((n1, n2) -> n1.getCreationDate() == n2.getCreationDate() ? n1.getUuid().compareTo(n2.getUuid()) : Long.compare(n1.getCreationDate(), n2.getCreationDate()) * -1);
news = new ReadOnlyListWrapper<>(sortedNews);
}
return news.getReadOnlyProperty();
}
CloudLinkService.java 文件源码
项目:javaone2016
阅读 35
收藏 0
点赞 0
评论 0
@Override
public ReadOnlyListProperty<OTNCoffee> retrieveOTNCoffees() {
if (otnCoffees == null) {
GluonObservableList<OTNCoffee> gluonCoffees = DataProvider.retrieveList(cloudGluonClient.createListDataReader("otncoffees", OTNCoffee.class, SyncFlag.LIST_READ_THROUGH));
otnCoffees = new ReadOnlyListWrapper<>(gluonCoffees);
}
return otnCoffees.getReadOnlyProperty();
}
CloudLinkService.java 文件源码
项目:javaone2016
阅读 48
收藏 0
点赞 0
评论 0
@Override
public ReadOnlyListProperty<OTNGame> retrieveOTNGames() {
if (otnGames == null) {
GluonObservableList<OTNGame> gluonGames = DataProvider.retrieveList(cloudGluonClient.createListDataReader("otngames", OTNGame.class, SyncFlag.LIST_READ_THROUGH));
otnGames = new ReadOnlyListWrapper<>(gluonGames);
}
return otnGames.getReadOnlyProperty();
}
CloudLinkService.java 文件源码
项目:javaone2016
阅读 32
收藏 0
点赞 0
评论 0
@Override
public ReadOnlyListProperty<OTNEmbroidery> retrieveOTNEmbroideries() {
if (otnEmbroideries == null) {
GluonObservableList<OTNEmbroidery> gluonEmbroideries = DataProvider.retrieveList(cloudGluonClient.createListDataReader("otnembroideries", OTNEmbroidery.class, SyncFlag.LIST_READ_THROUGH));
otnEmbroideries = new ReadOnlyListWrapper<>(gluonEmbroideries);
}
return otnEmbroideries.getReadOnlyProperty();
}
CloudLinkService.java 文件源码
项目:javaone2016
阅读 40
收藏 0
点赞 0
评论 0
@Override
public ReadOnlyListProperty<OTN3DModel> retrieveOTN3DModels() {
if (otn3DModels == null) {
ObservableList<OTN3DModel> localList = FXCollections.observableArrayList();
otn3DModels = new ReadOnlyListWrapper<>(localList);
GluonObservableList<OTN3DModel> gluon3DModels = DataProvider.retrieveList(cloudGluonClient.createListDataReader("otn3dmodels", OTN3DModel.class, SyncFlag.LIST_READ_THROUGH, SyncFlag.OBJECT_READ_THROUGH, SyncFlag.OBJECT_WRITE_THROUGH));
gluon3DModels.initializedProperty().addListener((obs, ov, nv) -> {
if (nv) {
Bindings.bindContent(localList, gluon3DModels);
}
});
}
return otn3DModels.getReadOnlyProperty();
}
MultiSourceFileListerController.java 文件源码
项目:StreamSis
阅读 43
收藏 0
点赞 0
评论 0
/**
* Sets the {@link MultiSourceFilePicker} to work with and binds view's controls to
* MultiSourceFilePicker's properties. Before using this method you should first invoke
* {@link #replaceFileTypeNameTagInLabeledControls(String)} method.
*
* @param editableCopyOfLister
* The MultiSourceFilePicker to edit. (Actually a copy of the MultiSourceFilePicker
* the user wishes to edit. The changes made in the copy will be transferred to
* original MultiSourceFilePicker once the user hit "Apply" or "OK" button).
* @param origLister
* The Original MultiSourceFilePicker to use as storage of original values of
* CuteElement's attributes. Should not be edited in controllers.
* @throws RuntimeException
* In case {@link #replaceFileTypeNameTagInLabeledControls(String)} wasn't used
* before this method.
*/
public void bindToMultiSourceFileLister(MultiSourceFileLister editableCopyOfLister,
MultiSourceFileLister origLister) {
if (fileTypeName == null) {
// refer to replaceFileTypeNameTagInLabeledControls() method.
throw new RuntimeException("File type name tag needs to be replaced before"
+ " using this view.");
}
this.lister = editableCopyOfLister;
this.origLister = origLister;
// Set up bidirectional bindings.
bindBidirectionalAndRemember(srcPathTextField.textProperty(),
editableCopyOfLister.srcPathProperty());
fileTable.itemsProperty()
.bindBidirectional(editableCopyOfLister.persistentSourceFileListProperty());
// Set up listeners
// Let the manualTitledPane expanded status control if file picker should search for
// files in manually set list or in "source" directory. So there's no need for additional
// CheckBox. Instead of bindings use listener because... reasons.
manualTitledPane.setExpanded(!editableCopyOfLister.isFindingSourcesInSrcPath());
manualTitledPane.expandedProperty().addListener(paneExpansionListener);
// Set up bindings to read-only properties.
allowedExtensionsLabel.setText(
addToExtensionsText + editableCopyOfLister.getAcceptableExtensions().toString());
bindNormalAndRemember(allowedExtensionsLabel.textProperty(),
Bindings.concat(addToExtensionsText)
.concat(this.lister.acceptableExtensionsProperty().asString()));
lister.getTemporarySourceFileList().addListener(tempFileListListener);
// Set initial value for sampleFile.
ReadOnlyListProperty<File> tempListOfCurrentFiles = lister.getTemporarySourceFileList();
if (tempListOfCurrentFiles.size() != 0) {
sampleFile.set(tempListOfCurrentFiles.get(0));
}
}
Path2ifxTest.java 文件源码
项目:afc
阅读 27
收藏 0
点赞 0
评论 0
@Test
public void typesProperty() {
ReadOnlyListProperty<PathElementType> property = this.shape.typesProperty();
assertNotNull(property);
assertEquals(5, property.size());
assertSame(PathElementType.MOVE_TO, property.get(0));
assertSame(PathElementType.LINE_TO, property.get(1));
assertSame(PathElementType.QUAD_TO, property.get(2));
assertSame(PathElementType.CURVE_TO, property.get(3));
assertSame(PathElementType.CLOSE, property.get(4));
}
Path2dfxTest.java 文件源码
项目:afc
阅读 38
收藏 0
点赞 0
评论 0
@Test
public void typesProperty() {
ReadOnlyListProperty<PathElementType> property = this.shape.typesProperty();
assertNotNull(property);
assertEquals(4, property.size());
assertSame(PathElementType.MOVE_TO, property.get(0));
assertSame(PathElementType.LINE_TO, property.get(1));
assertSame(PathElementType.QUAD_TO, property.get(2));
assertSame(PathElementType.CURVE_TO, property.get(3));
this.shape.closePath();
assertEquals(5, property.size());
assertSame(PathElementType.CLOSE, property.get(4));
}
Path3ifxTest.java 文件源码
项目:afc
阅读 28
收藏 0
点赞 0
评论 0
@Test
public void typesProperty() {
ReadOnlyListProperty<PathElementType> property = this.shape.typesProperty();
assertNotNull(property);
assertEquals(5, property.size());
assertSame(PathElementType.MOVE_TO, property.get(0));
assertSame(PathElementType.LINE_TO, property.get(1));
assertSame(PathElementType.QUAD_TO, property.get(2));
assertSame(PathElementType.CURVE_TO, property.get(3));
assertSame(PathElementType.CLOSE, property.get(4));
}
Path3dfxTest.java 文件源码
项目:afc
阅读 31
收藏 0
点赞 0
评论 0
@Test
public void typesProperty() {
ReadOnlyListProperty<PathElementType> property = this.shape.typesProperty();
assertNotNull(property);
assertEquals(4, property.size());
assertSame(PathElementType.MOVE_TO, property.get(0));
assertSame(PathElementType.LINE_TO, property.get(1));
assertSame(PathElementType.QUAD_TO, property.get(2));
assertSame(PathElementType.CURVE_TO, property.get(3));
this.shape.closePath();
assertEquals(5, property.size());
assertSame(PathElementType.CLOSE, property.get(4));
}
ListTransformation.java 文件源码
项目:easyMvvmFx
阅读 39
收藏 0
点赞 0
评论 0
/**
* @return {@link TargetType} representation of {@link #modelListProperty()}.
*/
public ReadOnlyListProperty<TargetType> targetListProperty() {
return viewModelList.getReadOnlyProperty();
}
SelectableItemList.java 文件源码
项目:easyMvvmFx
阅读 38
收藏 0
点赞 0
评论 0
/**
* @return String representation of {@link #modelListProperty()}.
*/
@Override
public ReadOnlyListProperty<String> stringListProperty() {
return targetListProperty();
}
ItemList.java 文件源码
项目:easyMvvmFx
阅读 41
收藏 0
点赞 0
评论 0
/**
* @return String representation of {@link #modelListProperty()}.
*/
public ReadOnlyListProperty<String> stringListProperty() {
return targetListProperty();
}
ListTransformation.java 文件源码
项目:javafx-qiniu-tinypng-client
阅读 27
收藏 0
点赞 0
评论 0
/**
* @return {@link TargetType} representation of {@link #modelListProperty()}.
*/
public ReadOnlyListProperty<TargetType> targetListProperty() {
return viewModelList.getReadOnlyProperty();
}