خرید بک لینک

Vote count: 0

This is my first time working on JavaFx and I'm following this tutorial just as a template: http://code.makery.ch/library/javafx-8-tutorial/part3/.

For my application, I'm working with 2 columns on the left side, telephone number and the call start date/time. I'm wanting to change the formatting of the data in the table as it's currently coming thorough as yyyy-MM-ddThh:mm.

I can't seem to figure out where to place the formatting piece at. I have a date formatter function that you can find at the link above, but its retuing a string and its giving me errors. Thanks for any help you can give. Here are some code snippets of what I'm working with.

Controller:

    @FXML
private void initialize() {
    // Initialize the person table with the two columns.
    billingNumberColumn.setCellValueFactory(cellData -> cellData.getValue().billingNumberProperty());
    callStartColumn.setCellValueFactory(cellData -> DateUtil.format(cellData.getValue().callStartProperty()));
}

Model:

public LocalDateTime getCallStart() {
    retu callStart.get();
}

public void setCallStart(LocalDateTime callStart) {
    this.callStart.set(callStart);
}

public ObjectProperty<LocalDateTime> callStartProperty() {
    retu callStart;
}

Date Format:

public static String format(ObjectProperty<LocalDateTime> callStart) {
    if (callStart == null) {
        retu null;
    }
    retu DATE_FORMATTER.format((TemporalAccessor) callStart);
}

asked 2 mins ago

برچسب: نویسنده: استخدام کار تاريخ: يکشنبه 1 فروردين 1395 ساعت: 13:56

صفحه بندی