* and the underlying table
*/
public TableSettingsControlPanel(TableSettingsController panelController) {
controller = panelController;
SpinnerModel rowDimensionModel = new SpinnerNumberModel(12, 5, 100, 1);
rowHeightSpinner = new JSpinner(rowDimensionModel);
setAccessibleName(rowHeightSpinner, "ROW_HEIGHT");
rowHeightSpinner.addChangeListener(rowHeightListener = new ChangeListener() {
@Override
public void stateChanged(ChangeEvent e) {
controller.setRowHeight(Integer.class.cast(rowHeightSpinner.getValue()).intValue());
}
});
SpinnerModel columnDimensionModel = new SpinnerNumberModel(12, 5, 3000, 1);
columnWidthSpinner = new JSpinner(columnDimensionModel);
setAccessibleName(columnWidthSpinner, "COLUMN_WIDTH");
columnWidthSpinner.addChangeListener(columnWidthListener = new ChangeListener() {
@Override
public void stateChanged(ChangeEvent e) {
controller.setColumnWidth(Integer.class.cast(columnWidthSpinner.getValue()).intValue());
}
});
tableRowOrientation = new JRadioButton(bundle.getString("ROW_MAJOR"));
setAccessibleName(tableRowOrientation, "ROW_MAJOR");
tableRowOrientation.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
controller.setTableOrientation(TableOrientation.ROW_MAJOR);
settingsChanged();
}
});
tableColOrientation = new JRadioButton(bundle.getString("COLUMN_MAJOR"));
setAccessibleName(tableColOrientation, "COLUMN_MAJOR");
tableColOrientation.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
controller.setTableOrientation(TableOrientation.COLUMN_MAJOR);
settingsChanged();
}
});
tableRowOrientation.setSelected(true);
groupButtons(tableRowOrientation, tableColOrientation);
transposeTableButton = new JButton(bundle.getString("TRANSPOSE_TABLE"));
setAccessibleName(transposeTableButton, "TRANSPOSE_TABLE");
transposeTableButton.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
controller.transposeTable();
}
});
rowHeaderFontName = setUpFontControl();
setAccessibleName(rowHeaderFontName, "ROW_FONT");
rowHeaderFontName.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
controller.setRowHeaderFontName((rowHeaderFontName.getModel()));
}
});
columnHeaderFontName = setUpFontControl();
setAccessibleName(columnHeaderFontName, "COL_FONT");
columnHeaderFontName.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
controller.setColumnHeaderFontName((columnHeaderFontName.getModel()));
}
});
SpinnerModel rowFontSizeModel = new SpinnerNumberModel(12, 8, 36, 1);
rowHeaderFontSize = new JSpinner(rowFontSizeModel);
setAccessibleName(rowHeaderFontSize, "ROW_FONT_SIZE");
rowHeaderFontSize.addChangeListener(rowHeaderFontSizeListener = new ChangeListener() {
@Override
public void stateChanged(ChangeEvent e) {
controller.setRowHeaderFontSize(Integer.class.cast(rowHeaderFontSize.getValue()).intValue());
}
});
SpinnerModel columnFontSizeModel = new SpinnerNumberModel(12, 8, 36, 1);
columnHeaderFontSize = new JSpinner(columnFontSizeModel);
setAccessibleName(columnHeaderFontSize, "COL_FONT_SIZE");
columnHeaderFontSize.addChangeListener(columnHeaderFontSizeListener = new ChangeListener() {
@Override
public void stateChanged(ChangeEvent e) {
controller.setColumnHeaderFontSize(Integer.class.cast(columnHeaderFontSize.getValue()).intValue());
}
});
SpinnerModel cellFontSizeModel = new SpinnerNumberModel(12, 8, 36, 1);
cellFontSize = new JSpinner(cellFontSizeModel);
setAccessibleName(cellFontSize, "CELL_FONT_SIZE");
cellFontSize.addChangeListener(cellFontSizeListener = new ChangeListener() {
@Override
public void stateChanged(ChangeEvent e) {