protected void editColors() { ColorsSelectionDialog dialog = new ColorsSelectionDialog( getDialogParent(), 2, Integer.MAX_VALUE, asList(this.colors) ); dialog.setVisible(true); if (!dialog.isCanceled()) { this.setColors(dialog.getSelectedColors()); } }
protected void editVisibleColumns() { List<String> visible = this.heatmap.getVisibleColumnNames(); List<String> notVisible = this.heatmap.getColumnNames(); notVisible.removeAll(visible); ListSelectionDialog<String> dialog; try { dialog = new ListSelectionDialog<String>( getDialogParent(), visible, notVisible, "Visible columns", "Not visible columns" ){ private static final long serialVersionUID = 1L; public String getDescription() { return DESCRIPTION_VISIBLE_COLUMNS; } }; dialog.setVisible(true); if (!dialog.isCanceled()) { this.heatmap.setVisibleColumnNames(dialog.getSelectedItems()); } } catch (InvalidClassException e) { throw new RuntimeException(e); } }
protected void editVisibleRows() { List<String> visible = this.heatmap.getVisibleRowNames(); List<String> notVisible = this.heatmap.getRowNames(); notVisible.removeAll(visible); ListSelectionDialog<String> dialog; try { dialog = new ListSelectionDialog<String>( getDialogParent(), visible, notVisible, "Visible rows", "Not visible rows" ) { private static final long serialVersionUID = 1L; public String getDescription() { return DESCRIPTION_VISIBLE_ROWS; } }; dialog.setVisible(true); if (!dialog.isCanceled()) { this.heatmap.setVisibleRowNames(dialog.getSelectedItems()); } } catch (InvalidClassException e) { throw new RuntimeException(e); } }
protected void configureFont() { FontConfigurationDialog dialog = new FontConfigurationDialog( getDialogParent(), getHeatmapFont() ) { private static final long serialVersionUID = 1L; @Override protected String getDescription() { return DESCRIPTION_FONT_DIALOG; } }; dialog.setVisible(true); if(!dialog.isCanceled()) { this.setHeatmapFont(dialog.getSelectedFont()); } }
private void transformDataMatrix() { JHeatMapDataOperationsDialog dialog = new JHeatMapDataOperationsDialog(getDialogParent()); dialog.setVisible(true); if(!dialog.isCanceled()) { applyTransformations(dialog.getTransform(), dialog.getCentering()); } }
protected void setHeatmapRange() { DoubleRangeInputDialog dialog = new DoubleRangeInputDialog( getDialogParent(), new DoubleRange(heatmap.getLowValue(), heatmap.getHighValue()) ) { private static final long serialVersionUID = 1L; @Override protected String getDescription() { return DESCRIPTION_RANGE_DIALOG; } }; dialog.setVisible(true); if(!dialog.isCanceled()) { heatmap.setValuesRange(dialog.getSelectedRange()); } }