Skip to content

Commit

Permalink
Added CSS stylesheets
Browse files Browse the repository at this point in the history
  • Loading branch information
tainfante committed Dec 22, 2017
1 parent db02f57 commit d48f868
Show file tree
Hide file tree
Showing 8 changed files with 81 additions and 30 deletions.
58 changes: 32 additions & 26 deletions src/mainwindow/chart.fxml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,18 @@
<?import javafx.scene.layout.HBox?>
<?import javafx.scene.layout.VBox?>

<BorderPane minHeight="325.0" minWidth="600.0" xmlns="http://javafx.com/javafx/8.0.121" xmlns:fx="http://javafx.com/fxml/1" fx:controller="mainwindow.Chart">
<?import java.net.URL?>
<?import com.sun.javafx.charts.Legend?>
<BorderPane minHeight="325.0" minWidth="600.0" xmlns="http://javafx.com/javafx/8.0.121"
xmlns:fx="http://javafx.com/fxml/1" fx:controller="mainwindow.Chart" styleClass="background">
<stylesheets>
<URL value="@../stylesheets/ChartCSS.css"/>
</stylesheets>
<center>
<LineChart fx:id="lchart" layoutY="37.0" prefHeight="226.0" prefWidth="455.0">

<Legend styleClass="legend" alignment="BOTTOM_CENTER"/>

<xAxis>
<CategoryAxis fx:id="xAxis" side="BOTTOM" />
</xAxis>
Expand All @@ -22,33 +31,30 @@
</LineChart>
</center>
<right>
<VBox spacing="10.0" BorderPane.alignment="CENTER">
<CheckBox layoutX="474.0" layoutY="87.0" mnemonicParsing="false" text="Channel 1" />
<CheckBox layoutX="474.0" layoutY="104.0" mnemonicParsing="false" text="Channel 2" />
<CheckBox layoutX="474.0" layoutY="121.0" mnemonicParsing="false" text="Channel 3" />
<CheckBox layoutX="474.0" layoutY="142.0" mnemonicParsing="false" text="Channel 4" />
<CheckBox layoutX="474.0" layoutY="161.0" mnemonicParsing="false" text="Channel 5" />
<CheckBox layoutX="474.0" layoutY="178.0" mnemonicParsing="false" text="Channel 6" />
<CheckBox layoutX="474.0" layoutY="53.0" mnemonicParsing="false" text="Channel 7" />
<CheckBox layoutX="474.0" layoutY="70.0" mnemonicParsing="false" text="Channel 8" />
<BorderPane.margin>
<Insets bottom="10.0" left="10.0" right="10.0" top="10.0" />
</BorderPane.margin>
<padding>
<Insets bottom="10.0" left="10.0" right="10.0" top="10.0" />
</padding>
<VBox spacing="10.0" BorderPane.alignment="CENTER" styleClass="background">
<CheckBox layoutX="474.0" layoutY="87.0" mnemonicParsing="false" text="Channel 1" styleClass="checkedBox"/>
<CheckBox layoutX="474.0" layoutY="104.0" mnemonicParsing="false" text="Channel 2" styleClass="checkedBox"/>
<CheckBox layoutX="474.0" layoutY="121.0" mnemonicParsing="false" text="Channel 3" styleClass="checkedBox"/>
<CheckBox layoutX="474.0" layoutY="142.0" mnemonicParsing="false" text="Channel 4" styleClass="checkedBox"/>
<CheckBox layoutX="474.0" layoutY="161.0" mnemonicParsing="false" text="Channel 5" styleClass="checkedBox"/>
<CheckBox layoutX="474.0" layoutY="178.0" mnemonicParsing="false" text="Channel 6" styleClass="checkedBox"/>
<CheckBox layoutX="474.0" layoutY="53.0" mnemonicParsing="false" text="Channel 7" styleClass="checkedBox"/>
<CheckBox layoutX="474.0" layoutY="70.0" mnemonicParsing="false" text="Channel 8" styleClass="checkedBox"/>
<BorderPane.margin>
<Insets bottom="10.0" left="10.0" right="10.0" top="10.0" />
</BorderPane.margin>
<padding>
<Insets bottom="10.0" left="10.0" right="10.0" top="10.0" />
</padding>
</VBox>


</right>
<bottom>
<HBox spacing="10.0">
<Button layoutX="114.0" layoutY="263.0" mnemonicParsing="false" text="START" />
<Button layoutX="176.0" layoutY="263.0" mnemonicParsing="false" text="STOP" />
<BorderPane.margin>
<Insets bottom="10.0" left="10.0" right="10.0" top="10.0" />
</BorderPane.margin>
</HBox>

</bottom>
<bottom>
<HBox spacing="10.0" styleClass="background">
<BorderPane.margin>
<Insets bottom="10.0" left="10.0" right="10.0" top="10.0" />
</BorderPane.margin>
</HBox>
</bottom>
</BorderPane>
3 changes: 2 additions & 1 deletion src/mainwindow/export.fxml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
<?import javafx.scene.control.*?>
<?import javafx.scene.layout.*?>

<AnchorPane minHeight="325.0" minWidth="600.0" prefHeight="325.0" prefWidth="600.0" xmlns="http://javafx.com/javafx/8" xmlns:fx="http://javafx.com/fxml/1">
<AnchorPane minHeight="325.0" minWidth="600.0" prefHeight="325.0" prefWidth="600.0"
xmlns="http://javafx.com/javafx/8" xmlns:fx="http://javafx.com/fxml/1">
<children>
<VBox layoutX="133.0" layoutY="27.0" prefHeight="293.0" prefWidth="170.0" spacing="10.0">
<children>
Expand Down
4 changes: 3 additions & 1 deletion src/mainwindow/log.fxml
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,6 @@
<?import javafx.scene.control.*?>


<TextArea fx:id="logTextArea" editable="false" prefHeight="400.0" prefWidth="600.0" xmlns="http://javafx.com/javafx/8" xmlns:fx="http://javafx.com/fxml/1" fx:controller="mainwindow.Log" />
<TextArea fx:id="logTextArea" editable="false" prefHeight="400.0" prefWidth="600.0"
xmlns="http://javafx.com/javafx/8" xmlns:fx="http://javafx.com/fxml/1"
fx:controller="mainwindow.Log"/>
7 changes: 6 additions & 1 deletion src/mainwindow/mainWindowLayout.fxml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,12 @@
<?import javafx.scene.layout.HBox?>
<?import javafx.scene.layout.VBox?>

<BorderPane maxHeight="-Infinity" maxWidth="-Infinity" minHeight="400.0" minWidth="600.0" prefHeight="403.0" prefWidth="600.0" xmlns="http://javafx.com/javafx/8" xmlns:fx="http://javafx.com/fxml/1">
<?import java.net.URL?>
<BorderPane maxHeight="-Infinity" maxWidth="-Infinity" minHeight="400.0" minWidth="600.0" prefHeight="403.0"
prefWidth="600.0" xmlns="http://javafx.com/javafx/8" xmlns:fx="http://javafx.com/fxml/1">
<stylesheets>
<URL value="@../stylesheets/MainCSS.css"/>
</stylesheets>

<center>
<TabPane layoutY="52.0" prefHeight="314.0" prefWidth="600.0" tabClosingPolicy="UNAVAILABLE">
Expand Down
7 changes: 6 additions & 1 deletion src/mainwindow/portView.fxml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,12 @@
<?import javafx.scene.control.*?>
<?import javafx.scene.layout.*?>

<HBox alignment="BASELINE_LEFT" prefHeight="25.0" prefWidth="600.0" xmlns="http://javafx.com/javafx/8" xmlns:fx="http://javafx.com/fxml/1" fx:controller="mainwindow.PortController">
<?import java.net.URL?>
<HBox alignment="BASELINE_LEFT" prefHeight="25.0" prefWidth="600.0" xmlns="http://javafx.com/javafx/8"
xmlns:fx="http://javafx.com/fxml/1" fx:controller="mainwindow.PortController">
<stylesheets>
<URL value="@../stylesheets/PortCSS.css"/>
</stylesheets>
<padding>
<Insets bottom="5.0" left="5.0" right="5.0" top="5.0" />
</padding>
Expand Down
26 changes: 26 additions & 0 deletions src/stylesheets/ChartCSS.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
.root {

}
.background {
-fx-background-color: #444444;
}
.checkedBox{
-fx-text-fill: yellow;
-fx-font-size: 15px;
}
.uncheckedBox{

}
.title{

}
.axis{

}
#lchart{
-fx-background-color: #444444;


}


Empty file added src/stylesheets/MainCSS.css
Empty file.
6 changes: 6 additions & 0 deletions src/stylesheets/PortCSS.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
.buttons{
-fx-border-radius: 5;
-fx-background-color: #DFB951;
-fx-border-color: #222222;
-fx-text-fill: #333333;
}

0 comments on commit d48f868

Please sign in to comment.