mirror of
https://github.com/frosch95/SmartCSV.fx.git
synced 2026-04-11 13:38:23 +02:00
added fontawesomefx to have icons in the project
This commit is contained in:
@@ -23,4 +23,5 @@ dependencies {
|
|||||||
compile group: 'net.sf.supercsv', name: 'super-csv', version: '2.4.0'
|
compile group: 'net.sf.supercsv', name: 'super-csv', version: '2.4.0'
|
||||||
compile group: 'com.typesafe', name: 'config', version: '1.3.0'
|
compile group: 'com.typesafe', name: 'config', version: '1.3.0'
|
||||||
compile group: 'commons-validator', name: 'commons-validator', version: '1.4.1'
|
compile group: 'commons-validator', name: 'commons-validator', version: '1.4.1'
|
||||||
|
compile group: 'de.jensd', name: 'fontawesomefx', version: '8.7'
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -27,12 +27,8 @@
|
|||||||
package ninja.javafx.smartcsv.fx;
|
package ninja.javafx.smartcsv.fx;
|
||||||
|
|
||||||
import javafx.application.Platform;
|
import javafx.application.Platform;
|
||||||
import javafx.beans.InvalidationListener;
|
|
||||||
import javafx.beans.Observable;
|
|
||||||
import javafx.beans.property.BooleanProperty;
|
import javafx.beans.property.BooleanProperty;
|
||||||
import javafx.beans.property.SimpleBooleanProperty;
|
import javafx.beans.property.SimpleBooleanProperty;
|
||||||
import javafx.beans.value.ChangeListener;
|
|
||||||
import javafx.beans.value.ObservableValue;
|
|
||||||
import javafx.concurrent.Service;
|
import javafx.concurrent.Service;
|
||||||
import javafx.concurrent.Task;
|
import javafx.concurrent.Task;
|
||||||
import javafx.event.ActionEvent;
|
import javafx.event.ActionEvent;
|
||||||
@@ -190,7 +186,8 @@ public class SmartCSVController extends FXMLController {
|
|||||||
"- spring framework\n" +
|
"- spring framework\n" +
|
||||||
"- supercsv\n" +
|
"- supercsv\n" +
|
||||||
"- config\n" +
|
"- config\n" +
|
||||||
"- commons-validator");
|
"- commons-validator\n" +
|
||||||
|
"- fontawesomefx");
|
||||||
|
|
||||||
|
|
||||||
alert.showAndWait();
|
alert.showAndWait();
|
||||||
|
|||||||
@@ -13,3 +13,35 @@
|
|||||||
.list-cell:even {
|
.list-cell:even {
|
||||||
-fx-background: -fx-control-inner-background;
|
-fx-background: -fx-control-inner-background;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.open-icon {
|
||||||
|
-glyph-name: "FILE_TEXT_ALT";
|
||||||
|
-glyph-size: 14px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.config-icon {
|
||||||
|
-glyph-name: "CHECK";
|
||||||
|
-glyph-size: 14px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.save-icon {
|
||||||
|
-glyph-name: "FLOPPY_ALT";
|
||||||
|
-glyph-size: 14px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.exit-icon {
|
||||||
|
-glyph-name: "SIGN_OUT";
|
||||||
|
-glyph-size: 14px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.info-icon {
|
||||||
|
-glyph-name: "INFO";
|
||||||
|
-glyph-size: 14px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.error-title-icon {
|
||||||
|
-glyph-name: "EXCLAMATION_TRIANGLE";
|
||||||
|
-glyph-size: 14px;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,90 +1,129 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
|
||||||
<?import java.net.*?>
|
<?import de.jensd.fx.glyphs.fontawesome.*?>
|
||||||
<?import javafx.geometry.*?>
|
<?import javafx.geometry.Insets?>
|
||||||
<?import javafx.scene.control.*?>
|
<?import javafx.scene.control.*?>
|
||||||
<?import java.lang.*?>
|
|
||||||
<?import javafx.scene.layout.*?>
|
<?import javafx.scene.layout.*?>
|
||||||
<?import java.net.URL?>
|
<?import java.net.URL?>
|
||||||
|
<BorderPane fx:id="applicationPane" maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity"
|
||||||
<BorderPane fx:id="applicationPane" maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="700.0" prefWidth="1000.0" xmlns="http://javafx.com/javafx/8.0.66" xmlns:fx="http://javafx.com/fxml/1">
|
minWidth="-Infinity" prefHeight="700.0" prefWidth="1000.0" xmlns="http://javafx.com/javafx/8.0.66"
|
||||||
<top>
|
xmlns:fx="http://javafx.com/fxml/1">
|
||||||
<VBox prefWidth="100.0" BorderPane.alignment="CENTER">
|
<top>
|
||||||
<children>
|
<VBox prefWidth="100.0" BorderPane.alignment="CENTER">
|
||||||
<MenuBar>
|
<children>
|
||||||
<menus>
|
<MenuBar>
|
||||||
<Menu mnemonicParsing="false" text="%menu.file">
|
<menus>
|
||||||
<items>
|
<Menu mnemonicParsing="false" text="%menu.file">
|
||||||
<MenuItem mnemonicParsing="false" onAction="#openCsv" text="%menu.open.csv" />
|
<graphic>
|
||||||
<MenuItem mnemonicParsing="false" onAction="#openConfig" text="%menu.open.config" />
|
<FontAwesomeIconView styleClass="save-icon"/>
|
||||||
<SeparatorMenuItem mnemonicParsing="false" />
|
</graphic>
|
||||||
<MenuItem mnemonicParsing="false" onAction="#saveCsv" text="%menu.save" />
|
<items>
|
||||||
<MenuItem mnemonicParsing="false" onAction="#saveAsCsv" text="%menu.save.as" />
|
<MenuItem mnemonicParsing="false" onAction="#openCsv" text="%menu.open.csv">
|
||||||
<SeparatorMenuItem mnemonicParsing="false" />
|
<graphic>
|
||||||
<MenuItem mnemonicParsing="false" onAction="#close" text="%menu.close" />
|
<FontAwesomeIconView styleClass="open-icon"/>
|
||||||
</items>
|
</graphic>
|
||||||
</Menu>
|
</MenuItem>
|
||||||
<Menu mnemonicParsing="false" text="%menu.help">
|
<MenuItem mnemonicParsing="false" onAction="#openConfig" text="%menu.open.config">
|
||||||
<items>
|
<graphic>
|
||||||
<MenuItem mnemonicParsing="false" onAction="#about" text="%menu.about" />
|
<FontAwesomeIconView styleClass="config-icon"/>
|
||||||
</items>
|
</graphic>
|
||||||
</Menu>
|
</MenuItem>
|
||||||
</menus>
|
<SeparatorMenuItem mnemonicParsing="false"/>
|
||||||
</MenuBar>
|
<MenuItem mnemonicParsing="false" onAction="#saveCsv" text="%menu.save">
|
||||||
</children>
|
<graphic>
|
||||||
</VBox>
|
<FontAwesomeIconView styleClass="save-icon"/>
|
||||||
</top>
|
</graphic>
|
||||||
<center>
|
</MenuItem>
|
||||||
<SplitPane dividerPositions="0.8" prefHeight="160.0" prefWidth="200.0" BorderPane.alignment="CENTER">
|
<MenuItem mnemonicParsing="false" onAction="#saveAsCsv" text="%menu.save.as">
|
||||||
<items>
|
<graphic>
|
||||||
<AnchorPane fx:id="tableWrapper">
|
<FontAwesomeIconView styleClass="save-icon"/>
|
||||||
<TableView fx:id="tableView" prefHeight="200.0" prefWidth="200.0" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0" BorderPane.alignment="CENTER">
|
</graphic>
|
||||||
<columns>
|
</MenuItem>
|
||||||
</columns>
|
<SeparatorMenuItem mnemonicParsing="false"/>
|
||||||
</TableView>
|
<MenuItem mnemonicParsing="false" onAction="#close" text="%menu.close">
|
||||||
</AnchorPane>
|
<graphic>
|
||||||
<VBox>
|
<FontAwesomeIconView styleClass="exit-icon"/>
|
||||||
<children>
|
</graphic>
|
||||||
<Label text="%title.validation.errors">
|
</MenuItem>
|
||||||
<padding>
|
</items>
|
||||||
<Insets bottom="8.0" left="8.0" right="8.0" top="8.0" />
|
</Menu>
|
||||||
</padding>
|
<Menu mnemonicParsing="false" text="%menu.help">
|
||||||
</Label>
|
<graphic>
|
||||||
<ListView fx:id="errorList" minWidth="10.0" prefWidth="200.0" VBox.vgrow="ALWAYS" />
|
<FontAwesomeIconView styleClass="info-icon"/>
|
||||||
</children>
|
</graphic>
|
||||||
</VBox>
|
<items>
|
||||||
</items>
|
<MenuItem mnemonicParsing="false" onAction="#about" text="%menu.about">
|
||||||
</SplitPane>
|
<graphic>
|
||||||
</center>
|
<FontAwesomeIconView styleClass="info-icon"/>
|
||||||
<left>
|
</graphic>
|
||||||
</left>
|
</MenuItem>
|
||||||
|
</items>
|
||||||
|
</Menu>
|
||||||
|
</menus>
|
||||||
|
</MenuBar>
|
||||||
|
</children>
|
||||||
|
</VBox>
|
||||||
|
</top>
|
||||||
|
<center>
|
||||||
|
<SplitPane dividerPositions="0.8" prefHeight="160.0" prefWidth="200.0" BorderPane.alignment="CENTER">
|
||||||
|
<items>
|
||||||
|
<AnchorPane fx:id="tableWrapper">
|
||||||
|
<TableView fx:id="tableView" prefHeight="200.0" prefWidth="200.0" AnchorPane.bottomAnchor="0.0"
|
||||||
|
AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0"
|
||||||
|
BorderPane.alignment="CENTER">
|
||||||
|
<columns>
|
||||||
|
</columns>
|
||||||
|
</TableView>
|
||||||
|
</AnchorPane>
|
||||||
|
<VBox>
|
||||||
|
<children>
|
||||||
|
<Label text="%title.validation.errors">
|
||||||
|
<padding>
|
||||||
|
<Insets bottom="8.0" left="8.0" right="8.0" top="8.0"/>
|
||||||
|
</padding>
|
||||||
|
<graphic>
|
||||||
|
<FontAwesomeIconView styleClass="error-title-icon"/>
|
||||||
|
</graphic>
|
||||||
|
</Label>
|
||||||
|
<ListView fx:id="errorList" minWidth="10.0" prefWidth="200.0" VBox.vgrow="ALWAYS"/>
|
||||||
|
</children>
|
||||||
|
</VBox>
|
||||||
|
</items>
|
||||||
|
</SplitPane>
|
||||||
|
</center>
|
||||||
|
<left>
|
||||||
|
</left>
|
||||||
<stylesheets>
|
<stylesheets>
|
||||||
<URL value="@/ninja/javafx/smartcsv/fx/smartcsv.css" />
|
<URL value="@/ninja/javafx/smartcsv/fx/smartcsv.css"/>
|
||||||
</stylesheets>
|
</stylesheets>
|
||||||
<bottom>
|
<bottom>
|
||||||
<GridPane hgap="8.0" BorderPane.alignment="CENTER">
|
<GridPane hgap="8.0" BorderPane.alignment="CENTER">
|
||||||
<columnConstraints>
|
<columnConstraints>
|
||||||
<ColumnConstraints hgrow="NEVER" minWidth="10.0" />
|
<ColumnConstraints hgrow="NEVER" minWidth="10.0"/>
|
||||||
<ColumnConstraints hgrow="ALWAYS" minWidth="10.0" prefWidth="100.0" />
|
<ColumnConstraints hgrow="NEVER" minWidth="10.0"/>
|
||||||
<ColumnConstraints hgrow="NEVER" minWidth="10.0" />
|
<ColumnConstraints hgrow="ALWAYS" minWidth="10.0" prefWidth="100.0"/>
|
||||||
<ColumnConstraints hgrow="ALWAYS" minWidth="10.0" prefWidth="100.0" />
|
<ColumnConstraints hgrow="NEVER" minWidth="10.0"/>
|
||||||
<ColumnConstraints hgrow="NEVER" minWidth="10.0" />
|
<ColumnConstraints hgrow="ALWAYS" minWidth="10.0" prefWidth="100.0"/>
|
||||||
<ColumnConstraints hgrow="ALWAYS" minWidth="10.0" prefWidth="100.0" />
|
<ColumnConstraints hgrow="NEVER" minWidth="10.0"/>
|
||||||
</columnConstraints>
|
<ColumnConstraints hgrow="NEVER" minWidth="10.0"/>
|
||||||
<rowConstraints>
|
<ColumnConstraints hgrow="ALWAYS" minWidth="10.0" prefWidth="100.0"/>
|
||||||
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
|
</columnConstraints>
|
||||||
</rowConstraints>
|
<rowConstraints>
|
||||||
<children>
|
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES"/>
|
||||||
<Label text="%stateline.csv" GridPane.hgrow="NEVER" />
|
</rowConstraints>
|
||||||
<Label fx:id="csvName" GridPane.columnIndex="1" GridPane.hgrow="ALWAYS" />
|
<children>
|
||||||
<Label text="%stateline.state" GridPane.columnIndex="2" GridPane.hgrow="NEVER" />
|
<FontAwesomeIconView styleClass="open-icon" GridPane.hgrow="NEVER"/>
|
||||||
<Label fx:id="stateName" GridPane.columnIndex="3" GridPane.hgrow="ALWAYS" />
|
<Label text="%stateline.csv" GridPane.columnIndex="1" GridPane.hgrow="NEVER"/>
|
||||||
<Label text="%stateline.configuration" GridPane.columnIndex="4" GridPane.hgrow="NEVER" />
|
<Label fx:id="csvName" GridPane.columnIndex="2" GridPane.hgrow="ALWAYS"/>
|
||||||
<Label fx:id="configurationName" GridPane.columnIndex="5" GridPane.hgrow="ALWAYS" />
|
<Label text="%stateline.state" GridPane.columnIndex="3" GridPane.hgrow="NEVER"/>
|
||||||
</children>
|
<Label fx:id="stateName" GridPane.columnIndex="4" GridPane.hgrow="ALWAYS"/>
|
||||||
<BorderPane.margin>
|
<FontAwesomeIconView styleClass="open-icon" GridPane.columnIndex="5" GridPane.hgrow="NEVER"/>
|
||||||
<Insets top="4.0" left="8.0" bottom="4.0" right="8.0" />
|
<Label text="%stateline.configuration" GridPane.columnIndex="6" GridPane.hgrow="NEVER"/>
|
||||||
</BorderPane.margin>
|
<Label fx:id="configurationName" GridPane.columnIndex="7" GridPane.hgrow="ALWAYS"/>
|
||||||
</GridPane>
|
</children>
|
||||||
</bottom>
|
<BorderPane.margin>
|
||||||
|
<Insets top="4.0" left="8.0" bottom="4.0" right="8.0"/>
|
||||||
|
</BorderPane.margin>
|
||||||
|
</GridPane>
|
||||||
|
</bottom>
|
||||||
</BorderPane>
|
</BorderPane>
|
||||||
|
|||||||
Reference in New Issue
Block a user