Skip to content

Commit fa57f1b

Browse files
author
淦珺(实习)
committed
ganjun first commit to test
1 parent cc45879 commit fa57f1b

File tree

14 files changed

+492
-2
lines changed

14 files changed

+492
-2
lines changed

README.md

Lines changed: 0 additions & 2 deletions
This file was deleted.

pom.xml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<project xmlns="http://maven.apache.org/POM/4.0.0"
3+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
5+
<modelVersion>4.0.0</modelVersion>
6+
7+
<groupId>iip</groupId>
8+
<artifactId>kjb</artifactId>
9+
<version>1.0-SNAPSHOT</version>
10+
11+
<build>
12+
<resources>
13+
<resource>
14+
<directory>src/main/java</directory>
15+
<includes>
16+
<include>**/*.fxml</include>
17+
<include>**/*.css</include>
18+
<include>**/*.png</include>
19+
</includes>
20+
<filtering>true</filtering>
21+
</resource>
22+
</resources>
23+
<plugins>
24+
<plugin>
25+
<groupId>org.apache.maven.plugins</groupId>
26+
<artifactId>maven-compiler-plugin</artifactId>
27+
<version>2.3.2</version>
28+
<configuration>
29+
<source>1.8</source>
30+
<target>1.8</target>
31+
</configuration>
32+
</plugin>
33+
</plugins>
34+
</build>
35+
</project>

src/main/java/com/iip/Main.java

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
package com.iip;
2+
3+
import javafx.application.Application;
4+
import javafx.fxml.FXMLLoader;
5+
import javafx.scene.Parent;
6+
import javafx.scene.Scene;
7+
import javafx.stage.Stage;
8+
9+
public class Main extends Application {
10+
11+
@Override
12+
public void start(Stage primaryStage) throws Exception{
13+
// System.out.println(getClass().getResource("view/Login.fxml"));
14+
Parent root = FXMLLoader.load(getClass().getResource("/com/iip/ui/view/Login.fxml"));
15+
primaryStage.setTitle("Hello World");
16+
Scene scene = new Scene(root, 400, 300);
17+
primaryStage.setScene(scene);
18+
19+
20+
primaryStage.show();
21+
}
22+
23+
24+
public static void main(String[] args) {
25+
launch(args);
26+
}
27+
}
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
package com.iip.connection;
2+
3+
/**
4+
* @Author Junnor.G
5+
* @Date 2018/12/4 下午4:06
6+
*/
7+
8+
import java.util.List;
9+
import java.util.Map;
10+
11+
public interface Connection {
12+
String getNickName();
13+
String getType();
14+
Map<String, Table> getTables();
15+
boolean isTarget();
16+
}
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
package com.iip.connection;
2+
3+
/**
4+
* Created by gegaojian on 7/20/17.
5+
*/
6+
public class Field {
7+
protected String name;
8+
protected String fieldType;
9+
protected String isKey;//有“Y” “N” “”三种取值
10+
11+
public Field(String name, String fieldType, String isKey) {
12+
this.name = name;
13+
this.fieldType = fieldType;
14+
this.isKey = isKey;
15+
}
16+
17+
public String getName() {
18+
return name;
19+
}
20+
21+
public String getFieldType() {
22+
return fieldType;
23+
}
24+
25+
public String getIsKey() {
26+
return isKey;
27+
}
28+
29+
public boolean isKey() {
30+
return isKey == "Y";
31+
}
32+
33+
}
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
package com.iip.connection;
2+
3+
/**
4+
* 表格类
5+
* Created by gegaojian on 7/20/17.
6+
* finished by ... on ...
7+
* fixed by ... on ...
8+
*/
9+
10+
import java.util.ArrayList;
11+
import java.util.LinkedHashMap;
12+
import java.util.Map;
13+
import java.util.TreeMap;
14+
15+
16+
public class Table {
17+
private String tableName;
18+
private Map<String, Field> fields = new LinkedHashMap<String, Field>();
19+
//....
20+
21+
public Table(String tableName){
22+
this.tableName = tableName;
23+
}
24+
25+
public void setTableName(String tableName) {
26+
this.tableName = tableName;
27+
}
28+
29+
public void setFields(LinkedHashMap<String, Field> fields) {
30+
this.fields = fields;
31+
}
32+
33+
public String getTableName(){ return tableName; }
34+
35+
public Map<String, Field> getFields() {
36+
return fields;
37+
}
38+
39+
// public void addField(TargetField field){
40+
// this.fields.add(field);
41+
// }
42+
43+
// public void deleteFieldByIndex(int index){
44+
// this.fields.remove(index);
45+
// }
46+
47+
// public void editFieldByIndex(int index, TargetField field){
48+
// this.fields.set(index, field);
49+
// }
50+
}
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
package com.iip.ui.controller;
2+
3+
import javafx.fxml.FXML;
4+
import javafx.fxml.Initializable;
5+
import javafx.scene.control.Button;
6+
import javafx.scene.control.TextArea;
7+
8+
import java.net.URL;
9+
import java.util.ResourceBundle;
10+
11+
/**
12+
* @Author Junnor.G
13+
* @Date 2018/11/28 下午7:24
14+
*/
15+
public class MainController implements Initializable {
16+
@FXML
17+
private TextArea textArea_1;
18+
19+
@FXML
20+
private Button button_1;
21+
22+
@FXML
23+
protected void buttonClick(){
24+
textArea_1.appendText("Hello world!\r\n");
25+
}
26+
@Override
27+
public void initialize(URL url, ResourceBundle rb){
28+
//todo
29+
}
30+
}
Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
3+
<?import java.lang.*?>
4+
<?import java.util.*?>
5+
<?import javafx.geometry.*?>
6+
<?import javafx.scene.control.*?>
7+
<?import javafx.scene.effect.*?>
8+
<?import javafx.scene.layout.*?>
9+
<?import javafx.scene.paint.*?>
10+
<?import javafx.scene.text.*?>
11+
12+
<AnchorPane id="AnchorPane" maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="250.0" prefWidth="400.0"
13+
xmlns:fx="http://javafx.com/fxml">
14+
<children>
15+
<VBox layoutX="3.0" layoutY="0.0" prefHeight="250.0" prefWidth="390.0" spacing="20.0">
16+
<children>
17+
<HBox minHeight="37.0" prefHeight="37.0" prefWidth="411.0">
18+
<children>
19+
<Label text="登陆界面">
20+
<effect>
21+
<DropShadow height="7.845238095238096" radius="4.1815476190476195" width="10.880952380952381" />
22+
</effect>
23+
<font>
24+
<Font name="System Bold" size="30.0" />
25+
</font>
26+
<HBox.margin>
27+
<Insets left="140.0" />
28+
</HBox.margin>
29+
</Label>
30+
</children>
31+
</HBox>
32+
<GridPane alignment="TOP_RIGHT" prefWidth="380.0">
33+
<children>
34+
<Label alignment="TOP_RIGHT" text="Account" GridPane.columnIndex="0" GridPane.halignment="RIGHT" GridPane.rowIndex="0">
35+
<effect>
36+
<DropShadow blurType="TWO_PASS_BOX" height="7.845238095238096" radius="3.675595238095238" width="8.857142857142858" />
37+
</effect>
38+
<font>
39+
<Font size="25.0" fx:id="x1" />
40+
</font>
41+
<GridPane.margin>
42+
<Insets right="8.0" fx:id="x2" />
43+
</GridPane.margin>
44+
</Label>
45+
<Label font="$x1" text="password" GridPane.columnIndex="0" GridPane.halignment="RIGHT" GridPane.margin="$x2" GridPane.rowIndex="1">
46+
<effect>
47+
<DropShadow blurType="TWO_PASS_BOX" height="7.845238095238094" radius="3.6755952380952372" width="8.857142857142854" />
48+
</effect>
49+
</Label>
50+
<TextField fx:id="tfAccount" prefHeight="26.0" prefWidth="268.0" promptText="please input your account" GridPane.columnIndex="1" GridPane.rowIndex="0" />
51+
<PasswordField fx:id="pfPassword" prefWidth="223.0" promptText="please input your password" GridPane.columnIndex="1" GridPane.rowIndex="1" />
52+
<Button id="btnLogin" mnemonicParsing="false" prefWidth="80.0" text="登陆" GridPane.columnIndex="0" GridPane.halignment="RIGHT" GridPane.rowIndex="2">
53+
<effect>
54+
<DropShadow />
55+
</effect>
56+
<GridPane.margin>
57+
<Insets top="15.0" />
58+
</GridPane.margin>
59+
</Button>
60+
<Button id="btnClear" mnemonicParsing="false" prefWidth="80.0" text="清除" GridPane.columnIndex="1" GridPane.rowIndex="2">
61+
<effect>
62+
<DropShadow />
63+
</effect>
64+
<GridPane.margin>
65+
<Insets left="80.0" top="15.0" />
66+
</GridPane.margin>
67+
</Button>
68+
</children>
69+
<columnConstraints>
70+
<ColumnConstraints hgrow="SOMETIMES" maxWidth="205.0" minWidth="10.0" prefWidth="147.0" />
71+
<ColumnConstraints hgrow="SOMETIMES" maxWidth="318.0" minWidth="10.0" prefWidth="243.0" />
72+
</columnConstraints>
73+
<rowConstraints>
74+
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
75+
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
76+
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
77+
</rowConstraints>
78+
</GridPane>
79+
</children>
80+
<padding>
81+
<Insets top="30.0" />
82+
</padding>
83+
</VBox>
84+
</children>
85+
</AnchorPane>
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
3+
<?import java.lang.*?>
4+
<?import java.util.*?>
5+
<?import javafx.scene.*?>
6+
<?import javafx.scene.control.*?>
7+
<?import javafx.scene.layout.*?>
8+
9+
<Pane fx:controller="com.iip.ui.controller.MainController" maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="347.0" prefWidth="328.0" xmlns="http://javafx.com/javafx/8.0.111" xmlns:fx="http://javafx.com/fxml/1">
10+
<children>
11+
<Button fx:id="button_1" layoutX="137.0" layoutY="267.0" mnemonicParsing="false" onAction="#buttonClick" text="Button" />
12+
<Label layoutX="134.0" layoutY="52.0" text="你好世界!" />
13+
<TextArea fx:id="textArea_1" layoutX="64.0" layoutY="67.0" prefHeight="200.0" prefWidth="200.0" />
14+
</children>
15+
</Pane>
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
3+
<?import javafx.scene.control.Label?>
4+
<?import javafx.scene.control.SplitPane?>
5+
<?import javafx.scene.control.TableColumn?>
6+
<?import javafx.scene.control.TableView?>
7+
<?import javafx.scene.layout.AnchorPane?>
8+
<?import javafx.scene.layout.ColumnConstraints?>
9+
<?import javafx.scene.layout.GridPane?>
10+
<?import javafx.scene.layout.RowConstraints?>
11+
12+
<AnchorPane prefHeight="400.0" prefWidth="600.0" xmlns="http://javafx.com/javafx/8.0.121" xmlns:fx="http://javafx.com/fxml/1" fx:controller="com.iip.test.ui.space_time.view.Test1">
13+
<children>
14+
<SplitPane dividerPositions="0.38294314381270905" prefHeight="400.0" prefWidth="600.0">
15+
<items>
16+
<AnchorPane minHeight="0.0" minWidth="0.0" prefHeight="160.0" prefWidth="100.0">
17+
<TableView prefHeight="398.0" prefWidth="225.0">
18+
<columns>
19+
<TableColumn prefWidth="115.0" text="FirstName" />
20+
<TableColumn prefWidth="109.0" text="LastName" />
21+
</columns>
22+
</TableView>
23+
</AnchorPane>
24+
<AnchorPane minHeight="0.0" minWidth="0.0" prefHeight="160.0" prefWidth="100.0">
25+
<Label prefHeight="28.0" prefWidth="365.0" text="Label" />
26+
<GridPane layoutY="29.0" prefHeight="243.0" prefWidth="365.0" AnchorPane.bottomAnchor="126.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="29.0">
27+
<columnConstraints>
28+
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" />
29+
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" />
30+
</columnConstraints>
31+
<rowConstraints>
32+
<RowConstraints minHeight="10.0" vgrow="SOMETIMES" />
33+
<RowConstraints minHeight="10.0" vgrow="SOMETIMES" />
34+
<RowConstraints minHeight="10.0" vgrow="SOMETIMES" />
35+
<RowConstraints minHeight="10.0" vgrow="SOMETIMES" />
36+
<RowConstraints minHeight="10.0" vgrow="SOMETIMES" />
37+
<RowConstraints minHeight="10.0" vgrow="SOMETIMES" />
38+
</rowConstraints>
39+
40+
<children>
41+
<Label text="1" />
42+
</children>
43+
</GridPane>
44+
</AnchorPane>
45+
46+
</items>
47+
</SplitPane>
48+
49+
</children>
50+
</AnchorPane>

0 commit comments

Comments
 (0)