Package de.timefinder.core.ui.planner

Examples of de.timefinder.core.ui.planner.TimeFinderPlannerBindingFactory


                AbstractDaoForm objForm = new LocationForm(parentFormModel,
                        "locationDetails", valueHolder, masterList) {

                    @Override
                    protected void addTabs() {
                        TimeFinderPlannerBindingFactory factory = (TimeFinderPlannerBindingFactory) getBindingFactory();
                        TableFormBuilder fBuilder = createTab(getMessage("features.label"));

                        final Dao<Feature> featureDao = pool.getDao(Feature.class);
                        final ValueHolder featureHolder = new ValueHolder(new ArrayList<Feature>(featureDao.getAll()));
                        ShuttleList sl = (ShuttleList) fBuilder.add(
                                factory.createBoundShuttleList("features", featureHolder, null))[1];
                        sl.setVisibleRowCount(10);

                        featureDao.addListener(new PropertyChangeListener() {

                            @Override
                            public void propertyChange(PropertyChangeEvent evt) {
                                if (Dao.ATTACH.equals(evt.getPropertyName())
                                        || Dao.ATTACH_ALL.equals(evt.getPropertyName())
                                        || Dao.DETACH.equals(evt.getPropertyName())
                                        || Dao.DETACH_ALL.equals(evt.getPropertyName())) {
                                    featureHolder.setValue(new ArrayList<Feature>(featureDao.getAll()));
                                }
                            }
                        });

                        TableFormBuilder builder = createTab(getMessage("planner"));
                        planner = (TimeFinderPlanner) builder.add(
                                factory.createBoundPlanner("events", settings))[1];
                    }
                };
                objForm.setDao(dao);

                return objForm;
View Full Code Here


                AbstractDaoForm objForm = new PersonForm(parentFormModel,
                        "personDetails", valueHolder, masterList) {

                    @Override
                    protected void addTabs() {
                        TimeFinderPlannerBindingFactory factory = (TimeFinderPlannerBindingFactory) getBindingFactory();
                        // warning: the methods person.set + getEvents is necessary!
                        TableFormBuilder builder = createTab(getMessage("events.label"));

                        final Dao<Event> eventDao = pool.getDao(Event.class);
                        final ValueHolder eventsHolder = new ValueHolder(
                                new ArrayList<Event>(eventDao.getAll()));

                        // TODO SPRING RC the problem of "name" instead null is that duplicate names will be removed!!!
                        ShuttleList sl = (ShuttleList) builder.add(factory.createBoundShuttleList("events", eventsHolder, null))[1];
                        sl.setVisibleRowCount(10);

                        eventDao.addListener(new PropertyChangeListener() {

                            @Override
                            public void propertyChange(PropertyChangeEvent evt) {
                                if (Dao.ATTACH.equals(evt.getPropertyName())
                                        || Dao.ATTACH_ALL.equals(evt.getPropertyName())
                                        || Dao.DETACH.equals(evt.getPropertyName())
                                        || Dao.DETACH_ALL.equals(evt.getPropertyName())) {
                                    eventsHolder.setValue(new ArrayList<Event>(eventDao.getAll()));
                                }
                            }
                        });

                        builder = createTab(getMessage("planner"));
                        planner = (TimeFinderPlanner) builder.add(
                                factory.createBoundPlanner("events", settings))[1];
                    }
                };
                objForm.setDao(dao);

                return objForm;
View Full Code Here

TOP

Related Classes of de.timefinder.core.ui.planner.TimeFinderPlannerBindingFactory

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.