I tried to implement this controller.java file. I implemented some TODOs, but I’m having trouble implementing the remaining ones

[ /**
* Default constructor.
* @param manager the mananger containing contacts
* Initialize all non FXML attributes
/
public Controller()
{
/

* Can’t get parent logger now, so standalone logger.
* Parent logger will be set in Main.
*/
logger = LoggerFactory.getParentLogger(getClass(), null, Level.INFO);

                    /*
                    * TODO complete Controller(): Load Data file instead
                    */
                    manager = new ContactManager();
                    PersonalContact p1 = new PersonalContact("Pierre", "Durand", null, null, null, null, null, null);
                    manager.add(p1);
                    PersonalContact p2 = new PersonalContact("Sophie", "Durand", null, null, null, null, null, null);
                    manager.add(p2);
                    PersonalContact p3 = new PersonalContact("Paul", "Dupont", null, null, null, null, null, null);
                    manager.add(p3);
                    CorporateContact ensiie = new CorporateContact("ENSIIE", null, null, null, null, null);
                    ensiie.add(p1);
                    ensiie.add(p2);
                    manager.add(ensiie);
                    contactsList = manager.getFilteredContacts();

                    /*
                    * Setup edition property
                    */
                    edition = new SimpleBooleanProperty();

                    /*
                    * Setup Contact view in GridPane
                    */
                    Font.getDefault();
                    Font font = Font.font(24);
                    firstName = new EditableLabel("[first]Name", font);
                    lastName = new EditableLabel("lastName", font);
            }

            /**
             * Controller initialization to initialize FXML related attributes.
             * @param location The location used to resolve relative paths for the root
             * object, or null if the location is not known.
             * @param resources Resource Bundle containing translations resources for
             * the UI (or null)
             */
            @Override
            public void initialize(URL location, ResourceBundle resources)
            {
                    // --------------------------------------------------------------------
                    // Initialize FXML related attributes
                    // --------------------------------------------------------------------
                    /*
                    * Create #styleableButtons so they can be style-updated in
                    *         - #onDisplayButtonsWithGraphicsOnlyAction
                    *         - #onDisplayButtonsWithTextOnlyAction
                    *         - #onDisplayButtonsWithTextAndGraphicsAction
                    */
                    styleableButtons = new ArrayList<Labeled>();
                    styleableButtons.add(addButton);
                    // TODO initialize(URL location, ResourceBundle resources): Add buttons to styleableButtons ...
                    onDisplayButtonsWithGraphicsOnlyAction(null);
                    styleableButtons = new ArrayList<Labeled>();



                    /*
                    * Share edition on/off property with bidirectional bindings between
                    *         - edition
                    *         - editButton
                    *         - editMenuItem
                    *         - editContextMenuItem
                    */
                    edition.bindBidirectional(editButton.selectedProperty());
                    // TODO initialize(URL location, ResourceBundle resources): bind edition property bidirectionnaly

                    /*
                    * Bind to edition property
                    *         - submitButton and cancelButton visible property
                    *         - firstName & lastName editatble property
                    *         - Contacts details buttons
                    */
                    submitButton.visibleProperty().bind(edition);
                    cancelButton.visibleProperty().bind(edition);
                    firstName.editableProperty().bind(edition);
                    lastName.editableProperty().bind(edition);
                    // TODO initialize(URL location, ResourceBundle resources): bind various elts to edition property

                    /*
                    * TODO initialize(URL location, ResourceBundle resources): Setup ListView's
                    *         - content with setItems
                    *         - and selection mode (SINGLE)
                    */

                    /*
                    * Set GridPane constraints on #firtName and #lastName
                    * and addAll to #contactGridPane
                    */
                    GridPane.setConstraints(firstName, 1, 0);
                    GridPane.setConstraints(lastName, 2, 0);
                    contactGridPane.getChildren().addAll(firstName, lastName);

                    /*
                    * TODO initialize(URL location, ResourceBundle resources): Setup #typeComboBox's
                    *         - content by creating an observable list from Contact.Type.all() : See FXCollections class
                    *         - selected item on selection model to Contact.Type.ALL
                    */

                    /*
                    * TODO initialize(URL location, ResourceBundle resources): Bind manager properties
                    *         - manager's typeFiltering property to typeComboBox's value property
                    *         - manager's searched property to SearchField's text property
                    */
                    // manager.typeFilteringProperty().bind(...)
                    // manager.searchedProperty().bind(...);
            }

]

New contributor

ALI DAOUDI is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật