Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ import javafx.scene.input.DragEvent
import javafx.scene.input.MouseButton
import javafx.scene.input.TransferMode
import javafx.scene.layout.VBox
import javafx.stage.Stage
import javafx.scene.text.TextFlow
import ru.nucodelabs.gem.app.pref.RECENT_FILES
import ru.nucodelabs.gem.view.controller.AbstractController
import ru.nucodelabs.gem.view.controller.FileImporter
import ru.nucodelabs.gem.view.controller.FileOpener
import ru.nucodelabs.kfx.core.AbstractViewController
import ru.nucodelabs.kfx.ext.emptyBinding
import java.io.File
import java.net.URL
Expand All @@ -26,19 +26,18 @@ class NoFileScreenController @Inject constructor(
private val fileOpenerProvider: Provider<FileOpener>,
private val fileImporterProvider: Provider<FileImporter>,
private val preferences: Preferences
) : AbstractController(), FileOpener by fileOpenerProvider.get(), FileImporter by fileImporterProvider.get() {
) : AbstractViewController<VBox>(),
FileOpener by fileOpenerProvider.get(),
FileImporter by fileImporterProvider.get() {

@FXML
private lateinit var recentFiles: ListView<File>
private lateinit var desc: TextFlow

@FXML
private lateinit var recentFilesContainer: VBox
private lateinit var recentFiles: ListView<File>

@FXML
private lateinit var root: VBox

override val stage: Stage?
get() = root.scene.window as Stage?
private lateinit var recentFilesContainer: VBox

fun visibleProperty(): BooleanProperty = root.visibleProperty()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,6 @@ package ru.nucodelabs.gem.view.controller.main
const val LEFT_AXIS_WIDTH = 65
const val COLOR_AXIS_WIDTH = 70
const val TOP_CHARTS_RIGHT_OFFSET = COLOR_AXIS_WIDTH + 12

const val MIN_SIZE = 50
const val MIN_WIN_SIZE = 500
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,18 @@
VBox.vgrow="ALWAYS"
fx:controller="ru.nucodelabs.gem.view.controller.charts.ModelSectionController"
stylesheets="@ModelSection.css">
<minHeight>
<UIConstantsKt fx:constant="MIN_SIZE"/>
</minHeight>
<HBox alignment="CENTER_LEFT">
<Label fx:id="title" text="Модель, разрез" styleClass="chart-label"/>
</HBox>

<CanvasRenderPolygonChart fx:id="chart" maxWidth="Infinity"
maxHeight="Infinity" animated="false" legendVisible="false" styleClass="padded-chart"
VBox.vgrow="ALWAYS">
<minHeight>
<UIConstantsKt fx:constant="MIN_SIZE"/>
</minHeight>
<xAxis>
<NucodeNumberAxis fx:id="xAxis" label="%x" side="BOTTOM" autoRanging="false"
minorTickVisible="false" tickUnit="25" forceMarksOnly="true"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,18 @@
VBox.vgrow="ALWAYS"
fx:controller="ru.nucodelabs.gem.view.controller.charts.ModelSectionController"
stylesheets="@ModelSection.css">
<minHeight>
<UIConstantsKt fx:constant="MIN_SIZE"/>
</minHeight>
<HBox alignment="CENTER_LEFT">
<Label fx:id="title" text="Модель, разрез" styleClass="chart-label"/>
</HBox>
<CanvasRenderPolygonChart fx:id="chart" maxWidth="Infinity"
maxHeight="Infinity" animated="false" legendVisible="false" styleClass="padded-chart"
VBox.vgrow="ALWAYS">
<minHeight>
<UIConstantsKt fx:constant="MIN_SIZE"/>
</minHeight>
<xAxis>
<NucodeNumberAxis fx:id="xAxis" label="%x" side="BOTTOM" autoRanging="false"
minorTickVisible="false" tickUnit="25" forceMarksOnly="true"/>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>

<?import javafx.scene.layout.VBox?>
<?import ru.nucodelabs.gem.view.controller.main.UIConstantsKt?>
<VBox xmlns:fx="http://javafx.com/fxml"
xmlns="http://javafx.com/javafx"
fx:controller="ru.nucodelabs.gem.view.controller.charts.ModelSectionSwitcherController"
maxWidth="Infinity" maxHeight="Infinity" fx:id="root">
<minHeight>
<UIConstantsKt fx:constant="MIN_SIZE"/>
</minHeight>
<fx:include fx:id="linearSectionBox" source="LinearModelSection.fxml"/>
<fx:include fx:id="logSectionBox" source="LogarithmicModelSection.fxml"/>
</VBox>
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>

<?import javafx.scene.layout.VBox?>
<?import ru.nucodelabs.gem.view.controller.main.UIConstantsKt?>
<VBox xmlns:fx="http://javafx.com/fxml"
xmlns="http://javafx.com/javafx"
fx:controller="ru.nucodelabs.gem.view.controller.charts.PseudoSectionSwitcherController"
maxHeight="Infinity" maxWidth="Infinity">
<minHeight>
<UIConstantsKt fx:constant="MIN_SIZE"/>
</minHeight>
<fx:include fx:id="curvesPseudoSectionBox" source="CurvesPseudoSection.fxml"/>
<fx:include fx:id="mapPseudoSectionBox" source="MapPseudoSection.fxml"/>
</VBox>
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@
VBox.vgrow="ALWAYS"
fx:id="root"
fx:controller="ru.nucodelabs.gem.view.controller.charts.VesCurvesController">
<minHeight>
<UIConstantsKt fx:constant="MIN_SIZE"/>
</minHeight>
<HBox maxWidth="Infinity" alignment="CENTER_RIGHT">
<Label fx:id="title" styleClass="chart-label" text="%ves" VBox.vgrow="NEVER"/>
<HBox maxWidth="Infinity" HBox.hgrow="ALWAYS"/>
Expand All @@ -37,6 +40,9 @@
</HBox>
<LineChart fx:id="lineChart" VBox.vgrow="ALWAYS" maxHeight="Infinity" maxWidth="Infinity" animated="false"
styleClass="padded-chart" onScroll="#zoom" onMousePressed="#pressed" onMouseDragged="#drugged">
<minHeight>
<UIConstantsKt fx:constant="MIN_SIZE"/>
</minHeight>
<xAxis>
<LogarithmicAxis fx:id="xAxis"
label="%ab2"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<?import javafx.scene.layout.*?>
<?import javafx.scene.Scene?>
<?import javafx.stage.Stage?>
<?import ru.nucodelabs.gem.view.controller.main.UIConstantsKt?>
<?import ru.nucodelabs.gem.view.controller.main.*?>
<Stage xmlns="http://javafx.com/javafx"
xmlns:fx="http://javafx.com/fxml"
maxWidth="Infinity" maxHeight="Infinity"
Expand All @@ -15,6 +15,12 @@
width="1280"
height="720"
title="GEM" onShown="initLayoutConfig()">
<minHeight>
<UIConstantsKt fx:constant="MIN_WIN_SIZE"/>
</minHeight>
<minWidth>
<UIConstantsKt fx:constant="MIN_WIN_SIZE"/>
</minWidth>
<fx:script>
// TODO: Move this back to controller itself
import javafx.scene.control.SplitPane
Expand Down Expand Up @@ -123,43 +129,66 @@
</Menu>
</MenuBar>
<StackPane maxWidth="Infinity" maxHeight="Infinity" VBox.vgrow="ALWAYS">
<minHeight>
<UIConstantsKt fx:constant="MIN_SIZE"/>
</minHeight>
<VBox maxWidth="Infinity" maxHeight="Infinity" fx:id="vesSectionSplitContainer" VBox.vgrow="ALWAYS">
<SplitPane orientation="VERTICAL" maxWidth="Infinity" maxHeight="Infinity"
<minHeight>
<UIConstantsKt fx:constant="MIN_SIZE"/>
</minHeight>
<HBox>
<HBox>
<prefWidth>
<UIConstantsKt fx:constant="LEFT_AXIS_WIDTH"/>
</prefWidth>
</HBox>
<fx:include fx:id="picketsBar" source="PicketsBar.fxml" HBox.hgrow="ALWAYS"/>
<HBox>
<Button fx:id="addPicketBtn"
onAction="#addNewPicket" stylesheets="@PicketsBar.css"
HBox.hgrow="NEVER" contentDisplay="GRAPHIC_ONLY">
<prefWidth>
<UIConstantsKt fx:constant="TOP_CHARTS_RIGHT_OFFSET"/>
</prefWidth>
<minWidth>
<UIConstantsKt fx:constant="TOP_CHARTS_RIGHT_OFFSET"/>
</minWidth>
<maxWidth>
<UIConstantsKt fx:constant="TOP_CHARTS_RIGHT_OFFSET"/>
</maxWidth>
<graphic>
<ImageView fitWidth="15" fitHeight="15" preserveRatio="true">
<Image url="/img/ui_icons/add/2x/round_add_black_24dp.png"/>
</ImageView>
</graphic>
</Button>
</HBox>
</HBox>
<SplitPane orientation="VERTICAL" maxWidth="Infinity"
maxHeight="Infinity"
fx:id="vesSectionSplit">
<HBox fx:id="sectionContainer" maxWidth="Infinity" maxHeight="Infinity" VBox.vgrow="ALWAYS">
<minWidth>
<UIConstantsKt fx:constant="MIN_SIZE"/>
</minWidth>
<minHeight>
<UIConstantsKt fx:constant="MIN_SIZE"/>
</minHeight>
<HBox fx:id="sectionContainer" maxWidth="Infinity" maxHeight="Infinity"
VBox.vgrow="ALWAYS">
<minHeight>
<UIConstantsKt fx:constant="MIN_SIZE"/>
</minHeight>
<VBox fx:id="sectionBox" HBox.hgrow="ALWAYS" VBox.vgrow="ALWAYS" maxWidth="Infinity"
maxHeight="Infinity">
<HBox>
<HBox>
<prefWidth>
<UIConstantsKt fx:constant="LEFT_AXIS_WIDTH"/>
</prefWidth>
</HBox>
<fx:include fx:id="picketsBar" source="PicketsBar.fxml" HBox.hgrow="ALWAYS"/>
<HBox>
<Button fx:id="addPicketBtn"
onAction="#addNewPicket" stylesheets="@PicketsBar.css"
HBox.hgrow="NEVER" contentDisplay="GRAPHIC_ONLY">
<prefWidth>
<UIConstantsKt fx:constant="TOP_CHARTS_RIGHT_OFFSET"/>
</prefWidth>
<minWidth>
<UIConstantsKt fx:constant="TOP_CHARTS_RIGHT_OFFSET"/>
</minWidth>
<maxWidth>
<UIConstantsKt fx:constant="TOP_CHARTS_RIGHT_OFFSET"/>
</maxWidth>
<graphic>
<ImageView fitWidth="15" fitHeight="15" preserveRatio="true">
<Image url="/img/ui_icons/add/2x/round_add_black_24dp.png"/>
</ImageView>
</graphic>
</Button>
</HBox>
</HBox>
<HBox VBox.vgrow="ALWAYS" maxHeight="Infinity">
<minHeight>
<UIConstantsKt fx:constant="MIN_SIZE"/>
</minHeight>
<SplitPane orientation="VERTICAL" maxHeight="Infinity" maxWidth="Infinity"
HBox.hgrow="ALWAYS" fx:id="sectionSplit">
<minHeight>
<UIConstantsKt fx:constant="MIN_SIZE"/>
</minHeight>
<fx:include fx:id="pseudoSectionSwitcher"
source="../charts/PseudoSectionSwitcher.fxml"/>
<fx:include fx:id="modelSectionSwitcher"
Expand All @@ -169,7 +198,7 @@
</HBox>
</VBox>
</HBox>
<VBox maxWidth="Infinity"
<VBox minWidth="10" maxWidth="Infinity"
maxHeight="Infinity"
VBox.vgrow="ALWAYS" fx:id="vesCurvesBox">

Expand Down Expand Up @@ -232,7 +261,8 @@
</graphic>
</Button>
</HBox>
<SplitPane dividerPositions="0.7" maxHeight="Infinity" maxWidth="Infinity"
<SplitPane dividerPositions="0.7" minHeight="10" maxHeight="Infinity"
maxWidth="Infinity"
VBox.vgrow="ALWAYS" fx:id="curvesTableSplit">

<SplitPane orientation="VERTICAL" dividerPositions="0.3" maxHeight="Infinity"
Expand All @@ -242,7 +272,7 @@
<fx:include fx:id="vesCurves" source="../charts/VesCurves.fxml"
VBox.vgrow="ALWAYS"/>
</SplitPane>
<TabPane VBox.vgrow="ALWAYS" maxHeight="Infinity">
<TabPane VBox.vgrow="ALWAYS" maxHeight="Infinity" minHeight="10" tabMinHeight="10">
<Tab text="%experimentalTable" closable="false">
<fx:include fx:id="experimentalTable"
source="../tables/ExperimentalTable.fxml"/>
Expand All @@ -259,7 +289,7 @@
</SplitPane>
</VBox>

<fx:include fx:id="noFileScreen" source="NoFileScreen.fxml"/>
<fx:include fx:id="noFileScreen" minHeight="10" source="NoFileScreen.fxml"/>
</StackPane>
</VBox>
</Scene>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,14 @@
-fx-font-size: 16;
}

.scroll-pane {
-fx-background-color: transparent;
}

.scroll-pane .viewport {
-fx-background-color: transparent;
}

/*.list-cell {*/
/* -fx-pref-height: 40;*/
/* -fx-font-size: 16;*/
Expand Down
Loading
Loading