Skip to content

Commit

Permalink
Add icon for JOSM download window
Browse files Browse the repository at this point in the history
Signed-off-by: Taylor Smock <[email protected]>
  • Loading branch information
tsmock committed Aug 1, 2023
1 parent 3fdb8b0 commit 9aab77d
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

import static org.openstreetmap.josm.tools.I18n.tr;

import javax.swing.Icon;
import javax.swing.JCheckBox;
import javax.swing.event.ChangeListener;

Expand All @@ -19,6 +20,7 @@
import org.openstreetmap.josm.plugins.mapwithai.data.mapwithai.MapWithAIInfo;
import org.openstreetmap.josm.plugins.mapwithai.data.mapwithai.MapWithAILayerInfo;
import org.openstreetmap.josm.plugins.mapwithai.data.mapwithai.MapWithAILayerInfo.LayerChangeListener;
import org.openstreetmap.josm.tools.ImageProvider;

/**
* Adds the MapWithAI download checkbox to the JOSM download UI
Expand All @@ -27,6 +29,11 @@ public class MapWithAIDownloadSourceType implements IDownloadSourceType, LayerCh
static final BooleanProperty IS_ENABLED = new BooleanProperty("download.mapwithai.data", false);
JCheckBox cbDownloadMapWithAIData;

@Override
public Icon getIcon() {
return ImageProvider.get("mapwithai", ImageProvider.ImageSizes.SMALLICON);
}

@Override
public JCheckBox getCheckBox(ChangeListener checkboxChangeListener) {
if (cbDownloadMapWithAIData == null) {
Expand Down

0 comments on commit 9aab77d

Please sign in to comment.