本文整理汇总了Java中org.controlsfx.control.GridView类的典型用法代码示例。如果您正苦于以下问题:Java GridView类的具体用法?Java GridView怎么用?Java GridView使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
GridView类属于org.controlsfx.control包,在下文中一共展示了GridView类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: showContent
import org.controlsfx.control.GridView; //导入依赖的package包/类
/**
* Method for generate file items for fileBrowser and add it into container(temporary realization)
*/
private void showContent() {
ObservableList<FileItem> list = FXCollections.observableArrayList();
GridView<FileItem> myGrid = new GridView<>(list);
myGrid.setCellFactory(gridView -> new GridCell<FileItem>() {
@Override
public void updateItem(FileItem item, boolean empty) {
if (empty || item == null) {
setText(null);
setGraphic(null);
} else {
//setText(item.getName());
setGraphic(item);
}
}
});
list.addAll(new FileItem("icon", "Folder1"),
new FileItem("icon", "Documents"),
new FileItem("icon", "WorkFiles"),
new FileItem("icon", "Projects"));
container.getChildren().add(myGrid);
}
开发者ID:StnetixDevTeam,项目名称:ariADDna,代码行数:26,代码来源:FileBrowserController.java
示例2: initView
import org.controlsfx.control.GridView; //导入依赖的package包/类
/**
* Initializes the view
*/
private void initView(){
gridView = new GridView<>();
gridViewPort = new GridViewViewPort(gridView);
gridViewPort.getViewPortItemsChanged().add((sender, eventArgs) -> onVisibleItemsChanged());
gridView.setCellFactory(control -> new MediaGridItemCell(
mediaPlayerService,
gridView.cellWidthProperty(),
gridView.cellHeightProperty()
));
gridView.setOnZoom(event -> {
setItemSize(gridView.getCellWidth() * event.getTotalZoomFactor() );
event.consume();
});
loadingProgress = new ProgressIndicator();
loadingProgress.setMaxWidth(70);
StackPane mediaGridStack = new StackPane();
mediaGridStack.getChildren().addAll(gridView, loadingProgress);
this.setCenter(mediaGridStack);
}
开发者ID:Vidada-Project,项目名称:vidada-desktop,代码行数:28,代码来源:MediaBrowserFX.java
示例3: ProjectGridPane
import org.controlsfx.control.GridView; //导入依赖的package包/类
public ProjectGridPane() {
this.setCellFactory((GridView<Project> param) -> new ProjectGridCell());
this.setCellHeight(200);
this.setCellWidth(300);
this.setPrefSize(400, 300);
initProjects();
}
开发者ID:cosysoft,项目名称:agile,代码行数:9,代码来源:ProjectGridPane.java
示例4: GridViewViewPort
import org.controlsfx.control.GridView; //导入依赖的package包/类
public GridViewViewPort(GridView gridview){
this.gridview = gridview;
}
开发者ID:Vidada-Project,项目名称:vidada-desktop,代码行数:4,代码来源:GridViewViewPort.java
注:本文中的org.controlsfx.control.GridView类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论