我试图绘制屏幕的JavaFX项目上的一些线路。我发现如何使用Java代码做文档,但我需要做的是在FXML文件。我不能找到在属性的任何文档(例如,x和y定位)在FXML创建</线>。
运行startx,startY - 起点坐标,endX,恩迪 - 终点坐标; 行程 - 线色; strokeLineCap(对接,方形,圆形); strokeWidth - 宽度行:
<Line startX="41.0" startY="56.0" endX="143.0" endY="56.0"
layoutX="67.0" layoutY="154.0" opacity="0.5"
stroke="#346e3c" strokeLineCap="BUTT" strokeWidth="4.0"/>
从布局的开始缩进线(长度= 100)(X = 50,Y = 50):
<!-- horizontal line -->
<Line layoutX="50.0" layoutY="50.0" endX="100" />
<!-- vertical line -->
<Line layoutX="50.0" layoutY="50.0" endY="100" />
光标和效果的属性:
<Line ...>
<cursor>
<Cursor fx:constant="HAND" />
<!-- other, such as: DEFAULT, V_RESIZE, H_RESIZE, MOVE -->
</cursor>
<effect>
<GaussianBlur />
<!-- other, such as: Blend, Bloom, Glow, Reflection, Shadow -->
</effect>
</Line>
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句