I want to change JTable
and JTree
style through Synth LookAndFeel xml configuration. But I only found that a small part can be implemented through the xml
file configuration(eg. high-line, cell-color...). For example, the cell border, the dividing line between the headers, the background color of the table selected cell, etc. have not found a configurable entry.
the code as followed:
enter code here
<style id="tableStyle">
<state>
<color type="BACKGROUND" value="WHITE"/>
<color type="FOREGROUND" value="BLACK"/>
<color value="LIGHT_GRAY" type="TEXT_BACKGROUND"/>
<color value="BLACK" type="TEXT_FOREGROUND"/>
<imagePainter method="tableBorder" path="images/textfield.png"
sourceInsets="1 1 1 0" paintCenter="false"/>
</state>
<object class="javax.swing.plaf.ColorUIResource" id="color">
<int>255</int>
<int>0</int>
<int>0</int>
</object>
<property key="Table.gridColor" type="idref" value="color"/>
</style>
<bind style="tableStyle" type="region" key="Table"/>
enter code here
Is it possible to implement styles in images through XML configuration? thanks.