    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.tools.ImageProvider;
    010import org.openstreetmap.josm.tools.ImageProvider.ImageSizes;
    011
    012import org.openstreetmap.josm.plugins.streetside.gui.StreetsideMainDialog;
    013
    014public class ImageReloadAction extends AbstractAction {
    015
    016        private static final long serialVersionUID = 7987479726049238315L;
    017
    018        public ImageReloadAction(final String name) {
    019                 super(name, ImageProvider.get("reload", ImageSizes.SMALLICON));
    020        }
    021
    022        @Override
    023        public void actionPerformed(ActionEvent arg0) {
    024                if(StreetsideMainDialog.getInstance().getImage()!=null){
    025                        CubemapBuilder.getInstance().reload(CubemapBuilder.getInstance().getCubemap().getId());
    026                }
    027        }
    028}