|
1 | 1 | <?xml version="1.0" encoding="UTF-8"?>
|
2 | 2 |
|
| 3 | +<?import javafx.geometry.Insets?> |
3 | 4 | <?import javafx.scene.control.Button?>
|
4 | 5 | <?import javafx.scene.control.ComboBox?>
|
5 | 6 | <?import javafx.scene.control.Hyperlink?>
|
|
9 | 10 | <?import javafx.scene.control.MenuItem?>
|
10 | 11 | <?import javafx.scene.control.PasswordField?>
|
11 | 12 | <?import javafx.scene.control.ProgressBar?>
|
| 13 | +<?import javafx.scene.control.Separator?> |
12 | 14 | <?import javafx.scene.control.TableColumn?>
|
13 | 15 | <?import javafx.scene.control.TableView?>
|
14 | 16 | <?import javafx.scene.control.TextField?>
|
15 | 17 | <?import javafx.scene.control.Tooltip?>
|
16 | 18 | <?import javafx.scene.layout.AnchorPane?>
|
| 19 | +<?import javafx.scene.layout.HBox?> |
| 20 | +<?import javafx.scene.layout.Region?> |
17 | 21 | <?import javafx.scene.layout.VBox?>
|
18 | 22 | <?import org.controlsfx.control.CheckComboBox?>
|
19 | 23 | <?import org.controlsfx.control.ToggleSwitch?>
|
|
39 | 43 | <children>
|
40 | 44 | <AnchorPane prefHeight="575.0" prefWidth="250.0" style="-fx-background-color: #555555; -fx-border-color: #333333;" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.topAnchor="0.0">
|
41 | 45 | <children>
|
42 |
| - <TextField fx:id="userText" layoutX="39.0" layoutY="53.0" onAction="#startSync" onMouseClicked="#resetChannels" prefHeight="25.0" prefWidth="200.0" promptText="User" AnchorPane.leftAnchor="20.0" AnchorPane.rightAnchor="20.0" AnchorPane.topAnchor="10.0" /> |
43 |
| - <PasswordField fx:id="pwdText" layoutX="38.0" layoutY="106.0" onAction="#startSync" prefWidth="200.0" promptText="Password" AnchorPane.leftAnchor="20.0" AnchorPane.rightAnchor="20.0" AnchorPane.topAnchor="50.0" /> |
44 |
| - <Button fx:id="syncButton" layoutX="50.0" layoutY="152.0" mnemonicParsing="false" onAction="#startSync" prefWidth="100.0" text="Sync" AnchorPane.leftAnchor="20.0" AnchorPane.topAnchor="195.0"> |
45 |
| - <tooltip> |
46 |
| - <Tooltip text="Sync with Sync Gateway" /> |
47 |
| - </tooltip> |
48 |
| - </Button> |
49 |
| - <Button fx:id="stopSync" disable="true" layoutX="134.0" layoutY="150.0" mnemonicParsing="false" onAction="#stopContinuousSync" prefWidth="100.0" text="Stop Sync" AnchorPane.rightAnchor="20.0" AnchorPane.topAnchor="195.0"> |
50 |
| - <tooltip> |
51 |
| - <Tooltip text="Stop sync if continuous sync is running" /> |
52 |
| - </tooltip> |
53 |
| - </Button> |
54 |
| - <Button fx:id="initSync" layoutX="22.0" layoutY="236.0" mnemonicParsing="false" onAction="#initSync" prefHeight="25.0" prefWidth="100.0" text="Initialize" AnchorPane.leftAnchor="20.0" AnchorPane.topAnchor="230.0"> |
55 |
| - <tooltip> |
56 |
| - <Tooltip text="Initialize DB and sync" /> |
57 |
| - </tooltip> |
58 |
| - </Button> |
59 |
| - <Button fx:id="deleteSync" layoutX="129.0" layoutY="236.0" mnemonicParsing="false" onAction="#deleteDB" prefHeight="25.0" prefWidth="100.0" text="Delete" AnchorPane.rightAnchor="20.0" AnchorPane.topAnchor="230.0"> |
60 |
| - <tooltip> |
61 |
| - <Tooltip text="Delete local CBLite DB file" /> |
62 |
| - </tooltip> |
63 |
| - </Button> |
64 |
| - <Button fx:id="reloadTable" layoutX="4.0" layoutY="494.0" mnemonicParsing="false" onAction="#reloadTable" text="Reload Table" AnchorPane.bottomAnchor="50.0" AnchorPane.leftAnchor="20.0" AnchorPane.rightAnchor="20.0" /> |
65 |
| - <Button fx:id="settingsButton" layoutX="84.0" layoutY="536.0" mnemonicParsing="false" onAction="#openSettings" text="Settings" AnchorPane.bottomAnchor="10.0" AnchorPane.leftAnchor="20.0" AnchorPane.rightAnchor="20.0" /> |
66 |
| - <Label fx:id="statusLabel" layoutX="20.0" layoutY="281.0" maxWidth="300.0" prefHeight="100.0" prefWidth="200.0" textFill="WHITE" wrapText="true" AnchorPane.leftAnchor="20.0" AnchorPane.topAnchor="270.0" /> |
67 |
| - <Label fx:id="tableStatusLabel" maxWidth="300.0" prefHeight="30.0" prefWidth="200.0" textFill="WHITE" AnchorPane.leftAnchor="20.0" AnchorPane.topAnchor="380.0" /> |
68 |
| - <Label layoutX="21.0" layoutY="211.0" text="Continuous Sync" textFill="WHITE" AnchorPane.leftAnchor="20.0" AnchorPane.topAnchor="165.0" /> |
69 |
| - <ToggleSwitch fx:id="continuousToggle" layoutX="99.0" layoutY="211.0" onMouseClicked="#toggleContinuousMode" textFill="WHITE" AnchorPane.leftAnchor="110.0" AnchorPane.topAnchor="165.0" /> |
70 |
| - <CheckComboBox fx:id="channelsComboBoxList" layoutX="21.0" layoutY="131.0" onMouseEntered="#setUpChannels" title="Sync Channels | Default: All" AnchorPane.leftAnchor="20.0" AnchorPane.rightAnchor="20.0" AnchorPane.topAnchor="90.0" /> |
71 |
| - <Hyperlink fx:id="about" layoutX="22.0" layoutY="490.0" onAction="#openAboutPage" textFill="WHITE" AnchorPane.bottomAnchor="90.0" AnchorPane.leftAnchor="20.0" AnchorPane.rightAnchor="20.0" /> |
72 |
| - <ComboBox fx:id="replicationMode" layoutX="23.0" layoutY="132.0" prefWidth="150.0" promptText="Replication Mode | Default: Pull" visibleRowCount="3" AnchorPane.leftAnchor="20.0" AnchorPane.rightAnchor="20.0" AnchorPane.topAnchor="130.0" /> |
| 46 | + <VBox spacing="8.0"> |
| 47 | + <children> |
| 48 | + <AnchorPane> |
| 49 | + <children> |
| 50 | + <VBox prefWidth="210.0" spacing="8.0"> |
| 51 | + <children> |
| 52 | + <TextField fx:id="userText" onAction="#startSync" onMouseClicked="#resetChannels" promptText="User" /> |
| 53 | + <PasswordField fx:id="pwdText" onAction="#startSync" promptText="Password" /> |
| 54 | + <Label alignment="CENTER" contentDisplay="CENTER" text="OR" textAlignment="CENTER" textFill="WHITE" /> |
| 55 | + <PasswordField fx:id="sessionTokenText" promptText="SG Session Token"> |
| 56 | + <VBox.margin> |
| 57 | + <Insets /> |
| 58 | + </VBox.margin> |
| 59 | + </PasswordField> |
| 60 | + </children> |
| 61 | + <padding> |
| 62 | + <Insets top="5.0" /> |
| 63 | + </padding> |
| 64 | + </VBox> |
| 65 | + </children> |
| 66 | + <VBox.margin> |
| 67 | + <Insets /> |
| 68 | + </VBox.margin> |
| 69 | + </AnchorPane> |
| 70 | + <Separator> |
| 71 | + <VBox.margin> |
| 72 | + <Insets bottom="5.0" top="5.0" /> |
| 73 | + </VBox.margin> |
| 74 | + </Separator> |
| 75 | + <CheckComboBox fx:id="channelsComboBoxList" maxWidth="1.7976931348623157E308" onMouseEntered="#setUpChannels" title="Sync Channels | Default: All" /> |
| 76 | + <ComboBox fx:id="replicationMode" promptText="Replication Mode | Default: Pull" visibleRowCount="3" /> |
| 77 | + <HBox> |
| 78 | + <children> |
| 79 | + <Label text="Continuous Sync" textFill="WHITE" /> |
| 80 | + <ToggleSwitch fx:id="continuousToggle" onMouseClicked="#toggleContinuousMode" textFill="WHITE" /> |
| 81 | + </children> |
| 82 | + <VBox.margin> |
| 83 | + <Insets /> |
| 84 | + </VBox.margin> |
| 85 | + <padding> |
| 86 | + <Insets top="5.0" /> |
| 87 | + </padding> |
| 88 | + </HBox> |
| 89 | + <HBox spacing="10.0"> |
| 90 | + <children> |
| 91 | + <Button fx:id="syncButton" mnemonicParsing="false" onAction="#startSync" prefWidth="100.0" text="Sync"> |
| 92 | + <tooltip> |
| 93 | + <Tooltip text="Sync with Sync Gateway" /> |
| 94 | + </tooltip> |
| 95 | + </Button> |
| 96 | + <Button fx:id="stopSync" disable="true" mnemonicParsing="false" onAction="#stopContinuousSync" prefWidth="100.0" text="Stop Sync"> |
| 97 | + <tooltip> |
| 98 | + <Tooltip text="Stop sync if continuous sync is running" /> |
| 99 | + </tooltip> |
| 100 | + </Button> |
| 101 | + </children> |
| 102 | + <padding> |
| 103 | + <Insets top="5.0" /> |
| 104 | + </padding> |
| 105 | + </HBox> |
| 106 | + <HBox spacing="10.0"> |
| 107 | + <children> |
| 108 | + <Button fx:id="initSync" mnemonicParsing="false" onAction="#initSync" prefHeight="25.0" prefWidth="100.0" text="Initialize"> |
| 109 | + <tooltip> |
| 110 | + <Tooltip text="Initialize DB and sync" /> |
| 111 | + </tooltip> |
| 112 | + </Button> |
| 113 | + <Button fx:id="deleteSync" mnemonicParsing="false" onAction="#deleteDB" prefHeight="25.0" prefWidth="100.0" text="Delete"> |
| 114 | + <tooltip> |
| 115 | + <Tooltip text="Delete local CBLite DB file" /> |
| 116 | + </tooltip> |
| 117 | + </Button> |
| 118 | + </children> |
| 119 | + <padding> |
| 120 | + <Insets top="5.0" /> |
| 121 | + </padding> |
| 122 | + </HBox> |
| 123 | + <Label fx:id="statusLabel" prefHeight="100.0" prefWidth="200.0" textFill="WHITE" wrapText="true"> |
| 124 | + <VBox.margin> |
| 125 | + <Insets top="5.0" /> |
| 126 | + </VBox.margin> |
| 127 | + </Label> |
| 128 | + <Label fx:id="tableStatusLabel" prefWidth="200.0" textFill="WHITE" wrapText="true" /> |
| 129 | + <Region VBox.vgrow="ALWAYS"> |
| 130 | + <VBox.margin> |
| 131 | + <Insets top="20.0" /> |
| 132 | + </VBox.margin> |
| 133 | + </Region> |
| 134 | + <Hyperlink fx:id="about" onAction="#openAboutPage" textFill="WHITE" /> |
| 135 | + <HBox spacing="10.0"> |
| 136 | + <children> |
| 137 | + <Button fx:id="reloadTable" mnemonicParsing="false" onAction="#reloadTable" prefWidth="100.0" text="Reload Table" /> |
| 138 | + <Button fx:id="settingsButton" mnemonicParsing="false" onAction="#openSettings" prefWidth="100.0" text="Settings" /> |
| 139 | + </children> |
| 140 | + <padding> |
| 141 | + <Insets top="5.0" /> |
| 142 | + </padding> |
| 143 | + </HBox> |
| 144 | + </children> |
| 145 | + <padding> |
| 146 | + <Insets left="20.0" top="10.0" /> |
| 147 | + </padding> |
| 148 | + </VBox> |
73 | 149 | </children>
|
74 | 150 | </AnchorPane>
|
75 |
| - <TableView fx:id="dataTable" layoutX="251.0" layoutY="82.0" prefHeight="560.0" prefWidth="650.0" style="-fx-border-color: #777777;" tableMenuButtonVisible="true" AnchorPane.bottomAnchor="40.0" AnchorPane.leftAnchor="250.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0"> |
| 151 | + <TableView fx:id="dataTable" layoutX="251.0" layoutY="82.0" style="-fx-border-color: #777777;" tableMenuButtonVisible="true" AnchorPane.bottomAnchor="40.0" AnchorPane.leftAnchor="250.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0"> |
76 | 152 | <columns>
|
77 | 153 | <TableColumn fx:id="docId" maxWidth="500.0" prefWidth="250.0" text="Doc Id" />
|
78 | 154 | <TableColumn fx:id="docValue" text="Document Value" />
|
|
0 commit comments