javafx之TableView的FXCSS

TableView的FXCSS

一、特殊的table设置

TableView的单元之间去掉行横线 

 

.table-view .table-row-cell {  -fx-background-insets: 0;  
}  

TableView的单元之间去掉没有数据的竖线 

 

table-row-cell:empty .table-cell {  -fx-border-width: 0px;  
}  
TableView 的单元之间去掉 竖线 

 

table-row-cell .table-cell {  -fx-border-width: 0px;  
}  

TableView的TableColumn的列头设置

 

.table-view .column-header{-fx-border-color:white lightgray white white;  
}
table的 空闲的列头设置

 

.table-view .filler{-fx-background-color: white;    
}
table的 首背景 设置,其中包括column-header,filler, MenuButton

 

.table-view .column-header-background{   -fx-background-color: white;    
}

/* remove double borders from scrollbars */

table的 垂直滚动条 设置

 

.table-view > .virtual-flow > .scroll-bar:vertical{-fx-background-insets: 0, 0 0 0 1;-fx-padding: -1 -1 -1 0;
}

 

table的水平滚动条设置

.table-view > .virtual-flow > .scroll-bar:horizontal{-fx-background-insets: 0, 1 0 0 0;-fx-padding: 0 -1 -1 -1;
}

table的边角设置

.table-view > .virtual-flow > .corner {-fx-background-color: derive(-fx-base,-1%); /*-fx-base 是modena 预先定义的颜色*/
}

/* Selected rows */

 

.table-view:focused > .virtual-flow > .clipped-container > .sheet > .table-row-cell:filled:selected{-fx-background: -fx-selection-bar;-fx-table-cell-border-color: derive(-fx-selection-bar, 20%);
}
/* Selected when control is not focused */

 

.table-row-cell:filled > .table-cell:selected{-fx-background: -fx-selection-bar-non-focused;-fx-table-cell-border-color: derive(-fx-selection-bar-non-focused, 20%);
}
/* focused cell (keyboard navigation) */
.table-view:focused:cell-selection > .virtual-flow > .clipped-container > .sheet > .table-row-cell > .table-cell:focused{-fx-background-color: -fx-background, -fx-cell-focus-inner-border, -fx-background;-fx-background-insets: 0, 1, 2;
}


.table-view{/* Constants used throughout the tableview. */-fx-table-header-border-color: -fx-box-border;-fx-table-cell-border-color: derive(-fx-color,5%);
}

二、TableView tableRow编辑

tableRow

/* 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: -fx-control-inner-background;-fx-background-color: -fx-table-cell-border-color, -fx-background;-fx-background-insets: 0, 0 0 1 0;-fx-padding: 0;-fx-text-fill: -fx-text-background-color;
}
tableRow单元 单数tableCell
.table-row-cell:odd {-fx-background: -fx-control-inner-background-alt;
}

三、TableView 单元tableCell编辑

tableCell
.table-cell {-fx-padding: 0.166667em; /* 2px, plus border adds 1px */-fx-background-color: null;-fx-border-color: transparent -fx-table-cell-border-color transparent transparent;-fx-cell-size: 2.0em; /* 24 */-fx-text-fill: -fx-text-background-color;
}
tableCell选择单元
.table-view > .virtual-flow > .clipped-container > .sheet > .table-row-cell .table-cell:selected {-fx-background-color: -fx-table-cell-border-color, -fx-background;-fx-background-insets: 0, 0 0 1 0;
}
tableCell最右可视单元
/* When in constrained resize mode, the right-most visible cell should not havea right-border, as it is not possible to get this cleanly out of view withoutintroducing horizontal scrollbars (see RT-14886). */
.table-view:constrained-resize > .virtual-flow > .clipped-container > .sheet > .table-row-cell > .table-cell:last-visible {-fx-border-color: transparent;
}

四、TableView列头编辑

TableView列大小重新调整线

/* The column-resize-line is shown when the user is attempting to resize a column. */
.table-view .column-resize-line {-fx-background: -fx-accent;-fx-background-color: -fx-background;-fx-padding: 0.0em 0.0416667em 0.0em 0.0416667em; /* 0 0.571429 0 0.571429 */
}
TableView列头背景
/* This is the area behind the column headers. An ideal place to specify backgroundand border colors for the whole area (not individual column-header's). */
.table-view .column-header-background{-fx-background-color: -fx-inner-border, -fx-body-color;-fx-background-insets: 0, 1;
}
TableView列头行设置背景
/* The column header row is made up of a number of column-header, one for eachTableColumn, and a 'filler' area that extends from the right-most columnto the edge of the tableview, or up to the 'column control' button. */
.table-view .column-header,
.table-view .filler,
.table-view > .column-header-background > .show-hide-columns-button,
.table-view:constrained-resize .filler{-fx-background-color: -fx-box-border, -fx-inner-border, -fx-body-color;-fx-background-insets: 0, 0 1 1 0, 1 2 2 1;-fx-font-weight: bold;-fx-size: 2em;-fx-text-fill: -fx-selection-bar-text;-fx-padding: 0.166667em;
}
TableView空闲列
.table-view .filler,
.table-view:constrained-resize .filler{-fx-background-insets: 0, 0 0 1 0, 1 1 2 1;
}
TableView列头展示隐藏列按钮
.table-view > .column-header-background > .show-hide-columns-button {-fx-background-insets: 0, 0 0 1 1, 1 1 2 2;
}
TableView列头排序顺序点容器
.table-view .column-header .sort-order-dots-container{-fx-padding: 2 0 2 0;
}
TableView列头排序顺序
.table-view .column-header .sort-order{-fx-font-size: 0.916667em; /* 11pt - 1 less than the default font */
}
TableView列头排序顺序点
.table-view .column-header .sort-order-dot {-fx-background-color: -fx-mark-color;-fx-padding: 0.115em;-fx-background-radius: 0.115em;
}
TableView列头文本标签
.table-view .column-header .label{-fx-alignment: center;
}

/* Plus Symbol */
.table-view .show-hide-column-image,{-fx-background-color: -fx-mark-color;-fx-padding: 0.25em; /* 3px */-fx-shape: "M398.902,298.045c0.667,0,1.333,0,2,0c0,0.667,0,1.333,0,2c0.667,0,1.333,0,2,0c0,0.667,0,1.333,0,2c-0.667,0-1.333,0-2,0c0,0.666,0,1.332,0,1.999c-0.667,0-1.333,0-2,0c0-0.667,0-1.333,0-1.999c-0.666,0-1.333,0-1.999,0c0-0.667,0-1.334,0-2c0.666,0,1.333,0,1.999,0C398.902,299.378,398.902,298.711,398.902,298.045z"; 
}
TableView列拖拽头留下的空闲区
/* When a column is being 'dragged' to be placed in a different position, thereis a region that follows along the column header area to indicate where thecolumn will be dropped. This region can be styled using the .column-drag-headername. */
.table-view .column-drag-header {-fx-background: -fx-accent;-fx-background-color: -fx-selection-bar;-fx-border-color: transparent;-fx-opacity: 0.6;
}
TableView当前正在移动且半透明覆盖的列
/* Semi-transparent overlay to indicate the column that is currently being moved */
.table-view .column-overlay{-fx-background-color: darkgray;-fx-opacity: 0.3;
}
TableView列头排序箭头
/* Header Sort Arrows */
.table-view /*> column-header-background > nested-column-header >*/ .arrow{-fx-background-color: -fx-mark-color;-fx-padding: 0.25em 0.3125em 0.25em 0.3125em; /* 3 3.75 3 3.75 */-fx-shape: "M 0 0 h 7 l -3.5 4 z";
}
TableView没有行列
/* This is shown when the table has no rows and/or no columns. */
.table-view .empty-table {-fx-background-color: white;-fx-font-size: 1.166667em; /* 14pt - 2 more than the default font */
}


css伪

 

css元素

-fx-background-color
-fx-background-radius
-fx-border-insets              //外边界插入,没有边界显示时不设置
-fx-border-color
-fx-padding
-fx-min-width
-fx-max-width
-fx-pref-width

 

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/331749.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

sql 注射_令人惊讶的注射

sql 注射所以,我欠吉姆道歉。 他编写了一个有效的模拟和JUnit测试,我在回顾中告诉他,我认为它没有达到他的预期。 当我错了时,这种情况对我来说就像是一个错误 。 称它为理想的意外副作用。 假设您有以下两类: public…

java中的equals方法+hashCode方法

【0】README 0.1)以下内容均为原创,包括源代码, 旨在理清 equals 和 hashCode 方法的 实现原理; 0.2) for full resource code, please visit https://github.com/pacosonTang/core-java-volume/blob/master/chapte…

mysql判断条件用法,MySQL数据库讲解条件判断函数 MySQL数据库使用教程

函数&#xff1a;(1)IF(expr,v1,v2)函数(2)IFNULL(v1,v2)函数(3)CASE函数(相关免费学习推荐&#xff1a;mysql视频教程)(1)if(expr,v1,v2)函数在if(expr,v1,v2)函数中,若表达式expr是true(expr<>0 and epr<>null)返回v1&#xff0c;否则返回v2。【例】使用if()函数…

cuba.platform_CUBA 7.2 –有什么新功能?

cuba.platformCUBA平台的第七版向前迈出了一大步。 内部体系结构的改进和新的IDE为进一步改进奠定了良好的基础。 我们将继续添加新功能&#xff0c;以使开发人员的生活更轻松&#xff0c;并使他们的工作更加高效。 在7.2版中&#xff0c;我们引入了许多可能看起来像是主要更新…

javafx之TableView的TableColumn

TableColumn列 列与Bean之间建立联系&#xff1a; setCellValueFactory(); 通过cell值工厂建立与Bean的联系。它这里并不需要知道你是传了什么Bean&#xff0c;它只需要通过“字段名”反射去Bean里面获得值&#xff0c;所以Bean属性定义的名字不需要与它相同&#xff0c;只需…

java集合——具体的集合

【0】README 0.1&#xff09; 本文描述 转自 core java volume 1&#xff0c; 旨在理解 java集合——具体的集合 的相关知识&#xff1b; 【1】下表展示了 java类库中的集合&#xff0c;并简要描述了每个集合类的用途。 1.1&#xff09;在下表中&#xff0c; 除了以 Map结尾的…

excel 26进制 php,记录一次华为招聘的编程题-excel中的26进制

var line "abcdefghijklmnopqrstuvwxyz";var list line.split("");function baseConversion(N) {var jz [];//获得有0的26进制while (true) {if (parseInt(N/26) 0) {jz.push(N%26);break;} else{jz.push(N%26);N parseInt(N/26);}}//转化成无0的26进…

日发帖 发帖频率 发帖时段_先发帖

日发帖 发帖频率 发帖时段通常&#xff0c;我们编写代码来计算出一堆可用的答案。 让我们来看一下Java中的情况。 public Widget getAppropriateWidget(CustomerRequest request) { if (shelfstock.contains(request.getBarcode()) { return new ShelfWidget(); } if (backroom…

java集合——数组列表(ArrayList)+散列集(HashSet)

【0】README 0.1&#xff09; 本文描述源代码均 转自 core java volume 1&#xff0c; 旨在理解 java集合——数组列表&#xff08;ArrayList&#xff09;散列集&#xff08;HashSet&#xff09; 的相关知识&#xff1b; 0.2&#xff09; 散列集HashSet 涉及到 hashCode&…

javafx之TableView的TaleCell

TaleCell 对TableColumn的cell里面弄重新构造 TableColumn的setCellFactory(TextFieldTableCell.forTableColumn());有一些默认的构造。 或者重写TableCell类 [java] view plaincopy tableColumn.setCellFactory(new Callback<TableColumn<Path, Number>, TableCell…

jdk8 cms g1gc_JDK 14:CMS GC是OBE

jdk8 cms g1gcJDK 14 Early Access Build&#xff03;23 &#xff08; 2019/11/13 &#xff09; 现已上市 。 此版本最值得注意的更改之一是删除了并发标记扫描垃圾收集器 。 JEP 291 [“弃用并发标记扫描&#xff08;CMS&#xff09;垃圾收集器”]早在2017年就使用JDK 9和JEP …

java集合——树集(TreeSet)+对象的比较

【0】README 0.1&#xff09; 本文描述转自 core java volume 1&#xff0c; 源代码为原创&#xff0c;旨在理解 java集合——树集&#xff08;TreeSet&#xff09;对象的比较 的相关知识&#xff1b; 0.2&#xff09; for full source code, please visit https://github.co…

php curl伪装cookies,php curl 添加cookie伪造登陆抓取数据

有的网页必须登陆才能看到&#xff0c;这个时候想要抓取信息必须在header里面传递cookie值才能获取1、首先登陆网站&#xff0c;打开firebug就能看到对应的cookie把这些cookie拷贝出来就能使用了2、<?php header("Content-type:text/html;Charsetutf8");$ch curl…

JavaFX之TableView的TableRow

TableRow 通过TableView的setRowFactory,对行的双击进行操作 tableView.setRowFactory(new Callback<TableView<T>, TableRow<T>>() { Override public TableRow<T> call(TableView<T> param) { return new TableRowControl(); }…

rpc结构错误_结构性错误

rpc结构错误团队成员在使用以下代码时遇到了麻烦&#xff1a; void extractData(String targetUri) { Path tempFile createTempFilePath(); extractDataToPathAndUpload(tempFile, targetUri); cleanUp(tempFile); } void extractDataToPathAndUpload(Path tempFile, Stri…

zabbix前端php界面,Zabbix Web UI

PS&#xff1a;其实安装zabbix很简单&#xff0c;网上资料一搜一大把&#xff0c;基本都是采用yum方式安装&#xff0c;简单省事。正因如此我没写相关配置文档&#xff0c;安装方式一般用yum安装或源码安装亦或是容器安装&#xff0c;最近有网友提出来了&#xff0c;我认真对待…

Comparable与Comparator的区别

【0】README 0.1&#xff09;本文章节一&#xff08;除开 Conclusion内容&#xff09;转自&#xff1a; http://blog.csdn.net/mageshuai/article/details/3849143 0.2&#xff09; 余下内容均为原创&#xff0c;包括源代码&#xff1b; 【1】Comparable与Comparator的区别&a…

JavaFX之TableView的MenuButton

MenuButton 在JavaFx的 TableView 上可以使用MenuButton来管理TableView的Column. 启用MenuButton. TableView.setTableMenuButtonVisible(true); 但是普通的MenuButton, 每次点击都会刷新TableView 重写TableMenuButton的事件 [java] view plaincopy 找到tableView 的 …

java 读取 文本块_Java 13:文本块

java 读取 文本块Java 13已交付了期待已久的多行字符串或Text Blocks 。 您不再需要连接跨越多行的字符串或转义特殊字符&#xff0c;这确实提高了代码的可读性。 文本块是一种预览语言功能 &#xff0c;这意味着必须使用--enable-preview标志在Java编译器和运行时中明确启用它…

php 崩溃 输出,php – 创建可崩溃的print_r()var_dump()的函数?

你可能熟悉print_r的这个输出&#xff1a;Hierarchy Object([parent:private] > Hierarchy Object([parent:private] >[children:private] > Array()[level:private] > 0[price_modes:private] > Array()[id:protected] >[left_id:protected] >[right_id:…