当前位置: 首页>>代码示例>>Java>>正文


Java ReadOnlyListWrapper类代码示例

本文整理汇总了Java中javafx.beans.property.ReadOnlyListWrapper的典型用法代码示例。如果您正苦于以下问题:Java ReadOnlyListWrapper类的具体用法?Java ReadOnlyListWrapper怎么用?Java ReadOnlyListWrapper使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


ReadOnlyListWrapper类属于javafx.beans.property包,在下文中一共展示了ReadOnlyListWrapper类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: TagsModel

import javafx.beans.property.ReadOnlyListWrapper; //导入依赖的package包/类
public TagsModel() {
	TAG_TYPES_PROPERTY = new ReadOnlyMapWrapper<>(FXCollections.observableHashMap());
	PREDEFINED_TAGS_PROPERTY = new ReadOnlyMapWrapper<>(FXCollections.observableHashMap());
	CUSTOM_TAGS_PROPERTY = new ReadOnlyListWrapper<>(FXCollections.observableArrayList());
	//
	for (PredefinedTagType predefinedTag : PredefinedTagType.values()) {
		final TagType tagType = predefinedTag.get();
		final int tagId = tagType.getId();
		if (null != TAG_TYPES_PROPERTY.putIfAbsent(tagId, tagType)) {
			System.out.println(String.format("%s already exists (id=%d)", TagType.class.getSimpleName(), tagId));
		}
		if (null != PREDEFINED_TAGS_PROPERTY.put(tagId, new TagModel(tagType.getName(), StringType.empty()))) {
			System.out.println(String.format("%s already exists (id=%d)", PredefinedTagType.class.getSimpleName(), tagId));
		}
	}
}
 
开发者ID:mikelaud,项目名称:core-domain-tags,代码行数:17,代码来源:TagsModel.java

示例2: loadData

import javafx.beans.property.ReadOnlyListWrapper; //导入依赖的package包/类
private void loadData() {
    GluonObservableList<Exhibitor> localExhibitors = loadEntities("exhibitors", Exhibitor.class, ServiceUtils::mapJsonToExhibitor);
    exhibitors = new ReadOnlyListWrapper<>(localExhibitors);
    GluonObservableList<Session> localSessions = loadEntities("sessions", Session.class, ServiceUtils::mapJsonToSession);
    sessions = new ReadOnlyListWrapper<>(localSessions);
    localSessions.initializedProperty().addListener(new InvalidationListener() {
        @Override
        public void invalidated(javafx.beans.Observable observable) {
            if (localSessions.isInitialized()) {
                // now that we have started retrieving the list of sessions we can
                // call retrieveAuthenticatedUser as sessions won't be empty
                localSessions.initializedProperty().removeListener(this);
                retrieveAuthenticatedUser();
            }
        }
    });

    GluonObservableList<Speaker> localSpeakers = loadEntities("speakers", Speaker.class, ServiceUtils::mapJsonToSpeaker);
    speakers = new ReadOnlyListWrapper<>(localSpeakers);
    GluonObservableList<Sponsor> localSponsors = loadEntities("sponsors", Sponsor.class, ServiceUtils::mapJsonToSponsor);
    sponsors = new ReadOnlyListWrapper<>(localSponsors);
    GluonObservableList<Venue> localVenues = loadEntities("venues", Venue.class, ServiceUtils::mapJsonToVenue);
    venues = new ReadOnlyListWrapper<>(localVenues);
}
 
开发者ID:gluonhq,项目名称:javaone2016,代码行数:25,代码来源:CloudLinkService.java

示例3: retrieveNews

import javafx.beans.property.ReadOnlyListWrapper; //导入依赖的package包/类
@Override
public ReadOnlyListProperty<News> retrieveNews() {
    if (news == null) {
        news = new ReadOnlyListWrapper<>(FXCollections.observableArrayList(readNews()));
    }
    return news.getReadOnlyProperty();
}
 
开发者ID:gluonhq,项目名称:javaone2016,代码行数:8,代码来源:DummyService.java

示例4: retrieveSessions

import javafx.beans.property.ReadOnlyListWrapper; //导入依赖的package包/类
@Override
public ReadOnlyListProperty<Session> retrieveSessions() {
    if (sessions == null) {
        sessions = new ReadOnlyListWrapper<>(FXCollections.observableArrayList(readSessions()));
    }
    return sessions.getReadOnlyProperty();
}
 
开发者ID:gluonhq,项目名称:javaone2016,代码行数:8,代码来源:DummyService.java

示例5: retrieveSpeakers

import javafx.beans.property.ReadOnlyListWrapper; //导入依赖的package包/类
@Override
public ReadOnlyListProperty<Speaker> retrieveSpeakers() {
    if (speakers == null) {
        speakers = new ReadOnlyListWrapper<>(FXCollections.observableArrayList(readSpeakers()));
    }
    return speakers.getReadOnlyProperty();
}
 
开发者ID:gluonhq,项目名称:javaone2016,代码行数:8,代码来源:DummyService.java

示例6: retrieveExhibitors

import javafx.beans.property.ReadOnlyListWrapper; //导入依赖的package包/类
@Override
public ReadOnlyListProperty<Exhibitor> retrieveExhibitors() {
    if (exhibitors == null) {
        exhibitors = new ReadOnlyListWrapper<>(FXCollections.observableArrayList(readExhibitors()));
    }
    return exhibitors.getReadOnlyProperty();
}
 
开发者ID:gluonhq,项目名称:javaone2016,代码行数:8,代码来源:DummyService.java

示例7: retrieveSponsors

import javafx.beans.property.ReadOnlyListWrapper; //导入依赖的package包/类
@Override
public ReadOnlyListProperty<Sponsor> retrieveSponsors() {
    if (sponsors == null) {
        sponsors = new ReadOnlyListWrapper<>(FXCollections.observableArrayList(readSponsors()));
    }
    return sponsors.getReadOnlyProperty();
}
 
开发者ID:gluonhq,项目名称:javaone2016,代码行数:8,代码来源:DummyService.java

示例8: retrieveVenues

import javafx.beans.property.ReadOnlyListWrapper; //导入依赖的package包/类
@Override
public ReadOnlyListProperty<Venue> retrieveVenues() {
    if (venues == null) {
        venues = new ReadOnlyListWrapper<>(FXCollections.observableArrayList(readVenues()));
    }
    return venues.getReadOnlyProperty();
}
 
开发者ID:gluonhq,项目名称:javaone2016,代码行数:8,代码来源:DummyService.java

示例9: retrieveOTNCoffees

import javafx.beans.property.ReadOnlyListWrapper; //导入依赖的package包/类
@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;
}
 
开发者ID:gluonhq,项目名称:javaone2016,代码行数:12,代码来源:DummyService.java

示例10: retrieveOTNGames

import javafx.beans.property.ReadOnlyListWrapper; //导入依赖的package包/类
@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;
}
 
开发者ID:gluonhq,项目名称:javaone2016,代码行数:12,代码来源:DummyService.java

示例11: retrieveOTNEmbroideries

import javafx.beans.property.ReadOnlyListWrapper; //导入依赖的package包/类
@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;
}
 
开发者ID:gluonhq,项目名称:javaone2016,代码行数:12,代码来源:DummyService.java

示例12: retrieveOTN3DModels

import javafx.beans.property.ReadOnlyListWrapper; //导入依赖的package包/类
@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;
}
 
开发者ID:gluonhq,项目名称:javaone2016,代码行数:13,代码来源:DummyService.java

示例13: retrieveNews

import javafx.beans.property.ReadOnlyListWrapper; //导入依赖的package包/类
@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();
}
 
开发者ID:gluonhq,项目名称:javaone2016,代码行数:11,代码来源:CloudLinkService.java

示例14: retrieveOTNCoffees

import javafx.beans.property.ReadOnlyListWrapper; //导入依赖的package包/类
@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();
}
 
开发者ID:gluonhq,项目名称:javaone2016,代码行数:9,代码来源:CloudLinkService.java

示例15: retrieveOTNGames

import javafx.beans.property.ReadOnlyListWrapper; //导入依赖的package包/类
@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();
}
 
开发者ID:gluonhq,项目名称:javaone2016,代码行数:9,代码来源:CloudLinkService.java


注:本文中的javafx.beans.property.ReadOnlyListWrapper类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。