mirror of
https://github.com/corda/corda.git
synced 2025-04-07 11:27:01 +00:00
DemoBench: layout fixes and more visual tweaks
This commit is contained in:
parent
3f7f05a0d9
commit
2c6163ecb9
@ -66,12 +66,14 @@ class NodeTabView : Fragment() {
|
||||
|
||||
hbox {
|
||||
styleClass.addAll("node-panel")
|
||||
vboxConstraints { vGrow = Priority.ALWAYS }
|
||||
|
||||
fieldset("CorDapps") {
|
||||
hboxConstraints { hGrow = Priority.ALWAYS }
|
||||
styleClass.addAll("cordapps-panel")
|
||||
|
||||
listview(cordapps) {
|
||||
vboxConstraints { vGrow = Priority.ALWAYS }
|
||||
setOnKeyPressed { key ->
|
||||
if ((key.code == KeyCode.DELETE) && !selectionModel.isEmpty) {
|
||||
cordapps.remove(selectionModel.selectedItem)
|
||||
@ -85,6 +87,7 @@ class NodeTabView : Fragment() {
|
||||
styleClass.addAll("services-panel")
|
||||
|
||||
listview(availableServices.observable()) {
|
||||
vboxConstraints { vGrow = Priority.ALWAYS }
|
||||
selectionModel.selectionMode = MULTIPLE
|
||||
model.item.extraServices.set(selectionModel.selectedItems)
|
||||
}
|
||||
@ -198,7 +201,7 @@ class NodeTabView : Fragment() {
|
||||
|
||||
value = CityDatabase["London"]
|
||||
|
||||
// TODO: Find a way to make the popup the same width as when not auto-completing.
|
||||
// TODO: Upgrade to TornadoFX 1.7.3 to fix an issue where the combobox dropdown isn't wide enough.
|
||||
isEditable = true
|
||||
makeAutocompletable()
|
||||
}
|
||||
|
@ -7,7 +7,10 @@ import javafx.application.Platform
|
||||
import javafx.embed.swing.SwingNode
|
||||
import javafx.scene.control.Button
|
||||
import javafx.scene.control.Label
|
||||
import javafx.scene.image.ImageView
|
||||
import javafx.scene.layout.StackPane
|
||||
import javafx.scene.layout.VBox
|
||||
import javafx.util.Duration
|
||||
import net.corda.client.rpc.notUsed
|
||||
import net.corda.demobench.explorer.ExplorerController
|
||||
import net.corda.demobench.model.NodeConfig
|
||||
@ -18,7 +21,8 @@ import net.corda.demobench.rpc.NodeRPC
|
||||
import net.corda.demobench.ui.PropertyLabel
|
||||
import net.corda.demobench.web.DBViewer
|
||||
import net.corda.demobench.web.WebServerController
|
||||
import tornadofx.Fragment
|
||||
import tornadofx.*
|
||||
import java.awt.Color
|
||||
import java.awt.Dimension
|
||||
import java.util.logging.Level
|
||||
import javax.swing.SwingUtilities
|
||||
@ -45,6 +49,7 @@ class NodeTerminalView : Fragment() {
|
||||
private val viewer = DBViewer()
|
||||
private var rpc: NodeRPC? = null
|
||||
private var pty: R3Pty? = null
|
||||
private lateinit var logo: ImageView
|
||||
|
||||
fun open(config: NodeConfig, onExit: () -> Unit) {
|
||||
nodeName.text = config.legalName
|
||||
@ -55,7 +60,11 @@ class NodeTerminalView : Fragment() {
|
||||
swingTerminal.requestFocus()
|
||||
}
|
||||
|
||||
root.children.add(swingTerminal)
|
||||
logo = ImageView(resources["corda-logo-square-trans.png"])
|
||||
logo.opacity = 0.0
|
||||
swingTerminal.styleClass += "terminal-widget"
|
||||
val stack = StackPane(logo, swingTerminal)
|
||||
root.children.add(stack)
|
||||
root.isVisible = true
|
||||
|
||||
SwingUtilities.invokeLater({
|
||||
@ -144,6 +153,7 @@ class NodeTerminalView : Fragment() {
|
||||
)
|
||||
|
||||
Platform.runLater {
|
||||
logo.opacityProperty().animate(1.0, Duration.seconds(2.5))
|
||||
states.value = fetchAndDrop(statesInVault).size.toString()
|
||||
transactions.value = fetchAndDrop(verifiedTx).size.toString()
|
||||
balance.value = if (cashBalances.isNullOrEmpty()) "0" else cashBalances
|
||||
@ -177,6 +187,5 @@ class NodeTerminalView : Fragment() {
|
||||
class TerminalSettingsProvider : DefaultSettingsProvider() {
|
||||
override fun getDefaultStyle() = TextStyle(TerminalColor.WHITE, TerminalColor.rgb(50, 50, 50))
|
||||
override fun emulateX11CopyPaste() = true
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -38,6 +38,10 @@
|
||||
-fx-background-color: #323232;
|
||||
}
|
||||
|
||||
.terminal-widget {
|
||||
-fx-opacity: 0.85;
|
||||
}
|
||||
|
||||
.node-panel {
|
||||
-fx-spacing: 1em;
|
||||
-fx-background-color: white;
|
||||
|
@ -19,9 +19,9 @@
|
||||
</Menu>
|
||||
</MenuBar>
|
||||
<StackPane styleClass="root-pane" VBox.vgrow="ALWAYS">
|
||||
<TabPane fx:id="nodeTabPane" minHeight="444.0" minWidth="800.0" prefHeight="613.0" prefWidth="1231.0" tabClosingPolicy="UNAVAILABLE" tabMinHeight="30.0" />
|
||||
<TabPane fx:id="nodeTabPane" minHeight="600.0" minWidth="800.0" prefHeight="800.0" prefWidth="1231.0" tabClosingPolicy="UNAVAILABLE" tabMinHeight="30.0" />
|
||||
<ImageView fitHeight="40.0" preserveRatio="true" StackPane.alignment="TOP_LEFT">
|
||||
<Image url="@cordalogo-full-trans.png"/>
|
||||
<Image url="@corda-logo-full-trans.png"/>
|
||||
<StackPane.margin>
|
||||
<Insets left="20" top="15.0"/>
|
||||
</StackPane.margin>
|
||||
|
Before Width: | Height: | Size: 8.5 KiB After Width: | Height: | Size: 8.5 KiB |
Binary file not shown.
After Width: | Height: | Size: 38 KiB |
Loading…
x
Reference in New Issue
Block a user