Archived
0

- modify station editor

- add system editor
 - show services in station tab
This commit is contained in:
iMoHax
2014-11-25 17:50:24 +03:00
parent 0dbd820c98
commit 14da314630
16 changed files with 508 additions and 60 deletions

View File

@@ -22,7 +22,7 @@
<ColumnConstraints fillWidth="true"/>
</columnConstraints>
<TitledPane GridPane.rowSpan="2" text="%market.systems" minWidth="250" prefHeight="510" collapsible="false">
<TitledPane GridPane.rowSpan="3" text="%market.systems" minWidth="250" prefHeight="530" collapsible="false">
<ListView fx:id="systems">
<contextMenu>
<ContextMenu>
@@ -38,7 +38,23 @@
<TitledPane GridPane.columnIndex="1" text="%market.stations" maxHeight="60" collapsible="false">
<SegmentedButton fx:id="stationsBar" />
</TitledPane>
<Accordion GridPane.rowIndex="1" GridPane.columnIndex="1" GridPane.hgrow="ALWAYS" GridPane.vgrow="ALWAYS">
<TitledPane GridPane.rowIndex="1" GridPane.columnIndex="1" text="" maxHeight="60" collapsible="false">
<HBox spacing="4">
<Label text="%offers.text.distance"/>
<Label fx:id="distance" minWidth="60"/>
<Label text="%offers.text.services"/>
<HBox spacing="20">
<CheckBox fx:id="cbMarket" text="%services.MARKET"/>
<CheckBox fx:id="cbBlackMarket" text="%services.BLACK_MARKET"/>
<CheckBox fx:id="cbRepair" text="%services.REPAIR"/>
<CheckBox fx:id="cbMunition" text="%services.MUNITION"/>
<CheckBox fx:id="cbOutfit" text="%services.OUTFIT"/>
<CheckBox fx:id="cbShipyard" text="%services.SHIPYARD"/>
</HBox>
</HBox>
</TitledPane>
<Accordion GridPane.rowIndex="2" GridPane.columnIndex="1" GridPane.hgrow="ALWAYS" GridPane.vgrow="ALWAYS">
<panes>
<TitledPane fx:id="paneSells" animated="false" text="%offers.pane.sell">
<TableView fx:id="tblSell" editable="true">

View File

@@ -0,0 +1,75 @@
<?xml version="1.0" encoding="UTF-8"?>
<?import javafx.geometry.*?>
<?import javafx.scene.control.*?>
<?import javafx.scene.layout.*?>
<?import javafx.scene.control.cell.PropertyValueFactory?>
<?import ru.trader.view.support.cells.PriceCellImpl?>
<?import ru.trader.view.support.cells.OfferCellValueImpl?>
<?import ru.trader.view.support.cells.DoubleCell?>
<?import org.controlsfx.glyphfont.Glyph?>
<?import org.controlsfx.control.SegmentedButton?>
<GridPane xmlns="http://javafx.com/javafx/8" xmlns:fx="http://javafx.com/fxml/1"
fx:controller="ru.trader.controllers.SystemsEditorController" styleClass="dialog"
hgap="10" vgap="5" prefHeight="400">
<columnConstraints>
<ColumnConstraints />
<ColumnConstraints minWidth="180" />
<ColumnConstraints minWidth="180" />
<ColumnConstraints minWidth="180" />
</columnConstraints>
<Label text="%sEditor.text.orientates" prefWidth="170" GridPane.rowSpan="2"/>
<ComboBox fx:id="system1" prefWidth="160" GridPane.columnIndex="1" />
<ComboBox fx:id="system2" prefWidth="160" GridPane.columnIndex="2" />
<ComboBox fx:id="system3" prefWidth="160" GridPane.columnIndex="3" />
<ComboBox fx:id="system4" prefWidth="160" GridPane.rowIndex="1" GridPane.columnIndex="1" />
<ComboBox fx:id="system5" prefWidth="160" GridPane.rowIndex="1" GridPane.columnIndex="2" />
<ComboBox fx:id="system6" prefWidth="160" GridPane.rowIndex="1" GridPane.columnIndex="3" />
<TableView fx:id="tblSystems" editable="true" prefWidth="725.0" GridPane.rowIndex="2" GridPane.columnSpan="4">
<columns>
<TableColumn fx:id="clnName" minWidth="180.0" text="%market.systems">
<cellValueFactory><PropertyValueFactory property="name"/></cellValueFactory>
</TableColumn>
<TableColumn fx:id="clnX" minWidth="60.0" text="x">
<cellValueFactory><PropertyValueFactory property="x"/></cellValueFactory>
</TableColumn>
<TableColumn fx:id="clnY" minWidth="60.0" text="y">
<cellValueFactory><PropertyValueFactory property="y"/></cellValueFactory>
</TableColumn>
<TableColumn fx:id="clnZ" minWidth="60.0" text="z">
<cellValueFactory><PropertyValueFactory property="z"/></cellValueFactory>
</TableColumn>
<TableColumn text="%sEditor.table.distance">
<columns>
<TableColumn fx:id="clnS1" minWidth="60.0" text="">
<cellValueFactory><PropertyValueFactory property="s1"/></cellValueFactory>
</TableColumn>
<TableColumn fx:id="clnS2" minWidth="60.0" text="">
<cellValueFactory><PropertyValueFactory property="s2"/></cellValueFactory>
</TableColumn>
<TableColumn fx:id="clnS3" minWidth="60.0" text="">
<cellValueFactory><PropertyValueFactory property="s3"/></cellValueFactory>
</TableColumn>
<TableColumn fx:id="clnS4" minWidth="60.0" text="">
<cellValueFactory><PropertyValueFactory property="s4"/></cellValueFactory>
</TableColumn>
<TableColumn fx:id="clnS5" minWidth="60.0" text="">
<cellValueFactory><PropertyValueFactory property="s5"/></cellValueFactory>
</TableColumn>
<TableColumn fx:id="clnS6" minWidth="60.0" text="">
<cellValueFactory><PropertyValueFactory property="s6"/></cellValueFactory>
</TableColumn>
</columns>
</TableColumn>
</columns>
<columnResizePolicy>
<TableView fx:constant="UNCONSTRAINED_RESIZE_POLICY"/>
</columnResizePolicy>
</TableView>
</GridPane>

View File

@@ -14,13 +14,22 @@
vgap="10" hgap="4">
<fx:define><Insets fx:id="hbox_margin" left="10" /></fx:define>
<TextField fx:id="name" GridPane.columnSpan="2" alignment="CENTER" />
<HBox GridPane.rowIndex="1" GridPane.columnIndex="1" spacing="4" alignment="BASELINE_CENTER">
<Label text="x:" HBox.margin="$hbox_margin" />
<NumberField fx:id="x" prefWidth="60" />
<Label text="z:" HBox.margin="$hbox_margin" />
<NumberField fx:id="z" prefWidth="60" />
<Label text="y:" HBox.margin="$hbox_margin" />
<NumberField fx:id="y" prefWidth="60" />
<HBox GridPane.rowIndex="1" GridPane.columnIndex="1" spacing="4">
<VBox prefWidth="200" alignment="CENTER">
<Label text="%vEditor.text.distance"/>
<NumberField fx:id="distance" maxWidth="60" />
</VBox>
<VBox HBox.hgrow="ALWAYS" alignment="CENTER">
<Label text="%vEditor.text.services"/>
<TilePane hgap="5" vgap="5" maxWidth="320" tileAlignment="BASELINE_LEFT">
<CheckBox fx:id="cbMarket" text="%services.MARKET"/>
<CheckBox fx:id="cbBlackMarket" text="%services.BLACK_MARKET"/>
<CheckBox fx:id="cbRepair" text="%services.REPAIR"/>
<CheckBox fx:id="cbMunition" text="%services.MUNITION"/>
<CheckBox fx:id="cbOutfit" text="%services.OUTFIT"/>
<CheckBox fx:id="cbShipyard" text="%services.SHIPYARD"/>
</TilePane>
</VBox>
</HBox>
<VBox GridPane.rowIndex="2" alignment="CENTER" spacing="10">
<Button prefWidth="30" onAction="#up"><graphic><Glyph text="FontAwesome|ARROW_UP"/></graphic></Button>
@@ -28,7 +37,7 @@
<Button prefWidth="30" onAction="#add"><graphic><Glyph text="FontAwesome|PLUS"/></graphic></Button>
<Button prefWidth="30" onAction="#updateFromEMDN"><graphic><Glyph text="FontAwesome|REFRESH"/></graphic></Button>
</VBox>
<TableView fx:id="items" prefWidth="395.0" editable="true" GridPane.columnIndex="1" GridPane.rowIndex="2">
<TableView fx:id="items" prefWidth="575" editable="true" GridPane.columnIndex="1" GridPane.rowIndex="2">
<columns>
<TableColumn minWidth="200.0" text="%market.item.name" editable="false">
<cellValueFactory><PropertyValueFactory property="name"/></cellValueFactory>
@@ -39,6 +48,12 @@
<TableColumn fx:id="sell" minWidth="90.0" text="%market.offer.buy">
<cellValueFactory><PropertyValueFactory property="sprice"/></cellValueFactory>
</TableColumn>
<TableColumn fx:id="demand" minWidth="90.0" text="%market.offer.demand">
<cellValueFactory><PropertyValueFactory property="demand"/></cellValueFactory>
</TableColumn>
<TableColumn fx:id="supply" minWidth="90.0" text="%market.offer.supply">
<cellValueFactory><PropertyValueFactory property="supply"/></cellValueFactory>
</TableColumn>
</columns>
</TableView>
</GridPane>