Skip to Main Content

Java SE (Java Platform, Standard Edition)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Round corner in TableView header

drenda81May 20 2014 — edited May 20 2014

Hi, I'm doing a bit of styling in TableView. The result is quite nice but I can't make the left top corner round.

This is the actual result:

http://snag.gy/kkf7v.jpg

.table-view {

    -fx-background-color: transparent;   

}

/*HEADER */

.table-view .column-header{      

    -fx-background-color: #27A5F9;   

    -fx-size: 45.0px;

    -fx-min-height: 45.0px;   

    -fx-cursor: hand;

}

.table-view .column-header .label {

    -fx-font-size: 1.083333em;

    -fx-font-weight: bold;   

    -fx-text-fill: white;

    -fx-alignment: center-left;

    -fx-padding: 5.0 5.0 5.0 5.0;

}

.table-view .filler{

    -fx-background-radius: 0.0 5.0 0.0 0.0; 

    -fx-background-color: #27A5F9;   

    -fx-size: 45.0px;

    -fx-min-height: 45.0px;   

}

.table-view .show-hide-columns-button{

    -fx-background-color: #27A5F9;   

}

.table-view .column-drag-header{

    -fx-background-color: #27A5F9;

    -fx-cursor: h-resize;

}

.table-view .column-resize-line{

    -fx-text-fill: white;

    -fx-background-color: white;

    -fx-fill: white;

    -fx-border-color: white;

    -fx-border-width: 1;

}

.table-view .column-header .sort-order{

    -fx-text-fill: white;

    -fx-fill: white;

}

.table-view .placeholder{

     -fx-background-color: white;   

}

.table-view .placeholder .label {

    -fx-font-size: 1.1em;

    -fx-font-weight: bold;   

    -fx-text-fill: #27A5F9;

    -fx-alignment: center;

}

.table-view .virtualflow{

    -fx-background-color: white;

}

/* Each row in the table is a table-row-cell. Inside a table-row-cell is any

   number of table-cell. */

.table-row-cell {

    -fx-background-color: transparent;  

    -fx-border-width: 0.0;

    -fx-padding: 10.0 0.0 10.0 0.0;   

    -fx-pref-height: 45.0px; 

}

.table-row-cell:filled:even{

    -fx-background-color: white;

}

.table-row-cell:filled:odd{

    -fx-background-color: #F6F7F8;

}

.table-view:row-selection .table-row-cell:filled:hover {

    /*-fx-background-color: red;*/

}

.table-view:row-selection .table-row-cell:filled:hover .text{

    /*-fx-fill: white;*/      

}

.table-row-cell:filled:focused {

    -fx-background-color: #e1e2e3;          

    -fx-background-insets: 0.0;

}

.table-row-cell:filled:focused .text{   

}

.table-row-cell .table-column{

    -fx-border-width: 0.0;   

    -fx-padding: 0.0 0.0 0.0 5.0;    

}

/*TESTO DELLE CELLE */

.table-row-cell .text{

    -fx-font-size: 1.1em;

    -fx-fill: #6F7B8A;

}

/*SCROLL BAR VERTICALE */

.table-view .scroll-bar:vertical{       

    -fx-padding: 0.0 0.0 0.0 0.0;

}

/*SCROLL BAR ORIZZONTALE */

.table-view .scroll-bar:horizontal {

    -fx-padding: 0.0 0.0 0.0 0.0;

}

I would also like the top left corner was round.



Thanks

This post has been answered by MoC on May 20 2014
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 17 2014
Added on May 20 2014
2 comments
3,225 views