JFoenix提供的多选组件为JFXCheckBox,JFXCheckBox样式如下:
对应源码如下:
<JFXCheckBox layoutX="50" layoutY="40" text="默认多选框"></JFXCheckBox>
<JFXCheckBox layoutX="50" layoutY="80" style="-jfx-unchecked-color: #4169E1;" text="自定义多选框 未选择-框颜色"></JFXCheckBox>
<JFXCheckBox layoutX="50" layoutY="120" style="-jfx-checked-color: #FF4500;" text="自定义多选框 已选择-框颜色"></JFXCheckBox>
<JFXCheckBox layoutX="50" layoutY="160" style="-jfx-unchecked-color: #2E8B57; -jfx-checked-color: #FF4500;" text="自定义多选框 未选择/已选择-框颜色"></JFXCheckBox>
<JFXCheckBox layoutX="50" layoutY="200" style="-jfx-unchecked-color: #2E8B57; -jfx-checked-color: #4169EE; -fx-text-fill: #FF4500;" text="自定义多选框 未选择/已选择-框颜色 文字颜色"></JFXCheckBox>
JFXCheckBox提供了两个自定义属性:
-jfx-checked-color
用于定义多选框选中时的颜色,默认是:#0F9D58(绿色系)
-jfx-unchecked-color
用于定义多选框未选中时的颜色,默认是:#5A5A5A(黑色系)