Merge remote-tracking branch 'origin/master'

This commit is contained in:
akasakaisami 2018-05-29 13:58:20 +08:00
commit 024dc34175
2 changed files with 128 additions and 0 deletions

View File

@ -0,0 +1,50 @@
package org.cutem.cutecalendar.presenter.newitems;
import javafx.fxml.FXML;
import javafx.scene.control.TextField;
import org.cutem.cutecalendar.model.TodoItem;
import org.jetbrains.annotations.Nullable;
public class InterviewTypeNewItemBuilder extends NewItemBuilder {
private static final int TYPE = TodoItem.INTERVIEW;
private static final String TYPE_NAME = TodoItem.typeName(TYPE);
private static final String INTERVIEW_TYPE_LAYOUT = "fxml/newitem_layouts/interview_type_layout.fxml";
@FXML
private TextField timeText;
@FXML
private TextField addressText;
@FXML
private TextField companyText;
@FXML
private TextField jobText;
@FXML
private TextField remarkText;
protected InterviewTypeNewItemBuilder(TodoItem parent) {
super(parent);
loadLayout(INTERVIEW_TYPE_LAYOUT);
}
@Override
protected boolean check() {
return autoCheck();
}
@Override
protected Object make() {
return null;
}
public static class Factory implements IFactory {
@Override
public String getTypeName() {
return TYPE_NAME;
}
@Override
public NewItemBuilder construct(@Nullable TodoItem parent) {
return new InterviewTypeNewItemBuilder(parent);
}
}
}

View File

@ -0,0 +1,78 @@
<?xml version="1.0" encoding="UTF-8"?>
<?import javafx.scene.control.*?>
<?import javafx.scene.layout.*?>
<fx:root xmlns:fx="http://javafx.com/fxml"
xmlns="http://javafx.com/javafx"
type="VBox"
>
<GridPane>
<columnConstraints>
<ColumnConstraints hgrow="SOMETIMES" halignment="RIGHT"/>
<ColumnConstraints hgrow="SOMETIMES" halignment="LEFT"/>
</columnConstraints>
<rowConstraints>
<RowConstraints vgrow="SOMETIMES" valignment="CENTER"/>
<RowConstraints vgrow="SOMETIMES" valignment="CENTER"/>
<RowConstraints vgrow="SOMETIMES" valignment="CENTER"/>
<RowConstraints vgrow="SOMETIMES" valignment="CENTER"/>
<RowConstraints vgrow="SOMETIMES" valignment="CENTER"/>
</rowConstraints>
<Label text="时间"
GridPane.columnIndex="0"
GridPane.rowIndex="0"
/>
<Label text="地点"
GridPane.columnIndex="0"
GridPane.rowIndex="1"
/>
<Label text="公司"
GridPane.columnIndex="0"
GridPane.rowIndex="2"
/>
<Label text="岗位"
GridPane.columnIndex="0"
GridPane.rowIndex="3"
/>
<Label text="备注"
GridPane.columnIndex="0"
GridPane.rowIndex="4"
/>
<TextField
fx:id="timeText"
promptText="yyyy-mm-dd/hh:mm"
GridPane.columnIndex="1"
GridPane.rowIndex="0"
/>
<TextField
fx:id="addressText"
promptText="Rd."
GridPane.columnIndex="1"
GridPane.rowIndex="1"
/>
<TextField
fx:id="companyText"
promptText="not empty"
GridPane.columnIndex="1"
GridPane.rowIndex="2"
/>
<TextField
fx:id="jobText"
promptText="not empty"
GridPane.columnIndex="1"
GridPane.rowIndex="3"
/>
<TextField
fx:id="remarkText"
promptText="not empty"
GridPane.columnIndex="1"
GridPane.rowIndex="4"
/>
</GridPane>
</fx:root>