如何设置TableView中的"THIS"点?
我的CSS代码如下:
*/*
* Empty Stylesheet file.
*/
.root{
-fx-background-color: #262626;
}
.table-view{
-fx-background-color: transparent;
}
.table-view:focused{
-fx-background-color: transparent;
}
/* Spaltenköpfe
Struktur column-header-background -> column-header */
.table-view .column-header-background{
-fx-background-color: linear-gradient(#131313 0%, #424141 100%);
}
.table-view .column-header-background .label{
-fx-background-color: transparent;
-fx-text-fill: white;
}
.table-view .column-header {
-fx-background-color: transparent;
}
.table-view .table-cell{
-fx-text-fill: white;
}
.table-row-cell{
-fx-background-color: -fx-table-cell-border-color, #616161;
-fx-background-insets: 0, 0 0 1 0;
-fx-padding: 0.0em; /* 0 */
}
.table-row-cell:odd{
-fx-background-color: -fx-table-cell-border-color, #424242;
-fx-background-insets: 0, 0 0 1 0; …Run Code Online (Sandbox Code Playgroud) 我想设置一个与我的窗口/屏幕大小相同的背景图像.
我更愿意在我的CSS文件中执行此操作,但我找不到实现此目的的方法.
我必须在javafx类文件中执行此操作吗?
谢谢你的每一个帮助;)
就像标题所说,我在最佳实践/良好编码的范围内有一个简单的问题.在我的组件中,我经常需要从视图中访问元素.所以现在我想知道,如果我应该使用这个sap.ui.getCore().byId(ID)方法来获取我的元素或this.getView().byId(ID)运算符.我想也许这不管我选择哪两个,但我想了解更多有关整个sapui5内容的信息,也许有一种方法可以选择一种解决方案.
编辑:
也许我对我的要求不够清楚,现在纠正错了.我的问题在于组件的范围.所以我想知道我是否应该由this运营商或通过运营商访问我的元素sap.ui.getCore().byId(ID).我知道这个运算符是什么等等,但我不知道,哪个变体"更清晰":
我的javaFx应用程序出了问题.每次我调用Label的.setText()方法时,都会出现NullPointerException.这是我的代码:这是我的控制器的一个小部件:
public class HomenizerController implements Initializable{
//ArrayList zum abspeichern der Termine in Listen Form
private ArrayList<Date> dateList = new ArrayList();
//ArrayList zum ab speichern der Aufgaben in Listen Form
private ArrayList<ToDo> toDoList = new ArrayList();
private Properties prop = null;
@FXML private Label username;
private void setWelcomeTab(){
username.setText("A");
}
private void loadProperties(String path){
FileInputStream fis = null;
try {
prop = new Properties();
fis = new FileInputStream("src/homenizer/profiles/"+path+"/config.properties");
prop.load(fis);
} catch (FileNotFoundException ex) {
Logger.getLogger(HomenizerController.class.getName()).log(Level.SEVERE, null, ex);
} catch (IOException ex) …Run Code Online (Sandbox Code Playgroud)