super("MapBackgroundColorAction");
}
public void actionPerformed(final ActionEvent e) {
final Controller controller = Controller.getCurrentController();
MapStyle mapStyle = (MapStyle) controller.getModeController().getExtension(MapStyle.class);
final MapStyleModel model = (MapStyleModel) mapStyle.getMapHook();
final Color oldBackgroundColor;
final String colorPropertyString = ResourceController.getResourceController().getProperty(
MapStyle.RESOURCES_BACKGROUND_COLOR);
final Color defaultBgColor = ColorUtils.stringToColor(colorPropertyString);
if (model != null) {
oldBackgroundColor = model.getBackgroundColor();
}
else {
oldBackgroundColor = defaultBgColor;
}
final Color actionColor = ColorTracker.showCommonJColorChooserDialog(controller.getSelection()
.getSelected(), TextUtils.getText("choose_map_background_color"), oldBackgroundColor, defaultBgColor);
mapStyle.setBackgroundColor(model, actionColor);
}