2018-10-13 22:54:52 +02:00
|
|
|
package extensions.blockreplacepackets;
|
2018-09-22 18:30:32 +02:00
|
|
|
|
2018-10-13 22:54:52 +02:00
|
|
|
import gearth.ui.GEarthController;
|
2018-09-22 18:30:32 +02:00
|
|
|
import javafx.fxml.FXMLLoader;
|
|
|
|
import javafx.scene.Parent;
|
|
|
|
import javafx.scene.Scene;
|
2018-10-05 18:38:42 +02:00
|
|
|
import javafx.scene.control.Button;
|
|
|
|
import javafx.scene.control.ComboBox;
|
|
|
|
import javafx.scene.control.TextField;
|
2018-09-22 18:30:32 +02:00
|
|
|
import javafx.stage.Stage;
|
2018-10-13 22:54:52 +02:00
|
|
|
import gearth.extensions.ExtensionForm;
|
|
|
|
import gearth.extensions.ExtensionInfo;
|
2018-09-22 18:30:32 +02:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Created by Jonas on 22/09/18.
|
|
|
|
*/
|
2018-09-25 18:58:58 +02:00
|
|
|
|
|
|
|
|
|
|
|
@ExtensionInfo(
|
|
|
|
Title = "iManipulate",
|
|
|
|
Description = "Block &/ replace packets",
|
|
|
|
Version = "0.1",
|
|
|
|
Author = "sirjonasxx"
|
|
|
|
)
|
2018-09-22 18:30:32 +02:00
|
|
|
public class BlockAndReplacePackets extends ExtensionForm {
|
|
|
|
|
2018-10-05 18:38:42 +02:00
|
|
|
public TextField txt_replacement;
|
|
|
|
public ComboBox<String> cmb_type;
|
|
|
|
public TextField txt_id;
|
|
|
|
public Button btn_add;
|
|
|
|
|
2018-09-22 18:30:32 +02:00
|
|
|
public static void main(String[] args) {
|
|
|
|
ExtensionForm.args = args;
|
|
|
|
launch(args);
|
|
|
|
}
|
|
|
|
|
2018-10-05 18:38:42 +02:00
|
|
|
//initialize javaFX elements
|
|
|
|
public void initialize() {
|
|
|
|
cmb_type.getItems().addAll("Block OUT", "Block IN", "Replace OUT", "Replace IN");
|
|
|
|
cmb_type.getSelectionModel().selectFirst();
|
|
|
|
}
|
|
|
|
|
2018-09-22 18:30:32 +02:00
|
|
|
@Override
|
|
|
|
protected void initExtension() {
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public void setStageData(Stage primaryStage) throws Exception {
|
|
|
|
FXMLLoader loader = new FXMLLoader(BlockAndReplacePackets.class.getResource("blockreplace.fxml"));
|
|
|
|
Parent root = loader.load();
|
|
|
|
|
2018-10-05 18:38:42 +02:00
|
|
|
primaryStage.setTitle("Packet blocker &/ replacer");
|
|
|
|
primaryStage.setScene(new Scene(root, 580, 262));
|
2018-10-15 02:01:28 +02:00
|
|
|
primaryStage.getScene().getStylesheets().add(GEarthController.class.getResource("/gearth/ui/bootstrap3.css").toExternalForm());
|
2018-09-22 18:30:32 +02:00
|
|
|
}
|
|
|
|
}
|