create some layout files

This commit is contained in:
hlq07 2018-05-30 02:28:23 +08:00
parent c7a8d43aa8
commit 9a0fdd76c8
15 changed files with 534 additions and 369 deletions

View File

@ -70,7 +70,7 @@ public class NewTodoItemStrategy extends VBox {
public void setStage(Stage stage) {
mNewItemStage = stage;
mNewItemStage.setScene(new Scene(this, 1000, 1000));
mNewItemStage.setScene(new Scene(this, 600, 800));
}
public void addFactory(@NotNull NewItemBuilder.IFactory factory) {

View File

@ -43,15 +43,15 @@ abstract class BaseTodoItemBuilder extends GeneralBuilder {
}
@FXML
protected ChoiceBox<String> priorityBox;
private ChoiceBox<String> priorityBox;
@FXML
protected ChoiceBox<String> importanceBox;
private ChoiceBox<String> importanceBox;
@FXML
protected ChoiceBox<String> alarmMethodBox;
private ChoiceBox<String> alarmMethodBox;
@FXML
protected TextField alarmStartText;
private TextField alarmStartText;
@FXML
protected TextField alarmIntervalText;
private TextField alarmIntervalText;
protected BaseTodoItemBuilder(@Nullable TodoItem parent) {
@ -64,6 +64,7 @@ abstract class BaseTodoItemBuilder extends GeneralBuilder {
@FXML
protected void initialize() {
StringProperty p = new SimpleStringProperty();
p.bind(priorityBox.valueProperty());

View File

@ -32,7 +32,7 @@ public final class CourseTypeBuilder extends BaseTodoItemBuilder {
private static final String COURSE_TYPE_LAYOUT = "fxml/newitem_layouts/course_type_layout.fxml";
private static final int TYPE = TodoItem.OTHERS;
private static final int TYPE = TodoItem.COURSE;
private static final String TYPE_NAME = TodoItem.typeName(TYPE);

View File

@ -32,7 +32,7 @@ public final class InterviewTypeBuilder extends BaseTodoItemBuilder {
private static final String INTERVIEW_TYPE_LAYOUT = "fxml/newitem_layouts/interview_type_layout.fxml";
private static final int TYPE = TodoItem.OTHERS;
private static final int TYPE = TodoItem.INTERVIEW;
private static final String TYPE_NAME = TodoItem.typeName(TYPE);

View File

@ -12,25 +12,16 @@
<GridPane>
<columnConstraints>
<ColumnConstraints hgrow="SOMETIMES" halignment="RIGHT"/>
<ColumnConstraints hgrow="SOMETIMES" halignment="LEFT"/>
<ColumnConstraints halignment="RIGHT" percentWidth="30"/>
<ColumnConstraints halignment="LEFT" percentWidth="70"/>
</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 vgrow="SOMETIMES" valignment="CENTER"/>
</rowConstraints>
<Label text="日期"
GridPane.columnIndex="0"
GridPane.rowIndex="0"
/>
<TextField
fx:id="dateTimeText"
<TextField fx:id="wholeDayText"
promptText="yyyy-mm-dd"
GridPane.columnIndex="1"
GridPane.rowIndex="0"
@ -40,8 +31,7 @@
GridPane.columnIndex="0"
GridPane.rowIndex="1"
/>
<TextField
fx:id="titleText"
<TextField fx:id="titleText"
promptText="not empty"
GridPane.columnIndex="1"
GridPane.rowIndex="1"
@ -51,18 +41,17 @@
GridPane.columnIndex="0"
GridPane.rowIndex="2"
/>
<TextField
fx:id="typeText"
<TextField fx:id="typeText"
promptText="not empty"
GridPane.columnIndex="1"
GridPane.rowIndex="2"
/>
<Label text="描述"
GridPane.columnIndex="0"
GridPane.rowIndex="3"
/>
<TextField
fx:id="descriptionText"
<TextField fx:id="descriptionText"
promptText="not empty"
GridPane.columnIndex="1"
GridPane.rowIndex="3"
@ -72,8 +61,7 @@
GridPane.columnIndex="0"
GridPane.rowIndex="4"
/>
<ChoiceBox
fx:id="priorityBox"
<ChoiceBox fx:id="priorityBox"
GridPane.columnIndex="1"
GridPane.rowIndex="4"
>
@ -93,8 +81,7 @@
GridPane.columnIndex="0"
GridPane.rowIndex="5"
/>
<ChoiceBox
fx:id="importanceBox"
<ChoiceBox fx:id="importanceBox"
GridPane.columnIndex="1"
GridPane.rowIndex="5"
>
@ -114,8 +101,7 @@
GridPane.columnIndex="0"
GridPane.rowIndex="6"
/>
<ChoiceBox
fx:id="alarmMethodBox"
<ChoiceBox fx:id="alarmMethodBox"
GridPane.columnIndex="1"
GridPane.rowIndex="6"
>
@ -136,8 +122,7 @@
GridPane.columnIndex="0"
GridPane.rowIndex="7"
/>
<TextField
fx:id="alarmStartText"
<TextField fx:id="alarmStartText"
promptText="yyyy-mm-dd/hh:mm"
GridPane.columnIndex="1"
GridPane.rowIndex="7"
@ -147,8 +132,7 @@
GridPane.columnIndex="0"
GridPane.rowIndex="8"
/>
<TextField
fx:id="alarmIntervalText"
<TextField fx:id="alarmIntervalText"
promptText="y;m;d;h;m"
GridPane.columnIndex="1"
GridPane.rowIndex="8"

View File

@ -8,43 +8,31 @@
xmlns:fx="http://javafx.com/fxml"
type="VBox"
>
<GridPane>
<GridPane maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="359.0" prefWidth="390.0" xmlns:fx="http://javafx.com/fxml/1" xmlns="http://javafx.com/javafx/8">
<columnConstraints>
<ColumnConstraints hgrow="SOMETIMES" maxWidth="291.0" minWidth="10.0" prefWidth="77.0" />
<ColumnConstraints hgrow="SOMETIMES" maxWidth="488.0" minWidth="10.0" prefWidth="313.0" />
<ColumnConstraints halignment="RIGHT" percentWidth="30"/>
<ColumnConstraints halignment="LEFT" percentWidth="70"/>
</columnConstraints>
<rowConstraints>
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
</rowConstraints>
<children>
<Label text="议题" GridPane.halignment="CENTER"/>
<Label text="开始时间" GridPane.halignment="CENTER" GridPane.rowIndex="1"/>
<Label text="结束时间" GridPane.halignment="CENTER" GridPane.rowIndex="2"/>
<Label text="地点" GridPane.halignment="CENTER" GridPane.rowIndex="3"/>
<Label text="内容" GridPane.halignment="CENTER" GridPane.rowIndex="4"/>
<Label text="紧急" GridPane.halignment="CENTER" GridPane.rowIndex="5"/>
<Label text="重要" GridPane.halignment="CENTER" GridPane.rowIndex="6"/>
<Label text="提醒方式" GridPane.halignment="CENTER" GridPane.rowIndex="7"/>
<Label text="提醒开始时间" GridPane.halignment="CENTER" GridPane.rowIndex="8"/>
<Label text="提醒间隔" GridPane.halignment="CENTER" GridPane.rowIndex="9"/>
<TextField fx:id="titleText" promptText="not empty" GridPane.columnIndex="1" />
<TextField fx:id="bgnTimeText" promptText="yyyy-mm-dd/hh:mm" GridPane.columnIndex="1" GridPane.rowIndex="1" />
<TextField fx:id="endTimeText" promptText="yyyy-mm-dd/hh:mm" GridPane.columnIndex="1" GridPane.rowIndex="2" />
<TextField fx:id="locationText" promptText="not empty" GridPane.columnIndex="1" GridPane.rowIndex="3" />
<TextField fx:id="descriptionText" promptText="not empty" GridPane.columnIndex="1" GridPane.rowIndex="4" />
<TextField fx:id="alarmStartText" promptText="yyyy-mm-dd/hh:mm" GridPane.columnIndex="1" GridPane.rowIndex="8" />
<TextField fx:id="alarmIntervalText" promptText="y;m;d;h;m" GridPane.columnIndex="1" GridPane.rowIndex="9" />
<ChoiceBox fx:id="priorityBox" prefWidth="150.0" GridPane.columnIndex="1" GridPane.rowIndex="5" >
<Label text="议题"/>
<Label text="开始时间" GridPane.rowIndex="1"/>
<Label text="结束时间" GridPane.rowIndex="2"/>
<Label text="地点" GridPane.rowIndex="3"/>
<Label text="内容" GridPane.rowIndex="4"/>
<Label text="紧急" GridPane.rowIndex="5"/>
<Label text="重要" GridPane.rowIndex="6"/>
<Label text="提醒方式" GridPane.rowIndex="7"/>
<Label text="提醒开始时间" GridPane.rowIndex="8"/>
<Label text="提醒间隔" GridPane.rowIndex="9"/>
<TextField fx:id="titleText" promptText="not empty" GridPane.columnIndex="1"/>
<TextField fx:id="bgnTimeText" promptText="yyyy-mm-dd/hh:mm" GridPane.columnIndex="1" GridPane.rowIndex="1"/>
<TextField fx:id="endTimeText" promptText="yyyy-mm-dd/hh:mm" GridPane.columnIndex="1" GridPane.rowIndex="2"/>
<TextField fx:id="locationText" promptText="not empty" GridPane.columnIndex="1" GridPane.rowIndex="3"/>
<TextField fx:id="descriptionText" promptText="not empty" GridPane.columnIndex="1" GridPane.rowIndex="4"/>
<ChoiceBox fx:id="priorityBox" prefWidth="150.0" GridPane.columnIndex="1" GridPane.rowIndex="5">
<value>
<String fx:value="urgent"/>
</value>
@ -56,7 +44,7 @@
</FXCollections>
</items>
</ChoiceBox>
<ChoiceBox fx:id="importanceBox" prefWidth="150.0" GridPane.columnIndex="1" GridPane.rowIndex="6" >
<ChoiceBox fx:id="importanceBox" prefWidth="150.0" GridPane.columnIndex="1" GridPane.rowIndex="6">
<value>
<String fx:value="important"/>
</value>
@ -68,7 +56,7 @@
</FXCollections>
</items>
</ChoiceBox>
<ChoiceBox fx:id="alarmMethodBox" prefWidth="150.0" GridPane.columnIndex="1" GridPane.rowIndex="7" >
<ChoiceBox fx:id="alarmMethodBox" prefWidth="150.0" GridPane.columnIndex="1" GridPane.rowIndex="7">
<value>
<String fx:value="none"/>
</value>
@ -81,6 +69,9 @@
</FXCollections>
</items>
</ChoiceBox>
</children>
</GridPane>
<TextField fx:id="alarmStartText" promptText="yyyy-mm-dd/hh:mm" GridPane.columnIndex="1" GridPane.rowIndex="8"/>
<TextField fx:id="alarmIntervalText" promptText="y;m;d;h;m" GridPane.columnIndex="1" GridPane.rowIndex="9"/>
</GridPane>
</fx:root>

View File

@ -0,0 +1,175 @@
<?xml version="1.0" encoding="UTF-8"?>
<?import javafx.collections.FXCollections?>
<?import javafx.scene.control.*?>
<?import javafx.scene.layout.*?>
<?import java.lang.*?>
<fx:root xmlns="http://javafx.com/javafx"
xmlns:fx="http://javafx.com/fxml"
type="VBox"
>
<GridPane>
<columnConstraints>
<ColumnConstraints halignment="RIGHT" percentWidth="30"/>
<ColumnConstraints halignment="LEFT" percentWidth="70"/>
</columnConstraints>
<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"
/>
<Label text="地点"
GridPane.columnIndex="0"
GridPane.rowIndex="5"
/>
<Label text="老师"
GridPane.columnIndex="0"
GridPane.rowIndex="6"
/>
<Label text="备注"
GridPane.columnIndex="0"
GridPane.rowIndex="7"
/>
<Label text="紧急"
GridPane.columnIndex="0"
GridPane.rowIndex="8"
/>
<Label text="重要"
GridPane.columnIndex="0"
GridPane.rowIndex="9"
/>
<Label text="提醒方式"
GridPane.columnIndex="0"
GridPane.rowIndex="10"
/>
<Label text="提醒开始时间"
GridPane.columnIndex="0"
GridPane.rowIndex="11"
/>
<Label text="提醒间隔"
GridPane.columnIndex="0"
GridPane.rowIndex="12"
/>
<TextField fx:id="bgnTimeText"
promptText="yyyy-mm-dd/hh:mm"
GridPane.columnIndex="1"
GridPane.rowIndex="0"
/>
<TextField fx:id="endTimeText"
promptText="yyyy-mm-dd/hh:mm"
GridPane.columnIndex="1"
GridPane.rowIndex="1"
/>
<TextField fx:id="titleText"
promptText="not empty"
GridPane.columnIndex="1"
GridPane.rowIndex="2"
/>
<TextField fx:id="repeatText"
promptText="only digits"
GridPane.columnIndex="1"
GridPane.rowIndex="3"
/>
<TextField fx:id="contentText"
promptText="only digits"
GridPane.columnIndex="1"
GridPane.rowIndex="4"
/>
<TextField fx:id="locationText"
promptText="only digits"
GridPane.columnIndex="1"
GridPane.rowIndex="5"
/>
<TextField fx:id="teacherText"
promptText="only digits"
GridPane.columnIndex="1"
GridPane.rowIndex="6"
/>
<TextField fx:id="descriptionText"
promptText="only digits"
GridPane.columnIndex="1"
GridPane.rowIndex="7"
/>
<ChoiceBox fx:id="priorityBox"
GridPane.columnIndex="1"
GridPane.rowIndex="8"
>
<value>
<String fx:value="urgent"/>
</value>
<items>
<FXCollections fx:factory="observableArrayList">
<String fx:value="urgent"/>
<String fx:value="normal"/>
</FXCollections>
</items>
</ChoiceBox>
<ChoiceBox fx:id="importanceBox"
GridPane.columnIndex="1"
GridPane.rowIndex="9"
>
<value>
<String fx:value="important"/>
</value>
<items>
<FXCollections fx:factory="observableArrayList">
<String fx:value="important"/>
<String fx:value="normal"/>
</FXCollections>
</items>
</ChoiceBox>
<ChoiceBox fx:id="alarmMethodBox"
GridPane.columnIndex="1"
GridPane.rowIndex="10"
>
<value>
<String fx:value="none"/>
</value>
<items>
<FXCollections fx:factory="observableArrayList">
<String fx:value="none"/>
<String fx:value="area"/>
<String fx:value="dialog"/>
</FXCollections>
</items>
</ChoiceBox>
<TextField fx:id="alarmStartText"
promptText="yyyy-mm-dd/hh:mm"
GridPane.columnIndex="1"
GridPane.rowIndex="11"
/>
<TextField fx:id="alarmIntervalText"
promptText="y;m;d;h;m"
GridPane.columnIndex="1"
GridPane.rowIndex="12"
/>
</GridPane>
</fx:root>

View File

@ -1,84 +1,72 @@
<?xml version="1.0" encoding="UTF-8"?>
<?import javafx.scene.control.*?>
<?import java.lang.*?>
<?import javafx.scene.layout.*?>
<?import javafx.collections.FXCollections?>
<?import javafx.scene.control.*?>
<?import javafx.scene.layout.*?>
<?import java.lang.*?>
<fx:root type="VBox" xmlns="http://javafx.com/javafx/8" xmlns:fx="http://javafx.com/fxml/1">
<GridPane maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="359.0" prefWidth="390.0" xmlns="http://javafx.com/javafx/8" xmlns:fx="http://javafx.com/fxml/1">
<GridPane>
<columnConstraints>
<ColumnConstraints hgrow="SOMETIMES" maxWidth="291.0" minWidth="10.0" prefWidth="77.0" />
<ColumnConstraints hgrow="SOMETIMES" maxWidth="488.0" minWidth="10.0" prefWidth="313.0" />
<ColumnConstraints halignment="RIGHT" percentWidth="30"/>
<ColumnConstraints halignment="LEFT" percentWidth="70"/>
</columnConstraints>
<rowConstraints>
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
</rowConstraints>
<children>
<Label text="开始时间" GridPane.halignment="CENTER" />
<Label text="结束时间" GridPane.halignment="CENTER" GridPane.rowIndex="1" />
<Label text="地点" GridPane.halignment="CENTER" GridPane.rowIndex="2" />
<Label text="参加人员" GridPane.halignment="CENTER" GridPane.rowIndex="3" />
<Label text="内容" GridPane.halignment="CENTER" GridPane.rowIndex="4" />
<Label text="紧急" GridPane.halignment="CENTER" GridPane.rowIndex="5" />
<Label text="重要" GridPane.halignment="CENTER" GridPane.rowIndex="6" />
<Label text="提醒方式" GridPane.halignment="CENTER" GridPane.rowIndex="7" />
<Label text="提醒开始时间" GridPane.halignment="CENTER" GridPane.rowIndex="8" />
<Label text="提醒间隔" GridPane.halignment="CENTER" GridPane.rowIndex="9" />
<TextField fx:id="bgnTimeText" promptText="yyyy-mm-dd/hh:mm" GridPane.columnIndex="1" />
<TextField fx:id="endTimeText" promptText="yyyy-mm-dd/hh:mm" GridPane.columnIndex="1" GridPane.rowIndex="1" />
<TextField fx:id="locationText" promptText="not empty" GridPane.columnIndex="1" GridPane.rowIndex="2" />
<TextField fx:id="personnelText" promptText="aa;bb;cc" GridPane.columnIndex="1" GridPane.rowIndex="3" />
<TextField fx:id="titleText" promptText="not empty" GridPane.columnIndex="1" GridPane.rowIndex="4" />
<TextField fx:id="alarmStartText" promptText="yyyy-mm-dd/hh:mm" GridPane.columnIndex="1" GridPane.rowIndex="8" />
<TextField fx:id="alarmIntervalText" promptText="y;m;d;h;m" GridPane.columnIndex="1" GridPane.rowIndex="9" />
<Label text="内容"/>
<Label text="开始时间" GridPane.rowIndex="1"/>
<Label text="结束时间" GridPane.rowIndex="2"/>
<Label text="地点" GridPane.rowIndex="3"/>
<Label text="参加人员" GridPane.rowIndex="4"/>
<Label text="紧急" GridPane.rowIndex="5"/>
<Label text="重要" GridPane.rowIndex="6"/>
<Label text="提醒方式" GridPane.rowIndex="7"/>
<Label text="提醒开始时间" GridPane.rowIndex="8"/>
<Label text="提醒间隔" GridPane.rowIndex="9"/>
<TextField fx:id="titleText" promptText="not empty" GridPane.columnIndex="1"/>
<TextField fx:id="bgnTimeText" promptText="yyyy-mm-dd/hh:mm" GridPane.columnIndex="1" GridPane.rowIndex="1"/>
<TextField fx:id="endTimeText" promptText="yyyy-mm-dd/hh:mm" GridPane.columnIndex="1" GridPane.rowIndex="2"/>
<TextField fx:id="locationText" promptText="not empty" GridPane.columnIndex="1" GridPane.rowIndex="3"/>
<TextField fx:id="personnelText" promptText="not empty" GridPane.columnIndex="1" GridPane.rowIndex="4"/>
<ChoiceBox fx:id="priorityBox" prefWidth="150.0" GridPane.columnIndex="1" GridPane.rowIndex="5">
<value>
<String fx:value="urgent" />
<String fx:value="urgent"/>
</value>
<items>
<FXCollections fx:factory="observableArrayList">
<String fx:value="urgent" />
<String fx:value="normal" />
<String fx:value="urgent"/>
<String fx:value="normal"/>
</FXCollections>
</items>
</ChoiceBox>
<ChoiceBox fx:id="importanceBox" prefWidth="150.0" GridPane.columnIndex="1" GridPane.rowIndex="6">
<value>
<String fx:value="important" />
<String fx:value="important"/>
</value>
<items>
<FXCollections fx:factory="observableArrayList">
<String fx:value="important" />
<String fx:value="normal" />
<String fx:value="important"/>
<String fx:value="normal"/>
</FXCollections>
</items>
</ChoiceBox>
<ChoiceBox fx:id="alarmMethodBox" prefWidth="150.0" GridPane.columnIndex="1" GridPane.rowIndex="7">
<value>
<String fx:value="none" />
<String fx:value="none"/>
</value>
<items>
<FXCollections fx:factory="observableArrayList">
<String fx:value="none" />
<String fx:value="area" />
<String fx:value="dialog" />
<String fx:value="none"/>
<String fx:value="area"/>
<String fx:value="dialog"/>
</FXCollections>
</items>
</ChoiceBox>
</children>
</GridPane>
<TextField fx:id="alarmStartText" promptText="yyyy-mm-dd/hh:mm" GridPane.columnIndex="1" GridPane.rowIndex="8"/>
<TextField fx:id="alarmIntervalText" promptText="y;m;d;h;m" GridPane.columnIndex="1" GridPane.rowIndex="9"/>
</GridPane>
</fx:root>

View File

@ -9,25 +9,17 @@
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>
<columnConstraints>
<ColumnConstraints halignment="RIGHT" percentWidth="30"/>
<ColumnConstraints halignment="LEFT" percentWidth="70"/>
</columnConstraints>
<Label text="开始时间"
GridPane.columnIndex="0"
GridPane.rowIndex="0"
/>
<TextField
fx:id="bgnTimeText"
<TextField fx:id="bgnTimeText"
promptText="yyyy-mm-dd/hh:mm"
GridPane.columnIndex="1"
GridPane.rowIndex="0"
@ -37,48 +29,47 @@
GridPane.columnIndex="0"
GridPane.rowIndex="1"
/>
<TextField
fx:id="endTimeText"
<TextField fx:id="endTimeText"
promptText="yyyy-mm-dd/hh:mm"
GridPane.columnIndex="1"
GridPane.rowIndex="1"
/>
<Label text="地点"
GridPane.columnIndex="0"
GridPane.rowIndex="2"
/>
<TextField
fx:id="locationText"
<TextField fx:id="locationText"
promptText="Rd."
GridPane.columnIndex="1"
GridPane.rowIndex="2"
/>
<Label text="公司"
GridPane.columnIndex="0"
GridPane.rowIndex="3"
/>
<TextField
fx:id="companyText"
<TextField fx:id="companyText"
promptText="not empty"
GridPane.columnIndex="1"
GridPane.rowIndex="3"
/>
<Label text="岗位"
GridPane.columnIndex="0"
GridPane.rowIndex="4"
/>
<TextField
fx:id="jobText"
<TextField fx:id="jobText"
promptText="not empty"
GridPane.columnIndex="1"
GridPane.rowIndex="4"
/>
<Label text="备注"
GridPane.columnIndex="0"
GridPane.rowIndex="5"
/>
<TextField
fx:id="remarkText"
<TextField fx:id="titleText"
promptText="not empty"
GridPane.columnIndex="1"
GridPane.rowIndex="5"
@ -88,8 +79,7 @@
GridPane.columnIndex="0"
GridPane.rowIndex="6"
/>
<ChoiceBox
fx:id="priorityBox"
<ChoiceBox fx:id="priorityBox"
GridPane.columnIndex="1"
GridPane.rowIndex="6"
>
@ -109,8 +99,7 @@
GridPane.columnIndex="0"
GridPane.rowIndex="7"
/>
<ChoiceBox
fx:id="importanceBox"
<ChoiceBox fx:id="importanceBox"
GridPane.columnIndex="1"
GridPane.rowIndex="7"
>
@ -130,8 +119,7 @@
GridPane.columnIndex="0"
GridPane.rowIndex="8"
/>
<ChoiceBox
fx:id="alarmMethodBox"
<ChoiceBox fx:id="alarmMethodBox"
GridPane.columnIndex="1"
GridPane.rowIndex="8"
>
@ -152,8 +140,7 @@
GridPane.columnIndex="0"
GridPane.rowIndex="9"
/>
<TextField
fx:id="alarmStartText"
<TextField fx:id="alarmStartText"
promptText="yyyy-mm-dd/hh:mm"
GridPane.columnIndex="1"
GridPane.rowIndex="9"
@ -163,12 +150,12 @@
GridPane.columnIndex="0"
GridPane.rowIndex="10"
/>
<TextField
fx:id="alarmIntervalText"
<TextField fx:id="alarmIntervalText"
promptText="y;m;d;h;m"
GridPane.columnIndex="1"
GridPane.rowIndex="10"
/>
</GridPane>
</fx:root>

View File

@ -12,58 +12,60 @@
<GridPane>
<columnConstraints>
<ColumnConstraints hgrow="SOMETIMES" halignment="RIGHT"/>
<ColumnConstraints hgrow="SOMETIMES" halignment="LEFT"/>
<ColumnConstraints halignment="RIGHT" percentWidth="30"/>
<ColumnConstraints halignment="LEFT" percentWidth="70"/>
</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 vgrow="SOMETIMES" valignment="CENTER"/>
</rowConstraints>
<Label text="开始时间"
GridPane.columnIndex="0"
GridPane.rowIndex="0"
/>
<TextField
fx:id="bgnTimeText"
promptText="yyyy-mm-dd/hh:mm"
GridPane.columnIndex="1"
GridPane.rowIndex="0"
/>
<Label text="结束时间"
GridPane.columnIndex="0"
GridPane.rowIndex="1"
/>
<TextField
fx:id="endTimeText"
promptText="yyyy-mm-dd/hh:mm"
GridPane.columnIndex="1"
GridPane.rowIndex="1"
/>
<Label text="描述"
GridPane.columnIndex="0"
GridPane.rowIndex="2"
/>
<TextField
fx:id="titleText"
promptText="not empty"
GridPane.columnIndex="1"
GridPane.rowIndex="2"
/>
<Label text="紧急"
GridPane.columnIndex="0"
GridPane.rowIndex="3"
/>
<ChoiceBox
fx:id="priorityBox"
<Label text="重要"
GridPane.columnIndex="0"
GridPane.rowIndex="4"
/>
<Label text="提醒方式"
GridPane.columnIndex="0"
GridPane.rowIndex="5"
/>
<Label text="提醒开始时间"
GridPane.columnIndex="0"
GridPane.rowIndex="6"
/>
<Label text="提醒间隔"
GridPane.columnIndex="0"
GridPane.rowIndex="7"
/>
<TextField fx:id="bgnTimeText"
promptText="yyyy-mm-dd/hh:mm"
GridPane.columnIndex="1"
GridPane.rowIndex="0"
/>
<TextField fx:id="endTimeText"
promptText="yyyy-mm-dd/hh:mm"
GridPane.columnIndex="1"
GridPane.rowIndex="1"
/>
<TextField fx:id="titleText"
promptText="not empty"
GridPane.columnIndex="1"
GridPane.rowIndex="2"
/>
<ChoiceBox fx:id="priorityBox"
GridPane.columnIndex="1"
GridPane.rowIndex="3"
>
@ -78,13 +80,7 @@
</FXCollections>
</items>
</ChoiceBox>
<Label text="重要"
GridPane.columnIndex="0"
GridPane.rowIndex="4"
/>
<ChoiceBox
fx:id="importanceBox"
<ChoiceBox fx:id="importanceBox"
GridPane.columnIndex="1"
GridPane.rowIndex="4"
>
@ -99,13 +95,7 @@
</FXCollections>
</items>
</ChoiceBox>
<Label text="提醒方式"
GridPane.columnIndex="0"
GridPane.rowIndex="5"
/>
<ChoiceBox
fx:id="alarmMethodBox"
<ChoiceBox fx:id="alarmMethodBox"
GridPane.columnIndex="1"
GridPane.rowIndex="5"
>
@ -121,29 +111,18 @@
</FXCollections>
</items>
</ChoiceBox>
<Label text="提醒开始时间"
GridPane.columnIndex="0"
GridPane.rowIndex="6"
/>
<TextField
fx:id="alarmStartText"
<TextField fx:id="alarmStartText"
promptText="yyyy-mm-dd/hh:mm"
GridPane.columnIndex="1"
GridPane.rowIndex="6"
/>
<Label text="提醒间隔"
GridPane.columnIndex="0"
GridPane.rowIndex="7"
/>
<TextField
fx:id="alarmIntervalText"
<TextField fx:id="alarmIntervalText"
promptText="y;m;d;h;m"
GridPane.columnIndex="1"
GridPane.rowIndex="7"
/>
</GridPane>
</fx:root>

View File

@ -10,19 +10,14 @@
<GridPane>
<columnConstraints>
<ColumnConstraints hgrow="SOMETIMES" halignment="RIGHT"/>
<ColumnConstraints hgrow="SOMETIMES" halignment="LEFT"/>
<ColumnConstraints halignment="RIGHT" percentWidth="30"/>
<ColumnConstraints halignment="LEFT" percentWidth="70"/>
</columnConstraints>
<rowConstraints>
<RowConstraints vgrow="SOMETIMES" valignment="CENTER"/>
</rowConstraints>
<Label text="描述"
GridPane.columnIndex="0"
GridPane.rowIndex="0"
/>
<TextField
fx:id="titleText"
promptText="not empty"

View File

@ -0,0 +1,75 @@
<?xml version="1.0" encoding="UTF-8"?>
<?import javafx.collections.FXCollections?>
<?import javafx.scene.control.*?>
<?import javafx.scene.layout.*?>
<?import java.lang.*?>
<fx:root type="VBox" xmlns="http://javafx.com/javafx/8" xmlns:fx="http://javafx.com/fxml/1">
<GridPane>
<columnConstraints>
<ColumnConstraints halignment="RIGHT" percentWidth="30"/>
<ColumnConstraints halignment="LEFT" percentWidth="70"/>
</columnConstraints>
<Label text="备注"/>
<Label text="开始时间" GridPane.rowIndex="1"/>
<Label text="结束时间" GridPane.rowIndex="2"/>
<Label text="地点" GridPane.rowIndex="3"/>
<Label text="交通方式" GridPane.rowIndex="4"/>
<Label text="车次/航班号/其他" GridPane.rowIndex="5"/>
<Label text="紧急" GridPane.rowIndex="6"/>
<Label text="重要" GridPane.rowIndex="7"/>
<Label text="提醒方式" GridPane.rowIndex="8"/>
<Label text="提醒开始时间" GridPane.rowIndex="9"/>
<Label text="提醒间隔" GridPane.rowIndex="10"/>
<TextField fx:id="titleText" promptText="not empty" GridPane.columnIndex="1"/>
<TextField fx:id="bgnTimeText" promptText="yyyy-mm-dd/hh:mm" GridPane.columnIndex="1" GridPane.rowIndex="1"/>
<TextField fx:id="endTimeText" promptText="yyyy-mm-dd/hh:mm" GridPane.columnIndex="1" GridPane.rowIndex="2"/>
<TextField fx:id="locationText" promptText="not empty" GridPane.columnIndex="1" GridPane.rowIndex="3"/>
<TextField fx:id="transportationText" promptText="not empty" GridPane.columnIndex="1" GridPane.rowIndex="4"/>
<TextField fx:id="transportationNumberText" promptText="not empty" GridPane.columnIndex="1"
GridPane.rowIndex="5"/>
<ChoiceBox fx:id="priorityBox" prefWidth="150.0" GridPane.columnIndex="1" GridPane.rowIndex="6">
<value>
<String fx:value="urgent"/>
</value>
<items>
<FXCollections fx:factory="observableArrayList">
<String fx:value="urgent"/>
<String fx:value="normal"/>
</FXCollections>
</items>
</ChoiceBox>
<ChoiceBox fx:id="importanceBox" prefWidth="150.0" GridPane.columnIndex="1" GridPane.rowIndex="7">
<value>
<String fx:value="important"/>
</value>
<items>
<FXCollections fx:factory="observableArrayList">
<String fx:value="important"/>
<String fx:value="normal"/>
</FXCollections>
</items>
</ChoiceBox>
<ChoiceBox fx:id="alarmMethodBox" prefWidth="150.0" GridPane.columnIndex="1" GridPane.rowIndex="8">
<value>
<String fx:value="none"/>
</value>
<items>
<FXCollections fx:factory="observableArrayList">
<String fx:value="none"/>
<String fx:value="area"/>
<String fx:value="dialog"/>
</FXCollections>
</items>
</ChoiceBox>
<TextField fx:id="alarmStartText" promptText="yyyy-mm-dd/hh:mm" GridPane.columnIndex="1" GridPane.rowIndex="9"/>
<TextField fx:id="alarmIntervalText" promptText="y;m;d;h;m" GridPane.columnIndex="1" GridPane.rowIndex="10"/>
</GridPane>
</fx:root>

View File

@ -6,11 +6,11 @@ import javafx.fxml.FXMLLoader;
import javafx.fxml.JavaFXBuilderFactory;
import javafx.scene.Parent;
import javafx.scene.Scene;
import javafx.scene.layout.GridPane;
import javafx.stage.Stage;
import org.cutem.cutecalendar.model.TodoItem;
import org.cutem.cutecalendar.presenter.*;
import org.cutem.cutecalendar.presenter.newitems.lab5.OtherTypeBuilder;
import org.cutem.cutecalendar.presenter.newitems.lab5.TimelessTypeBuilder;
import org.cutem.cutecalendar.presenter.newitems.lab5.*;
import org.jetbrains.annotations.NotNull;
import java.io.IOException;
@ -61,11 +61,12 @@ public class MainTest extends Application {
// add IoC
newItemStrategy.addFactory(new TimelessTypeBuilder.Factory());
newItemStrategy.addFactory(new OtherTypeBuilder.Factory());
// newItemStrategy.addFactory(new ConferenceTypeBuilder.Factory());
// newItemStrategy.addFactory(new InterviewTypeBuilder.Factory());
// newItemStrategy.addFactory(new AnniversaryTypeBuilder.Factory());
// newItemStrategy.addFactory(new CourseTypeBuilder.Factory());
// newItemStrategy.addFactory(new DateTypeBuilder.Factory());
newItemStrategy.addFactory(new ConferenceTypeBuilder.Factory());
newItemStrategy.addFactory(new DateTypeBuilder.Factory());
newItemStrategy.addFactory(new TripTypeBuilder.Factory());
newItemStrategy.addFactory(new AnniversaryTypeBuilder.Factory());
newItemStrategy.addFactory(new InterviewTypeBuilder.Factory());
newItemStrategy.addFactory(new CourseTypeBuilder.Factory());
mPresenter.goWork();
}
@ -88,6 +89,10 @@ public class MainTest extends Application {
primaryStage.setScene(scene);
primaryStage.setTitle("cute calendar");
primaryStage.show();
GridPane pane = new GridPane();
}
@Override

View File

@ -1 +0,0 @@
[]

View File

@ -1,14 +0,0 @@
[
{
"id": 0,
"bgn": "2018-5-29/0:0",
"end": "2018-5-29/23:59",
"type": 1,
"personnel": [],
"props": {
"alarm_method": "none",
"finish": "finish",
"title": "gg"
}
}
]