プロジェクト

全般

プロフィール

« | » 

リビジョン 9b053a2a

高徹 高橋 徹 さんが9年以上前に追加

縮小表示時に5分刻みが見やすいよう、時計の文字盤の5分刻みの目盛を少し大きくした

差分を表示:

AnalogClockSvg/nbproject/project.properties
javafx.application.implementation.version=0.2.2
javafx.binarycss=false
javafx.classpath.extension=\
${platforms.JDK_1.8_32bit_.home}/jre/lib/javaws.jar:\
${platforms.JDK_1.8_32bit_.home}/jre/lib/deploy.jar:\
${platforms.JDK_1.8_32bit_.home}/jre/lib/plugin.jar
${platforms.JDK_1.8_32bit.home}/jre/lib/javaws.jar:\
${platforms.JDK_1.8_32bit.home}/jre/lib/deploy.jar:\
${platforms.JDK_1.8_32bit.home}/jre/lib/plugin.jar
javafx.deploy.adddesktopshortcut=false
javafx.deploy.addstartmenushortcut=false
javafx.deploy.allowoffline=true
......
meta.inf.dir=${src.dir}/META-INF
mkdist.disabled=false
native.bundling.enabled=true
platform.active=JDK_1.8_32bit_
platform.active=JDK_1.8_32bit
run.classpath=\
${dist.jar}:\
${javac.classpath}:\
AnalogClockSvg/src/analogclocksvg/AnalogClock.fxml
<?import javafx.scene.layout.StackPane?>
<?import javafx.scene.shape.SVGPath?>
<StackPane style="-fx-background-color: transparent;" stylesheets="@AnalogClock.css" xmlns="http://javafx.com/javafx/8.0.65" xmlns:fx="http://javafx.com/fxml/1" fx:controller="analogclocksvg.AnalogClockController">
<StackPane style="-fx-background-color: transparent;" stylesheets="@AnalogClock.css" xmlns="http://javafx.com/javafx/8.0.60" xmlns:fx="http://javafx.com/fxml/1" fx:controller="analogclocksvg.AnalogClockController">
<children>
<Group>
<children>
<SVGPath fx:id="dialBase" cacheHint="SPEED" content="M 100 0 A 100,100 0 1 1 99 0" stroke="#f8f6f6" strokeWidth="0.0" />
<SVGPath fx:id="dialMinutes" cacheHint="SPEED" content="M 100.0,12.0 L 100.0,24.0 M 108.8,16.5 L 108.6,18.4 M 117.5,17.8 L 117.0,19.8 M 126.0,20.1 L 125.3,22.0 M 134.2,23.3 L 133.4,25.1 M 144.0,23.8 L 138.0,34.2 M 149.4,32.0 L 148.2,33.7 M 156.2,37.6 L 154.9,39.1 M 162.4,43.8 L 160.9,45.1 M 168.0,50.6 L 166.3,51.8 M 176.2,56.0 L 165.8,62.0 M 176.7,65.8 L 174.9,66.6 M 179.9,74.0 L 178.0,74.7 M 182.2,82.5 L 180.2,83.0 M 183.5,91.2 L 181.6,91.4 M 188.0,100.0 L 176.0,100.0 M 183.5,108.8 L 181.6,108.6 M 182.2,117.5 L 180.2,117.0 M 179.9,126.0 L 178.0,125.3 M 176.7,134.2 L 174.9,133.4 M 176.2,144.0 L 165.8,138.0 M 168.0,149.4 L 166.3,148.2 M 162.4,156.2 L 160.9,154.9 M 156.2,162.4 L 154.9,160.9 M 149.4,168.0 L 148.2,166.3 M 144.0,176.2 L 138.0,165.8 M 134.2,176.7 L 133.4,174.9 M 126.0,179.9 L 125.3,178.0 M 117.5,182.2 L 117.0,180.2 M 108.8,183.5 L 108.6,181.6 M 100.0,188.0 L 100.0,176.0 M 91.2,183.5 L 91.4,181.6 M 82.5,182.2 L 83.0,180.2 M 74.0,179.9 L 74.7,178.0 M 65.8,176.7 L 66.6,174.9 M 56.0,176.2 L 62.0,165.8 M 50.6,168.0 L 51.8,166.3 M 43.8,162.4 L 45.1,160.9 M 37.6,156.2 L 39.1,154.9 M 32.0,149.4 L 33.7,148.2 M 23.8,144.0 L 34.2,138.0 M 23.3,134.2 L 25.1,133.4 M 20.1,126.0 L 22.0,125.3 M 17.8,117.5 L 19.8,117.0 M 16.5,108.8 L 18.4,108.6 M 12.0,100.0 L 24.0,100.0 M 16.5,91.2 L 18.4,91.4 M 17.8,82.5 L 19.8,83.0 M 20.1,74.0 L 22.0,74.7 M 23.3,65.8 L 25.1,66.6 M 23.8,56.0 L 34.2,62.0 M 32.0,50.6 L 33.7,51.8 M 37.6,43.8 L 39.1,45.1 M 43.8,37.6 L 45.1,39.1 M 50.6,32.0 L 51.8,33.7 M 56.0,23.8 L 62.0,34.2 M 65.8,23.3 L 66.6,25.1 M 74.0,20.1 L 74.7,22.0 M 82.5,17.8 L 83.0,19.8 M 91.2,16.5 L 91.4,18.4" stroke="BLACK" strokeWidth="2.0" />
<SVGPath fx:id="dialMinutes" cacheHint="SPEED" content="M 100.0,12.0 L 100.0,32.0 M 108.8,16.5 L 108.6,18.4 M 117.5,17.8 L 117.0,19.8 M 126.0,20.1 L 125.3,22.0 M 134.2,23.3 L 133.4,25.1 M 144.0,23.8 L 134.0,41.1 M 149.4,32.0 L 148.2,33.7 M 156.2,37.6 L 154.9,39.1 M 162.4,43.8 L 160.9,45.1 M 168.0,50.6 L 166.3,51.8 M 176.2,56.0 L 158.9,66.0 M 176.7,65.8 L 174.9,66.6 M 179.9,74.0 L 178.0,74.7 M 182.2,82.5 L 180.2,83.0 M 183.5,91.2 L 181.6,91.4 M 188.0,100.0 L 168.0,100.0 M 183.5,108.8 L 181.6,108.6 M 182.2,117.5 L 180.2,117.0 M 179.9,126.0 L 178.0,125.3 M 176.7,134.2 L 174.9,133.4 M 176.2,144.0 L 158.9,134.0 M 168.0,149.4 L 166.3,148.2 M 162.4,156.2 L 160.9,154.9 M 156.2,162.4 L 154.9,160.9 M 149.4,168.0 L 148.2,166.3 M 144.0,176.2 L 134.0,158.9 M 134.2,176.7 L 133.4,174.9 M 126.0,179.9 L 125.3,178.0 M 117.5,182.2 L 117.0,180.2 M 108.8,183.5 L 108.6,181.6 M 100.0,188.0 L 100.0,168.0 M 91.2,183.5 L 91.4,181.6 M 82.5,182.2 L 83.0,180.2 M 74.0,179.9 L 74.7,178.0 M 65.8,176.7 L 66.6,174.9 M 56.0,176.2 L 66.0,158.9 M 50.6,168.0 L 51.8,166.3 M 43.8,162.4 L 45.1,160.9 M 37.6,156.2 L 39.1,154.9 M 32.0,149.4 L 33.7,148.2 M 23.8,144.0 L 41.1,134.0 M 23.3,134.2 L 25.1,133.4 M 20.1,126.0 L 22.0,125.3 M 17.8,117.5 L 19.8,117.0 M 16.5,108.8 L 18.4,108.6 M 12.0,100.0 L 32.0,100.0 M 16.5,91.2 L 18.4,91.4 M 17.8,82.5 L 19.8,83.0 M 20.1,74.0 L 22.0,74.7 M 23.3,65.8 L 25.1,66.6 M 23.8,56.0 L 41.1,66.0 M 32.0,50.6 L 33.7,51.8 M 37.6,43.8 L 39.1,45.1 M 43.8,37.6 L 45.1,39.1 M 50.6,32.0 L 51.8,33.7 M 56.0,23.8 L 66.0,41.1 M 65.8,23.3 L 66.6,25.1 M 74.0,20.1 L 74.7,22.0 M 82.5,17.8 L 83.0,19.8 M 91.2,16.5 L 91.4,18.4" stroke="BLACK" strokeWidth="2.0" />
<SVGPath fx:id="hourHand" cacheHint="SPEED" content="M 100,100 L 92,90 L 100,40 L 108,90 Z" />
<SVGPath fx:id="minuteHand" cacheHint="SPEED" content="M 100,100 L 92,90 L 100,20 L 108,90 Z" />
<SVGPath fx:id="secondHand" cacheHint="SPEED" content="M 100,110 L 100,20" stroke="#838080" />
AnalogClockSvg/test/analogclocksvg/AnalogClockControllerTest.java
private Line createLine(int minute) {
Rotate rot = new Rotate(minute * 6, 100, 100);
Point2D p0 = rot.transform(100, minute % 5 == 0 ? 12 : 16);
Point2D p1 = rot.transform(100, minute % 5 == 0 ? 24 : 18);
Point2D p1 = rot.transform(100, minute % 5 == 0 ? 32 : 18);
Line line = new Line(p0.getX(), p0.getY(), p1.getX(), p1.getY());
return line;
}

他の形式にエクスポート: Unified diff