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

View File

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