- * The foreground color.
- */
- private ForegroundPicker foreground;
-
- /**
- * The background color.
- */
- private BackgroundPicker background;
-
- /**
- * Set various widgets/values to the editing theme color.
- *
- * @param colorName name of color from theme
- */
- private void refreshFromTheme(final String colorName) {
- CellAttributes attr = editTheme.getColor(colorName);
- foreground.color = attr.getForeColor();
- foreground.bold = attr.isBold();
- background.color = attr.getBackColor();
- }
-
- /**
- * Examines foreground, background, and colorNames and sets the color in
- * editTheme.
- */
- private void saveToEditTheme() {
- String colorName = colorNames.getSelected();
- if (colorName == null) {
- return;
- }
- CellAttributes attr = editTheme.getColor(colorName);
- attr.setForeColor(foreground.color);
- attr.setBold(foreground.bold);
- attr.setBackColor(background.color);
- editTheme.setColor(colorName, attr);
- }
-
- /**
- * Public constructor. The file open box will be centered on screen.