implement Extension Console

This commit is contained in:
sirjonasxx 2020-04-27 05:11:13 +02:00
parent cee7fe5160
commit 23e28ba7a9
23 changed files with 364 additions and 93 deletions

View File

@ -11,7 +11,7 @@
<?import javafx.scene.layout.RowConstraints?> <?import javafx.scene.layout.RowConstraints?>
<?import javafx.scene.layout.VBox?> <?import javafx.scene.layout.VBox?>
<GridPane prefHeight="324.0" prefWidth="588.0" style="-fx-background-color: #FFFFFF;" xmlns="http://javafx.com/javafx/8.0.131" xmlns:fx="http://javafx.com/fxml/1" fx:controller="extensions.blockreplacepackets.BlockAndReplacePackets"> <GridPane prefHeight="324.0" prefWidth="588.0" style="-fx-background-color: #FFFFFF;" xmlns="http://javafx.com/javafx" xmlns:fx="http://javafx.com/fxml/1" fx:controller="extensions.blockreplacepackets.BlockAndReplacePackets">
<columnConstraints> <columnConstraints>
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" /> <ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
</columnConstraints> </columnConstraints>

View File

@ -15,7 +15,7 @@ import java.util.Map;
/** /**
* Created by Jonas on 23/06/18. * Created by Jonas on 23/06/18.
*/ */
public abstract class Extension implements IExtension{ public abstract class Extension implements IExtension {
public interface MessageListener { public interface MessageListener {
void act(HMessage message); void act(HMessage message);
@ -160,6 +160,7 @@ public abstract class Extension implements IExtension{
} }
else if (packet.headerId() == NetworkExtensionInfo.OUTGOING_MESSAGES_IDS.INIT) { else if (packet.headerId() == NetworkExtensionInfo.OUTGOING_MESSAGES_IDS.INIT) {
initExtension(); initExtension();
writeToConsole("green","Extension \"" + getInfoAnnotations().Title() + "\" succesfully initialized");
} }
else if (packet.headerId() == NetworkExtensionInfo.OUTGOING_MESSAGES_IDS.ONDOUBLECLICK) { else if (packet.headerId() == NetworkExtensionInfo.OUTGOING_MESSAGES_IDS.ONDOUBLECLICK) {
onClick(); onClick();
@ -314,6 +315,14 @@ public abstract class Extension implements IExtension{
} }
} }
/**
* Write to the console in G-Earth
* @param s the text to be written
*/
public void writeToConsole(String colorClass, String s) {
writeToConsole("[" + colorClass + "]" + s);
}
private boolean isOnClickMethodUsed() { private boolean isOnClickMethodUsed() {

View File

@ -8,7 +8,7 @@ import gearth.protocol.HPacket;
/** /**
* Created by Jonas on 22/09/18. * Created by Jonas on 22/09/18.
*/ */
public abstract class ExtensionForm implements IExtension{ public abstract class ExtensionForm implements IExtension {
volatile Extension extension; volatile Extension extension;
volatile Stage primaryStage; volatile Stage primaryStage;
@ -28,6 +28,9 @@ public abstract class ExtensionForm implements IExtension{
public void writeToConsole(String s) { public void writeToConsole(String s) {
extension.writeToConsole(s); extension.writeToConsole(s);
} }
public void writeToConsole(String colorClass, String s) {
extension.writeToConsole(colorClass, s);
}
public void intercept(HMessage.Direction direction, Extension.MessageListener messageListener) { public void intercept(HMessage.Direction direction, Extension.MessageListener messageListener) {
extension.intercept(direction, messageListener); extension.intercept(direction, messageListener);
} }

View File

@ -7,7 +7,7 @@ import javafx.stage.Stage;
/** /**
* Created by Jeunez on 6/11/2018. * Created by Jeunez on 6/11/2018.
*/ */
public class ExtensionFormLauncher extends Application{ public class ExtensionFormLauncher extends Application {
private static Class<? extends ExtensionForm> extension; private static Class<? extends ExtensionForm> extension;
private static String[] args; private static String[] args;

View File

@ -13,7 +13,8 @@ public interface IExtension {
void intercept(HMessage.Direction direction, int headerId, Extension.MessageListener messageListener); void intercept(HMessage.Direction direction, int headerId, Extension.MessageListener messageListener);
void intercept(HMessage.Direction direction, Extension.MessageListener messageListener); void intercept(HMessage.Direction direction, Extension.MessageListener messageListener);
boolean requestFlags(Extension.FlagsCheckListener flagRequestCallback); boolean requestFlags(Extension.FlagsCheckListener flagRequestCallback);
void writeToConsole(String s); // not implemented in g-earth yet void writeToConsole(String colorClass, String s);
void writeToConsole(String s);
void onConnect(OnConnectionListener listener); void onConnect(OnConnectionListener listener);
} }

View File

@ -167,12 +167,6 @@ public class ExtensionHandler {
} }
} }
@Override
public void log(String text) {
// todo make simple logger for Extensions, the implementation now is temporary
System.out.println(text);
}
@Override @Override
public void hasClosed() { public void hasClosed() {
synchronized (gEarthExtensions) { synchronized (gEarthExtensions) {

View File

@ -1,11 +1,15 @@
package gearth.ui.extensions; package gearth.ui.extensions;
import gearth.services.extensionhandler.ExtensionConnectedListener;
import gearth.services.extensionhandler.ExtensionHandler; import gearth.services.extensionhandler.ExtensionHandler;
import gearth.services.extensionhandler.extensions.ExtensionListener;
import gearth.services.extensionhandler.extensions.GEarthExtension;
import gearth.services.extensionhandler.extensions.implementations.network.NetworkExtensionsProducer; import gearth.services.extensionhandler.extensions.implementations.network.NetworkExtensionsProducer;
import gearth.services.extensionhandler.extensions.implementations.network.executer.ExecutionInfo; import gearth.services.extensionhandler.extensions.implementations.network.executer.ExecutionInfo;
import gearth.services.extensionhandler.extensions.implementations.network.executer.ExtensionRunner; import gearth.services.extensionhandler.extensions.implementations.network.executer.ExtensionRunner;
import gearth.services.extensionhandler.extensions.implementations.network.executer.ExtensionRunnerFactory; import gearth.services.extensionhandler.extensions.implementations.network.executer.ExtensionRunnerFactory;
import gearth.ui.SubForm; import gearth.ui.SubForm;
import gearth.ui.extensions.logger.ExtensionLogger;
import javafx.application.Platform; import javafx.application.Platform;
import javafx.event.ActionEvent; import javafx.event.ActionEvent;
import javafx.scene.control.Button; import javafx.scene.control.Button;
@ -30,14 +34,19 @@ public class ExtensionsController extends SubForm {
public VBox extensioncontainer; public VBox extensioncontainer;
public GridPane header_ext; public GridPane header_ext;
public ScrollPane scroller; public ScrollPane scroller;
public Button btn_viewExtensionConsole;
private ExtensionRunner extensionRunner = null; private ExtensionRunner extensionRunner = null;
private ExtensionHandler extensionHandler; private ExtensionHandler extensionHandler;
private NetworkExtensionsProducer networkExtensionsProducer; // needed for port private NetworkExtensionsProducer networkExtensionsProducer; // needed for port
private ExtensionLogger extensionLogger = null;
public void initialize() { public void initialize() {
scroller.widthProperty().addListener(observable -> header_ext.setPrefWidth(scroller.getWidth())); scroller.widthProperty().addListener(observable -> header_ext.setPrefWidth(scroller.getWidth()));
extensionLogger = new ExtensionLogger();
} }
protected void onParentSet() { protected void onParentSet() {
@ -60,6 +69,14 @@ public class ExtensionsController extends SubForm {
extensionRunner = ExtensionRunnerFactory.get(); extensionRunner = ExtensionRunnerFactory.get();
extensionRunner.runAllExtensions(networkExtensionsProducer.getPort()); extensionRunner.runAllExtensions(networkExtensionsProducer.getPort());
extensionHandler.getObservable().addListener(e -> e.getExtensionObservable().addListener(new ExtensionListener() {
@Override
protected void log(String text) {
extensionLogger.log(text);
}
}));
} }
@ -73,4 +90,14 @@ public class ExtensionsController extends SubForm {
extensionRunner.installAndRunExtension(selectedFile.getPath(), networkExtensionsProducer.getPort()); extensionRunner.installAndRunExtension(selectedFile.getPath(), networkExtensionsProducer.getPort());
} }
} }
public void extConsoleBtnClicked(ActionEvent actionEvent) {
if (!extensionLogger.isVisible()) {
extensionLogger.show();
}
else {
extensionLogger.hide();
}
}
} }

View File

@ -0,0 +1,11 @@
package gearth.ui.extensions.logger;
class Element {
final String text;
final String className;
Element(String text, String className) {
this.text = text;
this.className = className;
}
}

View File

@ -0,0 +1,93 @@
package gearth.ui.extensions.logger;
import javafx.fxml.FXMLLoader;
import javafx.scene.Parent;
import javafx.scene.Scene;
import javafx.scene.image.Image;
import javafx.stage.Modality;
import javafx.stage.Stage;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
public class ExtensionLogger {
private Stage stage;
private ExtensionLoggerController controller = null;
private final List<String> appendOnLoad = new ArrayList<>();
volatile boolean isVisible = false;
public ExtensionLogger() {
FXMLLoader loader = new FXMLLoader(getClass().getResource("/gearth/ui/extensions/logger/ExtensionLogger.fxml"));
try {
Parent root = loader.load();
synchronized (appendOnLoad) {
controller = loader.getController();
for (String s : appendOnLoad) {
controller.log(s);
}
appendOnLoad.clear();
}
stage = new Stage();
stage.setTitle("G-Earth | Extension Console");
stage.initModality(Modality.NONE);
stage.getIcons().add(new Image(getClass().getResourceAsStream("/gearth/G-EarthLogoSmaller.png")));
stage.setAlwaysOnTop(true);
stage.setMinHeight(235);
stage.setMinWidth(370);
Scene scene = new Scene(root);
scene.getStylesheets().add("/gearth/ui/bootstrap3.css");
scene.getStylesheets().add("/gearth/ui/extensions/logger/logger.css");
ExtensionLoggerController controller = loader.getController();
controller.setStage(stage);
stage.setScene(scene);
// don't let the user close this window on their own
stage.setOnCloseRequest(windowEvent -> {
stage.hide();
isVisible = false;
});
} catch (IOException e) {
e.printStackTrace();
}
}
public void show() {
if (stage != null){
stage.show();
if (stage.isIconified()) {
stage.setIconified(false);
}
isVisible = true;
}
}
public void hide() {
if (stage != null) {
stage.hide();
isVisible = false;
}
}
public void log(String s) {
synchronized (appendOnLoad) {
if (controller == null) {
appendOnLoad.add(s);
}
else {
controller.log(s);
}
}
}
public boolean isVisible() {
return isVisible;
}
}

View File

@ -0,0 +1,111 @@
package gearth.ui.extensions.logger;
import javafx.application.Platform;
import javafx.fxml.Initializable;
import javafx.scene.control.ScrollPane;
import javafx.scene.layout.BorderPane;
import javafx.stage.Stage;
import org.fxmisc.flowless.VirtualizedScrollPane;
import org.fxmisc.richtext.StyleClassedTextArea;
import org.fxmisc.richtext.model.StyleSpansBuilder;
import java.net.URL;
import java.util.*;
public class ExtensionLoggerController implements Initializable {
public BorderPane borderPane;
private Stage stage = null;
private StyleClassedTextArea area;
private volatile boolean initialized = false;
private final List<Element> appendOnLoad = new ArrayList<>();
@Override
public void initialize(URL arg0, ResourceBundle arg1) {
area = new StyleClassedTextArea();
area.getStyleClass().add("white");
area.setWrapText(true);
area.setEditable(false);
VirtualizedScrollPane<StyleClassedTextArea> vsPane = new VirtualizedScrollPane<>(area);
borderPane.setCenter(vsPane);
synchronized (appendOnLoad) {
initialized = true;
if (!appendOnLoad.isEmpty()) {
appendLog(appendOnLoad);
appendOnLoad.clear();
}
}
}
private synchronized void appendLog(List<Element> elements) {
Platform.runLater(() -> {
StringBuilder sb = new StringBuilder();
StyleSpansBuilder<Collection<String>> styleSpansBuilder = new StyleSpansBuilder<>(0);
for (Element element : elements) {
sb.append(element.text);
styleSpansBuilder.add(Collections.singleton(element.className), element.text.length());
}
int oldLen = area.getLength();
area.appendText(sb.toString());
// System.out.println(sb.toString());
area.setStyleSpans(oldLen, styleSpansBuilder.create());
// if (autoScroll) {
area.moveTo(area.getLength());
area.requestFollowCaret();
// }
});
}
void log(String s) {
s = cleanTextContent(s);
ArrayList<Element> elements = new ArrayList<>();
String classname, text;
if (s.startsWith("[") && s.contains("]")) {
classname = s.substring(1, s.indexOf("]"));
text = s.substring(s.indexOf("]") + 1);
}
else {
classname = "black";
text = s;
}
elements.add(new Element(text + "\n", classname.toLowerCase()));
synchronized (appendOnLoad) {
if (initialized) {
appendLog(elements);
}
else {
appendOnLoad.addAll(elements);
}
}
}
void setStage(Stage stage) {
this.stage = stage;
}
private static String cleanTextContent(String text)
{
// // strips off all non-ASCII characters
// text = text.replaceAll("[^\\x00-\\x7F]", "");
//
// // erases all the ASCII control characters
text = text.replaceAll("[\\p{Cntrl}&&[^\n\t]]", "");
// removes non-printable characters from Unicode
// text = text.replaceAll("\\p{C}", "");
return text.trim();
}
}

View File

@ -67,8 +67,6 @@ public class UiLoggerController implements Initializable {
appendLater.clear(); appendLater.clear();
} }
} }
} }
private static String cleanTextContent(String text) private static String cleanTextContent(String text)

View File

@ -7,7 +7,7 @@
<!--maxHeight="19.0" minHeight="19.0"--> <!--maxHeight="19.0" minHeight="19.0"-->
<VBox xmlns="http://javafx.com/javafx/8.0.112" xmlns:fx="http://javafx.com/fxml/1" <VBox xmlns="http://javafx.com/javafx" xmlns:fx="http://javafx.com/fxml/1"
fx:controller="gearth.ui.GEarthController"> fx:controller="gearth.ui.GEarthController">
<Pane fx:id="mover" maxHeight="0.0" minHeight="0.0" prefWidth="200.0"/> <Pane fx:id="mover" maxHeight="0.0" minHeight="0.0" prefWidth="200.0"/>
<TabPane fx:id="tabBar" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" minHeight="-Infinity" <TabPane fx:id="tabBar" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" minHeight="-Infinity"

View File

@ -11,7 +11,7 @@
<?import javafx.scene.layout.RowConstraints?> <?import javafx.scene.layout.RowConstraints?>
<?import javafx.scene.text.Font?> <?import javafx.scene.text.Font?>
<GridPane alignment="CENTER" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" prefHeight="262.0" prefWidth="565.0" xmlns="http://javafx.com/javafx/8.0.131" xmlns:fx="http://javafx.com/fxml/1" fx:controller="gearth.ui.connection.ConnectionController"> <GridPane alignment="CENTER" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" prefHeight="262.0" prefWidth="565.0" xmlns="http://javafx.com/javafx" xmlns:fx="http://javafx.com/fxml/1" fx:controller="gearth.ui.connection.ConnectionController">
<columnConstraints> <columnConstraints>
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" /> <ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
</columnConstraints> </columnConstraints>

View File

@ -1,112 +1,77 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<?import javafx.geometry.Insets?> <?import javafx.geometry.*?>
<?import javafx.scene.control.Button?> <?import javafx.scene.control.*?>
<?import javafx.scene.control.Label?> <?import javafx.scene.layout.*?>
<?import javafx.scene.control.ScrollPane?>
<?import javafx.scene.control.TextField?>
<?import javafx.scene.layout.ColumnConstraints?>
<?import javafx.scene.layout.GridPane?>
<?import javafx.scene.layout.RowConstraints?>
<?import javafx.scene.layout.VBox?>
<GridPane maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" prefHeight="262.0" prefWidth="565.0" <GridPane maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" prefHeight="262.0" prefWidth="565.0" xmlns="http://javafx.com/javafx" xmlns:fx="http://javafx.com/fxml/1" fx:controller="gearth.ui.extensions.ExtensionsController">
xmlns="http://javafx.com/javafx/8.0.112" xmlns:fx="http://javafx.com/fxml/1"
fx:controller="gearth.ui.extensions.ExtensionsController">
<columnConstraints> <columnConstraints>
<ColumnConstraints hgrow="SOMETIMES" maxWidth="1.7976931348623157E308" minWidth="10.0" prefWidth="277.0"/> <ColumnConstraints hgrow="SOMETIMES" maxWidth="1.7976931348623157E308" minWidth="10.0" prefWidth="277.0" />
</columnConstraints> </columnConstraints>
<rowConstraints> <rowConstraints>
<RowConstraints maxHeight="227.0" minHeight="10.0" prefHeight="222.0" vgrow="SOMETIMES"/> <RowConstraints maxHeight="227.0" minHeight="10.0" prefHeight="222.0" vgrow="SOMETIMES" />
<RowConstraints maxHeight="185.0" minHeight="10.0" prefHeight="40.0" vgrow="SOMETIMES"/> <RowConstraints maxHeight="185.0" minHeight="10.0" prefHeight="40.0" vgrow="SOMETIMES" />
</rowConstraints> </rowConstraints>
<ScrollPane fx:id="scroller" hbarPolicy="NEVER" maxHeight="1.7976931348623157E308" <ScrollPane fx:id="scroller" hbarPolicy="NEVER" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" style="-fx-border-color: #888888; -fx-background: #FFFFFF; -fx-border-radius: 4px;" vbarPolicy="ALWAYS">
maxWidth="1.7976931348623157E308"
style="-fx-border-color: #888888; -fx-background: #FFFFFF; -fx-border-radius: 4px;"
vbarPolicy="ALWAYS">
<GridPane.margin> <GridPane.margin>
<Insets bottom="8.0" left="17.0" right="17.0" top="17.0"/> <Insets bottom="8.0" left="17.0" right="17.0" top="17.0" />
</GridPane.margin> </GridPane.margin>
<VBox fx:id="extensioncontainer" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308"> <VBox fx:id="extensioncontainer" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308">
<GridPane fx:id="header_ext" gridLinesVisible="true"> <GridPane fx:id="header_ext" gridLinesVisible="true">
<columnConstraints> <columnConstraints>
<ColumnConstraints hgrow="SOMETIMES" maxWidth="163.0" minWidth="10.0" <ColumnConstraints hgrow="SOMETIMES" maxWidth="163.0" minWidth="10.0" percentWidth="22.0" prefWidth="57.0" />
percentWidth="22.0" prefWidth="57.0"/> <ColumnConstraints hgrow="SOMETIMES" maxWidth="190.0" minWidth="10.0" percentWidth="34.0" prefWidth="189.0" />
<ColumnConstraints hgrow="SOMETIMES" maxWidth="190.0" minWidth="10.0" <ColumnConstraints hgrow="SOMETIMES" maxWidth="118.0" minWidth="10.0" percentWidth="18.0" prefWidth="66.0" />
percentWidth="34.0" prefWidth="189.0"/> <ColumnConstraints hgrow="SOMETIMES" maxWidth="100.0" minWidth="10.0" percentWidth="13.0" prefWidth="100.0" />
<ColumnConstraints hgrow="SOMETIMES" maxWidth="118.0" minWidth="10.0" <ColumnConstraints hgrow="SOMETIMES" maxWidth="100.0" minWidth="10.0" percentWidth="11.0" prefWidth="100.0" />
percentWidth="18.0" prefWidth="66.0"/>
<ColumnConstraints hgrow="SOMETIMES" maxWidth="100.0" minWidth="10.0"
percentWidth="13.0" prefWidth="100.0"/>
<ColumnConstraints hgrow="SOMETIMES" maxWidth="100.0" minWidth="10.0"
percentWidth="11.0" prefWidth="100.0"/>
</columnConstraints> </columnConstraints>
<rowConstraints> <rowConstraints>
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES"/> <RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
</rowConstraints> </rowConstraints>
<VBox.margin> <VBox.margin>
<Insets bottom="-2.0" left="-2.0" right="-2.0" top="-2.0"/> <Insets bottom="-2.0" left="-2.0" right="-2.0" top="-2.0" />
</VBox.margin> </VBox.margin>
<Label alignment="CENTER" maxHeight="1.7976931348623157E308" <Label alignment="CENTER" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" style="-fx-text-fill: #666666; -fx-background-color: #F7F7F7;" text="Title" />
maxWidth="1.7976931348623157E308" <Label alignment="CENTER" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" style="-fx-text-fill: #666666; -fx-background-color: #F7F7F7;" text="Description" GridPane.columnIndex="1" />
style="-fx-text-fill: #666666; -fx-background-color: #F7F7F7;" text="Title"/> <Label alignment="CENTER" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" style="-fx-text-fill: #666666; -fx-background-color: #F7F7F7;" text="Author" GridPane.columnIndex="2" />
<Label alignment="CENTER" maxHeight="1.7976931348623157E308" <Label alignment="CENTER" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" style="-fx-text-fill: #666666; -fx-background-color: #F7F7F7;" text="Version" GridPane.columnIndex="3" />
maxWidth="1.7976931348623157E308" <Label alignment="CENTER" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" style="-fx-text-fill: #666666; -fx-background-color: #F7F7F7;" text="Edit" GridPane.columnIndex="4" />
style="-fx-text-fill: #666666; -fx-background-color: #F7F7F7;" text="Description"
GridPane.columnIndex="1"/>
<Label alignment="CENTER" maxHeight="1.7976931348623157E308"
maxWidth="1.7976931348623157E308"
style="-fx-text-fill: #666666; -fx-background-color: #F7F7F7;" text="Author"
GridPane.columnIndex="2"/>
<Label alignment="CENTER" maxHeight="1.7976931348623157E308"
maxWidth="1.7976931348623157E308"
style="-fx-text-fill: #666666; -fx-background-color: #F7F7F7;" text="Version"
GridPane.columnIndex="3"/>
<Label alignment="CENTER" maxHeight="1.7976931348623157E308"
maxWidth="1.7976931348623157E308"
style="-fx-text-fill: #666666; -fx-background-color: #F7F7F7;" text="Edit"
GridPane.columnIndex="4"/>
</GridPane> </GridPane>
</VBox> </VBox>
</ScrollPane> </ScrollPane>
<GridPane maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" vgap="3.0" GridPane.rowIndex="1"> <GridPane maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" vgap="3.0" GridPane.rowIndex="1">
<columnConstraints> <columnConstraints>
<ColumnConstraints hgrow="SOMETIMES" maxWidth="1.7976931348623157E308" minWidth="10.0" <ColumnConstraints hgrow="SOMETIMES" maxWidth="1.7976931348623157E308" minWidth="10.0" prefWidth="349.0" />
prefWidth="349.0"/>
</columnConstraints> </columnConstraints>
<rowConstraints> <rowConstraints>
<RowConstraints maxHeight="1.7976931348623157E308" minHeight="10.0" prefHeight="30.0" <RowConstraints maxHeight="1.7976931348623157E308" minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
vgrow="SOMETIMES"/>
</rowConstraints> </rowConstraints>
<GridPane.margin> <GridPane.margin>
<Insets bottom="10.0" left="17.0" right="17.0"/> <Insets bottom="10.0" left="17.0" right="17.0" />
</GridPane.margin> </GridPane.margin>
<GridPane hgap="7.0"> <GridPane hgap="7.0">
<columnConstraints> <columnConstraints>
<ColumnConstraints hgrow="SOMETIMES" maxWidth="63.0" minWidth="49.0" prefWidth="49.0"/> <ColumnConstraints hgrow="SOMETIMES" maxWidth="49.0" minWidth="49.0" prefWidth="49.0" />
<ColumnConstraints hgrow="SOMETIMES" maxWidth="114.0" minWidth="10.0" prefWidth="101.0"/> <ColumnConstraints hgrow="SOMETIMES" maxWidth="101.0" minWidth="101.0" prefWidth="101.0" />
<ColumnConstraints hgrow="SOMETIMES" maxWidth="257.0" minWidth="70.0" prefWidth="247.0"/> <ColumnConstraints hgrow="SOMETIMES" maxWidth="1.7976931348623157E308" minWidth="0.0" prefWidth="247.0" />
<ColumnConstraints hgrow="SOMETIMES" maxWidth="1.7976931348623157E308" minWidth="35.0" <ColumnConstraints hgrow="SOMETIMES" maxWidth="140.0" minWidth="140.0" prefWidth="140.0" />
prefWidth="113.0"/> <ColumnConstraints hgrow="SOMETIMES" maxWidth="140.0" minWidth="140.0" prefWidth="140.0" />
</columnConstraints> </columnConstraints>
<rowConstraints> <rowConstraints>
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES"/> <RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
</rowConstraints> </rowConstraints>
<TextField fx:id="ext_port" editable="false" prefHeight="26.0" prefWidth="157.0" <TextField fx:id="ext_port" editable="false" prefHeight="26.0" prefWidth="157.0" GridPane.columnIndex="1">
GridPane.columnIndex="1">
<GridPane.margin> <GridPane.margin>
<Insets left="-7.0"/> <Insets left="-7.0" />
</GridPane.margin> </GridPane.margin>
</TextField> </TextField>
<Label maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" text="Port:" <Label maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" text="Port:" textFill="#000000bb">
textFill="#000000bb">
<GridPane.margin> <GridPane.margin>
<Insets left="3.0"/> <Insets left="3.0" />
</GridPane.margin> </GridPane.margin>
</Label> </Label>
<Button fx:id="btn_install" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" <Button fx:id="btn_install" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" mnemonicParsing="false" onAction="#installBtnClicked" text="Install" GridPane.columnIndex="4" />
mnemonicParsing="false" onAction="#installBtnClicked" text="Install" <Button fx:id="btn_viewExtensionConsole" layoutX="401.0" layoutY="10.0" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" mnemonicParsing="false" onAction="#extConsoleBtnClicked" text="View logs" GridPane.columnIndex="3" />
GridPane.columnIndex="3"/>
</GridPane> </GridPane>
</GridPane> </GridPane>
</GridPane> </GridPane>

View File

@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<?import javafx.geometry.*?>
<?import javafx.scene.layout.*?>
<BorderPane fx:id="borderPane" prefHeight="230.0" prefWidth="394.0" style="-fx-background-color: white;" xmlns="http://javafx.com/javafx/10.0.2-internal" xmlns:fx="http://javafx.com/fxml/1" fx:controller="gearth.ui.extensions.logger.ExtensionLoggerController">
<padding>
<Insets bottom="1.0" left="5.0" right="1.0" top="5.0" />
</padding>
</BorderPane>

View File

@ -0,0 +1,49 @@
/* extension logger css */
.grey {
-fx-fill: #a9a9a9;
}
.lightgrey {
-fx-fill: #D0D3D4;
}
.yellow {
-fx-fill: #ffff00;
}
.red {
-fx-fill: #b22222;
}
.black {
-fx-fill: black;
}
.blue {
-fx-fill: #0066cc;
}
.lightblue {
-fx-fill: cyan;
}
.green {
-fx-fill: #73b504;
}
.dark {
-fx-background-color: #000000;
}
.caret {
-fx-stroke: #ffffff;
}
.label {
-fx-text-fill: #000000 !important;
}
.scroll-bar:vertical {
-fx-pref-width: 11.5;
-fx-padding: 1;
}

View File

@ -11,7 +11,7 @@
<?import javafx.scene.layout.GridPane?> <?import javafx.scene.layout.GridPane?>
<?import javafx.scene.layout.RowConstraints?> <?import javafx.scene.layout.RowConstraints?>
<GridPane maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" prefHeight="262.0" prefWidth="565.0" xmlns="http://javafx.com/javafx/8.0.112" xmlns:fx="http://javafx.com/fxml/1" fx:controller="gearth.ui.extra.ExtraController"> <GridPane maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" prefHeight="262.0" prefWidth="565.0" xmlns="http://javafx.com/javafx" xmlns:fx="http://javafx.com/fxml/1" fx:controller="gearth.ui.extra.ExtraController">
<columnConstraints> <columnConstraints>
<ColumnConstraints hgrow="SOMETIMES" maxWidth="331.0" minWidth="10.0" prefWidth="318.0" /> <ColumnConstraints hgrow="SOMETIMES" maxWidth="331.0" minWidth="10.0" prefWidth="318.0" />
<ColumnConstraints hgrow="SOMETIMES" maxWidth="390.0" minWidth="10.0" prefWidth="247.0" /> <ColumnConstraints hgrow="SOMETIMES" maxWidth="390.0" minWidth="10.0" prefWidth="247.0" />

View File

@ -5,7 +5,7 @@
<?import javafx.scene.layout.*?> <?import javafx.scene.layout.*?>
<?import javafx.scene.text.*?> <?import javafx.scene.text.*?>
<GridPane maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" prefHeight="262.0" prefWidth="595.0" xmlns="http://javafx.com/javafx/10.0.2-internal" xmlns:fx="http://javafx.com/fxml/1" fx:controller="gearth.ui.info.InfoController"> <GridPane maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" prefHeight="262.0" prefWidth="595.0" xmlns="http://javafx.com/javafx" xmlns:fx="http://javafx.com/fxml/1" fx:controller="gearth.ui.info.InfoController">
<columnConstraints> <columnConstraints>
<ColumnConstraints hgrow="SOMETIMES" maxWidth="1.7976931348623157E308" minWidth="10.0" prefWidth="332.0" /> <ColumnConstraints hgrow="SOMETIMES" maxWidth="1.7976931348623157E308" minWidth="10.0" prefWidth="332.0" />
</columnConstraints> </columnConstraints>

View File

@ -11,7 +11,7 @@
<?import javafx.scene.text.TextFlow?> <?import javafx.scene.text.TextFlow?>
<GridPane maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" prefHeight="262.0" prefWidth="565.0" <GridPane maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" prefHeight="262.0" prefWidth="565.0"
xmlns="http://javafx.com/javafx/8.0.112" xmlns:fx="http://javafx.com/fxml/1" xmlns="http://javafx.com/javafx" xmlns:fx="http://javafx.com/fxml/1"
fx:controller="gearth.ui.injection.InjectionController"> fx:controller="gearth.ui.injection.InjectionController">
<columnConstraints> <columnConstraints>
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0"/> <ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0"/>

View File

@ -13,7 +13,7 @@
<?import javafx.scene.text.TextFlow?> <?import javafx.scene.text.TextFlow?>
<GridPane maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" prefHeight="262.0" prefWidth="565.0" <GridPane maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" prefHeight="262.0" prefWidth="565.0"
xmlns="http://javafx.com/javafx/8.0.112" xmlns:fx="http://javafx.com/fxml/1" xmlns="http://javafx.com/javafx" xmlns:fx="http://javafx.com/fxml/1"
fx:controller="gearth.ui.logger.LoggerController"> fx:controller="gearth.ui.logger.LoggerController">
<columnConstraints> <columnConstraints>
<ColumnConstraints hgrow="SOMETIMES" maxWidth="293.0" minWidth="10.0" prefWidth="242.0"/> <ColumnConstraints hgrow="SOMETIMES" maxWidth="293.0" minWidth="10.0" prefWidth="242.0"/>

View File

@ -9,7 +9,7 @@
<?import javafx.scene.layout.BorderPane?> <?import javafx.scene.layout.BorderPane?>
<?import javafx.scene.layout.FlowPane?> <?import javafx.scene.layout.FlowPane?>
<BorderPane fx:id="borderPane" prefHeight="560.0" prefWidth="820.0" xmlns="http://javafx.com/javafx/8.0.121" xmlns:fx="http://javafx.com/fxml/1" fx:controller="gearth.ui.logger.loggerdisplays.uilogger.UiLoggerController"> <BorderPane fx:id="borderPane" prefHeight="560.0" prefWidth="820.0" xmlns="http://javafx.com/javafx" xmlns:fx="http://javafx.com/fxml/1" fx:controller="gearth.ui.logger.loggerdisplays.uilogger.UiLoggerController">
<top> <top>
<MenuBar BorderPane.alignment="CENTER"> <MenuBar BorderPane.alignment="CENTER">
<Menu mnemonicParsing="false" text="View"> <Menu mnemonicParsing="false" text="View">

View File

@ -4,7 +4,7 @@
<?import javafx.scene.control.*?> <?import javafx.scene.control.*?>
<?import javafx.scene.layout.*?> <?import javafx.scene.layout.*?>
<GridPane maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" prefHeight="262.0" prefWidth="595.0" xmlns="http://javafx.com/javafx/10.0.2-internal" xmlns:fx="http://javafx.com/fxml/1" fx:controller="gearth.ui.scheduler.SchedulerController"> <GridPane maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" prefHeight="262.0" prefWidth="595.0" xmlns="http://javafx.com/javafx" xmlns:fx="http://javafx.com/fxml/1" fx:controller="gearth.ui.scheduler.SchedulerController">
<columnConstraints> <columnConstraints>
<ColumnConstraints hgrow="SOMETIMES" maxWidth="1.7976931348623157E308" minWidth="10.0" prefWidth="277.0" /> <ColumnConstraints hgrow="SOMETIMES" maxWidth="1.7976931348623157E308" minWidth="10.0" prefWidth="277.0" />
</columnConstraints> </columnConstraints>

View File

@ -11,7 +11,7 @@
<?import javafx.scene.text.Font?> <?import javafx.scene.text.Font?>
<GridPane maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" prefHeight="262.0" prefWidth="565.0" <GridPane maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" prefHeight="262.0" prefWidth="565.0"
xmlns="http://javafx.com/javafx/8.0.112" xmlns:fx="http://javafx.com/fxml/1" xmlns="http://javafx.com/javafx" xmlns:fx="http://javafx.com/fxml/1"
fx:controller="gearth.ui.tools.ToolsController"> fx:controller="gearth.ui.tools.ToolsController">
<rowConstraints> <rowConstraints>
<RowConstraints maxHeight="158.0" minHeight="10.0" prefHeight="134.0" vgrow="SOMETIMES"/> <RowConstraints maxHeight="158.0" minHeight="10.0" prefHeight="134.0" vgrow="SOMETIMES"/>