Created
August 2, 2013 16:45
-
-
Save amiracam/6141413 to your computer and use it in GitHub Desktop.
JrubyFX Progress Indicator Issue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<?import java.lang.*?> | |
<?import java.util.*?> | |
<?import javafx.scene.control.*?> | |
<?import javafx.scene.layout.*?> | |
<?import javafx.scene.paint.*?> | |
<AnchorPane id="AnchorPane" maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="400.0" prefWidth="400.0" xmlns:fx="http://javafx.com/fxml"> | |
<children> | |
<GridPane prefHeight="400.0" prefWidth="600.0" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0"> | |
<children> | |
<ProgressIndicator fx:id="prog1" maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="50.0" prefWidth="50.0" progress="0.0" GridPane.columnIndex="1" GridPane.rowIndex="0" /> | |
<ProgressIndicator id="prog1" fx:id="prog2" maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="50.0" prefWidth="50.0" progress="0.0" GridPane.columnIndex="0" GridPane.rowIndex="1" /> | |
<ProgressIndicator id="prog1" fx:id="prog3" maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="50.0" prefWidth="50.0" progress="0.0" GridPane.columnIndex="1" GridPane.rowIndex="1" /> | |
<ProgressIndicator id="prog1" fx:id="prog4" maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="50.0" prefWidth="50.0" progress="0.0" GridPane.columnIndex="2" GridPane.rowIndex="1" /> | |
</children> | |
<columnConstraints> | |
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" /> | |
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" /> | |
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" /> | |
</columnConstraints> | |
<rowConstraints> | |
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" /> | |
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" /> | |
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" /> | |
</rowConstraints> | |
</GridPane> | |
</children> | |
</AnchorPane> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'jrubyfx' | |
require '../src/progress_indicator_controller' | |
class ProgressIndicatorApp < JRubyFX::Application | |
# To change this template use File | Settings | File Templates. | |
def start(stage) | |
# assign the title | |
stage.title = 'AMN' | |
ProgressIndicatorController.load_into stage, initialize: [self, 'To initialized'] | |
# finally, show our app | |
stage.show | |
end | |
end | |
ProgressIndicatorApp.launch |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'jrubyfx' | |
class ProgressIndicatorController | |
# To change this template use File | Settings | File Templates. | |
include JRubyFX::Controller | |
include JRubyFX | |
fxml 'progress_indicator.fxml', nil, '.' | |
def initialize arg1, arg2 | |
#@prog1.setProgress -1.0 | |
@prog2.setProgress 0.25 | |
@prog3.setProgress 0.50 | |
@prog4.setProgress 1.0 | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment