Skip to content

Commit

Permalink
Tidy up a few rough edges for DemoBench. (corda#507)
Browse files Browse the repository at this point in the history
* Install DemoBench as a systemwide application.
* This application's correct full name is "Corda DemoBench".
* Tidy up imports.
* Cordapps -> CorDapps
* Ensure application name is "Corda DemoBench" on MacOSX.
  • Loading branch information
chrisr3 authored Apr 5, 2017
1 parent 4829524 commit a9463eb
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 13 deletions.
7 changes: 5 additions & 2 deletions tools/demobench/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ task javapackage(dependsOn: 'distZip') {

ant.deploy(nativeBundles: packageType, outdir: pkg_outDir, outfile: 'DemoBench', verbose: 'true') {
application(name: 'DemoBench', version: pkg_version, mainClass: mainClassName)
info(title: 'DemoBench', vendor: 'R3', description: 'A sales and educational tool for demonstrating Corda.')
info(title: 'Corda DemoBench', vendor: 'R3', description: 'A sales and educational tool for demonstrating Corda.')
resources {
fileset(dir: "$dist_source/lib", type: 'jar') {
include(name: '*.jar')
Expand All @@ -190,12 +190,15 @@ task javapackage(dependsOn: 'distZip') {
}
}

// This is specific to the MacOSX packager.
bundleArgument(arg: 'mac.CFBundleName', value: 'Corda DemoBench')

platform {
property(name: 'java.util.logging.config.class', value: 'net.corda.demobench.config.LoggingConfig')
property(name: 'org.jboss.logging.provider', value: 'slf4j')
}

preferences(install: false)
preferences(install: true)
}
}
}
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
package net.corda.demobench

import java.io.InputStreamReader
import java.nio.charset.StandardCharsets.UTF_8
import javafx.scene.image.Image
import net.corda.demobench.views.DemoBenchView
import tornadofx.App
import tornadofx.addStageIcon
import java.io.InputStreamReader
import java.nio.charset.StandardCharsets.UTF_8

/**
* README!
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package net.corda.demobench.explorer

import net.corda.core.utilities.loggerFor
import net.corda.demobench.readErrorLines
import java.io.IOException
import java.util.concurrent.Executors
import net.corda.core.utilities.loggerFor
import net.corda.demobench.readErrorLines
import net.corda.demobench.model.NodeConfig
import net.corda.demobench.model.forceDirectory

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import net.corda.demobench.ui.CloseableTab
import org.controlsfx.dialog.ExceptionDialog
import tornadofx.*

class DemoBenchView : View("Corda Demo Bench") {
class DemoBenchView : View("Corda DemoBench") {

override val root by fxml<Parent>()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ class NodeTabView : Fragment() {
}
}

fieldset("Cordapps") {
fieldset("CorDapps") {
styleClass.addAll("cordapps-panel")

listview(cordapps) {
Expand All @@ -81,7 +81,7 @@ class NodeTabView : Fragment() {
key.consume()
}
}
button("Add Cordapp") {
button("Add CorDapp") {
setOnAction {
val app = (chooser.showOpenDialog(null) ?: return@setOnAction).toPath()
if (!cordapps.contains(app)) {
Expand Down Expand Up @@ -121,9 +121,9 @@ class NodeTabView : Fragment() {
model.webPort.value = nodeController.nextPort
model.h2Port.value = nodeController.nextPort

chooser.title = "Cordapps"
chooser.title = "CorDapps"
chooser.initialDirectory = jvm.dataHome.toFile()
chooser.extensionFilters.add(FileChooser.ExtensionFilter("Cordapps (*.jar)", "*.jar", "*.JAR"))
chooser.extensionFilters.add(FileChooser.ExtensionFilter("CorDapps (*.jar)", "*.jar", "*.JAR"))
}

private fun Pane.nodeNameField() = textfield(model.legalName) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package net.corda.demobench.web

import net.corda.core.utilities.loggerFor
import net.corda.demobench.readErrorLines
import java.io.IOException
import java.util.concurrent.Executors
import net.corda.core.utilities.loggerFor
import net.corda.demobench.readErrorLines
import net.corda.demobench.model.NodeConfig

class WebServer internal constructor(private val webServerController: WebServerController) : AutoCloseable {
Expand Down

0 comments on commit a9463eb

Please sign in to comment.