Ejemplo n.º 1
0
  private void setupTracksView() {
    TableColumn titleColumn = new TableColumn("Title");
    titleColumn.setSortable(false);
    titleColumn.setMinWidth(USE_COMPUTED_SIZE);
    titleColumn.setCellValueFactory(new PropertyValueFactory<>("title"));

    TableColumn durationColumn = new TableColumn("Duration");
    durationColumn.setMinWidth(60);
    durationColumn.setMaxWidth(60);
    durationColumn.setSortable(false);
    durationColumn.setCellValueFactory(new PropertyValueFactory<>("durationFormatted"));
    durationColumn.getStyleClass().add("text-layout-center");

    tracksView.getColumns().clear();
    tracksView.getColumns().addAll(titleColumn, durationColumn);
    tracksView.setColumnResizePolicy(TableView.CONSTRAINED_RESIZE_POLICY);
  }
Ejemplo n.º 2
0
  private void setupPlaylistsView() {
    TableColumn titleColumn = new TableColumn("Title");
    titleColumn.setMinWidth(USE_COMPUTED_SIZE);
    titleColumn.setSortable(false);
    titleColumn.setCellValueFactory(new PropertyValueFactory<>("title"));

    TableColumn countColumn = new TableColumn("Tracks");
    countColumn.setMinWidth(60);
    countColumn.setMaxWidth(60);
    countColumn.setSortable(false);
    countColumn.setCellValueFactory(new PropertyValueFactory<>("count"));
    countColumn.getStyleClass().add("text-layout-right");

    playlistsView.getColumns().clear();
    playlistsView.getColumns().addAll(titleColumn, countColumn);
    playlistsView.setContextMenu(playlistsContextMenu);
    playlistsView.setPlaceholder(playlistPlaceholder);
    playlistsView.setColumnResizePolicy(TableView.CONSTRAINED_RESIZE_POLICY);
  }
Ejemplo n.º 3
0
  public void initialize(URL location, ResourceBundle resource) {
    bundle = resource;
    double tableViewWidth = 0.98 * JeproLab.APP_WIDTH;
    double remainingWidth = tableViewWidth - 60;
    jeproLabFeedTableView.setPrefWidth(tableViewWidth);
    jeproLabFeedTableView.setLayoutX(0.01 * JeproLab.APP_WIDTH);

    jeproLabFeedIndexColumn.setText("#");
    jeproLabFeedIndexColumn.setPrefWidth(35);
    jeproLabFeedCheckBoxColumn.setText(bundle.getString("JEPROLAB_LABEL"));
    jeproLabFeedCheckBoxColumn.setPrefWidth(25);
    jeproLabFeedTitleColumn.setText(bundle.getString("JEPROLAB_TITLE_LABEL"));
    jeproLabFeedTitleColumn.setPrefWidth(0.15 * remainingWidth);
    jeproLabFeedAuthorColumn.setText(bundle.getString("JEPROLAB_AUTHOR_LABEL"));
    jeproLabFeedAuthorColumn.setPrefWidth(0.15 * remainingWidth);
    jeproLabFeedDescriptionColumn.setText(bundle.getString("JEPROLAB_DESCRIPTION_LABEL"));
    jeproLabFeedDescriptionColumn.getStyleClass().add("text-left");
    jeproLabFeedDescriptionColumn.setPrefWidth(.6 * remainingWidth);
    jeproLabFeedActionColumn.setText(bundle.getString("JEPROLAB_ACTIONS_LABEL"));
    jeproLabFeedActionColumn.setPrefWidth(0.1 * remainingWidth);
  }