├── .gitattributes ├── .github └── workflows │ ├── dependency-graph.yml │ └── scala.yml ├── .gitignore ├── .scalafmt.conf ├── README.md ├── build.sbt ├── install4j.sbt ├── installer ├── ScalaFX_Ensemble.install4j └── icons │ ├── SFX-128.png │ ├── SFX-16.png │ ├── SFX-256.png │ ├── SFX-32.png │ ├── SFX-48.png │ └── SFX-64.png ├── project ├── build.properties ├── plugins.sbt └── sbt-install4j.sbt └── src ├── main ├── resources │ └── scalafx │ │ └── ensemble │ │ ├── audio │ │ ├── Note1.wav │ │ ├── Note2.wav │ │ ├── Note3.wav │ │ ├── Note4.wav │ │ ├── Note5.wav │ │ ├── Note6.wav │ │ ├── Note7.wav │ │ └── Note8.wav │ │ ├── css │ │ ├── HiddenSplitPane.css │ │ ├── InsetText.css │ │ └── ensemble.css │ │ ├── example │ │ ├── charts │ │ │ ├── AdvBarAudioChartSample.png │ │ │ ├── AdvCandleStickChartSample.css │ │ │ ├── AdvCandleStickChartSample.png │ │ │ ├── AdvHorizontalBarChartSample.png │ │ │ ├── AdvLineCategoryChartSample.png │ │ │ ├── AdvancedBarChartSample.png │ │ │ ├── AdvancedBubbleChartSample.png │ │ │ ├── AdvancedLineChartSample.png │ │ │ ├── AdvancedPieChartSample.png │ │ │ ├── AdvancedStockLineChartSample.png │ │ │ ├── BarChartSample.png │ │ │ ├── BubbleChartSample.png │ │ │ ├── DrilldownPieChartSample.png │ │ │ ├── ImageBarChartSample.png │ │ │ ├── LineChartSample.png │ │ │ ├── PieChartSample.png │ │ │ └── StackedBarChartSample.png │ │ ├── controls │ │ │ ├── AccordionSample.png │ │ │ ├── ButtonSample.png │ │ │ ├── CheckBoxSample.png │ │ │ ├── ChoiceBoxSample.png │ │ │ ├── ColorButtonSample.png │ │ │ ├── ColorPickerSample.png │ │ │ ├── ComboBoxSample.png │ │ │ ├── GraphicButtonSample.png │ │ │ ├── HiddenSplitPaneSample.png │ │ │ ├── HorizontalListViewSample.png │ │ │ ├── HyperlinkSample.png │ │ │ ├── MenuSample.png │ │ │ ├── PaginationSample.png │ │ │ ├── ProgressBarSample.png │ │ │ ├── ProgressIndicatorSample.png │ │ │ ├── RadioButtonSample.png │ │ │ ├── ScrollBarSample.png │ │ │ ├── SimpleListViewSample.png │ │ │ ├── StyledToolBarSample.png │ │ │ ├── TabSample.png │ │ │ ├── ToggleButtonSample.png │ │ │ ├── ToolBarSample.png │ │ │ └── TreeViewSample.png │ │ ├── effects │ │ │ ├── DropShadowSample.png │ │ │ ├── GaussianBlurSample.png │ │ │ ├── InnerShadowSample.png │ │ │ ├── ReflectionSample.png │ │ │ └── SepiaToneSample.png │ │ ├── images │ │ │ ├── ImageCreationSample.png │ │ │ ├── ImagePropertiesSample.png │ │ │ └── sanfran.jpg │ │ ├── layout │ │ │ ├── AnchorPaneSample.png │ │ │ ├── BorderPaneSample.png │ │ │ ├── FlowPaneSample.png │ │ │ ├── GridPaneSample.png │ │ │ ├── HBoxSample.png │ │ │ ├── StackPaneSample.png │ │ │ ├── TilePaneSample.png │ │ │ └── VBoxSample.png │ │ ├── shapes │ │ │ ├── ArcSample.png │ │ │ ├── CircleSample.png │ │ │ ├── CubicCurveSample.png │ │ │ ├── EllipseSample.png │ │ │ ├── LineSample.png │ │ │ ├── PathSample.png │ │ │ ├── PolygonSample.png │ │ │ ├── PolylineSample.png │ │ │ ├── QuadCurveSample.png │ │ │ └── RectangleSample.png │ │ ├── text │ │ │ ├── AdvancedLabelSample.png │ │ │ ├── InsetTextSample.png │ │ │ ├── SimpleLabelSample.png │ │ │ └── TextFieldSample.png │ │ └── web │ │ │ ├── HtmlEditorSample.png │ │ │ └── WebViewSample.png │ │ ├── images │ │ ├── CalendarTextFieldSample.png │ │ ├── HiddenSplitPaneSample.png │ │ ├── ScalaFX-icon-64x64.png │ │ ├── StyledToolBarSample.png │ │ ├── ToolBarSample.png │ │ ├── animals-200x200 │ │ │ ├── animal1.jpg │ │ │ ├── animal10.jpg │ │ │ ├── animal11.jpg │ │ │ ├── animal12.jpg │ │ │ ├── animal13.jpg │ │ │ ├── animal14.jpg │ │ │ ├── animal2.jpg │ │ │ ├── animal3.jpg │ │ │ ├── animal4.jpg │ │ │ ├── animal5.jpg │ │ │ ├── animal6.jpg │ │ │ ├── animal7.jpg │ │ │ ├── animal8.jpg │ │ │ └── animal9.jpg │ │ ├── back.png │ │ ├── boat.jpg │ │ ├── bottom-bar.png │ │ ├── clef.png │ │ ├── crumb-focused.png │ │ ├── crumb-hover.png │ │ ├── crumb-selected-focused.png │ │ ├── crumb-selected.png │ │ ├── crumb.png │ │ ├── forward.png │ │ ├── icon-48x48.png │ │ ├── icon-overlay.png │ │ ├── info-tooltip.png │ │ ├── logo.png │ │ ├── logo1.png │ │ ├── mid-bar-left.png │ │ ├── mid-bar-right.png │ │ ├── mid-bar.png │ │ ├── reload.png │ │ ├── ribbon-highlights.png │ │ ├── ribbon-new.png │ │ ├── sanfran.jpg │ │ ├── scala-logo.png │ │ ├── scalaxia128.png │ │ ├── search-text.png │ │ ├── search.png │ │ ├── settings.png │ │ ├── texture.png │ │ ├── top-bar.png │ │ ├── tree-background.png │ │ ├── window-close-over.png │ │ ├── window-close.png │ │ ├── window-corner.png │ │ ├── window-expand-over.png │ │ ├── window-expand.png │ │ ├── window-min-over.png │ │ └── window-min.png │ │ ├── sbt │ │ ├── README.md │ │ ├── build.sbt │ │ └── project │ │ │ └── build.properties │ │ └── syntaxhighlighter │ │ ├── shBrushScala.js │ │ ├── shCore.js │ │ └── shCoreDefault.css └── scala │ ├── org │ └── scalafx │ │ └── extras │ │ └── extras.scala │ └── scalafx │ └── ensemble │ ├── Ensemble.scala │ ├── EnsembleTree.scala │ ├── commons │ ├── ContentFactory.scala │ ├── DisplayablePage.scala │ ├── EnsembleExample.scala │ ├── ExampleInfo.scala │ ├── IOUtils.scala │ ├── PageDisplayer.scala │ └── SortUtils.scala │ ├── example │ ├── charts │ │ ├── DrilldownChart.css │ │ ├── EnsembleAdvCandleStickChart.scala │ │ ├── EnsembleAdvHorizontalBarChart.scala │ │ ├── EnsembleAdvLineCategoryChart.scala │ │ ├── EnsembleAdvancedBarChart.scala │ │ ├── EnsembleAdvancedBubbleChart.scala │ │ ├── EnsembleAdvancedLineChart.scala │ │ ├── EnsembleAdvancedPieChart.scala │ │ ├── EnsembleBarChart.scala │ │ ├── EnsembleBubbleChart.scala │ │ ├── EnsembleDrilldownPieChart.scala │ │ ├── EnsembleImageBarChart.scala │ │ ├── EnsembleLineChart.scala │ │ ├── EnsemblePieChart.scala │ │ ├── EnsembleStackedBarChart.scala │ │ ├── ImageBarChart.css │ │ ├── sedan-s.png │ │ ├── suv-s.png │ │ ├── truck-s.png │ │ └── van-s.png │ ├── controls │ │ ├── EnsembleAccordion.scala │ │ ├── EnsembleButton.scala │ │ ├── EnsembleCheckBox.scala │ │ ├── EnsembleChoiceBox.scala │ │ ├── EnsembleColorButton.scala │ │ ├── EnsembleColorPicker.scala │ │ ├── EnsembleComboBox.scala │ │ ├── EnsembleGraphicButton.scala │ │ ├── EnsembleHiddenSplitPane.scala │ │ ├── EnsembleHorizontalListView.scala │ │ ├── EnsembleHyperlink.scala │ │ ├── EnsembleMenu.scala │ │ ├── EnsemblePagination.scala │ │ ├── EnsembleProgressBar.scala │ │ ├── EnsembleProgressIndicator.scala │ │ ├── EnsembleRadioButton.scala │ │ ├── EnsembleScrollBar.scala │ │ ├── EnsembleSimpleListView.scala │ │ ├── EnsembleStyledToolBar.scala │ │ ├── EnsembleTab.scala │ │ ├── EnsembleToggleButton.scala │ │ ├── EnsembleToolBar.scala │ │ └── EnsembleTreeView.scala │ ├── effects │ │ ├── EnsembleDropShadow.scala │ │ ├── EnsembleGaussianBlur.scala │ │ ├── EnsembleInnerShadow.scala │ │ ├── EnsembleReflection.scala │ │ └── EnsembleSepiaTone.scala │ ├── images │ │ ├── EnsembleImageCreation.scala │ │ └── EnsembleImageProperties.scala │ ├── layout │ │ ├── EnsembleAnchorPane.scala │ │ ├── EnsembleBorderPane.scala │ │ ├── EnsembleFlowPane.scala │ │ ├── EnsembleGridPane.scala │ │ ├── EnsembleHBox.scala │ │ ├── EnsembleStackPane.scala │ │ ├── EnsembleTilePane.scala │ │ └── EnsembleVBox.scala │ ├── shapes │ │ ├── EnsembleArc.scala │ │ ├── EnsembleCircle.scala │ │ ├── EnsembleCubicCurve.scala │ │ ├── EnsembleEllipse.scala │ │ ├── EnsembleLine.scala │ │ ├── EnsemblePath.scala │ │ ├── EnsemblePolygon.scala │ │ ├── EnsemblePolyline.scala │ │ ├── EnsembleQuadCurve.scala │ │ └── EnsembleRectangle.scala │ ├── text │ │ ├── EnsembleAdvancedLabel.scala │ │ ├── EnsembleInsetText.scala │ │ ├── EnsembleSimpleLabel.scala │ │ └── EnsembleTextField.scala │ └── web │ │ ├── EnsembleHtmlEditor.scala │ │ └── EnsembleWebView.scala │ ├── sbt │ └── SBTProjectBuilder.scala │ └── stage │ ├── DashboardPage.scala │ └── EnsembleTabbedPage.scala └── test └── scala └── scalafx └── ensemble └── commons └── ExampleInfoTest.scala /.gitattributes: -------------------------------------------------------------------------------- 1 | # Set the default line separator behavior, in case people don't have core.autocrlf set. 2 | # [[https://stackoverflow.com/a/42135910]] 3 | * text=auto eol=lf -------------------------------------------------------------------------------- /.github/workflows/dependency-graph.yml: -------------------------------------------------------------------------------- 1 | # .github/workflows/dependency-graph.yml 2 | name: Update Dependency Graph 3 | on: 4 | push: 5 | branches: 6 | - master # default branch of the project 7 | jobs: 8 | dependency-graph: 9 | name: Update Dependency Graph 10 | runs-on: ubuntu-latest 11 | steps: 12 | - uses: actions/checkout@v4 13 | - uses: sbt/setup-sbt@v1 14 | - uses: scalacenter/sbt-dependency-submission@v3 15 | -------------------------------------------------------------------------------- /.github/workflows/scala.yml: -------------------------------------------------------------------------------- 1 | name: Scala CI 2 | 3 | on: 4 | push: 5 | branches: [ master ] 6 | pull_request: 7 | branches: [ master ] 8 | 9 | jobs: 10 | build: 11 | 12 | runs-on: ubuntu-latest 13 | 14 | steps: 15 | - uses: actions/checkout@v4 16 | - name: Set up JDK 24 17 | uses: actions/setup-java@v4 18 | with: 19 | java-version: '24' 20 | distribution: 'temurin' 21 | cache: sbt 22 | - uses: sbt/setup-sbt@v1 23 | - name: Run tests 24 | run: sbt +test 25 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | project/project/target/ 2 | project/project/ 3 | target/ 4 | classes 5 | .settings/ 6 | bin 7 | 8 | .cache 9 | .history 10 | .log 11 | 12 | .classpath 13 | .project 14 | /lib_managed 15 | /.idea 16 | /.idea_modules 17 | /.worksheet 18 | /installer/media/ 19 | *.install4j~ 20 | .bsp 21 | /null/ 22 | .DS_Store 23 | -------------------------------------------------------------------------------- /.scalafmt.conf: -------------------------------------------------------------------------------- 1 | version = 3.9.4 2 | 3 | runner.dialect = scala213source3 4 | 5 | 6 | preset = IntelliJ 7 | align.preset = more 8 | maxColumn = 120 9 | docstrings.style = Asterisk 10 | docstrings.blankFirstLine = yes 11 | docstrings.wrap = no 12 | importSelectors = singleLine 13 | newlines.source = keep -------------------------------------------------------------------------------- /build.sbt: -------------------------------------------------------------------------------- 1 | //import java.io.File 2 | 3 | name := "ScalaFX Ensemble" 4 | 5 | version := "24.0.0-R35" 6 | 7 | organization := "org.scalafx" 8 | 9 | val scala2Version = "2.13.16" 10 | val scala3Version = "3.6.4" 11 | // To cross compile with Scala 2 and Scala 3 12 | crossScalaVersions := Seq(scala3Version, scala2Version) 13 | scalaVersion := scala3Version 14 | 15 | libraryDependencies ++= Seq( 16 | "org.scalafx" %% "scalafx" % "24.0.0-R35", 17 | "org.scalatest" %% "scalatest" % "3.2.19" 18 | ) 19 | 20 | resolvers ++= Resolver.sonatypeOssRepos("snapshots") 21 | 22 | scalacOptions ++= Seq("-unchecked", "-deprecation") 23 | scalacOptions ++= ( 24 | CrossVersion.partialVersion(scalaVersion.value) match { 25 | case Some((3, _)) => 26 | Seq("-explain", "-explain-types") 27 | case _ => 28 | Seq("-Xlint", "-explaintypes", "-Xsource:3", "-Xmigration") 29 | } 30 | ) 31 | 32 | // Sources should also be copied to output, so the sample code, for the viewer, 33 | // can be loaded from the same file that is used to execute the example 34 | Compile / unmanagedResourceDirectories += baseDirectory(_ / "src/main/scala").value 35 | 36 | // Set the prompt (for this build) to include the project id. 37 | shellPrompt := { state => System.getProperty("user.name") + ":" + Project.extract(state).currentRef.project + "> " } 38 | 39 | // Run in separate VM, so there are no issues with double initialization of JavaFX 40 | fork := true 41 | 42 | Test / fork := true 43 | 44 | // Create file used to determine available examples at runtime. 45 | Compile / resourceGenerators += Def.task { 46 | 47 | /** 48 | * Scan source directory for available examples 49 | * Return pairs 'directory' -> 'collection of examples in that directory'. 50 | */ 51 | def loadExampleNames(inSourceDir: File): Array[(String, Array[String])] = { 52 | val examplesDir = "/scalafx/ensemble/example/" 53 | val examplePath = new File(inSourceDir, examplesDir) 54 | val exampleRootFiles = examplePath.listFiles() 55 | for (dir <- exampleRootFiles if dir.isDirectory) yield { 56 | val leaves = for (f <- dir.listFiles() if f.getName.contains(".scala")) yield { 57 | f.getName.stripSuffix(".scala").stripPrefix("Ensemble") 58 | } 59 | dir.getName.capitalize -> leaves.sorted 60 | } 61 | } 62 | 63 | /** 64 | * Create file representing names and directories for all availabe examples. 65 | * It will be loaded by the application at runtime and used to popolate example tree. 66 | */ 67 | def generateExampleTreeFile(inSourceDir: File, outSourceDir: File, templatePath: String): Seq[File] = { 68 | val exampleDirs = loadExampleNames(inSourceDir) 69 | val contents = exampleDirs.map { case (dir, leaves) => dir + " -> " + leaves.mkString(", ") }.mkString("\n") 70 | val outFile = new File(outSourceDir, templatePath) 71 | IO.write(outFile, contents) 72 | 73 | Seq(outFile) 74 | } 75 | 76 | generateExampleTreeFile( 77 | (Compile / scalaSource).value, 78 | (Compile / resourceManaged).value, 79 | "/scalafx/ensemble/example/example.tree" 80 | ) 81 | }.taskValue 82 | 83 | Compile / mainClass := Some("scalafx.ensemble.Ensemble") 84 | -------------------------------------------------------------------------------- /install4j.sbt: -------------------------------------------------------------------------------- 1 | // 2 | // Install4J Setup 3 | // 4 | 5 | exportJars := true 6 | 7 | enablePlugins(SBTInstall4J) 8 | //install4jcFile := file("C:/Program Files/install4j8/bin/install4jc.exe") 9 | install4jProjectFile := "installer/ScalaFX_Ensemble.install4j" 10 | install4jRelease := version.value 11 | //install4jVerbose := true 12 | -------------------------------------------------------------------------------- /installer/icons/SFX-128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scalafx/scalafx-ensemble/a166e7d41dc9b722c61cf80a89a3a6b7e6897a25/installer/icons/SFX-128.png -------------------------------------------------------------------------------- /installer/icons/SFX-16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scalafx/scalafx-ensemble/a166e7d41dc9b722c61cf80a89a3a6b7e6897a25/installer/icons/SFX-16.png -------------------------------------------------------------------------------- /installer/icons/SFX-256.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scalafx/scalafx-ensemble/a166e7d41dc9b722c61cf80a89a3a6b7e6897a25/installer/icons/SFX-256.png -------------------------------------------------------------------------------- /installer/icons/SFX-32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scalafx/scalafx-ensemble/a166e7d41dc9b722c61cf80a89a3a6b7e6897a25/installer/icons/SFX-32.png -------------------------------------------------------------------------------- /installer/icons/SFX-48.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scalafx/scalafx-ensemble/a166e7d41dc9b722c61cf80a89a3a6b7e6897a25/installer/icons/SFX-48.png -------------------------------------------------------------------------------- /installer/icons/SFX-64.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scalafx/scalafx-ensemble/a166e7d41dc9b722c61cf80a89a3a6b7e6897a25/installer/icons/SFX-64.png -------------------------------------------------------------------------------- /project/build.properties: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (c) 2012-2023, ScalaFX Project 3 | # All rights reserved. 4 | # 5 | # Redistribution and use in source and binary forms, with or without 6 | # modification, are permitted provided that the following conditions are met: 7 | # * Redistributions of source code must retain the above copyright 8 | # notice, this list of conditions and the following disclaimer. 9 | # * Redistributions in binary form must reproduce the above copyright 10 | # notice, this list of conditions and the following disclaimer in the 11 | # documentation and/or other materials provided with the distribution. 12 | # * Neither the name of the ScalaFX Project nor the 13 | # names of its contributors may be used to endorse or promote products 14 | # derived from this software without specific prior written permission. 15 | # 16 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 17 | # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 18 | # WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 19 | # DISCLAIMED. IN NO EVENT SHALL THE SCALAFX PROJECT OR ITS CONTRIBUTORS BE LIABLE 20 | # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 21 | # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 22 | # SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED 23 | # AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 | # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 25 | # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | # 27 | 28 | sbt.version=1.10.11 29 | 30 | -------------------------------------------------------------------------------- /project/plugins.sbt: -------------------------------------------------------------------------------- 1 | scalacOptions ++= Seq("-unchecked", "-deprecation") 2 | 3 | 4 | -------------------------------------------------------------------------------- /project/sbt-install4j.sbt: -------------------------------------------------------------------------------- 1 | // [https://github.com/jpsacha/sbt-install4j] 2 | addSbtPlugin("com.github.jpsacha" % "sbt-install4j" % "1.5.0") -------------------------------------------------------------------------------- /src/main/resources/scalafx/ensemble/audio/Note1.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scalafx/scalafx-ensemble/a166e7d41dc9b722c61cf80a89a3a6b7e6897a25/src/main/resources/scalafx/ensemble/audio/Note1.wav -------------------------------------------------------------------------------- /src/main/resources/scalafx/ensemble/audio/Note2.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scalafx/scalafx-ensemble/a166e7d41dc9b722c61cf80a89a3a6b7e6897a25/src/main/resources/scalafx/ensemble/audio/Note2.wav -------------------------------------------------------------------------------- /src/main/resources/scalafx/ensemble/audio/Note3.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scalafx/scalafx-ensemble/a166e7d41dc9b722c61cf80a89a3a6b7e6897a25/src/main/resources/scalafx/ensemble/audio/Note3.wav -------------------------------------------------------------------------------- /src/main/resources/scalafx/ensemble/audio/Note4.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scalafx/scalafx-ensemble/a166e7d41dc9b722c61cf80a89a3a6b7e6897a25/src/main/resources/scalafx/ensemble/audio/Note4.wav -------------------------------------------------------------------------------- /src/main/resources/scalafx/ensemble/audio/Note5.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scalafx/scalafx-ensemble/a166e7d41dc9b722c61cf80a89a3a6b7e6897a25/src/main/resources/scalafx/ensemble/audio/Note5.wav -------------------------------------------------------------------------------- /src/main/resources/scalafx/ensemble/audio/Note6.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scalafx/scalafx-ensemble/a166e7d41dc9b722c61cf80a89a3a6b7e6897a25/src/main/resources/scalafx/ensemble/audio/Note6.wav -------------------------------------------------------------------------------- /src/main/resources/scalafx/ensemble/audio/Note7.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scalafx/scalafx-ensemble/a166e7d41dc9b722c61cf80a89a3a6b7e6897a25/src/main/resources/scalafx/ensemble/audio/Note7.wav -------------------------------------------------------------------------------- /src/main/resources/scalafx/ensemble/audio/Note8.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scalafx/scalafx-ensemble/a166e7d41dc9b722c61cf80a89a3a6b7e6897a25/src/main/resources/scalafx/ensemble/audio/Note8.wav -------------------------------------------------------------------------------- /src/main/resources/scalafx/ensemble/css/HiddenSplitPane.css: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2012-2020, ScalaFX Ensemble Project 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * * Redistributions of source code must retain the above copyright 8 | * notice, this list of conditions and the following disclaimer. 9 | * * Redistributions in binary form must reproduce the above copyright 10 | * notice, this list of conditions and the following disclaimer in the 11 | * documentation and/or other materials provided with the distribution. 12 | * * Neither the name of the ScalaFX Project nor the 13 | * names of its contributors may be used to endorse or promote products 14 | * derived from this software without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 17 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 19 | * DISCLAIMED. IN NO EVENT SHALL THE SCALAFX PROJECT OR ITS CONTRIBUTORS BE LIABLE 20 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 21 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 22 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED 23 | * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | */ 27 | .rounded { 28 | -fx-border-color: dodgerblue; 29 | -fx-border-width: 2px; 30 | -fx-border-radius: 15px; 31 | -fx-padding: 20px; 32 | } 33 | #hiddenSplitter { 34 | -fx-background-color: null; 35 | -fx-padding: 10px; 36 | } 37 | #hiddenSplitter *.split-pane-divider, 38 | #hiddenSplitter *.vertical-grabber, 39 | #hiddenSplitter *.horizontal-grabber { 40 | -fx-background-color: null; 41 | -fx-border-color: null; 42 | -fx-padding: 5px; 43 | } -------------------------------------------------------------------------------- /src/main/resources/scalafx/ensemble/css/InsetText.css: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2012-2020, ScalaFX Ensemble Project 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * * Redistributions of source code must retain the above copyright 8 | * notice, this list of conditions and the following disclaimer. 9 | * * Redistributions in binary form must reproduce the above copyright 10 | * notice, this list of conditions and the following disclaimer in the 11 | * documentation and/or other materials provided with the distribution. 12 | * * Neither the name of the ScalaFX Project nor the 13 | * names of its contributors may be used to endorse or promote products 14 | * derived from this software without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 17 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 19 | * DISCLAIMED. IN NO EVENT SHALL THE SCALAFX PROJECT OR ITS CONTRIBUTORS BE LIABLE 20 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 21 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 22 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED 23 | * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | */ 27 | #label1 .text{ 28 | -fx-effect: dropshadow(one-pass-box , white, 0, 1 , 0, 1); 29 | } 30 | #label1 { 31 | -fx-background-color: linear-gradient( 32 | to bottom, #dbdcdd 0%, #a9a9ab 100%); 33 | -fx-padding: 6px; 34 | -fx-font-size: 1.2em; 35 | } -------------------------------------------------------------------------------- /src/main/resources/scalafx/ensemble/example/charts/AdvBarAudioChartSample.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scalafx/scalafx-ensemble/a166e7d41dc9b722c61cf80a89a3a6b7e6897a25/src/main/resources/scalafx/ensemble/example/charts/AdvBarAudioChartSample.png -------------------------------------------------------------------------------- /src/main/resources/scalafx/ensemble/example/charts/AdvCandleStickChartSample.css: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2012-2020, ScalaFX Ensemble Project 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * * Redistributions of source code must retain the above copyright 8 | * notice, this list of conditions and the following disclaimer. 9 | * * Redistributions in binary form must reproduce the above copyright 10 | * notice, this list of conditions and the following disclaimer in the 11 | * documentation and/or other materials provided with the distribution. 12 | * * Neither the name of the ScalaFX Project nor the 13 | * names of its contributors may be used to endorse or promote products 14 | * derived from this software without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 17 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 19 | * DISCLAIMED. IN NO EVENT SHALL THE SCALAFX PROJECT OR ITS CONTRIBUTORS BE LIABLE 20 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 21 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 22 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED 23 | * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | */ 27 | 28 | .candlestick-tooltip-label { 29 | -fx-font-size: 0.75em; 30 | -fx-font-weight: bold; 31 | -fx-text-fill: #666666; 32 | -fx-padding: 2 5 2 0; 33 | } 34 | .candlestick-average-line { 35 | -fx-stroke: #106ece; 36 | -fx-stroke-width: 2px; 37 | } 38 | .candlestick-candle { 39 | -fx-effect: dropshadow( two-pass-box , rgba(0,0,0,0.4) , 10, 0.0 , 2 , 4 ); 40 | } 41 | .candlestick-line { 42 | -fx-stroke: #666666; 43 | -fx-stroke-width: 3px; 44 | } 45 | .candlestick-bar { 46 | -fx-padding: 5; 47 | -demo-bar-fill: red; 48 | -fx-background-color: linear-gradient(derive(-demo-bar-fill,-30%), derive(-demo-bar-fill,-40%)), 49 | linear-gradient(derive(-demo-bar-fill,100%), derive(-demo-bar-fill, 10%)), 50 | linear-gradient(derive(-demo-bar-fill,30%), derive(-demo-bar-fill,-10%)); 51 | -fx-background-insets: 0,1,2; 52 | } 53 | .candlestick-bar.close-above-open { 54 | -demo-bar-fill: #95ce1b; 55 | } 56 | .candlestick-bar.open-above-close { 57 | -demo-bar-fill: #ce2700; 58 | } 59 | -------------------------------------------------------------------------------- /src/main/resources/scalafx/ensemble/example/charts/AdvCandleStickChartSample.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scalafx/scalafx-ensemble/a166e7d41dc9b722c61cf80a89a3a6b7e6897a25/src/main/resources/scalafx/ensemble/example/charts/AdvCandleStickChartSample.png -------------------------------------------------------------------------------- /src/main/resources/scalafx/ensemble/example/charts/AdvHorizontalBarChartSample.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scalafx/scalafx-ensemble/a166e7d41dc9b722c61cf80a89a3a6b7e6897a25/src/main/resources/scalafx/ensemble/example/charts/AdvHorizontalBarChartSample.png -------------------------------------------------------------------------------- /src/main/resources/scalafx/ensemble/example/charts/AdvLineCategoryChartSample.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scalafx/scalafx-ensemble/a166e7d41dc9b722c61cf80a89a3a6b7e6897a25/src/main/resources/scalafx/ensemble/example/charts/AdvLineCategoryChartSample.png -------------------------------------------------------------------------------- /src/main/resources/scalafx/ensemble/example/charts/AdvancedBarChartSample.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scalafx/scalafx-ensemble/a166e7d41dc9b722c61cf80a89a3a6b7e6897a25/src/main/resources/scalafx/ensemble/example/charts/AdvancedBarChartSample.png -------------------------------------------------------------------------------- /src/main/resources/scalafx/ensemble/example/charts/AdvancedBubbleChartSample.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scalafx/scalafx-ensemble/a166e7d41dc9b722c61cf80a89a3a6b7e6897a25/src/main/resources/scalafx/ensemble/example/charts/AdvancedBubbleChartSample.png -------------------------------------------------------------------------------- /src/main/resources/scalafx/ensemble/example/charts/AdvancedLineChartSample.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scalafx/scalafx-ensemble/a166e7d41dc9b722c61cf80a89a3a6b7e6897a25/src/main/resources/scalafx/ensemble/example/charts/AdvancedLineChartSample.png -------------------------------------------------------------------------------- /src/main/resources/scalafx/ensemble/example/charts/AdvancedPieChartSample.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scalafx/scalafx-ensemble/a166e7d41dc9b722c61cf80a89a3a6b7e6897a25/src/main/resources/scalafx/ensemble/example/charts/AdvancedPieChartSample.png -------------------------------------------------------------------------------- /src/main/resources/scalafx/ensemble/example/charts/AdvancedStockLineChartSample.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scalafx/scalafx-ensemble/a166e7d41dc9b722c61cf80a89a3a6b7e6897a25/src/main/resources/scalafx/ensemble/example/charts/AdvancedStockLineChartSample.png -------------------------------------------------------------------------------- /src/main/resources/scalafx/ensemble/example/charts/BarChartSample.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scalafx/scalafx-ensemble/a166e7d41dc9b722c61cf80a89a3a6b7e6897a25/src/main/resources/scalafx/ensemble/example/charts/BarChartSample.png -------------------------------------------------------------------------------- /src/main/resources/scalafx/ensemble/example/charts/BubbleChartSample.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scalafx/scalafx-ensemble/a166e7d41dc9b722c61cf80a89a3a6b7e6897a25/src/main/resources/scalafx/ensemble/example/charts/BubbleChartSample.png -------------------------------------------------------------------------------- /src/main/resources/scalafx/ensemble/example/charts/DrilldownPieChartSample.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scalafx/scalafx-ensemble/a166e7d41dc9b722c61cf80a89a3a6b7e6897a25/src/main/resources/scalafx/ensemble/example/charts/DrilldownPieChartSample.png -------------------------------------------------------------------------------- /src/main/resources/scalafx/ensemble/example/charts/ImageBarChartSample.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scalafx/scalafx-ensemble/a166e7d41dc9b722c61cf80a89a3a6b7e6897a25/src/main/resources/scalafx/ensemble/example/charts/ImageBarChartSample.png -------------------------------------------------------------------------------- /src/main/resources/scalafx/ensemble/example/charts/LineChartSample.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scalafx/scalafx-ensemble/a166e7d41dc9b722c61cf80a89a3a6b7e6897a25/src/main/resources/scalafx/ensemble/example/charts/LineChartSample.png -------------------------------------------------------------------------------- /src/main/resources/scalafx/ensemble/example/charts/PieChartSample.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scalafx/scalafx-ensemble/a166e7d41dc9b722c61cf80a89a3a6b7e6897a25/src/main/resources/scalafx/ensemble/example/charts/PieChartSample.png -------------------------------------------------------------------------------- /src/main/resources/scalafx/ensemble/example/charts/StackedBarChartSample.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scalafx/scalafx-ensemble/a166e7d41dc9b722c61cf80a89a3a6b7e6897a25/src/main/resources/scalafx/ensemble/example/charts/StackedBarChartSample.png -------------------------------------------------------------------------------- /src/main/resources/scalafx/ensemble/example/controls/AccordionSample.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scalafx/scalafx-ensemble/a166e7d41dc9b722c61cf80a89a3a6b7e6897a25/src/main/resources/scalafx/ensemble/example/controls/AccordionSample.png -------------------------------------------------------------------------------- /src/main/resources/scalafx/ensemble/example/controls/ButtonSample.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scalafx/scalafx-ensemble/a166e7d41dc9b722c61cf80a89a3a6b7e6897a25/src/main/resources/scalafx/ensemble/example/controls/ButtonSample.png -------------------------------------------------------------------------------- /src/main/resources/scalafx/ensemble/example/controls/CheckBoxSample.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scalafx/scalafx-ensemble/a166e7d41dc9b722c61cf80a89a3a6b7e6897a25/src/main/resources/scalafx/ensemble/example/controls/CheckBoxSample.png -------------------------------------------------------------------------------- /src/main/resources/scalafx/ensemble/example/controls/ChoiceBoxSample.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scalafx/scalafx-ensemble/a166e7d41dc9b722c61cf80a89a3a6b7e6897a25/src/main/resources/scalafx/ensemble/example/controls/ChoiceBoxSample.png -------------------------------------------------------------------------------- /src/main/resources/scalafx/ensemble/example/controls/ColorButtonSample.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scalafx/scalafx-ensemble/a166e7d41dc9b722c61cf80a89a3a6b7e6897a25/src/main/resources/scalafx/ensemble/example/controls/ColorButtonSample.png -------------------------------------------------------------------------------- /src/main/resources/scalafx/ensemble/example/controls/ColorPickerSample.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scalafx/scalafx-ensemble/a166e7d41dc9b722c61cf80a89a3a6b7e6897a25/src/main/resources/scalafx/ensemble/example/controls/ColorPickerSample.png -------------------------------------------------------------------------------- /src/main/resources/scalafx/ensemble/example/controls/ComboBoxSample.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scalafx/scalafx-ensemble/a166e7d41dc9b722c61cf80a89a3a6b7e6897a25/src/main/resources/scalafx/ensemble/example/controls/ComboBoxSample.png -------------------------------------------------------------------------------- /src/main/resources/scalafx/ensemble/example/controls/GraphicButtonSample.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scalafx/scalafx-ensemble/a166e7d41dc9b722c61cf80a89a3a6b7e6897a25/src/main/resources/scalafx/ensemble/example/controls/GraphicButtonSample.png -------------------------------------------------------------------------------- /src/main/resources/scalafx/ensemble/example/controls/HiddenSplitPaneSample.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scalafx/scalafx-ensemble/a166e7d41dc9b722c61cf80a89a3a6b7e6897a25/src/main/resources/scalafx/ensemble/example/controls/HiddenSplitPaneSample.png -------------------------------------------------------------------------------- /src/main/resources/scalafx/ensemble/example/controls/HorizontalListViewSample.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scalafx/scalafx-ensemble/a166e7d41dc9b722c61cf80a89a3a6b7e6897a25/src/main/resources/scalafx/ensemble/example/controls/HorizontalListViewSample.png -------------------------------------------------------------------------------- /src/main/resources/scalafx/ensemble/example/controls/HyperlinkSample.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scalafx/scalafx-ensemble/a166e7d41dc9b722c61cf80a89a3a6b7e6897a25/src/main/resources/scalafx/ensemble/example/controls/HyperlinkSample.png -------------------------------------------------------------------------------- /src/main/resources/scalafx/ensemble/example/controls/MenuSample.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scalafx/scalafx-ensemble/a166e7d41dc9b722c61cf80a89a3a6b7e6897a25/src/main/resources/scalafx/ensemble/example/controls/MenuSample.png -------------------------------------------------------------------------------- /src/main/resources/scalafx/ensemble/example/controls/PaginationSample.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scalafx/scalafx-ensemble/a166e7d41dc9b722c61cf80a89a3a6b7e6897a25/src/main/resources/scalafx/ensemble/example/controls/PaginationSample.png -------------------------------------------------------------------------------- /src/main/resources/scalafx/ensemble/example/controls/ProgressBarSample.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scalafx/scalafx-ensemble/a166e7d41dc9b722c61cf80a89a3a6b7e6897a25/src/main/resources/scalafx/ensemble/example/controls/ProgressBarSample.png -------------------------------------------------------------------------------- /src/main/resources/scalafx/ensemble/example/controls/ProgressIndicatorSample.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scalafx/scalafx-ensemble/a166e7d41dc9b722c61cf80a89a3a6b7e6897a25/src/main/resources/scalafx/ensemble/example/controls/ProgressIndicatorSample.png -------------------------------------------------------------------------------- /src/main/resources/scalafx/ensemble/example/controls/RadioButtonSample.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scalafx/scalafx-ensemble/a166e7d41dc9b722c61cf80a89a3a6b7e6897a25/src/main/resources/scalafx/ensemble/example/controls/RadioButtonSample.png -------------------------------------------------------------------------------- /src/main/resources/scalafx/ensemble/example/controls/ScrollBarSample.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scalafx/scalafx-ensemble/a166e7d41dc9b722c61cf80a89a3a6b7e6897a25/src/main/resources/scalafx/ensemble/example/controls/ScrollBarSample.png -------------------------------------------------------------------------------- /src/main/resources/scalafx/ensemble/example/controls/SimpleListViewSample.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scalafx/scalafx-ensemble/a166e7d41dc9b722c61cf80a89a3a6b7e6897a25/src/main/resources/scalafx/ensemble/example/controls/SimpleListViewSample.png -------------------------------------------------------------------------------- /src/main/resources/scalafx/ensemble/example/controls/StyledToolBarSample.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scalafx/scalafx-ensemble/a166e7d41dc9b722c61cf80a89a3a6b7e6897a25/src/main/resources/scalafx/ensemble/example/controls/StyledToolBarSample.png -------------------------------------------------------------------------------- /src/main/resources/scalafx/ensemble/example/controls/TabSample.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scalafx/scalafx-ensemble/a166e7d41dc9b722c61cf80a89a3a6b7e6897a25/src/main/resources/scalafx/ensemble/example/controls/TabSample.png -------------------------------------------------------------------------------- /src/main/resources/scalafx/ensemble/example/controls/ToggleButtonSample.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scalafx/scalafx-ensemble/a166e7d41dc9b722c61cf80a89a3a6b7e6897a25/src/main/resources/scalafx/ensemble/example/controls/ToggleButtonSample.png -------------------------------------------------------------------------------- /src/main/resources/scalafx/ensemble/example/controls/ToolBarSample.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scalafx/scalafx-ensemble/a166e7d41dc9b722c61cf80a89a3a6b7e6897a25/src/main/resources/scalafx/ensemble/example/controls/ToolBarSample.png -------------------------------------------------------------------------------- /src/main/resources/scalafx/ensemble/example/controls/TreeViewSample.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scalafx/scalafx-ensemble/a166e7d41dc9b722c61cf80a89a3a6b7e6897a25/src/main/resources/scalafx/ensemble/example/controls/TreeViewSample.png -------------------------------------------------------------------------------- /src/main/resources/scalafx/ensemble/example/effects/DropShadowSample.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scalafx/scalafx-ensemble/a166e7d41dc9b722c61cf80a89a3a6b7e6897a25/src/main/resources/scalafx/ensemble/example/effects/DropShadowSample.png -------------------------------------------------------------------------------- /src/main/resources/scalafx/ensemble/example/effects/GaussianBlurSample.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scalafx/scalafx-ensemble/a166e7d41dc9b722c61cf80a89a3a6b7e6897a25/src/main/resources/scalafx/ensemble/example/effects/GaussianBlurSample.png -------------------------------------------------------------------------------- /src/main/resources/scalafx/ensemble/example/effects/InnerShadowSample.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scalafx/scalafx-ensemble/a166e7d41dc9b722c61cf80a89a3a6b7e6897a25/src/main/resources/scalafx/ensemble/example/effects/InnerShadowSample.png -------------------------------------------------------------------------------- /src/main/resources/scalafx/ensemble/example/effects/ReflectionSample.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scalafx/scalafx-ensemble/a166e7d41dc9b722c61cf80a89a3a6b7e6897a25/src/main/resources/scalafx/ensemble/example/effects/ReflectionSample.png -------------------------------------------------------------------------------- /src/main/resources/scalafx/ensemble/example/effects/SepiaToneSample.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scalafx/scalafx-ensemble/a166e7d41dc9b722c61cf80a89a3a6b7e6897a25/src/main/resources/scalafx/ensemble/example/effects/SepiaToneSample.png -------------------------------------------------------------------------------- /src/main/resources/scalafx/ensemble/example/images/ImageCreationSample.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scalafx/scalafx-ensemble/a166e7d41dc9b722c61cf80a89a3a6b7e6897a25/src/main/resources/scalafx/ensemble/example/images/ImageCreationSample.png -------------------------------------------------------------------------------- /src/main/resources/scalafx/ensemble/example/images/ImagePropertiesSample.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scalafx/scalafx-ensemble/a166e7d41dc9b722c61cf80a89a3a6b7e6897a25/src/main/resources/scalafx/ensemble/example/images/ImagePropertiesSample.png -------------------------------------------------------------------------------- /src/main/resources/scalafx/ensemble/example/images/sanfran.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scalafx/scalafx-ensemble/a166e7d41dc9b722c61cf80a89a3a6b7e6897a25/src/main/resources/scalafx/ensemble/example/images/sanfran.jpg -------------------------------------------------------------------------------- /src/main/resources/scalafx/ensemble/example/layout/AnchorPaneSample.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scalafx/scalafx-ensemble/a166e7d41dc9b722c61cf80a89a3a6b7e6897a25/src/main/resources/scalafx/ensemble/example/layout/AnchorPaneSample.png -------------------------------------------------------------------------------- /src/main/resources/scalafx/ensemble/example/layout/BorderPaneSample.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scalafx/scalafx-ensemble/a166e7d41dc9b722c61cf80a89a3a6b7e6897a25/src/main/resources/scalafx/ensemble/example/layout/BorderPaneSample.png -------------------------------------------------------------------------------- /src/main/resources/scalafx/ensemble/example/layout/FlowPaneSample.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scalafx/scalafx-ensemble/a166e7d41dc9b722c61cf80a89a3a6b7e6897a25/src/main/resources/scalafx/ensemble/example/layout/FlowPaneSample.png -------------------------------------------------------------------------------- /src/main/resources/scalafx/ensemble/example/layout/GridPaneSample.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scalafx/scalafx-ensemble/a166e7d41dc9b722c61cf80a89a3a6b7e6897a25/src/main/resources/scalafx/ensemble/example/layout/GridPaneSample.png -------------------------------------------------------------------------------- /src/main/resources/scalafx/ensemble/example/layout/HBoxSample.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scalafx/scalafx-ensemble/a166e7d41dc9b722c61cf80a89a3a6b7e6897a25/src/main/resources/scalafx/ensemble/example/layout/HBoxSample.png -------------------------------------------------------------------------------- /src/main/resources/scalafx/ensemble/example/layout/StackPaneSample.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scalafx/scalafx-ensemble/a166e7d41dc9b722c61cf80a89a3a6b7e6897a25/src/main/resources/scalafx/ensemble/example/layout/StackPaneSample.png -------------------------------------------------------------------------------- /src/main/resources/scalafx/ensemble/example/layout/TilePaneSample.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scalafx/scalafx-ensemble/a166e7d41dc9b722c61cf80a89a3a6b7e6897a25/src/main/resources/scalafx/ensemble/example/layout/TilePaneSample.png -------------------------------------------------------------------------------- /src/main/resources/scalafx/ensemble/example/layout/VBoxSample.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scalafx/scalafx-ensemble/a166e7d41dc9b722c61cf80a89a3a6b7e6897a25/src/main/resources/scalafx/ensemble/example/layout/VBoxSample.png -------------------------------------------------------------------------------- /src/main/resources/scalafx/ensemble/example/shapes/ArcSample.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scalafx/scalafx-ensemble/a166e7d41dc9b722c61cf80a89a3a6b7e6897a25/src/main/resources/scalafx/ensemble/example/shapes/ArcSample.png -------------------------------------------------------------------------------- /src/main/resources/scalafx/ensemble/example/shapes/CircleSample.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scalafx/scalafx-ensemble/a166e7d41dc9b722c61cf80a89a3a6b7e6897a25/src/main/resources/scalafx/ensemble/example/shapes/CircleSample.png -------------------------------------------------------------------------------- /src/main/resources/scalafx/ensemble/example/shapes/CubicCurveSample.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scalafx/scalafx-ensemble/a166e7d41dc9b722c61cf80a89a3a6b7e6897a25/src/main/resources/scalafx/ensemble/example/shapes/CubicCurveSample.png -------------------------------------------------------------------------------- /src/main/resources/scalafx/ensemble/example/shapes/EllipseSample.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scalafx/scalafx-ensemble/a166e7d41dc9b722c61cf80a89a3a6b7e6897a25/src/main/resources/scalafx/ensemble/example/shapes/EllipseSample.png -------------------------------------------------------------------------------- /src/main/resources/scalafx/ensemble/example/shapes/LineSample.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scalafx/scalafx-ensemble/a166e7d41dc9b722c61cf80a89a3a6b7e6897a25/src/main/resources/scalafx/ensemble/example/shapes/LineSample.png -------------------------------------------------------------------------------- /src/main/resources/scalafx/ensemble/example/shapes/PathSample.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scalafx/scalafx-ensemble/a166e7d41dc9b722c61cf80a89a3a6b7e6897a25/src/main/resources/scalafx/ensemble/example/shapes/PathSample.png -------------------------------------------------------------------------------- /src/main/resources/scalafx/ensemble/example/shapes/PolygonSample.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scalafx/scalafx-ensemble/a166e7d41dc9b722c61cf80a89a3a6b7e6897a25/src/main/resources/scalafx/ensemble/example/shapes/PolygonSample.png -------------------------------------------------------------------------------- /src/main/resources/scalafx/ensemble/example/shapes/PolylineSample.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scalafx/scalafx-ensemble/a166e7d41dc9b722c61cf80a89a3a6b7e6897a25/src/main/resources/scalafx/ensemble/example/shapes/PolylineSample.png -------------------------------------------------------------------------------- /src/main/resources/scalafx/ensemble/example/shapes/QuadCurveSample.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scalafx/scalafx-ensemble/a166e7d41dc9b722c61cf80a89a3a6b7e6897a25/src/main/resources/scalafx/ensemble/example/shapes/QuadCurveSample.png -------------------------------------------------------------------------------- /src/main/resources/scalafx/ensemble/example/shapes/RectangleSample.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scalafx/scalafx-ensemble/a166e7d41dc9b722c61cf80a89a3a6b7e6897a25/src/main/resources/scalafx/ensemble/example/shapes/RectangleSample.png -------------------------------------------------------------------------------- /src/main/resources/scalafx/ensemble/example/text/AdvancedLabelSample.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scalafx/scalafx-ensemble/a166e7d41dc9b722c61cf80a89a3a6b7e6897a25/src/main/resources/scalafx/ensemble/example/text/AdvancedLabelSample.png -------------------------------------------------------------------------------- /src/main/resources/scalafx/ensemble/example/text/InsetTextSample.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scalafx/scalafx-ensemble/a166e7d41dc9b722c61cf80a89a3a6b7e6897a25/src/main/resources/scalafx/ensemble/example/text/InsetTextSample.png -------------------------------------------------------------------------------- /src/main/resources/scalafx/ensemble/example/text/SimpleLabelSample.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scalafx/scalafx-ensemble/a166e7d41dc9b722c61cf80a89a3a6b7e6897a25/src/main/resources/scalafx/ensemble/example/text/SimpleLabelSample.png -------------------------------------------------------------------------------- /src/main/resources/scalafx/ensemble/example/text/TextFieldSample.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scalafx/scalafx-ensemble/a166e7d41dc9b722c61cf80a89a3a6b7e6897a25/src/main/resources/scalafx/ensemble/example/text/TextFieldSample.png -------------------------------------------------------------------------------- /src/main/resources/scalafx/ensemble/example/web/HtmlEditorSample.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scalafx/scalafx-ensemble/a166e7d41dc9b722c61cf80a89a3a6b7e6897a25/src/main/resources/scalafx/ensemble/example/web/HtmlEditorSample.png -------------------------------------------------------------------------------- /src/main/resources/scalafx/ensemble/example/web/WebViewSample.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scalafx/scalafx-ensemble/a166e7d41dc9b722c61cf80a89a3a6b7e6897a25/src/main/resources/scalafx/ensemble/example/web/WebViewSample.png -------------------------------------------------------------------------------- /src/main/resources/scalafx/ensemble/images/CalendarTextFieldSample.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scalafx/scalafx-ensemble/a166e7d41dc9b722c61cf80a89a3a6b7e6897a25/src/main/resources/scalafx/ensemble/images/CalendarTextFieldSample.png -------------------------------------------------------------------------------- /src/main/resources/scalafx/ensemble/images/HiddenSplitPaneSample.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scalafx/scalafx-ensemble/a166e7d41dc9b722c61cf80a89a3a6b7e6897a25/src/main/resources/scalafx/ensemble/images/HiddenSplitPaneSample.png -------------------------------------------------------------------------------- /src/main/resources/scalafx/ensemble/images/ScalaFX-icon-64x64.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scalafx/scalafx-ensemble/a166e7d41dc9b722c61cf80a89a3a6b7e6897a25/src/main/resources/scalafx/ensemble/images/ScalaFX-icon-64x64.png -------------------------------------------------------------------------------- /src/main/resources/scalafx/ensemble/images/StyledToolBarSample.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scalafx/scalafx-ensemble/a166e7d41dc9b722c61cf80a89a3a6b7e6897a25/src/main/resources/scalafx/ensemble/images/StyledToolBarSample.png -------------------------------------------------------------------------------- /src/main/resources/scalafx/ensemble/images/ToolBarSample.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scalafx/scalafx-ensemble/a166e7d41dc9b722c61cf80a89a3a6b7e6897a25/src/main/resources/scalafx/ensemble/images/ToolBarSample.png -------------------------------------------------------------------------------- /src/main/resources/scalafx/ensemble/images/animals-200x200/animal1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scalafx/scalafx-ensemble/a166e7d41dc9b722c61cf80a89a3a6b7e6897a25/src/main/resources/scalafx/ensemble/images/animals-200x200/animal1.jpg -------------------------------------------------------------------------------- /src/main/resources/scalafx/ensemble/images/animals-200x200/animal10.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scalafx/scalafx-ensemble/a166e7d41dc9b722c61cf80a89a3a6b7e6897a25/src/main/resources/scalafx/ensemble/images/animals-200x200/animal10.jpg -------------------------------------------------------------------------------- /src/main/resources/scalafx/ensemble/images/animals-200x200/animal11.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scalafx/scalafx-ensemble/a166e7d41dc9b722c61cf80a89a3a6b7e6897a25/src/main/resources/scalafx/ensemble/images/animals-200x200/animal11.jpg -------------------------------------------------------------------------------- /src/main/resources/scalafx/ensemble/images/animals-200x200/animal12.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scalafx/scalafx-ensemble/a166e7d41dc9b722c61cf80a89a3a6b7e6897a25/src/main/resources/scalafx/ensemble/images/animals-200x200/animal12.jpg -------------------------------------------------------------------------------- /src/main/resources/scalafx/ensemble/images/animals-200x200/animal13.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scalafx/scalafx-ensemble/a166e7d41dc9b722c61cf80a89a3a6b7e6897a25/src/main/resources/scalafx/ensemble/images/animals-200x200/animal13.jpg -------------------------------------------------------------------------------- /src/main/resources/scalafx/ensemble/images/animals-200x200/animal14.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scalafx/scalafx-ensemble/a166e7d41dc9b722c61cf80a89a3a6b7e6897a25/src/main/resources/scalafx/ensemble/images/animals-200x200/animal14.jpg -------------------------------------------------------------------------------- /src/main/resources/scalafx/ensemble/images/animals-200x200/animal2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scalafx/scalafx-ensemble/a166e7d41dc9b722c61cf80a89a3a6b7e6897a25/src/main/resources/scalafx/ensemble/images/animals-200x200/animal2.jpg -------------------------------------------------------------------------------- /src/main/resources/scalafx/ensemble/images/animals-200x200/animal3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scalafx/scalafx-ensemble/a166e7d41dc9b722c61cf80a89a3a6b7e6897a25/src/main/resources/scalafx/ensemble/images/animals-200x200/animal3.jpg -------------------------------------------------------------------------------- /src/main/resources/scalafx/ensemble/images/animals-200x200/animal4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scalafx/scalafx-ensemble/a166e7d41dc9b722c61cf80a89a3a6b7e6897a25/src/main/resources/scalafx/ensemble/images/animals-200x200/animal4.jpg -------------------------------------------------------------------------------- /src/main/resources/scalafx/ensemble/images/animals-200x200/animal5.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scalafx/scalafx-ensemble/a166e7d41dc9b722c61cf80a89a3a6b7e6897a25/src/main/resources/scalafx/ensemble/images/animals-200x200/animal5.jpg -------------------------------------------------------------------------------- /src/main/resources/scalafx/ensemble/images/animals-200x200/animal6.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scalafx/scalafx-ensemble/a166e7d41dc9b722c61cf80a89a3a6b7e6897a25/src/main/resources/scalafx/ensemble/images/animals-200x200/animal6.jpg -------------------------------------------------------------------------------- /src/main/resources/scalafx/ensemble/images/animals-200x200/animal7.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scalafx/scalafx-ensemble/a166e7d41dc9b722c61cf80a89a3a6b7e6897a25/src/main/resources/scalafx/ensemble/images/animals-200x200/animal7.jpg -------------------------------------------------------------------------------- /src/main/resources/scalafx/ensemble/images/animals-200x200/animal8.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scalafx/scalafx-ensemble/a166e7d41dc9b722c61cf80a89a3a6b7e6897a25/src/main/resources/scalafx/ensemble/images/animals-200x200/animal8.jpg -------------------------------------------------------------------------------- /src/main/resources/scalafx/ensemble/images/animals-200x200/animal9.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scalafx/scalafx-ensemble/a166e7d41dc9b722c61cf80a89a3a6b7e6897a25/src/main/resources/scalafx/ensemble/images/animals-200x200/animal9.jpg -------------------------------------------------------------------------------- /src/main/resources/scalafx/ensemble/images/back.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scalafx/scalafx-ensemble/a166e7d41dc9b722c61cf80a89a3a6b7e6897a25/src/main/resources/scalafx/ensemble/images/back.png -------------------------------------------------------------------------------- /src/main/resources/scalafx/ensemble/images/boat.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scalafx/scalafx-ensemble/a166e7d41dc9b722c61cf80a89a3a6b7e6897a25/src/main/resources/scalafx/ensemble/images/boat.jpg -------------------------------------------------------------------------------- /src/main/resources/scalafx/ensemble/images/bottom-bar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scalafx/scalafx-ensemble/a166e7d41dc9b722c61cf80a89a3a6b7e6897a25/src/main/resources/scalafx/ensemble/images/bottom-bar.png -------------------------------------------------------------------------------- /src/main/resources/scalafx/ensemble/images/clef.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scalafx/scalafx-ensemble/a166e7d41dc9b722c61cf80a89a3a6b7e6897a25/src/main/resources/scalafx/ensemble/images/clef.png -------------------------------------------------------------------------------- /src/main/resources/scalafx/ensemble/images/crumb-focused.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scalafx/scalafx-ensemble/a166e7d41dc9b722c61cf80a89a3a6b7e6897a25/src/main/resources/scalafx/ensemble/images/crumb-focused.png -------------------------------------------------------------------------------- /src/main/resources/scalafx/ensemble/images/crumb-hover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scalafx/scalafx-ensemble/a166e7d41dc9b722c61cf80a89a3a6b7e6897a25/src/main/resources/scalafx/ensemble/images/crumb-hover.png -------------------------------------------------------------------------------- /src/main/resources/scalafx/ensemble/images/crumb-selected-focused.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scalafx/scalafx-ensemble/a166e7d41dc9b722c61cf80a89a3a6b7e6897a25/src/main/resources/scalafx/ensemble/images/crumb-selected-focused.png -------------------------------------------------------------------------------- /src/main/resources/scalafx/ensemble/images/crumb-selected.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scalafx/scalafx-ensemble/a166e7d41dc9b722c61cf80a89a3a6b7e6897a25/src/main/resources/scalafx/ensemble/images/crumb-selected.png -------------------------------------------------------------------------------- /src/main/resources/scalafx/ensemble/images/crumb.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scalafx/scalafx-ensemble/a166e7d41dc9b722c61cf80a89a3a6b7e6897a25/src/main/resources/scalafx/ensemble/images/crumb.png -------------------------------------------------------------------------------- /src/main/resources/scalafx/ensemble/images/forward.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scalafx/scalafx-ensemble/a166e7d41dc9b722c61cf80a89a3a6b7e6897a25/src/main/resources/scalafx/ensemble/images/forward.png -------------------------------------------------------------------------------- /src/main/resources/scalafx/ensemble/images/icon-48x48.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scalafx/scalafx-ensemble/a166e7d41dc9b722c61cf80a89a3a6b7e6897a25/src/main/resources/scalafx/ensemble/images/icon-48x48.png -------------------------------------------------------------------------------- /src/main/resources/scalafx/ensemble/images/icon-overlay.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scalafx/scalafx-ensemble/a166e7d41dc9b722c61cf80a89a3a6b7e6897a25/src/main/resources/scalafx/ensemble/images/icon-overlay.png -------------------------------------------------------------------------------- /src/main/resources/scalafx/ensemble/images/info-tooltip.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scalafx/scalafx-ensemble/a166e7d41dc9b722c61cf80a89a3a6b7e6897a25/src/main/resources/scalafx/ensemble/images/info-tooltip.png -------------------------------------------------------------------------------- /src/main/resources/scalafx/ensemble/images/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scalafx/scalafx-ensemble/a166e7d41dc9b722c61cf80a89a3a6b7e6897a25/src/main/resources/scalafx/ensemble/images/logo.png -------------------------------------------------------------------------------- /src/main/resources/scalafx/ensemble/images/logo1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scalafx/scalafx-ensemble/a166e7d41dc9b722c61cf80a89a3a6b7e6897a25/src/main/resources/scalafx/ensemble/images/logo1.png -------------------------------------------------------------------------------- /src/main/resources/scalafx/ensemble/images/mid-bar-left.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scalafx/scalafx-ensemble/a166e7d41dc9b722c61cf80a89a3a6b7e6897a25/src/main/resources/scalafx/ensemble/images/mid-bar-left.png -------------------------------------------------------------------------------- /src/main/resources/scalafx/ensemble/images/mid-bar-right.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scalafx/scalafx-ensemble/a166e7d41dc9b722c61cf80a89a3a6b7e6897a25/src/main/resources/scalafx/ensemble/images/mid-bar-right.png -------------------------------------------------------------------------------- /src/main/resources/scalafx/ensemble/images/mid-bar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scalafx/scalafx-ensemble/a166e7d41dc9b722c61cf80a89a3a6b7e6897a25/src/main/resources/scalafx/ensemble/images/mid-bar.png -------------------------------------------------------------------------------- /src/main/resources/scalafx/ensemble/images/reload.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scalafx/scalafx-ensemble/a166e7d41dc9b722c61cf80a89a3a6b7e6897a25/src/main/resources/scalafx/ensemble/images/reload.png -------------------------------------------------------------------------------- /src/main/resources/scalafx/ensemble/images/ribbon-highlights.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scalafx/scalafx-ensemble/a166e7d41dc9b722c61cf80a89a3a6b7e6897a25/src/main/resources/scalafx/ensemble/images/ribbon-highlights.png -------------------------------------------------------------------------------- /src/main/resources/scalafx/ensemble/images/ribbon-new.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scalafx/scalafx-ensemble/a166e7d41dc9b722c61cf80a89a3a6b7e6897a25/src/main/resources/scalafx/ensemble/images/ribbon-new.png -------------------------------------------------------------------------------- /src/main/resources/scalafx/ensemble/images/sanfran.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scalafx/scalafx-ensemble/a166e7d41dc9b722c61cf80a89a3a6b7e6897a25/src/main/resources/scalafx/ensemble/images/sanfran.jpg -------------------------------------------------------------------------------- /src/main/resources/scalafx/ensemble/images/scala-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scalafx/scalafx-ensemble/a166e7d41dc9b722c61cf80a89a3a6b7e6897a25/src/main/resources/scalafx/ensemble/images/scala-logo.png -------------------------------------------------------------------------------- /src/main/resources/scalafx/ensemble/images/scalaxia128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scalafx/scalafx-ensemble/a166e7d41dc9b722c61cf80a89a3a6b7e6897a25/src/main/resources/scalafx/ensemble/images/scalaxia128.png -------------------------------------------------------------------------------- /src/main/resources/scalafx/ensemble/images/search-text.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scalafx/scalafx-ensemble/a166e7d41dc9b722c61cf80a89a3a6b7e6897a25/src/main/resources/scalafx/ensemble/images/search-text.png -------------------------------------------------------------------------------- /src/main/resources/scalafx/ensemble/images/search.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scalafx/scalafx-ensemble/a166e7d41dc9b722c61cf80a89a3a6b7e6897a25/src/main/resources/scalafx/ensemble/images/search.png -------------------------------------------------------------------------------- /src/main/resources/scalafx/ensemble/images/settings.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scalafx/scalafx-ensemble/a166e7d41dc9b722c61cf80a89a3a6b7e6897a25/src/main/resources/scalafx/ensemble/images/settings.png -------------------------------------------------------------------------------- /src/main/resources/scalafx/ensemble/images/texture.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scalafx/scalafx-ensemble/a166e7d41dc9b722c61cf80a89a3a6b7e6897a25/src/main/resources/scalafx/ensemble/images/texture.png -------------------------------------------------------------------------------- /src/main/resources/scalafx/ensemble/images/top-bar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scalafx/scalafx-ensemble/a166e7d41dc9b722c61cf80a89a3a6b7e6897a25/src/main/resources/scalafx/ensemble/images/top-bar.png -------------------------------------------------------------------------------- /src/main/resources/scalafx/ensemble/images/tree-background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scalafx/scalafx-ensemble/a166e7d41dc9b722c61cf80a89a3a6b7e6897a25/src/main/resources/scalafx/ensemble/images/tree-background.png -------------------------------------------------------------------------------- /src/main/resources/scalafx/ensemble/images/window-close-over.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scalafx/scalafx-ensemble/a166e7d41dc9b722c61cf80a89a3a6b7e6897a25/src/main/resources/scalafx/ensemble/images/window-close-over.png -------------------------------------------------------------------------------- /src/main/resources/scalafx/ensemble/images/window-close.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scalafx/scalafx-ensemble/a166e7d41dc9b722c61cf80a89a3a6b7e6897a25/src/main/resources/scalafx/ensemble/images/window-close.png -------------------------------------------------------------------------------- /src/main/resources/scalafx/ensemble/images/window-corner.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scalafx/scalafx-ensemble/a166e7d41dc9b722c61cf80a89a3a6b7e6897a25/src/main/resources/scalafx/ensemble/images/window-corner.png -------------------------------------------------------------------------------- /src/main/resources/scalafx/ensemble/images/window-expand-over.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scalafx/scalafx-ensemble/a166e7d41dc9b722c61cf80a89a3a6b7e6897a25/src/main/resources/scalafx/ensemble/images/window-expand-over.png -------------------------------------------------------------------------------- /src/main/resources/scalafx/ensemble/images/window-expand.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scalafx/scalafx-ensemble/a166e7d41dc9b722c61cf80a89a3a6b7e6897a25/src/main/resources/scalafx/ensemble/images/window-expand.png -------------------------------------------------------------------------------- /src/main/resources/scalafx/ensemble/images/window-min-over.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scalafx/scalafx-ensemble/a166e7d41dc9b722c61cf80a89a3a6b7e6897a25/src/main/resources/scalafx/ensemble/images/window-min-over.png -------------------------------------------------------------------------------- /src/main/resources/scalafx/ensemble/images/window-min.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scalafx/scalafx-ensemble/a166e7d41dc9b722c61cf80a89a3a6b7e6897a25/src/main/resources/scalafx/ensemble/images/window-min.png -------------------------------------------------------------------------------- /src/main/resources/scalafx/ensemble/sbt/README.md: -------------------------------------------------------------------------------- 1 | ScalaFX Ensemble Sample Project 2 | =============================== 3 | 4 | This is a [ScalaFX](http://scalafx.org) sample project created by 5 | [ScalaFX Ensemble](http://jugchennai.github.com/scalafx-ensemble/) 6 | 7 | ScalaFX Ensemble provides examples of using ScalaFX to create graphical user interfaces. 8 | 9 | This example can be compiled and run using the [Simple Build Tool](http://www.scala-sbt.org/) (SBT). 10 | [Intellij IDEA](http://www.jetbrains.com/idea/) can import SBT configuration file `build.sbt`. 11 | [Eclipse](http://www.eclipse.org) project configurations can be generated from the SBT setup. 12 | 13 | 14 | Requirements 15 | ------------ 16 | 17 | To compile and run the project, you only need to have 18 | [Java 17](http://www.oracle.com/technetwork/java/javase/downloads/index.html) 19 | (version 17 or newer) and [SBT](http://www.scala-sbt.org/) (v.1.9 or newer) installed. 20 | All missing dependencies, including proper version of Scala and ScalaFX, will be downloaded by SBT. 21 | 22 | 23 | Compile and Run using SBT 24 | ------------------------- 25 | 26 | 1. Open command prompt 27 | 2. Change directory to where you saved the sample (directory containing this README file). 28 | 3. Type `sbt run` 29 | 30 | 31 | Import IntelliJ IDEA project configuration 32 | -------------------------------------------- 33 | 34 | 1. From IDEA select File > Open 35 | 2. Change directory to where you saved the sample (directory containing this README file). 36 | 3. Select `build.sbt` and click OK 37 | 38 | 39 | Got questions about ScalaFX? 40 | ---------------------------- 41 | 42 | To post questions or send feedback about ScalaFX Ensamble or ScalaFX in general, please use 43 | [scalafx-user](https://groups.google.com/forum/?fromgroups#!forum/scalafx-users) discussion group. 44 | 45 | -------------------------------------------------------------------------------- /src/main/resources/scalafx/ensemble/sbt/build.sbt: -------------------------------------------------------------------------------- 1 | name := "@name@" 2 | 3 | version := "1.22" 4 | 5 | scalaVersion := "3.3.1" 6 | 7 | libraryDependencies += "org.scalafx" %% "scalafx" % "21.0.0-R32" 8 | 9 | Compile / mainClass := Some("@mainClass@") 10 | 11 | // Run in separate VM, so there are no issues with double initialization of JavaFX 12 | fork := true 13 | 14 | Test / fork := true 15 | -------------------------------------------------------------------------------- /src/main/resources/scalafx/ensemble/sbt/project/build.properties: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (c) 2012-2023, ScalaFX Project 3 | # All rights reserved. 4 | # 5 | # Redistribution and use in source and binary forms, with or without 6 | # modification, are permitted provided that the following conditions are met: 7 | # * Redistributions of source code must retain the above copyright 8 | # notice, this list of conditions and the following disclaimer. 9 | # * Redistributions in binary form must reproduce the above copyright 10 | # notice, this list of conditions and the following disclaimer in the 11 | # documentation and/or other materials provided with the distribution. 12 | # * Neither the name of the ScalaFX Project nor the 13 | # names of its contributors may be used to endorse or promote products 14 | # derived from this software without specific prior written permission. 15 | # 16 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 17 | # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 18 | # WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 19 | # DISCLAIMED. IN NO EVENT SHALL THE SCALAFX PROJECT OR ITS CONTRIBUTORS BE LIABLE 20 | # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 21 | # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 22 | # SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED 23 | # AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 | # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 25 | # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | # 27 | sbt.version=1.9.7 28 | 29 | -------------------------------------------------------------------------------- /src/main/scala/scalafx/ensemble/commons/DisplayablePage.scala: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2012-2021, ScalaFX Project 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * * Redistributions of source code must retain the above copyright 8 | * notice, this list of conditions and the following disclaimer. 9 | * * Redistributions in binary form must reproduce the above copyright 10 | * notice, this list of conditions and the following disclaimer in the 11 | * documentation and/or other materials provided with the distribution. 12 | * * Neither the name of the ScalaFX Project nor the 13 | * names of its contributors may be used to endorse or promote products 14 | * derived from this software without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 17 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 19 | * DISCLAIMED. IN NO EVENT SHALL THE SCALAFX PROJECT OR ITS CONTRIBUTORS BE LIABLE 20 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 21 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 22 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED 23 | * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | */ 27 | 28 | package scalafx.ensemble.commons 29 | 30 | import scalafx.scene.Node 31 | 32 | /** 33 | * @author Jarek Sacha 34 | */ 35 | trait DisplayablePage { 36 | def getPage: Node 37 | } 38 | -------------------------------------------------------------------------------- /src/main/scala/scalafx/ensemble/commons/EnsembleExample.scala: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2012-2021, ScalaFX Project 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * * Redistributions of source code must retain the above copyright 8 | * notice, this list of conditions and the following disclaimer. 9 | * * Redistributions in binary form must reproduce the above copyright 10 | * notice, this list of conditions and the following disclaimer in the 11 | * documentation and/or other materials provided with the distribution. 12 | * * Neither the name of the ScalaFX Project nor the 13 | * names of its contributors may be used to endorse or promote products 14 | * derived from this software without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 17 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 19 | * DISCLAIMED. IN NO EVENT SHALL THE SCALAFX PROJECT OR ITS CONTRIBUTORS BE LIABLE 20 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 21 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 22 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED 23 | * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | */ 27 | 28 | package scalafx.ensemble.commons 29 | 30 | import scalafx.scene.Node 31 | 32 | /** 33 | * @author Jarek Sacha 34 | */ 35 | trait EnsembleExample { 36 | def getContent: Node 37 | } 38 | -------------------------------------------------------------------------------- /src/main/scala/scalafx/ensemble/commons/IOUtils.scala: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2012-2021, ScalaFX Project 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * * Redistributions of source code must retain the above copyright 8 | * notice, this list of conditions and the following disclaimer. 9 | * * Redistributions in binary form must reproduce the above copyright 10 | * notice, this list of conditions and the following disclaimer in the 11 | * documentation and/or other materials provided with the distribution. 12 | * * Neither the name of the ScalaFX Project nor the 13 | * names of its contributors may be used to endorse or promote products 14 | * derived from this software without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 17 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 19 | * DISCLAIMED. IN NO EVENT SHALL THE SCALAFX PROJECT OR ITS CONTRIBUTORS BE LIABLE 20 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 21 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 22 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED 23 | * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | */ 27 | 28 | package scalafx.ensemble.commons 29 | 30 | import scala.io.Source 31 | 32 | /** Helper functions related to I/O. */ 33 | object IOUtils { 34 | 35 | /** 36 | * Load a resource as a string. 37 | * 38 | * @param reference using class loader of the `reference` object to load the resource 39 | * @param path to the resource, relative to the reference, or absolute of it starts with `/` 40 | */ 41 | def loadResourceAsString(reference: Any, path: String): String = { 42 | val in = reference.getClass.getResourceAsStream(path) 43 | Source.fromInputStream(in).mkString 44 | } 45 | 46 | } 47 | -------------------------------------------------------------------------------- /src/main/scala/scalafx/ensemble/commons/PageDisplayer.scala: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2012-2020, ScalaFX Ensemble Project 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * * Redistributions of source code must retain the above copyright 8 | * notice, this list of conditions and the following disclaimer. 9 | * * Redistributions in binary form must reproduce the above copyright 10 | * notice, this list of conditions and the following disclaimer in the 11 | * documentation and/or other materials provided with the distribution. 12 | * * Neither the name of the ScalaFX Project nor the 13 | * names of its contributors may be used to endorse or promote products 14 | * derived from this software without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 17 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 19 | * DISCLAIMED. IN NO EVENT SHALL THE SCALAFX PROJECT OR ITS CONTRIBUTORS BE LIABLE 20 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 21 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 22 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED 23 | * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | */ 27 | 28 | package scalafx.ensemble.commons 29 | 30 | import scalafx.ensemble.stage.{DashboardPage, EnsembleTabbedPage} 31 | import scalafx.scene.Node 32 | import scalafx.scene.layout.{Priority, VBox} 33 | 34 | /** 35 | * the class that updates tabbed view or dashboard view 36 | * based on the TreeItem selected from left pane 37 | */ 38 | object PageDisplayer { 39 | 40 | def choosePage(value: String = "dashBoard"): Node = { 41 | value match { 42 | case "dashBoard" => displayPage(new DashboardPage()) 43 | case _ => 44 | if (value.startsWith("dashBoard - ")) { 45 | displayPage(new DashboardPage(value.split("-")(1).trim())) 46 | } else { 47 | displayPage(EnsembleTabbedPage.buildTab(value.split(">")(1).trim(), value.split(">")(0).trim())) 48 | } 49 | } 50 | } 51 | 52 | private def displayPage(nodeToAdd: DisplayablePage): Node = { 53 | new VBox { 54 | vgrow = Priority.Always 55 | hgrow = Priority.Always 56 | children = nodeToAdd.getPage 57 | } 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /src/main/scala/scalafx/ensemble/commons/SortUtils.scala: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2012-2021, ScalaFX Project 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * * Redistributions of source code must retain the above copyright 8 | * notice, this list of conditions and the following disclaimer. 9 | * * Redistributions in binary form must reproduce the above copyright 10 | * notice, this list of conditions and the following disclaimer in the 11 | * documentation and/or other materials provided with the distribution. 12 | * * Neither the name of the ScalaFX Project nor the 13 | * names of its contributors may be used to endorse or promote products 14 | * derived from this software without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 17 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 19 | * DISCLAIMED. IN NO EVENT SHALL THE SCALAFX PROJECT OR ITS CONTRIBUTORS BE LIABLE 20 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 21 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 22 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED 23 | * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | */ 27 | 28 | package scalafx.ensemble.commons 29 | 30 | import scalafx.ensemble.EnsembleThumbNail 31 | import scalafx.scene.control._ 32 | 33 | /** 34 | * utility to sort the items 35 | */ 36 | object SortUtils { 37 | 38 | def treeItemSort: (TreeItem[String], TreeItem[String]) => Boolean = (ti: TreeItem[String], t2: TreeItem[String]) => 39 | compare(ti.value(), t2.value()) 40 | 41 | def thumbNailsSort: (EnsembleThumbNail, EnsembleThumbNail) => Boolean = 42 | (t1: EnsembleThumbNail, t2: EnsembleThumbNail) => 43 | compare(t1.button.text(), t2.button.text()) 44 | 45 | def sortKeys: (String, String) => Boolean = (x: String, y: String) => compare(x, y) 46 | 47 | private def compare = (x: String, y: String) => 48 | x.compareToIgnoreCase(y) < 0 49 | } 50 | -------------------------------------------------------------------------------- /src/main/scala/scalafx/ensemble/example/charts/DrilldownChart.css: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2012-2020, ScalaFX Ensemble Project 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * * Redistributions of source code must retain the above copyright 8 | * notice, this list of conditions and the following disclaimer. 9 | * * Redistributions in binary form must reproduce the above copyright 10 | * notice, this list of conditions and the following disclaimer in the 11 | * documentation and/or other materials provided with the distribution. 12 | * * Neither the name of the ScalaFX Project nor the 13 | * names of its contributors may be used to endorse or promote products 14 | * derived from this software without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 17 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 19 | * DISCLAIMED. IN NO EVENT SHALL THE SCALAFX PROJECT OR ITS CONTRIBUTORS BE LIABLE 20 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 21 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 22 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED 23 | * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | */ 27 | 28 | .chart-pie:hover { 29 | -fx-border-color: red; 30 | -fx-border-width: 2px; 31 | } -------------------------------------------------------------------------------- /src/main/scala/scalafx/ensemble/example/charts/EnsembleAdvLineCategoryChart.scala: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2012-2020, ScalaFX Ensemble Project 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * * Redistributions of source code must retain the above copyright 8 | * notice, this list of conditions and the following disclaimer. 9 | * * Redistributions in binary form must reproduce the above copyright 10 | * notice, this list of conditions and the following disclaimer in the 11 | * documentation and/or other materials provided with the distribution. 12 | * * Neither the name of the ScalaFX Project nor the 13 | * names of its contributors may be used to endorse or promote products 14 | * derived from this software without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 17 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 19 | * DISCLAIMED. IN NO EVENT SHALL THE SCALAFX PROJECT OR ITS CONTRIBUTORS BE LIABLE 20 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 21 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 22 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED 23 | * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | */ 27 | 28 | package scalafx.ensemble.example.charts 29 | 30 | import scalafx.Includes._ 31 | import scalafx.ensemble.commons.EnsembleExample 32 | import scalafx.scene.chart.{CategoryAxis, LineChart, NumberAxis, XYChart} 33 | 34 | /** 35 | * A line chart demonstrating a CategoryAxis. 36 | * 37 | * @see scalafx.scene.chart.CategoryAxis 38 | * @see scalafx.scene.chart.Chart 39 | * @see scalafx.scene.chart.NumberAxis 40 | * @see scalafx.scene.chart.LineChart 41 | * @see scalafx.scene.chart.XYChart 42 | */ 43 | class EnsembleAdvLineCategoryChart extends EnsembleExample { 44 | def getContent: LineChart[String, Number] = { 45 | // add starting data 46 | val series = new XYChart.Series[String, Number] { 47 | name = "Data Series 1" 48 | // create sample data 49 | data = Seq( 50 | XYChart.Data[String, Number]("Alpha", 50d), 51 | XYChart.Data[String, Number]("Beta", 80d), 52 | XYChart.Data[String, Number]("RC1", 90d), 53 | XYChart.Data[String, Number]("RC2", 30d), 54 | XYChart.Data[String, Number]("1.0", 120d), 55 | XYChart.Data[String, Number]("1.1", 20d) 56 | ) 57 | } 58 | 59 | // setup chart 60 | new LineChart[String, Number](CategoryAxis("X Axis"), NumberAxis("Y Axis")) { 61 | title = "LineChart with Category Axis" 62 | data() += series 63 | } 64 | } 65 | } 66 | -------------------------------------------------------------------------------- /src/main/scala/scalafx/ensemble/example/charts/EnsembleAdvancedBubbleChart.scala: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2012-2021, ScalaFX Project 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * * Redistributions of source code must retain the above copyright 8 | * notice, this list of conditions and the following disclaimer. 9 | * * Redistributions in binary form must reproduce the above copyright 10 | * notice, this list of conditions and the following disclaimer in the 11 | * documentation and/or other materials provided with the distribution. 12 | * * Neither the name of the ScalaFX Project nor the 13 | * names of its contributors may be used to endorse or promote products 14 | * derived from this software without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 17 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 19 | * DISCLAIMED. IN NO EVENT SHALL THE SCALAFX PROJECT OR ITS CONTRIBUTORS BE LIABLE 20 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 21 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 22 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED 23 | * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | */ 27 | 28 | package scalafx.ensemble.example.charts 29 | 30 | import scalafx.collections.ObservableBuffer 31 | import scalafx.ensemble.commons.EnsembleExample 32 | import scalafx.scene.chart.{BubbleChart, NumberAxis, XYChart} 33 | 34 | import scala.math.random 35 | 36 | /** 37 | * An advanced bubble chart. 38 | * 39 | * @see scalafx.scene.chart.BubbleChart 40 | * @see scalafx.scene.chart.Chart 41 | * @see scalafx.scene.chart.NumberAxis 42 | * @see scalafx.scene.chart.ScatterChart 43 | * @see scalafx.scene.chart.XYChart 44 | */ 45 | class EnsembleAdvancedBubbleChart extends EnsembleExample { 46 | 47 | def getContent: BubbleChart[Number, Number] = { 48 | // Generate some random data 49 | def randomData = (1 to 20).map(_ => XYChart.Data[Number, Number](random() * 100, random() * 100, random() * 10)) 50 | 51 | val bcSeries1 = XYChart.Series("Data Series 1", ObservableBuffer.from(randomData)) 52 | val bcSeries2 = XYChart.Series("Data Series 2", ObservableBuffer.from(randomData)) 53 | 54 | // Create Bubble Chart 55 | new BubbleChart(NumberAxis("X Axis"), NumberAxis("Y Axis")) { 56 | title = "Advanced BubbleChart" 57 | data = Seq(bcSeries1, bcSeries2) 58 | } 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /src/main/scala/scalafx/ensemble/example/charts/EnsembleAdvancedLineChart.scala: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2012-2020, ScalaFX Ensemble Project 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * * Redistributions of source code must retain the above copyright 8 | * notice, this list of conditions and the following disclaimer. 9 | * * Redistributions in binary form must reproduce the above copyright 10 | * notice, this list of conditions and the following disclaimer in the 11 | * documentation and/or other materials provided with the distribution. 12 | * * Neither the name of the ScalaFX Project nor the 13 | * names of its contributors may be used to endorse or promote products 14 | * derived from this software without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 17 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 19 | * DISCLAIMED. IN NO EVENT SHALL THE SCALAFX PROJECT OR ITS CONTRIBUTORS BE LIABLE 20 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 21 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 22 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED 23 | * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | */ 27 | 28 | package scalafx.ensemble.example.charts 29 | 30 | import scalafx.Includes._ 31 | import scalafx.ensemble.commons.EnsembleExample 32 | import scalafx.scene.chart.{LineChart, NumberAxis, XYChart} 33 | 34 | /** 35 | * An advanced line chart. 36 | * 37 | * @see scalafx.scene.chart.LineChart 38 | * @see scalafx.scene.chart.Chart 39 | * @see scalafx.scene.chart.NumberAxis 40 | * @see scalafx.scene.chart.XYChart 41 | */ 42 | class EnsembleAdvancedLineChart extends EnsembleExample { 43 | 44 | def getContent: LineChart[Number, Number] = { 45 | 46 | // Create sample data. Here we use a collection of (x,y) pairs 47 | val xyData = Seq( 48 | 20d -> 50d, 49 | 40d -> 80d, 50 | 50d -> 90d, 51 | 70d -> 30d, 52 | 170d -> 122d 53 | ) 54 | 55 | // Prepare series 56 | val series = new XYChart.Series[Number, Number] { 57 | name = "Data Series 1" 58 | data() ++= xyData.map { 59 | case (x, y) => XYChart.Data[Number, Number](x, y) 60 | } 61 | } 62 | 63 | // setup Line chart 64 | new LineChart(NumberAxis("X Axis"), NumberAxis("Y Axis")) { 65 | title = "Basic LineChart" 66 | data() += series 67 | } 68 | } 69 | } 70 | -------------------------------------------------------------------------------- /src/main/scala/scalafx/ensemble/example/charts/EnsembleAdvancedPieChart.scala: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2012-2021, ScalaFX Project 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * * Redistributions of source code must retain the above copyright 8 | * notice, this list of conditions and the following disclaimer. 9 | * * Redistributions in binary form must reproduce the above copyright 10 | * notice, this list of conditions and the following disclaimer in the 11 | * documentation and/or other materials provided with the distribution. 12 | * * Neither the name of the ScalaFX Project nor the 13 | * names of its contributors may be used to endorse or promote products 14 | * derived from this software without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 17 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 19 | * DISCLAIMED. IN NO EVENT SHALL THE SCALAFX PROJECT OR ITS CONTRIBUTORS BE LIABLE 20 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 21 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 22 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED 23 | * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | */ 27 | 28 | package scalafx.ensemble.example.charts 29 | 30 | import scalafx.ensemble.commons.EnsembleExample 31 | import scalafx.scene.chart.PieChart 32 | 33 | /** 34 | * An advanced pie chart. 35 | * 36 | * @see scalafx.scene.chart.PieChart 37 | * @see scalafx.scene.chart.Chart 38 | */ 39 | class EnsembleAdvancedPieChart extends EnsembleExample { 40 | 41 | def getContent: PieChart = { 42 | val data1 = PieChart.Data("Sun", 20) 43 | val data2 = PieChart.Data("IBM", 12) 44 | val data3 = PieChart.Data("HP", 25) 45 | val data4 = PieChart.Data("Dell", 22) 46 | val data5 = PieChart.Data("Apple", 30) 47 | 48 | new PieChart { 49 | data = Seq(data1, data2, data3, data4, data5) 50 | id = "Advanced Pie Chart" 51 | title = "Pie Chart Sample" 52 | } 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /src/main/scala/scalafx/ensemble/example/charts/EnsembleImageBarChart.scala: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2012-2020, ScalaFX Ensemble Project 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * * Redistributions of source code must retain the above copyright 8 | * notice, this list of conditions and the following disclaimer. 9 | * * Redistributions in binary form must reproduce the above copyright 10 | * notice, this list of conditions and the following disclaimer in the 11 | * documentation and/or other materials provided with the distribution. 12 | * * Neither the name of the ScalaFX Project nor the 13 | * names of its contributors may be used to endorse or promote products 14 | * derived from this software without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 17 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 19 | * DISCLAIMED. IN NO EVENT SHALL THE SCALAFX PROJECT OR ITS CONTRIBUTORS BE LIABLE 20 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 21 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 22 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED 23 | * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | */ 27 | 28 | package scalafx.ensemble.example.charts 29 | 30 | import scalafx.ensemble.commons.EnsembleExample 31 | import scalafx.scene.chart.{BarChart, CategoryAxis, NumberAxis, XYChart} 32 | 33 | /** 34 | * A bar chart that uses CSS to display stacks of car images to indicate data values 35 | * for categories. 36 | * 37 | * @see scalafx.scene.chart.BarChart 38 | * @see scalafx.scene.chart.Chart 39 | * @see scalafx.scene.chart.CategoryAxis 40 | * @see scalafx.scene.chart.NumberAxis 41 | * @resource ImageBarChart.css 42 | * @resource sedan-s.png 43 | * @resource suv-s.png 44 | * @resource truck-s.png 45 | * @resource van-s.png 46 | */ 47 | class EnsembleImageBarChart extends EnsembleExample { 48 | 49 | def getContent: BarChart[String, Number] = new BarChart(new CategoryAxis(), new NumberAxis()) { 50 | legendVisible = false 51 | stylesheets += this.getClass.getResource("ImageBarChart.css").toExternalForm 52 | data = new XYChart.Series[String, Number]() { 53 | name = "Sales Per Product" 54 | data = Seq( 55 | XYChart.Data[String, Number]("SUV", 120), 56 | XYChart.Data[String, Number]("Sedan", 50), 57 | XYChart.Data[String, Number]("Truck", 180), 58 | XYChart.Data[String, Number]("Van", 20) 59 | ) 60 | } 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /src/main/scala/scalafx/ensemble/example/charts/EnsemblePieChart.scala: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2012-2021, ScalaFX Project 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * * Redistributions of source code must retain the above copyright 8 | * notice, this list of conditions and the following disclaimer. 9 | * * Redistributions in binary form must reproduce the above copyright 10 | * notice, this list of conditions and the following disclaimer in the 11 | * documentation and/or other materials provided with the distribution. 12 | * * Neither the name of the ScalaFX Project nor the 13 | * names of its contributors may be used to endorse or promote products 14 | * derived from this software without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 17 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 19 | * DISCLAIMED. IN NO EVENT SHALL THE SCALAFX PROJECT OR ITS CONTRIBUTORS BE LIABLE 20 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 21 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 22 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED 23 | * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | */ 27 | 28 | package scalafx.ensemble.example.charts 29 | 30 | import scalafx.ensemble.commons.EnsembleExample 31 | import scalafx.scene.chart.PieChart 32 | 33 | /** 34 | * A circular chart divided into segments. The value of each segment represents 35 | * a proportion of the total. 36 | * 37 | * @see scalafx.scene.chart.PieChart 38 | * @see scalafx.scene.chart.Chart 39 | */ 40 | class EnsemblePieChart extends EnsembleExample { 41 | 42 | def getContent: PieChart = new PieChart { 43 | data = Seq( 44 | PieChart.Data("Sun", 20), 45 | PieChart.Data("IBM", 12), 46 | PieChart.Data("HP", 25), 47 | PieChart.Data("Dell", 22), 48 | PieChart.Data("Apple", 30) 49 | ) 50 | clockwise = false 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /src/main/scala/scalafx/ensemble/example/charts/ImageBarChart.css: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2012-2021, ScalaFX Project 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * * Redistributions of source code must retain the above copyright 8 | * notice, this list of conditions and the following disclaimer. 9 | * * Redistributions in binary form must reproduce the above copyright 10 | * notice, this list of conditions and the following disclaimer in the 11 | * documentation and/or other materials provided with the distribution. 12 | * * Neither the name of the ScalaFX Project nor the 13 | * names of its contributors may be used to endorse or promote products 14 | * derived from this software without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 17 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 19 | * DISCLAIMED. IN NO EVENT SHALL THE SCALAFX PROJECT OR ITS CONTRIBUTORS BE LIABLE 20 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 21 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 22 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED 23 | * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | */ 27 | 28 | chart { 29 | -fx-background-color: -fx-box-border, #f5f5f5; 30 | -fx-background-insets: 0, 1; 31 | -fx-font-size: 0.9em; 32 | } 33 | 34 | .chart-bar { 35 | -fx-background-color: rgba(0, 168, 355, 0.05); 36 | -fx-border-color: rgba(0, 168, 355, 0.3) rgba(0, 168, 355, 0.3) transparent rgba(0, 168, 355, 0.3); 37 | -fx-background-radius: 0; 38 | -fx-background-position: center bottom; 39 | -fx-background-repeat: no-repeat space; 40 | -fx-background-image: url("van-s.png"); 41 | } 42 | 43 | .data0.chart-bar { 44 | -fx-background-image: url("suv-s.png"); 45 | } 46 | 47 | .data1.chart-bar { 48 | -fx-background-image: url("sedan-s.png"); 49 | } 50 | 51 | .data2.chart-bar { 52 | -fx-background-image: url("truck-s.png"); 53 | } -------------------------------------------------------------------------------- /src/main/scala/scalafx/ensemble/example/charts/sedan-s.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scalafx/scalafx-ensemble/a166e7d41dc9b722c61cf80a89a3a6b7e6897a25/src/main/scala/scalafx/ensemble/example/charts/sedan-s.png -------------------------------------------------------------------------------- /src/main/scala/scalafx/ensemble/example/charts/suv-s.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scalafx/scalafx-ensemble/a166e7d41dc9b722c61cf80a89a3a6b7e6897a25/src/main/scala/scalafx/ensemble/example/charts/suv-s.png -------------------------------------------------------------------------------- /src/main/scala/scalafx/ensemble/example/charts/truck-s.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scalafx/scalafx-ensemble/a166e7d41dc9b722c61cf80a89a3a6b7e6897a25/src/main/scala/scalafx/ensemble/example/charts/truck-s.png -------------------------------------------------------------------------------- /src/main/scala/scalafx/ensemble/example/charts/van-s.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scalafx/scalafx-ensemble/a166e7d41dc9b722c61cf80a89a3a6b7e6897a25/src/main/scala/scalafx/ensemble/example/charts/van-s.png -------------------------------------------------------------------------------- /src/main/scala/scalafx/ensemble/example/controls/EnsembleAccordion.scala: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2012-2021, ScalaFX Project 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * * Redistributions of source code must retain the above copyright 8 | * notice, this list of conditions and the following disclaimer. 9 | * * Redistributions in binary form must reproduce the above copyright 10 | * notice, this list of conditions and the following disclaimer in the 11 | * documentation and/or other materials provided with the distribution. 12 | * * Neither the name of the ScalaFX Project nor the 13 | * names of its contributors may be used to endorse or promote products 14 | * derived from this software without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 17 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 19 | * DISCLAIMED. IN NO EVENT SHALL THE SCALAFX PROJECT OR ITS CONTRIBUTORS BE LIABLE 20 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 21 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 22 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED 23 | * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | */ 27 | 28 | package scalafx.ensemble.example.controls 29 | 30 | import scalafx.ensemble.commons.EnsembleExample 31 | import scalafx.geometry.Insets 32 | import scalafx.scene.control._ 33 | import scalafx.scene.layout.StackPane 34 | 35 | /** 36 | * An example of an accordion control. You can use accordion controls to define 37 | * individual panes and display them one at a time. 38 | * 39 | * @see scalafx.scene.control.Accordion 40 | * @related controls/ToggleButton 41 | * @related controls/ToolBar 42 | */ 43 | class EnsembleAccordion extends EnsembleExample { 44 | 45 | // @stage-property resizable = false 46 | // @stage-property width = 200 47 | // @stage-property height = 200 48 | 49 | def getContent: StackPane = new StackPane { 50 | padding = Insets(10) 51 | children = new Accordion { 52 | maxWidth = 150 53 | maxHeight = 150 54 | panes = List( 55 | new TitledPane { 56 | text = "Ensemble Button 1" 57 | content = new Button("Button 1") 58 | }, 59 | new TitledPane { 60 | text = "Ensemble TextField 1" 61 | content = new TextField { 62 | promptText = "Hi! Scalafx Ensemble!" 63 | } 64 | }, 65 | new TitledPane { 66 | text = "Ensemble CheckBox 1" 67 | content = new CheckBox { 68 | text = "CheckBox 1" 69 | } 70 | } 71 | ) 72 | } 73 | } 74 | } 75 | -------------------------------------------------------------------------------- /src/main/scala/scalafx/ensemble/example/controls/EnsembleButton.scala: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2012-2021, ScalaFX Project 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * * Redistributions of source code must retain the above copyright 8 | * notice, this list of conditions and the following disclaimer. 9 | * * Redistributions in binary form must reproduce the above copyright 10 | * notice, this list of conditions and the following disclaimer in the 11 | * documentation and/or other materials provided with the distribution. 12 | * * Neither the name of the ScalaFX Project nor the 13 | * names of its contributors may be used to endorse or promote products 14 | * derived from this software without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 17 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 19 | * DISCLAIMED. IN NO EVENT SHALL THE SCALAFX PROJECT OR ITS CONTRIBUTORS BE LIABLE 20 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 21 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 22 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED 23 | * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | */ 27 | 28 | package scalafx.ensemble.example.controls 29 | 30 | import scalafx.ensemble.commons.EnsembleExample 31 | import scalafx.geometry.{Insets, Orientation} 32 | import scalafx.scene.control.Button 33 | import scalafx.scene.layout.TilePane 34 | 35 | /** Example of organizing buttons in column, of the same width. */ 36 | class EnsembleButton extends EnsembleExample { 37 | 38 | def getContent: TilePane = new TilePane { 39 | padding = Insets(10) 40 | orientation = Orientation.Vertical 41 | hgap = 10 42 | vgap = 10 43 | children = List( 44 | new Button { 45 | text = "Button 1" 46 | maxWidth = Double.MaxValue 47 | }, 48 | new Button { 49 | text = "Default Button - Enter Key" 50 | defaultButton = true 51 | maxWidth = Double.MaxValue 52 | }, 53 | new Button { 54 | text = "Cancel Button - Esc Key" 55 | cancelButton = true 56 | maxWidth = Double.MaxValue 57 | }, 58 | new Button { 59 | text = "Disabled Button" 60 | disable = true 61 | maxWidth = Double.MaxValue 62 | } 63 | ) 64 | } 65 | } 66 | -------------------------------------------------------------------------------- /src/main/scala/scalafx/ensemble/example/controls/EnsembleCheckBox.scala: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2012-2021, ScalaFX Project 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * * Redistributions of source code must retain the above copyright 8 | * notice, this list of conditions and the following disclaimer. 9 | * * Redistributions in binary form must reproduce the above copyright 10 | * notice, this list of conditions and the following disclaimer in the 11 | * documentation and/or other materials provided with the distribution. 12 | * * Neither the name of the ScalaFX Project nor the 13 | * names of its contributors may be used to endorse or promote products 14 | * derived from this software without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 17 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 19 | * DISCLAIMED. IN NO EVENT SHALL THE SCALAFX PROJECT OR ITS CONTRIBUTORS BE LIABLE 20 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 21 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 22 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED 23 | * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | */ 27 | 28 | package scalafx.ensemble.example.controls 29 | 30 | import scalafx.ensemble.commons.EnsembleExample 31 | import scalafx.geometry.Insets 32 | import scalafx.scene.control.CheckBox 33 | import scalafx.scene.layout.{Priority, VBox} 34 | 35 | /** 36 | * * An example of checkboxes in various states. 37 | * 38 | * @see scalafx.scene.control.CheckBox 39 | * @related controls/buttons/GraphicButton 40 | * @related controls/buttons/RadioButtons 41 | */ 42 | class EnsembleCheckBox extends EnsembleExample { 43 | 44 | def getContent: VBox = new VBox { 45 | vgrow = Priority.Always 46 | hgrow = Priority.Always 47 | spacing = 10 48 | padding = Insets(20) 49 | children = List( 50 | new CheckBox { 51 | text = "Simple CheckBox" 52 | }, 53 | new CheckBox { 54 | text = "Three state checkbox" 55 | allowIndeterminate = true 56 | indeterminate = false 57 | }, 58 | new CheckBox { 59 | text = "Disabled" 60 | selected = true 61 | disable = true 62 | } 63 | ) 64 | } 65 | } 66 | -------------------------------------------------------------------------------- /src/main/scala/scalafx/ensemble/example/controls/EnsembleChoiceBox.scala: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2012-2021, ScalaFX Project 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * * Redistributions of source code must retain the above copyright 8 | * notice, this list of conditions and the following disclaimer. 9 | * * Redistributions in binary form must reproduce the above copyright 10 | * notice, this list of conditions and the following disclaimer in the 11 | * documentation and/or other materials provided with the distribution. 12 | * * Neither the name of the ScalaFX Project nor the 13 | * names of its contributors may be used to endorse or promote products 14 | * derived from this software without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 17 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 19 | * DISCLAIMED. IN NO EVENT SHALL THE SCALAFX PROJECT OR ITS CONTRIBUTORS BE LIABLE 20 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 21 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 22 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED 23 | * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | */ 27 | 28 | package scalafx.ensemble.example.controls 29 | 30 | import scalafx.collections.ObservableBuffer 31 | import scalafx.ensemble.commons.EnsembleExample 32 | import scalafx.geometry.Insets 33 | import scalafx.scene.control.ChoiceBox 34 | import scalafx.scene.layout.VBox 35 | 36 | /** 37 | * A sample that shows a choice box with several options. The ChoiceBox control 38 | * displays a default or current selection, with an icon to click that expands 39 | * the list for a selection. 40 | * 41 | * @see scalafx.scene.control.ChoiceBox 42 | * @related controls/CheckBoxes 43 | * @related controls/ToggleButton 44 | * @related controls/ToolBar 45 | */ 46 | class EnsembleChoiceBox extends EnsembleExample { 47 | 48 | def getContent: VBox = new VBox { 49 | spacing = 10 50 | padding = Insets(20) 51 | children = new ChoiceBox[String]() { 52 | maxWidth = 80 53 | maxHeight = 50 54 | items = ObservableBuffer("Earth", "Sky", "Paradise") 55 | selectionModel().selectFirst() 56 | } 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /src/main/scala/scalafx/ensemble/example/controls/EnsembleColorButton.scala: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2012-2021, ScalaFX Project 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * * Redistributions of source code must retain the above copyright 8 | * notice, this list of conditions and the following disclaimer. 9 | * * Redistributions in binary form must reproduce the above copyright 10 | * notice, this list of conditions and the following disclaimer in the 11 | * documentation and/or other materials provided with the distribution. 12 | * * Neither the name of the ScalaFX Project nor the 13 | * names of its contributors may be used to endorse or promote products 14 | * derived from this software without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 17 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 19 | * DISCLAIMED. IN NO EVENT SHALL THE SCALAFX PROJECT OR ITS CONTRIBUTORS BE LIABLE 20 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 21 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 22 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED 23 | * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | */ 27 | 28 | package scalafx.ensemble.example.controls 29 | 30 | import scalafx.ensemble.commons.EnsembleExample 31 | import scalafx.geometry.Insets 32 | import scalafx.scene.control.Button 33 | import scalafx.scene.layout.{Priority, VBox} 34 | 35 | /** 36 | * Buttons with different background colors. 37 | * 38 | * @see scalafx.scene.control.Button 39 | * @related controls/buttons/GraphicButton 40 | * @related controls/buttons/HyperlinkSample 41 | */ 42 | class EnsembleColorButton extends EnsembleExample { 43 | 44 | def getContent: VBox = new VBox { 45 | vgrow = Priority.Always 46 | hgrow = Priority.Always 47 | spacing = 10 48 | padding = Insets(20) 49 | children = List( 50 | new Button { 51 | maxWidth = 200 52 | maxHeight = 150 53 | text = "Color Button 1" 54 | style = "-fx-base: red" 55 | }, 56 | new Button { 57 | maxWidth = 200 58 | maxHeight = 150 59 | text = "Color Button 2" 60 | style = "-fx-base: green " 61 | }, 62 | new Button { 63 | maxWidth = 200 64 | maxHeight = 150 65 | text = "Color Button 3" 66 | style = "-fx-base: Yellow" 67 | }, 68 | new Button { 69 | maxWidth = 200 70 | maxHeight = 150 71 | text = "Color Button 4" 72 | style = "-fx-base: Orange" 73 | } 74 | ) 75 | } 76 | } 77 | -------------------------------------------------------------------------------- /src/main/scala/scalafx/ensemble/example/controls/EnsembleComboBox.scala: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2012-2021, ScalaFX Project 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * * Redistributions of source code must retain the above copyright 8 | * notice, this list of conditions and the following disclaimer. 9 | * * Redistributions in binary form must reproduce the above copyright 10 | * notice, this list of conditions and the following disclaimer in the 11 | * documentation and/or other materials provided with the distribution. 12 | * * Neither the name of the ScalaFX Project nor the 13 | * names of its contributors may be used to endorse or promote products 14 | * derived from this software without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 17 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 19 | * DISCLAIMED. IN NO EVENT SHALL THE SCALAFX PROJECT OR ITS CONTRIBUTORS BE LIABLE 20 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 21 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 22 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED 23 | * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | */ 27 | 28 | package scalafx.ensemble.example.controls 29 | 30 | import scalafx.collections.ObservableBuffer 31 | import scalafx.ensemble.commons.EnsembleExample 32 | import scalafx.geometry.Insets 33 | import scalafx.scene.control.ComboBox 34 | import scalafx.scene.layout.{Priority, VBox} 35 | 36 | /** 37 | * A sample that shows both an un-editable and an editable ComboBox. 38 | * 39 | * @see scalafx.scene.control.ComboBox 40 | * @see scalafx.scene.control.ComboBoxBuilder 41 | */ 42 | class EnsembleComboBox extends EnsembleExample { 43 | 44 | val strings: ObservableBuffer[String] = ObservableBuffer( 45 | "Option 1", 46 | "Option 2", 47 | "Option 3", 48 | "Option 4", 49 | "Option 5", 50 | "Option 6", 51 | "Longer ComboBox item", 52 | "Option 7", 53 | "Option 8", 54 | "Option 9", 55 | "Option 10", 56 | "Option 12" 57 | ) 58 | 59 | def getContent: VBox = { 60 | new VBox { 61 | vgrow = Priority.Always 62 | hgrow = Priority.Always 63 | spacing = 15 64 | padding = Insets(20) 65 | children = List( 66 | new ComboBox[String]() { 67 | maxWidth = 200 68 | promptText = "Make a choice..." 69 | items = strings 70 | }, 71 | new ComboBox[String]() { 72 | maxWidth = 200 73 | promptText = "Edit or Choose..." 74 | editable = true 75 | items = strings 76 | } 77 | ) 78 | } 79 | } 80 | } 81 | -------------------------------------------------------------------------------- /src/main/scala/scalafx/ensemble/example/controls/EnsembleGraphicButton.scala: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2012-2021, ScalaFX Project 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * * Redistributions of source code must retain the above copyright 8 | * notice, this list of conditions and the following disclaimer. 9 | * * Redistributions in binary form must reproduce the above copyright 10 | * notice, this list of conditions and the following disclaimer in the 11 | * documentation and/or other materials provided with the distribution. 12 | * * Neither the name of the ScalaFX Project nor the 13 | * names of its contributors may be used to endorse or promote products 14 | * derived from this software without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 17 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 19 | * DISCLAIMED. IN NO EVENT SHALL THE SCALAFX PROJECT OR ITS CONTRIBUTORS BE LIABLE 20 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 21 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 22 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED 23 | * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | */ 27 | 28 | package scalafx.ensemble.example.controls 29 | 30 | import scalafx.ensemble.commons.EnsembleExample 31 | import scalafx.geometry.Insets 32 | import scalafx.scene.control.Button 33 | import scalafx.scene.image.{Image, ImageView} 34 | import scalafx.scene.layout.StackPane 35 | 36 | /** 37 | * A button with an embedded image. 38 | * 39 | * @see scalafx.scene.control.Button 40 | * @related controls/CheckBoxes 41 | * @related controls/RadioButtons 42 | * @resource /scalafx/ensemble/images/icon-48x48.png 43 | */ 44 | class EnsembleGraphicButton extends EnsembleExample { 45 | def getContent: StackPane = new StackPane { 46 | padding = Insets(20) 47 | children = new Button { 48 | maxWidth = 170 49 | maxHeight = 50 50 | text = "Graphic Button" 51 | graphic = new ImageView { 52 | image = new Image(this.getClass.getResourceAsStream("/scalafx/ensemble/images/icon-48x48.png")) 53 | margin = Insets(0, 0, 0, 10) 54 | } 55 | } 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /src/main/scala/scalafx/ensemble/example/controls/EnsembleHiddenSplitPane.scala: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2012-2020, ScalaFX Ensemble Project 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * * Redistributions of source code must retain the above copyright 8 | * notice, this list of conditions and the following disclaimer. 9 | * * Redistributions in binary form must reproduce the above copyright 10 | * notice, this list of conditions and the following disclaimer in the 11 | * documentation and/or other materials provided with the distribution. 12 | * * Neither the name of the ScalaFX Project nor the 13 | * names of its contributors may be used to endorse or promote products 14 | * derived from this software without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 17 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 19 | * DISCLAIMED. IN NO EVENT SHALL THE SCALAFX PROJECT OR ITS CONTRIBUTORS BE LIABLE 20 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 21 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 22 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED 23 | * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | */ 27 | 28 | package scalafx.ensemble.example.controls 29 | 30 | import scalafx.ensemble.commons.EnsembleExample 31 | import scalafx.geometry.Insets 32 | import scalafx.scene.control.SplitPane 33 | import scalafx.scene.layout.{Region, StackPane} 34 | 35 | /** 36 | * A sample that demonstrates styling a hidden split pane with CSS. 37 | * 38 | * @see javafx.scene.control.SplitPane 39 | * @resource /scalafx/ensemble/css/HiddenSplitPane.css 40 | */ 41 | class EnsembleHiddenSplitPane extends EnsembleExample { 42 | 43 | // @stage-property width = 600 44 | // @stage-property height = 400 45 | 46 | def getContent: StackPane = { 47 | 48 | // Style Sheet loaded from external 49 | val hiddenSplitPaneCss = this.getClass.getResource("/scalafx/ensemble/css/HiddenSplitPane.css").toExternalForm 50 | 51 | // Region that will be used in the split pane 52 | val reg1 = new Region { 53 | styleClass = List("rounded") 54 | } 55 | val reg2 = new Region { 56 | styleClass = List("rounded") 57 | } 58 | val reg3 = new Region { 59 | styleClass = List("rounded") 60 | } 61 | 62 | new StackPane { 63 | padding = Insets(20) 64 | children = new SplitPane { 65 | padding = Insets(20) 66 | dividerPositions_=(0.20, 0.80) 67 | items ++= Seq(reg1, reg2, reg3) 68 | id = "hiddenSplitter" 69 | stylesheets += hiddenSplitPaneCss 70 | } 71 | } 72 | } 73 | } 74 | -------------------------------------------------------------------------------- /src/main/scala/scalafx/ensemble/example/controls/EnsembleHyperlink.scala: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2012-2021, ScalaFX Project 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * * Redistributions of source code must retain the above copyright 8 | * notice, this list of conditions and the following disclaimer. 9 | * * Redistributions in binary form must reproduce the above copyright 10 | * notice, this list of conditions and the following disclaimer in the 11 | * documentation and/or other materials provided with the distribution. 12 | * * Neither the name of the ScalaFX Project nor the 13 | * names of its contributors may be used to endorse or promote products 14 | * derived from this software without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 17 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 19 | * DISCLAIMED. IN NO EVENT SHALL THE SCALAFX PROJECT OR ITS CONTRIBUTORS BE LIABLE 20 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 21 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 22 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED 23 | * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | */ 27 | 28 | package scalafx.ensemble.example.controls 29 | 30 | import scalafx.ensemble.commons.EnsembleExample 31 | import scalafx.geometry.Insets 32 | import scalafx.scene.control.Hyperlink 33 | import scalafx.scene.image.{Image, ImageView} 34 | import scalafx.scene.layout.{Priority, VBox} 35 | 36 | /** 37 | * A sample that shows a simple hyperlink and a hyperlink with an image. 38 | * 39 | * @see scalafx.scene.control.Hyperlink 40 | * @related controls/GraphicButton 41 | * @resource /scalafx/ensemble/images/icon-48x48.png 42 | */ 43 | class EnsembleHyperlink extends EnsembleExample { 44 | 45 | def getContent: VBox = new VBox { 46 | vgrow = Priority.Always 47 | hgrow = Priority.Always 48 | spacing = 10 49 | padding = Insets(20) 50 | children = List( 51 | new Hyperlink { 52 | text = "Hyperlink" 53 | }, 54 | new Hyperlink { 55 | text = "Hyperlink with Image" 56 | graphic = new ImageView { 57 | image = new Image(this.getClass.getResourceAsStream("/scalafx/ensemble/images/icon-48x48.png")) 58 | margin = Insets(0, 0, 0, 10) 59 | } 60 | } 61 | ) 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /src/main/scala/scalafx/ensemble/example/controls/EnsembleProgressBar.scala: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2012-2021, ScalaFX Project 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * * Redistributions of source code must retain the above copyright 8 | * notice, this list of conditions and the following disclaimer. 9 | * * Redistributions in binary form must reproduce the above copyright 10 | * notice, this list of conditions and the following disclaimer in the 11 | * documentation and/or other materials provided with the distribution. 12 | * * Neither the name of the ScalaFX Project nor the 13 | * names of its contributors may be used to endorse or promote products 14 | * derived from this software without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 17 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 19 | * DISCLAIMED. IN NO EVENT SHALL THE SCALAFX PROJECT OR ITS CONTRIBUTORS BE LIABLE 20 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 21 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 22 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED 23 | * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | */ 27 | 28 | package scalafx.ensemble.example.controls 29 | 30 | import scalafx.ensemble.commons.EnsembleExample 31 | import scalafx.geometry.Insets 32 | import scalafx.scene.control.ProgressBar 33 | import scalafx.scene.layout.{StackPane, VBox} 34 | 35 | class EnsembleProgressBar extends EnsembleExample { 36 | 37 | // @stage-property width = 400 38 | 39 | def getContent: StackPane = new StackPane { 40 | padding = Insets(20) 41 | children = new VBox { 42 | spacing = 10 43 | children = List( 44 | new ProgressBar { 45 | maxWidth = 100 46 | }, 47 | new ProgressBar { 48 | maxWidth = 200 49 | }, 50 | new ProgressBar { 51 | maxWidth = 300 52 | }, 53 | new ProgressBar { 54 | maxWidth = 100 55 | progress = 0.25 56 | }, 57 | new ProgressBar { 58 | maxWidth = 200 59 | progress = 0.50 60 | }, 61 | new ProgressBar { 62 | maxWidth = 300 63 | progress = 1 64 | } 65 | ) 66 | } 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /src/main/scala/scalafx/ensemble/example/controls/EnsembleProgressIndicator.scala: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2012-2021, ScalaFX Project 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * * Redistributions of source code must retain the above copyright 8 | * notice, this list of conditions and the following disclaimer. 9 | * * Redistributions in binary form must reproduce the above copyright 10 | * notice, this list of conditions and the following disclaimer in the 11 | * documentation and/or other materials provided with the distribution. 12 | * * Neither the name of the ScalaFX Project nor the 13 | * names of its contributors may be used to endorse or promote products 14 | * derived from this software without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 17 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 19 | * DISCLAIMED. IN NO EVENT SHALL THE SCALAFX PROJECT OR ITS CONTRIBUTORS BE LIABLE 20 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 21 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 22 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED 23 | * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | */ 27 | 28 | package scalafx.ensemble.example.controls 29 | 30 | import scalafx.ensemble.commons.EnsembleExample 31 | import scalafx.geometry.Insets 32 | import scalafx.scene.control.ProgressIndicator 33 | import scalafx.scene.layout.GridPane 34 | 35 | class EnsembleProgressIndicator extends EnsembleExample { 36 | 37 | def getContent: GridPane = { 38 | // Progress Indicators 1, 2, 3, 4 39 | val p1 = new ProgressIndicator { 40 | prefWidth = 50 41 | prefHeight = 50 42 | } 43 | val p2 = new ProgressIndicator { 44 | prefWidth = 50 45 | prefHeight = 50 46 | progress = 0.25f 47 | } 48 | val p3 = new ProgressIndicator { 49 | prefWidth = 50 50 | prefHeight = 50 51 | progress = 0.50f 52 | } 53 | val p4 = new ProgressIndicator { 54 | prefWidth = 50 55 | prefHeight = 50 56 | progress = 1.0f 57 | } 58 | // Add all progress indicators in grid pane 59 | new GridPane() { 60 | hgap = 20 61 | vgap = 20 62 | padding = Insets(20) 63 | add(p1, 1, 0) 64 | add(p2, 0, 1) 65 | add(p3, 1, 1) 66 | add(p4, 2, 1) 67 | } 68 | } 69 | } 70 | -------------------------------------------------------------------------------- /src/main/scala/scalafx/ensemble/example/controls/EnsembleRadioButton.scala: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2012-2021, ScalaFX Project 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * * Redistributions of source code must retain the above copyright 8 | * notice, this list of conditions and the following disclaimer. 9 | * * Redistributions in binary form must reproduce the above copyright 10 | * notice, this list of conditions and the following disclaimer in the 11 | * documentation and/or other materials provided with the distribution. 12 | * * Neither the name of the ScalaFX Project nor the 13 | * names of its contributors may be used to endorse or promote products 14 | * derived from this software without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 17 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 19 | * DISCLAIMED. IN NO EVENT SHALL THE SCALAFX PROJECT OR ITS CONTRIBUTORS BE LIABLE 20 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 21 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 22 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED 23 | * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | */ 27 | 28 | package scalafx.ensemble.example.controls 29 | 30 | import scalafx.ensemble.commons.EnsembleExample 31 | import scalafx.geometry.Insets 32 | import scalafx.scene.control.{RadioButton, ToggleGroup} 33 | import scalafx.scene.layout.{Priority, VBox} 34 | 35 | class EnsembleRadioButton extends EnsembleExample { 36 | 37 | def getContent: VBox = new VBox { 38 | vgrow = Priority.Always 39 | hgrow = Priority.Always 40 | spacing = 10 41 | padding = Insets(20) 42 | 43 | // Radio Button Toggle Group 44 | val tog = new ToggleGroup() 45 | 46 | children = List( 47 | new RadioButton { 48 | maxWidth = 200 49 | maxHeight = 50 50 | text = "Hi" 51 | toggleGroup = tog 52 | }, 53 | new RadioButton { 54 | maxWidth = 200 55 | maxHeight = 50 56 | text = "Good bye" 57 | selected = true 58 | toggleGroup = tog 59 | }, 60 | new RadioButton { 61 | maxWidth = 200 62 | maxHeight = 50 63 | text = "Disabled!!" 64 | disable = true 65 | } 66 | ) 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /src/main/scala/scalafx/ensemble/example/controls/EnsembleSimpleListView.scala: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2012-2020, ScalaFX Ensemble Project 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * * Redistributions of source code must retain the above copyright 8 | * notice, this list of conditions and the following disclaimer. 9 | * * Redistributions in binary form must reproduce the above copyright 10 | * notice, this list of conditions and the following disclaimer in the 11 | * documentation and/or other materials provided with the distribution. 12 | * * Neither the name of the ScalaFX Project nor the 13 | * names of its contributors may be used to endorse or promote products 14 | * derived from this software without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 17 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 19 | * DISCLAIMED. IN NO EVENT SHALL THE SCALAFX PROJECT OR ITS CONTRIBUTORS BE LIABLE 20 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 21 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 22 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED 23 | * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | */ 27 | 28 | package scalafx.ensemble.example.controls 29 | 30 | import scalafx.Includes._ 31 | import scalafx.collections.ObservableBuffer 32 | import scalafx.ensemble.commons.EnsembleExample 33 | import scalafx.geometry.Insets 34 | import scalafx.scene.control.{ListView, SelectionMode} 35 | import scalafx.scene.layout.StackPane 36 | 37 | class EnsembleSimpleListView extends EnsembleExample { 38 | 39 | def getContent: StackPane = new StackPane { 40 | padding = Insets(20) 41 | children = new ListView[String] { 42 | maxWidth = 200 43 | items = ObservableBuffer( 44 | "Row 1", 45 | "Row 2", 46 | "Long Row 3", 47 | "Row 4", 48 | "Row 5", 49 | "Row 6", 50 | "Row 7", 51 | "Row 8", 52 | "Row 9", 53 | "Row 10", 54 | "Row 11", 55 | "Row 12", 56 | "Row 13", 57 | "Row 14", 58 | "Row 15", 59 | "Row 16", 60 | "Row 17", 61 | "Row 18", 62 | "Row 19", 63 | "Row 20" 64 | ) 65 | selectionModel().selectionMode = SelectionMode.Multiple 66 | } 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /src/main/scala/scalafx/ensemble/example/controls/EnsembleToolBar.scala: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2012-2021, ScalaFX Project 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * * Redistributions of source code must retain the above copyright 8 | * notice, this list of conditions and the following disclaimer. 9 | * * Redistributions in binary form must reproduce the above copyright 10 | * notice, this list of conditions and the following disclaimer in the 11 | * documentation and/or other materials provided with the distribution. 12 | * * Neither the name of the ScalaFX Project nor the 13 | * names of its contributors may be used to endorse or promote products 14 | * derived from this software without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 17 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 19 | * DISCLAIMED. IN NO EVENT SHALL THE SCALAFX PROJECT OR ITS CONTRIBUTORS BE LIABLE 20 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 21 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 22 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED 23 | * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | */ 27 | 28 | package scalafx.ensemble.example.controls 29 | 30 | import scalafx.ensemble.commons.EnsembleExample 31 | import scalafx.geometry.Insets 32 | import scalafx.scene.control.{Button, ToolBar} 33 | import scalafx.scene.layout.BorderPane 34 | 35 | class EnsembleToolBar extends EnsembleExample { 36 | 37 | // @stage-property width = 400 38 | // @stage-property height = 150 39 | def getContent: BorderPane = new BorderPane { 40 | padding = Insets(20) 41 | top = new ToolBar { 42 | content = List( 43 | new Button { 44 | text = "Home" 45 | minWidth = 75 46 | }, 47 | new Button { 48 | text = "Options" 49 | minWidth = 75 50 | }, 51 | new Button { 52 | text = "Help" 53 | minWidth = 75 54 | } 55 | ) 56 | } 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /src/main/scala/scalafx/ensemble/example/controls/EnsembleTreeView.scala: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2012-2021, ScalaFX Project 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * * Redistributions of source code must retain the above copyright 8 | * notice, this list of conditions and the following disclaimer. 9 | * * Redistributions in binary form must reproduce the above copyright 10 | * notice, this list of conditions and the following disclaimer in the 11 | * documentation and/or other materials provided with the distribution. 12 | * * Neither the name of the ScalaFX Project nor the 13 | * names of its contributors may be used to endorse or promote products 14 | * derived from this software without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 17 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 19 | * DISCLAIMED. IN NO EVENT SHALL THE SCALAFX PROJECT OR ITS CONTRIBUTORS BE LIABLE 20 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 21 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 22 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED 23 | * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | */ 27 | 28 | package scalafx.ensemble.example.controls 29 | 30 | import scalafx.ensemble.commons.EnsembleExample 31 | import scalafx.geometry.Insets 32 | import scalafx.scene.control.{TreeItem, TreeView} 33 | import scalafx.scene.layout.StackPane 34 | 35 | class EnsembleTreeView extends EnsembleExample { 36 | 37 | def getContent: StackPane = { 38 | val treeView = new TreeView[String]() { 39 | minWidth = 200 40 | minHeight = 200 41 | showRoot = true 42 | root = new TreeItem[String]("Root Node") { 43 | expanded = true 44 | children = Seq( 45 | new TreeItem[String]() { 46 | value = "Node 1" 47 | }, 48 | new TreeItem[String]() { 49 | value = "Node 2" 50 | }, 51 | new TreeItem[String]() { 52 | value = "Node 3" 53 | children = (4 to 12).map(n => new TreeItem[String]("Child Node " + n)) 54 | } 55 | ) 56 | } 57 | } 58 | 59 | new StackPane { 60 | padding = Insets(20) 61 | children = treeView 62 | } 63 | } 64 | } 65 | -------------------------------------------------------------------------------- /src/main/scala/scalafx/ensemble/example/effects/EnsembleDropShadow.scala: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2012-2021, ScalaFX Project 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * * Redistributions of source code must retain the above copyright 8 | * notice, this list of conditions and the following disclaimer. 9 | * * Redistributions in binary form must reproduce the above copyright 10 | * notice, this list of conditions and the following disclaimer in the 11 | * documentation and/or other materials provided with the distribution. 12 | * * Neither the name of the ScalaFX Project nor the 13 | * names of its contributors may be used to endorse or promote products 14 | * derived from this software without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 17 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 19 | * DISCLAIMED. IN NO EVENT SHALL THE SCALAFX PROJECT OR ITS CONTRIBUTORS BE LIABLE 20 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 21 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 22 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED 23 | * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | */ 27 | 28 | package scalafx.ensemble.example.effects 29 | 30 | import scalafx.ensemble.commons.EnsembleExample 31 | import scalafx.geometry.Insets 32 | import scalafx.scene.control.Label 33 | import scalafx.scene.effect.DropShadow 34 | import scalafx.scene.layout.{Priority, VBox} 35 | import scalafx.scene.paint.Color 36 | import scalafx.scene.text.Font 37 | 38 | class EnsembleDropShadow extends EnsembleExample { 39 | 40 | def getContent: VBox = new VBox { 41 | vgrow = Priority.Always 42 | hgrow = Priority.Always 43 | spacing = 30 44 | padding = Insets(20, 75, 20, 75) 45 | children = List( 46 | new Label { 47 | text = "Ensemble Drop Shadow 1" 48 | font = new Font("Verdana", 20) 49 | effect = new DropShadow(12, Color.Blue) { 50 | offsetX = 60 51 | offsetY = 15 52 | } 53 | }, 54 | new Label { 55 | text = "Ensemble Drop Shadow 2" 56 | font = new Font("Verdana", 20) 57 | effect = new DropShadow() 58 | } 59 | ) 60 | } 61 | } 62 | -------------------------------------------------------------------------------- /src/main/scala/scalafx/ensemble/example/effects/EnsembleGaussianBlur.scala: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2012-2021, ScalaFX Project 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * * Redistributions of source code must retain the above copyright 8 | * notice, this list of conditions and the following disclaimer. 9 | * * Redistributions in binary form must reproduce the above copyright 10 | * notice, this list of conditions and the following disclaimer in the 11 | * documentation and/or other materials provided with the distribution. 12 | * * Neither the name of the ScalaFX Project nor the 13 | * names of its contributors may be used to endorse or promote products 14 | * derived from this software without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 17 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 19 | * DISCLAIMED. IN NO EVENT SHALL THE SCALAFX PROJECT OR ITS CONTRIBUTORS BE LIABLE 20 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 21 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 22 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED 23 | * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | */ 27 | 28 | package scalafx.ensemble.example.effects 29 | 30 | import scalafx.ensemble.commons.EnsembleExample 31 | import scalafx.geometry.Insets 32 | import scalafx.scene.effect.GaussianBlur 33 | import scalafx.scene.image.{Image, ImageView} 34 | import scalafx.scene.layout.{Priority, VBox} 35 | 36 | /** 37 | * A sample that demonstrates a Gaussian blur effect on an image, with varying 38 | * degrees of blurriness. 39 | * 40 | * @see scalafx.scene.effect.GaussianBlur 41 | * @see scalafx.scene.effect.Effect 42 | * @resource /scalafx/ensemble/images/icon-48x48.png 43 | */ 44 | class EnsembleGaussianBlur extends EnsembleExample { 45 | 46 | def getContent: VBox = new VBox { 47 | vgrow = Priority.Always 48 | hgrow = Priority.Always 49 | spacing = 10 50 | padding = Insets(20, 100, 20, 100) 51 | children = List( 52 | new ImageView { 53 | image = new Image(this.getClass.getResourceAsStream("/scalafx/ensemble/images/icon-48x48.png")) 54 | effect = new GaussianBlur() 55 | }, 56 | new ImageView { 57 | image = new Image(this.getClass.getResourceAsStream("/scalafx/ensemble/images/icon-48x48.png")) 58 | effect = new GaussianBlur() { 59 | radius = 5d 60 | } 61 | } 62 | ) 63 | } 64 | } 65 | -------------------------------------------------------------------------------- /src/main/scala/scalafx/ensemble/example/effects/EnsembleInnerShadow.scala: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2012-2021, ScalaFX Project 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * * Redistributions of source code must retain the above copyright 8 | * notice, this list of conditions and the following disclaimer. 9 | * * Redistributions in binary form must reproduce the above copyright 10 | * notice, this list of conditions and the following disclaimer in the 11 | * documentation and/or other materials provided with the distribution. 12 | * * Neither the name of the ScalaFX Project nor the 13 | * names of its contributors may be used to endorse or promote products 14 | * derived from this software without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 17 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 19 | * DISCLAIMED. IN NO EVENT SHALL THE SCALAFX PROJECT OR ITS CONTRIBUTORS BE LIABLE 20 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 21 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 22 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED 23 | * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | */ 27 | 28 | package scalafx.ensemble.example.effects 29 | 30 | import scalafx.ensemble.commons.EnsembleExample 31 | import scalafx.geometry.Insets 32 | import scalafx.scene.control.Label 33 | import scalafx.scene.effect.InnerShadow 34 | import scalafx.scene.layout.{Priority, VBox} 35 | import scalafx.scene.paint.Color 36 | import scalafx.scene.text.Font 37 | 38 | class EnsembleInnerShadow extends EnsembleExample { 39 | 40 | def getContent: VBox = { 41 | new VBox { 42 | vgrow = Priority.Always 43 | hgrow = Priority.Always 44 | spacing = 10 45 | padding = Insets(20) 46 | children = List( 47 | new Label { 48 | text = "Ensemble Inner Shadow 1" 49 | font = new Font("Arial Black", 30) 50 | textFill = Color.web("#BBBBBB") 51 | effect = new InnerShadow { 52 | offsetX = 3 53 | offsetY = 3 54 | radius = 5d 55 | } 56 | }, 57 | new Label { 58 | text = "Ensemble Inner Shadow 2" 59 | font = new Font("Arial Black", 30) 60 | textFill = Color.web("#BBBBBB") 61 | effect = new InnerShadow() 62 | } 63 | ) 64 | } 65 | } 66 | } 67 | -------------------------------------------------------------------------------- /src/main/scala/scalafx/ensemble/example/effects/EnsembleReflection.scala: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2012-2021, ScalaFX Project 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * * Redistributions of source code must retain the above copyright 8 | * notice, this list of conditions and the following disclaimer. 9 | * * Redistributions in binary form must reproduce the above copyright 10 | * notice, this list of conditions and the following disclaimer in the 11 | * documentation and/or other materials provided with the distribution. 12 | * * Neither the name of the ScalaFX Project nor the 13 | * names of its contributors may be used to endorse or promote products 14 | * derived from this software without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 17 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 19 | * DISCLAIMED. IN NO EVENT SHALL THE SCALAFX PROJECT OR ITS CONTRIBUTORS BE LIABLE 20 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 21 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 22 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED 23 | * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | */ 27 | 28 | package scalafx.ensemble.example.effects 29 | 30 | import scalafx.ensemble.commons.EnsembleExample 31 | import scalafx.geometry.Insets 32 | import scalafx.scene.effect.Reflection 33 | import scalafx.scene.image.{Image, ImageView} 34 | import scalafx.scene.layout.StackPane 35 | 36 | /** 37 | * A sample that demonstrates reflection effect. 38 | * 39 | * @see scalafx.scene.effect.Reflection 40 | * @see scalafx.scene.effect.Effect 41 | * @resource /scalafx/ensemble/images/boat.jpg 42 | */ 43 | class EnsembleReflection extends EnsembleExample { 44 | 45 | def getContent: StackPane = { 46 | new StackPane { 47 | padding = Insets(20, 20, 170, 20) 48 | children = new ImageView { 49 | image = new Image(this.getClass.getResourceAsStream("/scalafx/ensemble/images/boat.jpg")) 50 | fitHeight = 150 51 | preserveRatio = true 52 | effect = new Reflection() 53 | } 54 | } 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /src/main/scala/scalafx/ensemble/example/effects/EnsembleSepiaTone.scala: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2012-2021, ScalaFX Project 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * * Redistributions of source code must retain the above copyright 8 | * notice, this list of conditions and the following disclaimer. 9 | * * Redistributions in binary form must reproduce the above copyright 10 | * notice, this list of conditions and the following disclaimer in the 11 | * documentation and/or other materials provided with the distribution. 12 | * * Neither the name of the ScalaFX Project nor the 13 | * names of its contributors may be used to endorse or promote products 14 | * derived from this software without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 17 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 19 | * DISCLAIMED. IN NO EVENT SHALL THE SCALAFX PROJECT OR ITS CONTRIBUTORS BE LIABLE 20 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 21 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 22 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED 23 | * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | */ 27 | 28 | package scalafx.ensemble.example.effects 29 | 30 | import scalafx.ensemble.commons.EnsembleExample 31 | import scalafx.geometry.Insets 32 | import scalafx.scene.effect.SepiaTone 33 | import scalafx.scene.image.{Image, ImageView} 34 | import scalafx.scene.layout.StackPane 35 | 36 | /** 37 | * A sample that demonstrates a sepia tone effect. 38 | * 39 | * @see scalafx.scene.effect.SepiaTone 40 | * @see scalafx.scene.effect.Effect 41 | * @resource /scalafx/ensemble/images/boat.jpg 42 | */ 43 | class EnsembleSepiaTone extends EnsembleExample { 44 | 45 | def getContent: StackPane = { 46 | new StackPane { 47 | padding = Insets(20) 48 | children = new ImageView { 49 | image = new Image(this.getClass.getResourceAsStream("/scalafx/ensemble/images/boat.jpg")) 50 | effect = new SepiaTone() { 51 | level = 0.9d 52 | } 53 | } 54 | } 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /src/main/scala/scalafx/ensemble/example/images/EnsembleImageCreation.scala: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2012-2021, ScalaFX Project 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * * Redistributions of source code must retain the above copyright 8 | * notice, this list of conditions and the following disclaimer. 9 | * * Redistributions in binary form must reproduce the above copyright 10 | * notice, this list of conditions and the following disclaimer in the 11 | * documentation and/or other materials provided with the distribution. 12 | * * Neither the name of the ScalaFX Project nor the 13 | * names of its contributors may be used to endorse or promote products 14 | * derived from this software without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 17 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 19 | * DISCLAIMED. IN NO EVENT SHALL THE SCALAFX PROJECT OR ITS CONTRIBUTORS BE LIABLE 20 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 21 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 22 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED 23 | * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | */ 27 | 28 | package scalafx.ensemble.example.images 29 | 30 | import scalafx.ensemble.commons.EnsembleExample 31 | import scalafx.geometry.Insets 32 | import scalafx.scene.image.{Image, ImageView} 33 | import scalafx.scene.layout.{Priority, VBox} 34 | 35 | /** 36 | * A sample that demonstrates the use of two different constructors in the Image 37 | * class. 38 | * 39 | * @related images/ImageProperties 40 | * @see scalafx.scene.image.Image 41 | * @see scalafx.scene.image.ImageView 42 | * @resource /scalafx/ensemble/images/icon-48x48.png 43 | * @resource /scalafx/ensemble/images/scala-logo.png 44 | */ 45 | class EnsembleImageCreation extends EnsembleExample { 46 | def getContent: VBox = new VBox { 47 | vgrow = Priority.Always 48 | hgrow = Priority.Always 49 | spacing = 10 50 | padding = Insets(20) 51 | children = List( 52 | new ImageView { 53 | image = new Image(this.getClass.getResourceAsStream("/scalafx/ensemble/images/icon-48x48.png")) 54 | fitHeight = 50 55 | fitWidth = 150 56 | preserveRatio = true 57 | smooth = true 58 | }, 59 | new ImageView { 60 | // image = new Image("/scalafx/ensemble/images/scala-logo.png") 61 | image = new Image("http://www.scala-lang.org/resources/img/scala-logo.png") 62 | 63 | } 64 | ) 65 | } 66 | } 67 | -------------------------------------------------------------------------------- /src/main/scala/scalafx/ensemble/example/layout/EnsembleAnchorPane.scala: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2012-2021, ScalaFX Project 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * * Redistributions of source code must retain the above copyright 8 | * notice, this list of conditions and the following disclaimer. 9 | * * Redistributions in binary form must reproduce the above copyright 10 | * notice, this list of conditions and the following disclaimer in the 11 | * documentation and/or other materials provided with the distribution. 12 | * * Neither the name of the ScalaFX Project nor the 13 | * names of its contributors may be used to endorse or promote products 14 | * derived from this software without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 17 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 19 | * DISCLAIMED. IN NO EVENT SHALL THE SCALAFX PROJECT OR ITS CONTRIBUTORS BE LIABLE 20 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 21 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 22 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED 23 | * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | */ 27 | 28 | package scalafx.ensemble.example.layout 29 | 30 | import scalafx.ensemble.commons.EnsembleExample 31 | import scalafx.geometry.Insets 32 | import scalafx.scene.control.{Button, Label} 33 | import scalafx.scene.image.{Image, ImageView} 34 | import scalafx.scene.layout.AnchorPane 35 | 36 | /** 37 | * An example of an AnchorPane layout. 38 | * 39 | * @see scalafx.scene.layout.AnchorPane 40 | * @resource /scalafx/ensemble/images/icon-48x48.png 41 | */ 42 | class EnsembleAnchorPane extends EnsembleExample { 43 | 44 | def getContent: AnchorPane = { 45 | val label = Label("We are all in an AnchorPane.") 46 | val button = new Button("Submit") 47 | val imageView = new ImageView { 48 | image = new Image(this.getClass.getResourceAsStream("/scalafx/ensemble/images/icon-48x48.png")) 49 | } 50 | 51 | AnchorPane.setTopAnchor(label, 2.0) 52 | AnchorPane.setLeftAnchor(label, 20.0) 53 | AnchorPane.setTopAnchor(button, 40.0) 54 | AnchorPane.setLeftAnchor(button, 20.0) 55 | AnchorPane.setTopAnchor(imageView, 75.0) 56 | AnchorPane.setLeftAnchor(imageView, 20.0) 57 | 58 | new AnchorPane { 59 | padding = Insets(20) 60 | children = List(label, button, imageView) 61 | } 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /src/main/scala/scalafx/ensemble/example/layout/EnsembleFlowPane.scala: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2012-2020, ScalaFX Ensemble Project 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * * Redistributions of source code must retain the above copyright 8 | * notice, this list of conditions and the following disclaimer. 9 | * * Redistributions in binary form must reproduce the above copyright 10 | * notice, this list of conditions and the following disclaimer in the 11 | * documentation and/or other materials provided with the distribution. 12 | * * Neither the name of the ScalaFX Project nor the 13 | * names of its contributors may be used to endorse or promote products 14 | * derived from this software without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 17 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 19 | * DISCLAIMED. IN NO EVENT SHALL THE SCALAFX PROJECT OR ITS CONTRIBUTORS BE LIABLE 20 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 21 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 22 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED 23 | * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | */ 27 | 28 | package scalafx.ensemble.example.layout 29 | 30 | import scalafx.ensemble.commons.EnsembleExample 31 | import scalafx.geometry.Insets 32 | import scalafx.scene.control.Label 33 | import scalafx.scene.image.{Image, ImageView} 34 | import scalafx.scene.layout.FlowPane 35 | 36 | /** 37 | * An example of a FlowPane layout. 38 | * 39 | * @see scalafx.scene.layout.FlowPane 40 | * @resource /scalafx/ensemble/images/icon-48x48.png 41 | */ 42 | class EnsembleFlowPane extends EnsembleExample { 43 | 44 | // @stage-property width = 400 45 | // @stage-property height = 500 46 | // @stage-property resizable = false 47 | 48 | def getContent: FlowPane = { 49 | val image = new Image(this.getClass.getResourceAsStream("/scalafx/ensemble/images/icon-48x48.png")) 50 | 51 | new FlowPane(2, 4) { 52 | prefWrapLength = 200 53 | padding = Insets(20) 54 | for (_ <- 1 to 5) { 55 | children ++= Seq( 56 | new Label("Short label"), 57 | new Label("I am a slightly longer label."), 58 | new ImageView(image) 59 | ) 60 | } 61 | } 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /src/main/scala/scalafx/ensemble/example/layout/EnsembleHBox.scala: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2012-2021, ScalaFX Project 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * * Redistributions of source code must retain the above copyright 8 | * notice, this list of conditions and the following disclaimer. 9 | * * Redistributions in binary form must reproduce the above copyright 10 | * notice, this list of conditions and the following disclaimer in the 11 | * documentation and/or other materials provided with the distribution. 12 | * * Neither the name of the ScalaFX Project nor the 13 | * names of its contributors may be used to endorse or promote products 14 | * derived from this software without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 17 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 19 | * DISCLAIMED. IN NO EVENT SHALL THE SCALAFX PROJECT OR ITS CONTRIBUTORS BE LIABLE 20 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 21 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 22 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED 23 | * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | */ 27 | 28 | package scalafx.ensemble.example.layout 29 | 30 | import scalafx.ensemble.commons.EnsembleExample 31 | import scalafx.geometry.{Insets, Pos} 32 | import scalafx.scene.control.{Button, Label, TextField} 33 | import scalafx.scene.layout.HBox 34 | 35 | class EnsembleHBox extends EnsembleExample { 36 | 37 | def getContent: HBox = { 38 | val label = new Label { 39 | text = "Text:" 40 | } 41 | val textField = new TextField { 42 | promptText = "Type something..." 43 | } 44 | val button = new Button { 45 | text = "Search..." 46 | } 47 | 48 | new HBox { 49 | padding = Insets(20) 50 | spacing = 5 51 | alignment = Pos.Center 52 | children = List(label, textField, button) 53 | } 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /src/main/scala/scalafx/ensemble/example/layout/EnsembleStackPane.scala: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2012-2021, ScalaFX Project 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * * Redistributions of source code must retain the above copyright 8 | * notice, this list of conditions and the following disclaimer. 9 | * * Redistributions in binary form must reproduce the above copyright 10 | * notice, this list of conditions and the following disclaimer in the 11 | * documentation and/or other materials provided with the distribution. 12 | * * Neither the name of the ScalaFX Project nor the 13 | * names of its contributors may be used to endorse or promote products 14 | * derived from this software without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 17 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 19 | * DISCLAIMED. IN NO EVENT SHALL THE SCALAFX PROJECT OR ITS CONTRIBUTORS BE LIABLE 20 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 21 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 22 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED 23 | * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | */ 27 | 28 | package scalafx.ensemble.example.layout 29 | 30 | import scalafx.ensemble.commons.EnsembleExample 31 | import scalafx.geometry.Insets 32 | import scalafx.scene.control.{ContentDisplay, Label} 33 | import scalafx.scene.image.{Image, ImageView} 34 | import scalafx.scene.layout.StackPane 35 | import scalafx.scene.paint.Color 36 | import scalafx.scene.shape.Rectangle 37 | 38 | /** 39 | * An example of a StackPane layout. 40 | * 41 | * @see scalafx.scene.layout.FlowPane 42 | * @resource /scalafx/ensemble/images/icon-48x48.png 43 | */ 44 | class EnsembleStackPane extends EnsembleExample { 45 | 46 | def getContent: StackPane = { 47 | new StackPane { 48 | padding = Insets(20) 49 | children = List( 50 | new Rectangle { 51 | width = 200 52 | height = 70 53 | fill = Color.Bisque 54 | stroke = Color.Burlywood 55 | }, 56 | new Label { 57 | text = "I am in a stack pane" 58 | contentDisplay = ContentDisplay.Left 59 | graphic = new ImageView { 60 | image = new Image(this.getClass.getResourceAsStream("/scalafx/ensemble/images/icon-48x48.png")) 61 | } 62 | } 63 | ) 64 | } 65 | } 66 | } 67 | -------------------------------------------------------------------------------- /src/main/scala/scalafx/ensemble/example/layout/EnsembleTilePane.scala: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2012-2021, ScalaFX Project 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * * Redistributions of source code must retain the above copyright 8 | * notice, this list of conditions and the following disclaimer. 9 | * * Redistributions in binary form must reproduce the above copyright 10 | * notice, this list of conditions and the following disclaimer in the 11 | * documentation and/or other materials provided with the distribution. 12 | * * Neither the name of the ScalaFX Project nor the 13 | * names of its contributors may be used to endorse or promote products 14 | * derived from this software without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 17 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 19 | * DISCLAIMED. IN NO EVENT SHALL THE SCALAFX PROJECT OR ITS CONTRIBUTORS BE LIABLE 20 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 21 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 22 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED 23 | * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | */ 27 | 28 | package scalafx.ensemble.example.layout 29 | 30 | import scalafx.ensemble.commons.EnsembleExample 31 | import scalafx.geometry.Insets 32 | import scalafx.scene.control.Button 33 | import scalafx.scene.image.{Image, ImageView} 34 | import scalafx.scene.layout.TilePane 35 | 36 | /** 37 | * An example of a TilePane layout. 38 | * 39 | * @see scalafx.scene.layout.TilePane 40 | * @resource /scalafx/ensemble/images/icon-48x48.png 41 | */ 42 | class EnsembleTilePane extends EnsembleExample { 43 | 44 | def getContent: TilePane = { 45 | // Image for buttons 46 | val image = new Image(this.getClass.getResourceAsStream("/scalafx/ensemble/images/icon-48x48.png")) 47 | 48 | // Create buttons 49 | val buttons = for (i <- 1 to 17) yield new Button("Button " + i, new ImageView(image)) 50 | 51 | new TilePane { 52 | hgap = 3 53 | vgap = 3 54 | padding = Insets(20) 55 | prefColumns = 3 56 | children = buttons 57 | } 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /src/main/scala/scalafx/ensemble/example/layout/EnsembleVBox.scala: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2012-2021, ScalaFX Project 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * * Redistributions of source code must retain the above copyright 8 | * notice, this list of conditions and the following disclaimer. 9 | * * Redistributions in binary form must reproduce the above copyright 10 | * notice, this list of conditions and the following disclaimer in the 11 | * documentation and/or other materials provided with the distribution. 12 | * * Neither the name of the ScalaFX Project nor the 13 | * names of its contributors may be used to endorse or promote products 14 | * derived from this software without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 17 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 19 | * DISCLAIMED. IN NO EVENT SHALL THE SCALAFX PROJECT OR ITS CONTRIBUTORS BE LIABLE 20 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 21 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 22 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED 23 | * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | */ 27 | 28 | package scalafx.ensemble.example.layout 29 | 30 | import scalafx.ensemble.commons.EnsembleExample 31 | import scalafx.geometry.{Insets, Pos} 32 | import scalafx.scene.control.{CheckBox, Label} 33 | import scalafx.scene.layout.VBox 34 | 35 | class EnsembleVBox extends EnsembleExample { 36 | 37 | def getContent: VBox = { 38 | // Checkboxes arranged vertically using VBox 39 | val label = Label("Select one or more vehicles:") 40 | val checkBox1 = new CheckBox { 41 | text = "Ford" 42 | } 43 | val checkBox2 = new CheckBox { 44 | text = "Hyundai" 45 | } 46 | val checkBox3 = new CheckBox { 47 | text = "Toyota" 48 | } 49 | 50 | new VBox { 51 | padding = Insets(20) 52 | spacing = 10 53 | alignment = Pos.TopLeft 54 | children = Seq( 55 | label, 56 | new VBox { 57 | spacing = 5 58 | children = List(checkBox1, checkBox2, checkBox3) 59 | } 60 | ) 61 | } 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /src/main/scala/scalafx/ensemble/example/shapes/EnsembleCircle.scala: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2012-2021, ScalaFX Project 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * * Redistributions of source code must retain the above copyright 8 | * notice, this list of conditions and the following disclaimer. 9 | * * Redistributions in binary form must reproduce the above copyright 10 | * notice, this list of conditions and the following disclaimer in the 11 | * documentation and/or other materials provided with the distribution. 12 | * * Neither the name of the ScalaFX Project nor the 13 | * names of its contributors may be used to endorse or promote products 14 | * derived from this software without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 17 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 19 | * DISCLAIMED. IN NO EVENT SHALL THE SCALAFX PROJECT OR ITS CONTRIBUTORS BE LIABLE 20 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 21 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 22 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED 23 | * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | */ 27 | 28 | package scalafx.ensemble.example.shapes 29 | 30 | import scalafx.ensemble.commons.EnsembleExample 31 | import scalafx.geometry.Insets 32 | import scalafx.scene.layout.HBox 33 | import scalafx.scene.paint.Color 34 | import scalafx.scene.shape.Circle 35 | 36 | class EnsembleCircle extends EnsembleExample { 37 | def getContent: HBox = { 38 | 39 | val circle1 = new Circle { 40 | centerX = 200 41 | centerY = 200 42 | radius = 50 43 | stroke = Color.Black 44 | strokeWidth = 3 45 | strokeDashArray ++= Seq(15d, 10d) 46 | fill = null 47 | } 48 | 49 | val circle2 = new Circle { 50 | centerX = 200 51 | centerY = 200 52 | radius = 50 53 | stroke = Color.Brown 54 | strokeWidth = 2 55 | fill = Color.DarkKhaki 56 | } 57 | 58 | new HBox { 59 | spacing = 25 60 | padding = Insets(20) 61 | children = List(circle1, circle2) 62 | } 63 | } 64 | } 65 | -------------------------------------------------------------------------------- /src/main/scala/scalafx/ensemble/example/shapes/EnsembleCubicCurve.scala: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2012-2021, ScalaFX Project 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * * Redistributions of source code must retain the above copyright 8 | * notice, this list of conditions and the following disclaimer. 9 | * * Redistributions in binary form must reproduce the above copyright 10 | * notice, this list of conditions and the following disclaimer in the 11 | * documentation and/or other materials provided with the distribution. 12 | * * Neither the name of the ScalaFX Project nor the 13 | * names of its contributors may be used to endorse or promote products 14 | * derived from this software without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 17 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 19 | * DISCLAIMED. IN NO EVENT SHALL THE SCALAFX PROJECT OR ITS CONTRIBUTORS BE LIABLE 20 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 21 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 22 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED 23 | * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | */ 27 | 28 | package scalafx.ensemble.example.shapes 29 | 30 | import scalafx.ensemble.commons.EnsembleExample 31 | import scalafx.geometry.Insets 32 | import scalafx.scene.layout.HBox 33 | import scalafx.scene.paint.Color 34 | import scalafx.scene.shape.CubicCurve 35 | 36 | class EnsembleCubicCurve extends EnsembleExample { 37 | 38 | def getContent: HBox = new HBox { 39 | spacing = 10 40 | padding = Insets(20) 41 | children = List( 42 | new CubicCurve { 43 | controlX1 = 30.0 44 | controlX2 = 150.0 45 | controlY1 = 10.0 46 | controlY2 = 80.0 47 | startX = 0 48 | startY = 45 49 | endX = 180 50 | endY = 45 51 | stroke = Color.Burlywood 52 | fill = Color.Orange 53 | strokeWidth = 2d 54 | }, 55 | new CubicCurve { 56 | controlX1 = 230.0 57 | controlX2 = 350.0 58 | controlY1 = 100.0 59 | controlY2 = 180.0 60 | startX = 0 61 | startY = 90 62 | endX = 120 63 | endY = 55 64 | stroke = Color.DarkOrange 65 | fill = Color.White 66 | strokeWidth = 5d 67 | } 68 | ) 69 | } 70 | } 71 | -------------------------------------------------------------------------------- /src/main/scala/scalafx/ensemble/example/shapes/EnsembleEllipse.scala: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2012-2021, ScalaFX Project 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * * Redistributions of source code must retain the above copyright 8 | * notice, this list of conditions and the following disclaimer. 9 | * * Redistributions in binary form must reproduce the above copyright 10 | * notice, this list of conditions and the following disclaimer in the 11 | * documentation and/or other materials provided with the distribution. 12 | * * Neither the name of the ScalaFX Project nor the 13 | * names of its contributors may be used to endorse or promote products 14 | * derived from this software without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 17 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 19 | * DISCLAIMED. IN NO EVENT SHALL THE SCALAFX PROJECT OR ITS CONTRIBUTORS BE LIABLE 20 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 21 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 22 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED 23 | * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | */ 27 | 28 | package scalafx.ensemble.example.shapes 29 | 30 | import scalafx.ensemble.commons.EnsembleExample 31 | import scalafx.geometry.Insets 32 | import scalafx.scene.layout.HBox 33 | import scalafx.scene.paint.Color 34 | import scalafx.scene.shape.Ellipse 35 | 36 | class EnsembleEllipse extends EnsembleExample { 37 | 38 | def getContent: HBox = new HBox { 39 | spacing = 25 40 | padding = Insets(20) 41 | children = List( 42 | new Ellipse { 43 | centerX = 40 44 | centerY = 45 45 | radiusX = 30 46 | radiusY = 45 47 | fill = Color.BlueViolet 48 | }, 49 | new Ellipse { 50 | centerX = 140 51 | centerY = 145 52 | radiusX = 30 53 | radiusY = 45 54 | stroke = Color.Black 55 | fill = Color.White 56 | } 57 | ) 58 | } 59 | 60 | } 61 | -------------------------------------------------------------------------------- /src/main/scala/scalafx/ensemble/example/shapes/EnsembleLine.scala: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2012-2021, ScalaFX Project 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * * Redistributions of source code must retain the above copyright 8 | * notice, this list of conditions and the following disclaimer. 9 | * * Redistributions in binary form must reproduce the above copyright 10 | * notice, this list of conditions and the following disclaimer in the 11 | * documentation and/or other materials provided with the distribution. 12 | * * Neither the name of the ScalaFX Project nor the 13 | * names of its contributors may be used to endorse or promote products 14 | * derived from this software without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 17 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 19 | * DISCLAIMED. IN NO EVENT SHALL THE SCALAFX PROJECT OR ITS CONTRIBUTORS BE LIABLE 20 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 21 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 22 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED 23 | * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | */ 27 | 28 | package scalafx.ensemble.example.shapes 29 | 30 | import scalafx.ensemble.commons.EnsembleExample 31 | import scalafx.geometry.Insets 32 | import scalafx.scene.layout.VBox 33 | import scalafx.scene.paint.Color 34 | import scalafx.scene.shape.Line 35 | 36 | class EnsembleLine extends EnsembleExample { 37 | 38 | def getContent: VBox = new VBox { 39 | spacing = 20 40 | padding = Insets(20) 41 | children = List( 42 | new Line { 43 | startX = 320 44 | startY = 120 45 | endX = 20 46 | endY = 180 47 | fill = Color.Black 48 | stroke = Color.Green 49 | strokeWidth = 1d 50 | }, 51 | new Line { 52 | startX = 320 53 | startY = 120 54 | endX = 20 55 | endY = 180 56 | fill = Color.White 57 | stroke = Color.Orange 58 | strokeWidth = 10d 59 | } 60 | ) 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /src/main/scala/scalafx/ensemble/example/shapes/EnsemblePath.scala: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2012-2021, ScalaFX Project 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * * Redistributions of source code must retain the above copyright 8 | * notice, this list of conditions and the following disclaimer. 9 | * * Redistributions in binary form must reproduce the above copyright 10 | * notice, this list of conditions and the following disclaimer in the 11 | * documentation and/or other materials provided with the distribution. 12 | * * Neither the name of the ScalaFX Project nor the 13 | * names of its contributors may be used to endorse or promote products 14 | * derived from this software without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 17 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 19 | * DISCLAIMED. IN NO EVENT SHALL THE SCALAFX PROJECT OR ITS CONTRIBUTORS BE LIABLE 20 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 21 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 22 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED 23 | * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | */ 27 | 28 | package scalafx.ensemble.example.shapes 29 | 30 | import scalafx.ensemble.commons.EnsembleExample 31 | import scalafx.geometry.Insets 32 | import scalafx.scene.layout.HBox 33 | import scalafx.scene.paint.Color 34 | import scalafx.scene.shape._ 35 | 36 | class EnsemblePath extends EnsembleExample { 37 | 38 | def getContent: HBox = new HBox { 39 | spacing = 20 40 | padding = Insets(20) 41 | children = List( 42 | new Path { 43 | elements = List(MoveTo(35, 35), HLineTo(75), VLineTo(75), LineTo(35, 75), new ClosePath()) 44 | fill = Color.Orange 45 | stroke = Color.Black 46 | strokeWidth = 1d 47 | }, 48 | new Path { 49 | elements = List( 50 | MoveTo(100, 55), 51 | CubicCurveTo(120, 20, 130, 80, 140, 45), 52 | QuadCurveTo(150, 0, 160, 45), 53 | ArcTo(20, 40, 0, 180, 45, true, true) 54 | ) 55 | fill = Color.Azure 56 | } 57 | ) 58 | } 59 | 60 | } 61 | -------------------------------------------------------------------------------- /src/main/scala/scalafx/ensemble/example/shapes/EnsemblePolygon.scala: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2012-2020, ScalaFX Ensemble Project 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * * Redistributions of source code must retain the above copyright 8 | * notice, this list of conditions and the following disclaimer. 9 | * * Redistributions in binary form must reproduce the above copyright 10 | * notice, this list of conditions and the following disclaimer in the 11 | * documentation and/or other materials provided with the distribution. 12 | * * Neither the name of the ScalaFX Project nor the 13 | * names of its contributors may be used to endorse or promote products 14 | * derived from this software without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 17 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 19 | * DISCLAIMED. IN NO EVENT SHALL THE SCALAFX PROJECT OR ITS CONTRIBUTORS BE LIABLE 20 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 21 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 22 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED 23 | * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | */ 27 | 28 | package scalafx.ensemble.example.shapes 29 | 30 | import scalafx.ensemble.commons.EnsembleExample 31 | import scalafx.geometry.Insets 32 | import scalafx.scene.layout.HBox 33 | import scalafx.scene.paint.{Color, Paint} 34 | import scalafx.scene.shape.Polygon 35 | 36 | class EnsemblePolygon extends EnsembleExample { 37 | 38 | def getContent: HBox = { 39 | val polyObj = (poly: Polygon, color: Paint) => { 40 | poly.setFill(color) 41 | poly.setStroke(Color.Black) 42 | poly.setStrokeWidth(1d) 43 | poly 44 | } 45 | 46 | new HBox { 47 | spacing = 25 48 | padding = Insets(20) 49 | children = List( 50 | polyObj(Polygon(45, 10, 10, 80, 80, 80), Color.DarkCyan), 51 | polyObj(Polygon(135, 15, 160, 30, 160, 60, 135, 75, 110, 60, 110, 30), Color.Orange) 52 | ) 53 | } 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /src/main/scala/scalafx/ensemble/example/shapes/EnsemblePolyline.scala: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2012-2020, ScalaFX Ensemble Project 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * * Redistributions of source code must retain the above copyright 8 | * notice, this list of conditions and the following disclaimer. 9 | * * Redistributions in binary form must reproduce the above copyright 10 | * notice, this list of conditions and the following disclaimer in the 11 | * documentation and/or other materials provided with the distribution. 12 | * * Neither the name of the ScalaFX Project nor the 13 | * names of its contributors may be used to endorse or promote products 14 | * derived from this software without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 17 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 19 | * DISCLAIMED. IN NO EVENT SHALL THE SCALAFX PROJECT OR ITS CONTRIBUTORS BE LIABLE 20 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 21 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 22 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED 23 | * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | */ 27 | 28 | package scalafx.ensemble.example.shapes 29 | 30 | import scalafx.ensemble.commons.EnsembleExample 31 | import scalafx.geometry.Insets 32 | import scalafx.scene.layout.HBox 33 | import scalafx.scene.paint.{Color, Paint} 34 | import scalafx.scene.shape.Polyline 35 | 36 | class EnsemblePolyline extends EnsembleExample { 37 | def getContent: HBox = { 38 | // Set polyline fill color using literal 39 | val polyObj = (poly: Polyline, color: Paint) => { 40 | poly.setFill(color) 41 | poly.setStroke(Color.Blue) 42 | poly.setStrokeWidth(1d) 43 | poly 44 | } 45 | new HBox { 46 | spacing = 25 47 | padding = Insets(20) 48 | children = List( 49 | polyObj(Polyline(45, 10, 10, 80, 45, 80), Color.Azure), 50 | polyObj(Polyline(135, 15, 160, 30, 160, 60, 135, 110, 110, 30), Color.White) 51 | ) 52 | } 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /src/main/scala/scalafx/ensemble/example/shapes/EnsembleQuadCurve.scala: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2012-2021, ScalaFX Project 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * * Redistributions of source code must retain the above copyright 8 | * notice, this list of conditions and the following disclaimer. 9 | * * Redistributions in binary form must reproduce the above copyright 10 | * notice, this list of conditions and the following disclaimer in the 11 | * documentation and/or other materials provided with the distribution. 12 | * * Neither the name of the ScalaFX Project nor the 13 | * names of its contributors may be used to endorse or promote products 14 | * derived from this software without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 17 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 19 | * DISCLAIMED. IN NO EVENT SHALL THE SCALAFX PROJECT OR ITS CONTRIBUTORS BE LIABLE 20 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 21 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 22 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED 23 | * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | */ 27 | 28 | package scalafx.ensemble.example.shapes 29 | 30 | import scalafx.ensemble.commons.EnsembleExample 31 | import scalafx.geometry.Insets 32 | import scalafx.scene.layout.VBox 33 | import scalafx.scene.paint.Color 34 | import scalafx.scene.shape.QuadCurve 35 | 36 | class EnsembleQuadCurve extends EnsembleExample { 37 | def getContent: VBox = new VBox { 38 | spacing = 20 39 | padding = Insets(20) 40 | children = List( 41 | new QuadCurve { 42 | controlX = 50 43 | controlY = 10 44 | startX = 0 45 | startY = 45 46 | endX = 180 47 | endY = 45 48 | stroke = Color.Red 49 | fill = Color.RosyBrown 50 | strokeWidth = 2d 51 | }, 52 | new QuadCurve { 53 | controlX = 150 54 | controlY = 100 55 | startX = 35 56 | startY = 145 57 | endX = 210 58 | endY = 145 59 | stroke = Color.Blue 60 | fill = Color.White 61 | strokeWidth = 2d 62 | } 63 | ) 64 | } 65 | } 66 | -------------------------------------------------------------------------------- /src/main/scala/scalafx/ensemble/example/shapes/EnsembleRectangle.scala: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2012-2020, ScalaFX Ensemble Project 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * * Redistributions of source code must retain the above copyright 8 | * notice, this list of conditions and the following disclaimer. 9 | * * Redistributions in binary form must reproduce the above copyright 10 | * notice, this list of conditions and the following disclaimer in the 11 | * documentation and/or other materials provided with the distribution. 12 | * * Neither the name of the ScalaFX Project nor the 13 | * names of its contributors may be used to endorse or promote products 14 | * derived from this software without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 17 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 19 | * DISCLAIMED. IN NO EVENT SHALL THE SCALAFX PROJECT OR ITS CONTRIBUTORS BE LIABLE 20 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 21 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 22 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED 23 | * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | */ 27 | 28 | package scalafx.ensemble.example.shapes 29 | 30 | import scalafx.ensemble.commons.EnsembleExample 31 | import scalafx.geometry.Insets 32 | import scalafx.scene.layout.HBox 33 | import scalafx.scene.paint.{Color, Paint} 34 | import scalafx.scene.shape.Rectangle 35 | 36 | class EnsembleRectangle extends EnsembleExample { 37 | def getContent: HBox = { 38 | // function literal to get Rectangle object 39 | val rectObj = (rect: Rectangle) => { 40 | rect.setStroke(Color.Burlywood); 41 | rect 42 | } 43 | val rectArcObj = (height: Int, width: Int) => { 44 | val rect = Rectangle(100, 100, Color.White) 45 | rect.setStroke(Color.Green) 46 | rect.setArcWidth(width) 47 | rect.setArcHeight(height) 48 | rect 49 | } 50 | val fillArc = (height: Int, width: Int, color: Paint) => { 51 | val rect = Rectangle(100, 100, color) 52 | rect.setStroke(Color.Black) 53 | rect.setArcWidth(width) 54 | rect.setArcHeight(height) 55 | rect 56 | } 57 | 58 | new HBox { 59 | spacing = 20 60 | padding = Insets(20) 61 | children = List( 62 | Rectangle(100, 100, Color.Red), 63 | rectObj(Rectangle(100, 100, Color.White)), 64 | rectArcObj(20, 20), 65 | fillArc(20, 20, Color.Blue) 66 | ) 67 | } 68 | } 69 | } 70 | -------------------------------------------------------------------------------- /src/main/scala/scalafx/ensemble/example/text/EnsembleInsetText.scala: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2012-2021, ScalaFX Project 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * * Redistributions of source code must retain the above copyright 8 | * notice, this list of conditions and the following disclaimer. 9 | * * Redistributions in binary form must reproduce the above copyright 10 | * notice, this list of conditions and the following disclaimer in the 11 | * documentation and/or other materials provided with the distribution. 12 | * * Neither the name of the ScalaFX Project nor the 13 | * names of its contributors may be used to endorse or promote products 14 | * derived from this software without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 17 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 19 | * DISCLAIMED. IN NO EVENT SHALL THE SCALAFX PROJECT OR ITS CONTRIBUTORS BE LIABLE 20 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 21 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 22 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED 23 | * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | */ 27 | 28 | package scalafx.ensemble.example.text 29 | 30 | import scalafx.ensemble.commons.EnsembleExample 31 | import scalafx.geometry.Insets 32 | import scalafx.scene.control.Label 33 | import scalafx.scene.layout.VBox 34 | 35 | /** 36 | * A sample that shows styling of text through CSS. 37 | * 38 | * @resource /scalafx/ensemble/css/InsetText.css 39 | */ 40 | class EnsembleInsetText extends EnsembleExample { 41 | 42 | def getContent: VBox = { 43 | // StyleSheets are added 44 | val insetTextCss = this.getClass.getResource("/scalafx/ensemble/css/InsetText.css").toExternalForm 45 | new VBox { 46 | padding = Insets(20) 47 | children = new Label { 48 | text = "Label styled as a bar" 49 | id = "label1" 50 | stylesheets = List(insetTextCss) 51 | } 52 | } 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /src/main/scala/scalafx/ensemble/example/text/EnsembleSimpleLabel.scala: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2012-2021, ScalaFX Project 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * * Redistributions of source code must retain the above copyright 8 | * notice, this list of conditions and the following disclaimer. 9 | * * Redistributions in binary form must reproduce the above copyright 10 | * notice, this list of conditions and the following disclaimer in the 11 | * documentation and/or other materials provided with the distribution. 12 | * * Neither the name of the ScalaFX Project nor the 13 | * names of its contributors may be used to endorse or promote products 14 | * derived from this software without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 17 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 19 | * DISCLAIMED. IN NO EVENT SHALL THE SCALAFX PROJECT OR ITS CONTRIBUTORS BE LIABLE 20 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 21 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 22 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED 23 | * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | */ 27 | 28 | package scalafx.ensemble.example.text 29 | 30 | import scalafx.ensemble.commons.EnsembleExample 31 | import scalafx.geometry.Insets 32 | import scalafx.scene.control.{ContentDisplay, Label} 33 | import scalafx.scene.image.{Image, ImageView} 34 | import scalafx.scene.layout.VBox 35 | 36 | /** 37 | * A simple implementation of the Label control, with an image to the left of the label. 38 | * 39 | * @resource /scalafx/ensemble/images/icon-48x48.png 40 | */ 41 | class EnsembleSimpleLabel extends EnsembleExample { 42 | 43 | def getContent: VBox = new VBox { 44 | padding = Insets(20) 45 | children = new Label { 46 | text = "A simple label with a graphic on the left." 47 | graphic = new ImageView { 48 | image = new Image(this.getClass.getResourceAsStream("/scalafx/ensemble/images/icon-48x48.png")) 49 | } 50 | contentDisplay = ContentDisplay.Left 51 | } 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /src/main/scala/scalafx/ensemble/example/text/EnsembleTextField.scala: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2012-2021, ScalaFX Project 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * * Redistributions of source code must retain the above copyright 8 | * notice, this list of conditions and the following disclaimer. 9 | * * Redistributions in binary form must reproduce the above copyright 10 | * notice, this list of conditions and the following disclaimer in the 11 | * documentation and/or other materials provided with the distribution. 12 | * * Neither the name of the ScalaFX Project nor the 13 | * names of its contributors may be used to endorse or promote products 14 | * derived from this software without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 17 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 19 | * DISCLAIMED. IN NO EVENT SHALL THE SCALAFX PROJECT OR ITS CONTRIBUTORS BE LIABLE 20 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 21 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 22 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED 23 | * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | */ 27 | 28 | package scalafx.ensemble.example.text 29 | 30 | import scalafx.ensemble.commons.EnsembleExample 31 | import scalafx.geometry.Insets 32 | import scalafx.scene.control.TextField 33 | import scalafx.scene.layout.VBox 34 | 35 | class EnsembleTextField extends EnsembleExample { 36 | 37 | def getContent: VBox = new VBox { 38 | spacing = 10 39 | padding = Insets(20) 40 | children = List( 41 | new TextField { 42 | promptText = "Hi! I am Scalafx TextField" 43 | maxWidth = 200 44 | }, 45 | new TextField { 46 | promptText = "So Sad! I am disabled" 47 | disable = true 48 | maxWidth = 200 49 | } 50 | ) 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /src/main/scala/scalafx/ensemble/stage/DashboardPage.scala: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2012-2021, ScalaFX Project 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * * Redistributions of source code must retain the above copyright 8 | * notice, this list of conditions and the following disclaimer. 9 | * * Redistributions in binary form must reproduce the above copyright 10 | * notice, this list of conditions and the following disclaimer in the 11 | * documentation and/or other materials provided with the distribution. 12 | * * Neither the name of the ScalaFX Project nor the 13 | * names of its contributors may be used to endorse or promote products 14 | * derived from this software without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 17 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 19 | * DISCLAIMED. IN NO EVENT SHALL THE SCALAFX PROJECT OR ITS CONTRIBUTORS BE LIABLE 20 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 21 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 22 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED 23 | * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | */ 27 | 28 | package scalafx.ensemble.stage 29 | 30 | import scalafx.ensemble.EnsembleTree 31 | import scalafx.ensemble.commons.DisplayablePage 32 | import scalafx.scene.control.ScrollPane 33 | import scalafx.scene.layout.{Priority, VBox} 34 | 35 | /** Dashboard Page */ 36 | class DashboardPage(dashPart: String = "dashboard") extends DisplayablePage { 37 | 38 | private val tree = EnsembleTree.create() 39 | 40 | def getPage: ScrollPane = { 41 | val thumbs = dashPart match { 42 | case "dashboard" => tree.getDashThumbsCtrl 43 | case _ => tree.getDashThumb(dashPart) 44 | } 45 | 46 | new ScrollPane { 47 | vgrow = Priority.Always 48 | hgrow = Priority.Always 49 | fitToHeight = true 50 | fitToWidth = true 51 | content = new VBox { 52 | vgrow = Priority.Always 53 | hgrow = Priority.Always 54 | children = thumbs 55 | } 56 | styleClass += "category-page" 57 | } 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /src/main/scala/scalafx/ensemble/stage/EnsembleTabbedPage.scala: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2012-2020, ScalaFX Ensemble Project 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * * Redistributions of source code must retain the above copyright 8 | * notice, this list of conditions and the following disclaimer. 9 | * * Redistributions in binary form must reproduce the above copyright 10 | * notice, this list of conditions and the following disclaimer in the 11 | * documentation and/or other materials provided with the distribution. 12 | * * Neither the name of the ScalaFX Project nor the 13 | * names of its contributors may be used to endorse or promote products 14 | * derived from this software without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 17 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 19 | * DISCLAIMED. IN NO EVENT SHALL THE SCALAFX PROJECT OR ITS CONTRIBUTORS BE LIABLE 20 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 21 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 22 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED 23 | * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | */ 27 | 28 | package scalafx.ensemble.stage 29 | 30 | import scalafx.Includes._ 31 | import scalafx.ensemble.commons.{ContentFactory, DisplayablePage} 32 | import scalafx.geometry.Pos 33 | import scalafx.scene.Node 34 | import scalafx.scene.control.{Tab, TabPane} 35 | import scalafx.scene.layout.{Priority, StackPane} 36 | 37 | object EnsembleTabbedPage { 38 | 39 | def buildTab(ctrlName: String, ctrlgrop: String): EnsembleTabbedPage = { 40 | 41 | val tabbedPage = new TabPane() { 42 | hgrow = Priority.Always 43 | vgrow = Priority.Always 44 | id = "source-tabs" 45 | tabs = Seq( 46 | new Tab() { 47 | text = "Demo" 48 | closable = false 49 | }, 50 | new Tab() { 51 | text = "Source" 52 | closable = false 53 | } 54 | ) 55 | } 56 | 57 | new EnsembleTabbedPage(tabbedPage, ctrlName, ctrlgrop) 58 | } 59 | 60 | def buildTabContent(node: Node): StackPane = { 61 | val demoTabStack = new StackPane { 62 | alignmentInParent = Pos.TopLeft 63 | children = List(node) 64 | } 65 | demoTabStack 66 | } 67 | } 68 | 69 | class EnsembleTabbedPage(tabPane: TabPane, ctrlName: String, ctrlGroup: String) 70 | extends DisplayablePage { 71 | 72 | def getPage: TabPane = { 73 | import scalafx.ensemble.stage.EnsembleTabbedPage._ 74 | tabPane.tabs(0).content = buildTabContent(ContentFactory.createContent(ctrlName, ctrlGroup)) 75 | tabPane.tabs(1).content = buildTabContent(ContentFactory.createSrcContent(ctrlName, ctrlGroup)) 76 | tabPane 77 | } 78 | } 79 | -------------------------------------------------------------------------------- /src/test/scala/scalafx/ensemble/commons/ExampleInfoTest.scala: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2012-2020, ScalaFX Ensemble Project 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * * Redistributions of source code must retain the above copyright 8 | * notice, this list of conditions and the following disclaimer. 9 | * * Redistributions in binary form must reproduce the above copyright 10 | * notice, this list of conditions and the following disclaimer in the 11 | * documentation and/or other materials provided with the distribution. 12 | * * Neither the name of the ScalaFX Project nor the 13 | * names of its contributors may be used to endorse or promote products 14 | * derived from this software without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 17 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 19 | * DISCLAIMED. IN NO EVENT SHALL THE SCALAFX PROJECT OR ITS CONTRIBUTORS BE LIABLE 20 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 21 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 22 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED 23 | * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | */ 27 | 28 | package scalafx.ensemble.commons 29 | 30 | import org.scalatest.flatspec._ 31 | import org.scalatest.matchers._ 32 | 33 | import java.io.File 34 | import scala.io.Source 35 | import scala.language.implicitConversions 36 | 37 | 38 | class ExampleInfoTest extends AnyFlatSpec with should.Matchers { 39 | 40 | val exampleBaseDir = new File("src/main/scala/scalafx/ensemble/example") 41 | 42 | it should "generate code for all examples with no errors" in { 43 | val dirs = exampleBaseDir.listFiles(file => file.isDirectory) 44 | println(s"Dirs: ${dirs.map(_.getName).mkString(", ")}") 45 | for (dir <- dirs) { 46 | val files = dir.listFiles(file => file.getName.endsWith(".scala")) 47 | for (file <- files) { 48 | val sourceRaw = loadExampleSource(file) 49 | ExampleInfo.convertSourceCode(sourceRaw) 50 | } 51 | } 52 | } 53 | 54 | it should "extractStageProperties" in { 55 | val sourceRaw = loadExampleSource("controls/EnsembleToolBar.scala") 56 | 57 | val props = ExampleInfo.extractStageProperties(sourceRaw) 58 | 59 | props should be(Seq("width = 400", "height = 150")) 60 | } 61 | 62 | def loadExampleSource(example: String): String = { 63 | val baseDir = new File("src/main/scala/scalafx/ensemble/example") 64 | val file = new File(baseDir, example) 65 | loadExampleSource(file) 66 | } 67 | 68 | def loadExampleSource(file: File): String = { 69 | val bs = Source.fromFile(file) 70 | try { 71 | bs.getLines().mkString("\n") 72 | } finally { 73 | bs.close() 74 | } 75 | } 76 | 77 | } 78 | --------------------------------------------------------------------------------