    001// License: GPL. For details, see LICENSE file.
    002package org.openstreetmap.josm.plugins.streetside.actions;
    003
    004import java.awt.event.ActionEvent;
    005
    006import javax.swing.AbstractAction;
    007
    008import org.openstreetmap.josm.plugins.streetside.cubemap.CubemapBuilder;
    009import org.openstreetmap.josm.plugins.streetside.gui.StreetsideMainDialog;
    010import org.openstreetmap.josm.tools.ImageProvider;
    011import org.openstreetmap.josm.tools.ImageProvider.ImageSizes;
    012
    013public class ImageReloadAction extends AbstractAction {
    014
    015        private static final long serialVersionUID = 7987479726049238315L;
    016
    017        public ImageReloadAction(final String name) {
    018                 super(name, ImageProvider.get("reload", ImageSizes.SMALLICON));
    019        }
    020
    021        @Override
    022        public void actionPerformed(ActionEvent arg0) {
    023                if(StreetsideMainDialog.getInstance().getImage()!=null){
    024                        CubemapBuilder.getInstance().reload(CubemapBuilder.getInstance().getCubemap().getId());
    025                }
    026        }
    027}