import java.util.List;
import javax.help.HelpSetException;
-import javax.swing.JButton;
import javax.swing.JColorChooser;
import javax.swing.JFileChooser;
import javax.swing.JInternalFrame;
public static final String SHOW_OCCUPANCY = "SHOW_OCCUPANCY";
+ public static final String SHOW_OV_HIDDEN_AT_START = "SHOW_OV_HIDDEN_AT_START";
+
+ public static final String USE_LEGACY_GAP = "USE_LEGACY_GAP";
+
private static final int MIN_FONT_SIZE = 1;
private static final int MAX_FONT_SIZE = 30;
Cache.getDefaultColour("ANNOTATIONCOLOUR_MIN", Color.orange));
maxColour.setBackground(
Cache.getDefaultColour("ANNOTATIONCOLOUR_MAX", Color.red));
+
+ /*
+ * Set overview panel defaults
+ */
gapColour.setBackground(
Cache.getDefaultColour("GAP_COLOUR", Color.lightGray));
hiddenColour.setBackground(
Cache.getDefaultColour("HIDDEN_COLOUR", Color.darkGray));
+ useLegacyGap.setSelected(Cache.getDefault("USE_LEGACY_GAP", false));
+ gapLabel.setEnabled(!useLegacyGap.isSelected());
+ gapColour.setEnabled(!useLegacyGap.isSelected());
+ showHiddenAtStart
+ .setSelected(Cache.getDefault("SHOW_OV_HIDDEN_AT_START", true));
/*
* Set Structure tab defaults.
maxColour.getBackground());
/*
+ * Save Overview settings
+ */
+ Cache.setColourProperty("GAP_COLOUR", gapColour.getBackground());
+ Cache.setColourProperty("HIDDEN_COLOUR", hiddenColour.getBackground());
+ Cache.applicationProperties.setProperty(USE_LEGACY_GAP,
+ Boolean.toString(useLegacyGap.isSelected()));
+ Cache.applicationProperties.setProperty(SHOW_OV_HIDDEN_AT_START,
+ Boolean.toString(showHiddenAtStart.isSelected()));
+
+ /*
* Save Structure settings
*/
Cache.applicationProperties.setProperty(ADD_TEMPFACT_ANN,
}
@Override
- public void gapColour_actionPerformed(JButton btn)
+ public void gapColour_actionPerformed(JPanel gap)
{
- Color col = JColorChooser.showDialog(this,
- MessageManager.getString("label.select_gap_colour"),
- gapColour.getForeground());
- if (col != null)
+ if (!useLegacyGap.isSelected())
{
- btn.setForeground(col);
+ Color col = JColorChooser.showDialog(this,
+ MessageManager.getString("label.select_gap_colour"),
+ gapColour.getBackground());
+ if (col != null)
+ {
+ gap.setBackground(col);
+ }
+ gap.repaint();
}
- btn.repaint();
}
@Override
- public void hiddenColour_actionPerformed(JButton btn)
+ public void hiddenColour_actionPerformed(JPanel hidden)
{
Color col = JColorChooser.showDialog(this,
MessageManager.getString("label.select_hidden_colour"),
- hiddenColour.getForeground());
+ hiddenColour.getBackground());
if (col != null)
{
- btn.setForeground(col);
+ hidden.setBackground(col);
}
- btn.repaint();
+ hidden.repaint();
}
@Override