Remove Anchorpane in OrderBookView

This commit is contained in:
Manfred Karrer 2014-09-15 02:15:50 +02:00
parent 3b5a59ac55
commit 7dc8d66614
2 changed files with 112 additions and 119 deletions

View file

@ -24,139 +24,133 @@
<?import javafx.scene.control.*?> <?import javafx.scene.control.*?>
<?import javafx.scene.layout.*?> <?import javafx.scene.layout.*?>
<?import javafx.scene.text.*?> <?import javafx.scene.text.*?>
<AnchorPane fx:id="root" fx:controller="io.bitsquare.gui.main.trade.orderbook.OrderBookViewCB" <GridPane fx:id="root" fx:controller="io.bitsquare.gui.main.trade.orderbook.OrderBookViewCB"
AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" hgap="5.0" vgap="0"
AnchorPane.topAnchor="0.0" xmlns:fx="http://javafx.com/fxml">
xmlns:fx="http://javafx.com/fxml"> <padding>
<Insets bottom="20.0" left="25.0" top="30.0" right="25"/>
</padding>
<GridPane fx:id="gridPane" hgap="5.0" vgap="0" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" <TitledGroupBg fx:id="priceAmountPane" text="Order book filter" GridPane.rowIndex="0" GridPane.columnIndex="0"
AnchorPane.rightAnchor="0.0" GridPane.rowSpan="5" GridPane.columnSpan="2"/>
AnchorPane.topAnchor="0.0">
<Label text="Filter by amount or price:" GridPane.rowIndex="0" GridPane.valignment="TOP">
<padding> <padding>
<Insets bottom="20.0" left="25.0" top="30.0" right="25"/> <Insets top="21.0"/>
</padding> </padding>
</Label>
<TitledGroupBg fx:id="priceAmountPane" text="Order book filter" GridPane.rowIndex="0" GridPane.columnIndex="0" <HBox alignment="CENTER_LEFT" spacing="5" GridPane.rowIndex="0" GridPane.columnIndex="1">
GridPane.rowSpan="5" GridPane.columnSpan="2"/> <VBox spacing="4">
<Label id="input-description-label" text="Filter by Amount in BTC"
<Label text="Filter by amount or price:" GridPane.rowIndex="0" GridPane.valignment="TOP"> prefWidth="137"/>
<HBox>
<InputTextField fx:id="amountTextField" id="text-input-with-currency-text-field"
promptText="Amount in BTC" prefWidth="137"
alignment="CENTER_RIGHT"/>
<Label fx:id="amountBtcLabel" id="currency-info-label"/>
</HBox>
</VBox>
<Label text="x">
<font>
<Font name="Helvetica" size="20.0"/>
</font>
<padding> <padding>
<Insets top="21.0"/> <Insets top="14.0" left="3" right="3"/>
</padding> </padding>
</Label> </Label>
<HBox alignment="CENTER_LEFT" spacing="5" GridPane.rowIndex="0" GridPane.columnIndex="1">
<VBox spacing="4">
<Label id="input-description-label" text="Filter by Amount in BTC"
prefWidth="137"/>
<HBox>
<InputTextField fx:id="amountTextField" id="text-input-with-currency-text-field"
promptText="Amount in BTC" prefWidth="137"
alignment="CENTER_RIGHT"/>
<Label fx:id="amountBtcLabel" id="currency-info-label"/>
</HBox>
</VBox>
<Label text="x">
<font>
<Font name="Helvetica" size="20.0"/>
</font>
<padding>
<Insets top="14.0" left="3" right="3"/>
</padding>
</Label>
<VBox spacing="4"> <VBox spacing="4">
<Label fx:id="priceDescriptionLabel" id="input-description-label" prefWidth="123"/> <Label fx:id="priceDescriptionLabel" id="input-description-label" prefWidth="123"/>
<HBox> <HBox>
<InputTextField fx:id="priceTextField" id="text-input-with-currency-text-field" <InputTextField fx:id="priceTextField" id="text-input-with-currency-text-field"
promptText="Filter by price" prefWidth="123" promptText="Filter by price" prefWidth="123"
alignment="CENTER_RIGHT"/> alignment="CENTER_RIGHT"/>
<Label fx:id="priceFiatLabel" id="currency-info-label" alignment="CENTER"/> <Label fx:id="priceFiatLabel" id="currency-info-label" alignment="CENTER"/>
</HBox> </HBox>
</VBox> </VBox>
<Label text="="> <Label text="=">
<font> <font>
<Font name="Helvetica" size="20.0"/> <Font name="Helvetica" size="20.0"/>
</font> </font>
<padding> <padding>
<Insets top="14.0" left="2" right="2"/> <Insets top="14.0" left="2" right="2"/>
</padding> </padding>
</Label> </Label>
<VBox spacing="4"> <VBox spacing="4">
<Label fx:id="volumeDescriptionLabel" id="input-description-label" prefWidth="135"/> <Label fx:id="volumeDescriptionLabel" id="input-description-label" prefWidth="135"/>
<HBox> <HBox>
<InputTextField fx:id="volumeTextField" id="text-input-with-currency-text-field" <InputTextField fx:id="volumeTextField" id="text-input-with-currency-text-field"
prefWidth="135" alignment="CENTER_RIGHT"/> prefWidth="135" alignment="CENTER_RIGHT"/>
<Label fx:id="volumeFiatLabel" id="currency-info-label"/> <Label fx:id="volumeFiatLabel" id="currency-info-label"/>
</HBox> </HBox>
</VBox> </VBox>
<GridPane.margin> <GridPane.margin>
<Insets bottom="5"/> <Insets bottom="5"/>
</GridPane.margin> </GridPane.margin>
</HBox> </HBox>
<Label fx:id="extendedCheckBoxLabel" text="Show only matching offers:" GridPane.columnIndex="0" <Label fx:id="extendedCheckBoxLabel" text="Show only matching offers:" GridPane.columnIndex="0"
GridPane.rowIndex="2" visible="false" managed="false"/> GridPane.rowIndex="2" visible="false" managed="false"/>
<CheckBox fx:id="extendedCheckBox" visible="false" managed="false" GridPane.columnIndex="1" <CheckBox fx:id="extendedCheckBox" visible="false" managed="false" GridPane.columnIndex="1"
GridPane.rowIndex="2"/> GridPane.rowIndex="2"/>
<Label fx:id="extendedButton1Label" text="Payments account countries:" GridPane.columnIndex="0" <Label fx:id="extendedButton1Label" text="Payments account countries:" GridPane.columnIndex="0"
GridPane.rowIndex="3" visible="false" managed="false"/> GridPane.rowIndex="3" visible="false" managed="false"/>
<Button fx:id="extendedButton1" text="Open filter" GridPane.columnIndex="1" <Button fx:id="extendedButton1" text="Open filter" GridPane.columnIndex="1"
GridPane.rowIndex="3" visible="false" managed="false"/> GridPane.rowIndex="3" visible="false" managed="false"/>
<Label fx:id="extendedButton2Label" text="Payments account methods:" GridPane.columnIndex="0" <Label fx:id="extendedButton2Label" text="Payments account methods:" GridPane.columnIndex="0"
GridPane.rowIndex="4" visible="false" managed="false"/> GridPane.rowIndex="4" visible="false" managed="false"/>
<Button fx:id="extendedButton2" text="Open filter" GridPane.columnIndex="1" <Button fx:id="extendedButton2" text="Open filter" GridPane.columnIndex="1"
GridPane.rowIndex="4" visible="false" managed="false"> GridPane.rowIndex="4" visible="false" managed="false">
<GridPane.margin> <GridPane.margin>
<Insets bottom="-5"/> <Insets bottom="-5"/>
</GridPane.margin> </GridPane.margin>
</Button> </Button>
<HBox spacing="10" GridPane.columnIndex="1" GridPane.rowIndex="5"> <HBox spacing="10" GridPane.columnIndex="1" GridPane.rowIndex="5">
<Button fx:id="showAdvancedSettingsButton" text="Open advanced filter" <Button fx:id="showAdvancedSettingsButton" text="Open advanced filter"
onAction="#onToggleShowAdvancedSettings"/> onAction="#onToggleShowAdvancedSettings"/>
<Button fx:id="createOfferButton" text="Create new offer" defaultButton="true" onAction="#createOffer"/> <Button fx:id="createOfferButton" text="Create new offer" defaultButton="true" onAction="#createOffer"/>
<GridPane.margin> <GridPane.margin>
<Insets bottom="30" top="20"/> <Insets bottom="30" top="20"/>
</GridPane.margin> </GridPane.margin>
</HBox> </HBox>
<TitledSeparator text="Order book for buying Bitcoin" GridPane.rowIndex="6" GridPane.columnIndex="0" <TitledSeparator text="Order book for buying Bitcoin" GridPane.rowIndex="6" GridPane.columnIndex="0"
GridPane.columnSpan="2"/> GridPane.columnSpan="2"/>
<TableView fx:id="orderBookTable" GridPane.rowIndex="6" GridPane.columnIndex="0" GridPane.columnSpan="2" <TableView fx:id="orderBookTable" GridPane.rowIndex="6" GridPane.columnIndex="0" GridPane.columnSpan="2"
prefHeight="1500"> prefHeight="1500">
<GridPane.margin> <GridPane.margin>
<Insets top="10.0" left="-10" right="-10" bottom="-15"/> <Insets top="10.0" left="-10" right="-10" bottom="-15"/>
</GridPane.margin> </GridPane.margin>
<columns> <columns>
<TableColumn text="Amount in BTC (Min.)" fx:id="amountColumn" minWidth="130"/> <TableColumn text="Amount in BTC (Min.)" fx:id="amountColumn" minWidth="130"/>
<TableColumn text="Price" fx:id="priceColumn" minWidth="130"/> <TableColumn text="Price" fx:id="priceColumn" minWidth="130"/>
<TableColumn text="Amount in EUR (Min.)" fx:id="volumeColumn" minWidth="130"/> <TableColumn text="Amount in EUR (Min.)" fx:id="volumeColumn" minWidth="130"/>
<TableColumn text="Country" fx:id="countryColumn" minWidth="60"/> <TableColumn text="Country" fx:id="countryColumn" minWidth="60"/>
<TableColumn text="Bank transfer type" fx:id="bankAccountTypeColumn" minWidth="130"/> <TableColumn text="Bank transfer type" fx:id="bankAccountTypeColumn" minWidth="130"/>
<TableColumn text="" fx:id="directionColumn" minWidth="80" sortable="false"/> <TableColumn text="" fx:id="directionColumn" minWidth="80" sortable="false"/>
</columns> </columns>
</TableView> </TableView>
<columnConstraints> <columnConstraints>
<ColumnConstraints halignment="RIGHT" hgrow="SOMETIMES" minWidth="200"/> <ColumnConstraints halignment="RIGHT" hgrow="SOMETIMES" minWidth="200"/>
<ColumnConstraints hgrow="ALWAYS"/> <ColumnConstraints hgrow="ALWAYS"/>
</columnConstraints> </columnConstraints>
<rowConstraints> <rowConstraints>
<RowConstraints/> <RowConstraints/>
<RowConstraints/> <RowConstraints/>
<RowConstraints/> <RowConstraints/>
<RowConstraints/> <RowConstraints/>
<RowConstraints/> <RowConstraints/>
<RowConstraints/> <RowConstraints/>
<RowConstraints/> <RowConstraints/>
</rowConstraints> </rowConstraints>
</GridPane> </GridPane>
</AnchorPane>

View file

@ -85,7 +85,6 @@ public class OrderBookViewCB extends CachedViewCB<OrderBookPM> {
private ImageView expand; private ImageView expand;
private ImageView collapse; private ImageView collapse;
@FXML private GridPane gridPane;
@FXML private CheckBox extendedCheckBox; @FXML private CheckBox extendedCheckBox;
@FXML private Label amountBtcLabel, priceDescriptionLabel, priceFiatLabel, volumeDescriptionLabel, @FXML private Label amountBtcLabel, priceDescriptionLabel, priceFiatLabel, volumeDescriptionLabel,
volumeFiatLabel, extendedButton1Label, extendedButton2Label, extendedCheckBoxLabel; volumeFiatLabel, extendedButton1Label, extendedButton2Label, extendedCheckBoxLabel;
@ -342,7 +341,7 @@ public class OrderBookViewCB extends CachedViewCB<OrderBookPM> {
} }
private void toggleDetailsScreen(boolean visible) { private void toggleDetailsScreen(boolean visible) {
gridPane.setVgap(visible ? 5 : 0); ((GridPane) root).setVgap(visible ? 5 : 0);
extendedButton1Label.setVisible(visible); extendedButton1Label.setVisible(visible);
extendedButton1Label.setManaged(visible); extendedButton1Label.setManaged(visible);