我有一个 png 的用户 Image.asset,但已经指出图像质量较差,如何在真实设备中保持相同的质量。
提前致谢。
我已经用列制作了我的表格视图,一切正常。
我注意到的一件事是,当我过滤行时,一些数据保留在我定义为 cellFactory 的列中。
显示问题的图像:
列的代码:
@FXML
private TableColumn<Log, Integer> colQuanJour;
colQuanJour.setCellValueFactory(new PropertyValueFactory<>("quantite"));
Run Code Online (Sandbox Code Playgroud)
CellFactory 添加颜色和字符(+ 或 -)
colQuanJour.setCellFactory(
new Callback<TableColumn<Log,Integer>,TableCell<Log,Integer>>(){
@Override
public TableCell<Log, Integer> call(TableColumn<Log, Integer> param) {
return new TableCell<Log, Integer>(){
@Override
protected void updateItem(Integer item, boolean empty) {
if( ! empty){
int currIndex = indexProperty().getValue() < 0 ? 0
: indexProperty().getValue();
int operIndex = param.getTableView().getItems().get(currIndex).getOperation().getId_operation();
setStyle("-fx-font-weight: bold");
String Char ;
if(operIndex == 2){
setStyle("-fx-font-size : 16px");
setStyle("-fx-text-fill : red");
Char = "-";
}else {
setStyle("-fx-font-size : 16px");
setStyle("-fx-text-fill …Run Code Online (Sandbox Code Playgroud)