public class MainController
extends java.lang.Object
implements javafx.fxml.Initializable
限定符和类型 | 字段和说明 |
---|---|
private javafx.scene.canvas.Canvas |
canva |
private javafx.scene.control.ChoiceBox<java.lang.String> |
cb1 |
private javafx.scene.control.ChoiceBox<java.lang.String> |
cb2 |
private javafx.scene.control.TableColumn<EarthquakeData,java.time.LocalDate> |
Date |
private javafx.scene.control.TableColumn<EarthquakeData,java.lang.Integer> |
Depth |
private javafx.scene.control.DatePicker |
dp |
private javafx.scene.control.DatePicker |
dp2 |
private javafx.scene.control.TableColumn<EarthquakeData,java.lang.String> |
Latitude |
javafx.collections.ObservableList<EarthquakeData> |
list |
private javafx.scene.control.TableColumn<EarthquakeData,java.lang.String> |
Longitude |
private javafx.scene.control.TableColumn<EarthquakeData,java.lang.Double> |
Magnitude |
static javafx.collections.ObservableList<java.lang.String> |
plateslist |
(专用程序包) QueryDatabase |
qb |
private javafx.scene.control.TableColumn<EarthquakeData,java.lang.String> |
Region |
private javafx.scene.control.TableView<EarthquakeData> |
table |
private javafx.scene.control.ToggleButton |
tbd |
private javafx.scene.control.ToggleButton |
tbm |
private javafx.scene.control.ToggleButton |
tbr |
private javafx.scene.text.Text |
text |
private javafx.scene.text.Text |
text1 |
private javafx.scene.control.TextArea |
textinput1 |
private javafx.scene.control.TextArea |
textinput2 |
private javafx.scene.control.TableColumn<EarthquakeData,java.time.LocalTime> |
Time |
private javafx.scene.layout.VBox |
vbox |
构造器和说明 |
---|
MainController() |
限定符和类型 | 方法和说明 |
---|---|
void |
DateSelect(javafx.event.ActionEvent event)
When the ToggleButton "Set Date Scale" is selected, "Search by Date" mode is on.
|
void |
initialize(java.net.URL location,
java.util.ResourceBundle resources)
Rewrite the initialize method in "Initializable".
|
private java.lang.Double |
latAdjust(java.lang.String lat,
java.lang.Double adjustment)
This method is aimed to adjust the position showed in the map.
|
private java.lang.Double |
lonAdjust(java.lang.String lon,
java.lang.Double adjustment)
This method is aimed to adjust the position showed in the map.
|
void |
MagSelect(javafx.event.ActionEvent event)
When the ToggleButton "Set Magnitude Scale" is selected, "Search by Magnitude" mode is on.
|
void |
RegionSelect(javafx.event.ActionEvent event)
When the ToggleButton "Select Region" is selected, "Search by region" mode is on.
|
void |
resProcess(java.sql.ResultSet res)
The detailed method to search for the data in the database.
|
void |
Search(javafx.event.ActionEvent event)
The methods to search for the data based on the condition users choose.
|
QueryDatabase qb
private javafx.scene.control.TableView<EarthquakeData> table
private javafx.scene.control.TableColumn<EarthquakeData,java.time.LocalDate> Date
private javafx.scene.control.TableColumn<EarthquakeData,java.time.LocalTime> Time
private javafx.scene.control.TableColumn<EarthquakeData,java.lang.String> Latitude
private javafx.scene.control.TableColumn<EarthquakeData,java.lang.String> Longitude
private javafx.scene.control.TableColumn<EarthquakeData,java.lang.Integer> Depth
private javafx.scene.control.TableColumn<EarthquakeData,java.lang.Double> Magnitude
private javafx.scene.control.TableColumn<EarthquakeData,java.lang.String> Region
public javafx.collections.ObservableList<EarthquakeData> list
public static javafx.collections.ObservableList<java.lang.String> plateslist
private javafx.scene.control.DatePicker dp
private javafx.scene.control.DatePicker dp2
private javafx.scene.control.ToggleButton tbd
private javafx.scene.control.ToggleButton tbm
private javafx.scene.control.ToggleButton tbr
private javafx.scene.layout.VBox vbox
private javafx.scene.text.Text text
private javafx.scene.text.Text text1
private javafx.scene.control.TextArea textinput1
private javafx.scene.control.TextArea textinput2
private javafx.scene.canvas.Canvas canva
private javafx.scene.control.ChoiceBox<java.lang.String> cb1
private javafx.scene.control.ChoiceBox<java.lang.String> cb2
public void Search(javafx.event.ActionEvent event)
event
- - Click the button will run the method.public void DateSelect(javafx.event.ActionEvent event)
event
- - Click the button will run the method.public void MagSelect(javafx.event.ActionEvent event)
event
- - Click the button will run the method.public void RegionSelect(javafx.event.ActionEvent event)
event
- - Click the button will run the method.public void initialize(java.net.URL location, java.util.ResourceBundle resources)
initialize
在接口中 javafx.fxml.Initializable
public void resProcess(java.sql.ResultSet res)
res
- - the result set return by the searching method.private java.lang.Double lonAdjust(java.lang.String lon, java.lang.Double adjustment)
lon
- - the longitude the earthquake happened.adjustment
- - the distance that the point should move rightward.private java.lang.Double latAdjust(java.lang.String lat, java.lang.Double adjustment)
lat
- - the latitude the earthquake happened.adjustment
- - the distance that the point should move downward.