Added new set of icons
parent
002d6d2301
commit
4ae0c39983
@ -0,0 +1,37 @@
|
||||
package org.gcube.portlets.user.geoportaldataviewer.client.resources;
|
||||
|
||||
import com.github.gwtbootstrap.client.ui.constants.BaseIconType;
|
||||
import com.google.gwt.core.client.GWT;
|
||||
import com.google.gwt.resources.client.ClientBundle;
|
||||
|
||||
public interface GNAIcons extends ClientBundle {
|
||||
|
||||
/** My custom base icon collection */
|
||||
public enum CustomIconType implements BaseIconType {
|
||||
|
||||
MAP("map"),
|
||||
PRESET_LOCATION("preset_location"),
|
||||
LAYERS("layers");
|
||||
|
||||
/** Inject the icon's css once at first usage */
|
||||
static {
|
||||
GNAImages icons = GWT.create(GNAImages.class);
|
||||
icons.css().ensureInjected();
|
||||
}
|
||||
|
||||
private static final String PREFIX = "myBaseIcon_";
|
||||
private String className;
|
||||
|
||||
private CustomIconType(String className) {
|
||||
this.className = className;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
@Override
|
||||
public String get() {
|
||||
return PREFIX + className;
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,41 @@
|
||||
package org.gcube.portlets.user.geoportaldataviewer.client.resources;
|
||||
|
||||
import com.google.gwt.core.client.GWT;
|
||||
import com.google.gwt.resources.client.ClientBundle;
|
||||
import com.google.gwt.resources.client.CssResource;
|
||||
import com.google.gwt.resources.client.ImageResource;
|
||||
|
||||
public interface GNAImages extends ClientBundle {
|
||||
|
||||
/** Get access to the css resource during gwt compilation */
|
||||
@Source("baseIcons.css")
|
||||
CssResource css();
|
||||
|
||||
public static final GNAImages ICONS = GWT.create(GNAImages.class);
|
||||
|
||||
/** Our sample image icon. Makes the image resource for the gwt-compiler's css composer accessible */
|
||||
@Source("map.png")
|
||||
ImageResource map();
|
||||
|
||||
@Source("preset_location.png")
|
||||
ImageResource preset_location();
|
||||
|
||||
@Source("layers.png")
|
||||
ImageResource layers();
|
||||
|
||||
@Source("loading.gif")
|
||||
ImageResource loading();
|
||||
|
||||
@Source("map-marker-icon.png")
|
||||
ImageResource mapMarkerIcon();
|
||||
|
||||
@Source("icon_share.png")
|
||||
ImageResource shareIcon();
|
||||
|
||||
@Source("italy.png")
|
||||
ImageResource italyIcon();
|
||||
|
||||
@Source("world.png")
|
||||
ImageResource worldIcon();
|
||||
|
||||
}
|
@ -1,25 +0,0 @@
|
||||
package org.gcube.portlets.user.geoportaldataviewer.client.resources;
|
||||
|
||||
import com.google.gwt.core.client.GWT;
|
||||
import com.google.gwt.resources.client.ClientBundle;
|
||||
import com.google.gwt.resources.client.ImageResource;
|
||||
|
||||
public interface Images extends ClientBundle {
|
||||
|
||||
public static final Images ICONS = GWT.create(Images.class);
|
||||
|
||||
@Source("loading.gif")
|
||||
ImageResource loading();
|
||||
|
||||
@Source("map-marker-icon.png")
|
||||
ImageResource mapMarkerIcon();
|
||||
|
||||
@Source("icon_share.png")
|
||||
ImageResource shareIcon();
|
||||
|
||||
@Source("italy.png")
|
||||
ImageResource italyIcon();
|
||||
|
||||
@Source("world.png")
|
||||
ImageResource worldIcon();
|
||||
}
|
@ -0,0 +1,25 @@
|
||||
/* Prevent our icons from css obfuscation */
|
||||
@external .myBaseIcon_*; /* Do some css stuff */
|
||||
@sprite .myBaseIcon_map {
|
||||
gwt-image: "map";
|
||||
display: inline-block;
|
||||
vertical-align: middle;
|
||||
margin-bottom: 3px;
|
||||
margin-right: 2px;
|
||||
}
|
||||
|
||||
@sprite .myBaseIcon_preset_location {
|
||||
gwt-image: "preset_location";
|
||||
display: inline-block;
|
||||
vertical-align: middle;
|
||||
margin-bottom: 3px;
|
||||
margin-right: 2px;
|
||||
}
|
||||
|
||||
@sprite .myBaseIcon_layers {
|
||||
gwt-image: "layers";
|
||||
display: inline-block;
|
||||
vertical-align: middle;
|
||||
margin-bottom: 3px;
|
||||
margin-right: 2px;
|
||||
}
|
Binary file not shown.
After Width: | Height: | Size: 403 B |
Binary file not shown.
After Width: | Height: | Size: 465 B |
Binary file not shown.
After Width: | Height: | Size: 318 B |
Binary file not shown.
After Width: | Height: | Size: 581 B |
Binary file not shown.
After Width: | Height: | Size: 683 B |
Binary file not shown.
After Width: | Height: | Size: 1.4 KiB |
Loading…
Reference in New Issue