Class GoogleIconDescriptor
- java.lang.Object
-
- org.eclipse.jface.resource.DeviceResourceDescriptor
-
- org.eclipse.jface.resource.ImageDescriptor
-
- org.eclipse.nebula.widgets.geomap.jface.GoogleIconDescriptor
-
public class GoogleIconDescriptor extends org.eclipse.jface.resource.ImageDescriptorImageDescriptor that downloads the image data from https://chart.googleapis.com/ Typically used by a LabelProvider with an ImageRegistry to provide map icons.- See Also:
LabelProvider,ImageRegistry
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classGoogleIconDescriptor.OptionsOptions for the GoogleIconDescriptor
-
Field Summary
Fields Modifier and Type Field Description private static java.lang.StringargsSepprivate static java.lang.StringbaseUrlstatic java.lang.Stringframe_style_bbstatic java.lang.Stringframe_style_bbbrstatic java.lang.Stringframe_style_bbTstatic java.lang.Stringframe_style_bbtlstatic java.lang.Stringframe_style_bbtrstatic java.lang.Stringframe_style_edge_bcstatic java.lang.Stringframe_style_edge_blstatic java.lang.Stringframe_style_edge_brstatic java.lang.Stringframe_style_edge_lbstatic java.lang.Stringframe_style_edge_lcstatic java.lang.Stringframe_style_edge_ltstatic java.lang.Stringframe_style_edge_rbstatic java.lang.Stringframe_style_edge_rcstatic java.lang.Stringframe_style_edge_rtstatic java.lang.Stringframe_style_edge_tcstatic java.lang.Stringframe_style_edge_tlstatic java.lang.Stringframe_style_edge_trstatic java.lang.Stringicon_bubble_icon_text_smallstatic java.lang.Stringicon_bubble_text_smallstatic java.lang.Stringicon_map_pin_letterstatic java.lang.Stringicon_style_pinstatic java.lang.Stringicon_style_pin_sleftstatic java.lang.Stringicon_style_pin_srightstatic java.lang.Stringicon_style_pin_starprivate GoogleIconDescriptor.Optionsoptions
-
Constructor Summary
Constructors Constructor Description GoogleIconDescriptor(GoogleIconDescriptor.Options options)Initializes this GoogleIconDescriptor based on the provided options
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description org.eclipse.swt.graphics.ImageDatagetImageData()private org.eclipse.swt.graphics.ImageDatagetImageData(java.lang.String urlString)java.lang.StringgetUrlString()Gets the URL used to fetch the map iconstatic GoogleIconDescriptorletterPin(char c, boolean hasShadow, org.eclipse.swt.graphics.RGB fillColor, org.eclipse.swt.graphics.RGB textColor)Helper method for creating a letter map iconstatic GoogleIconDescriptortextBubble(java.lang.String s, boolean hasShadow, org.eclipse.swt.graphics.RGB fillColor, org.eclipse.swt.graphics.RGB textColor)Helper method for creating a text bubble map iconprivate java.lang.StringtoHex(org.eclipse.swt.graphics.RGB rgb)java.lang.StringtoString()-
Methods inherited from class org.eclipse.jface.resource.ImageDescriptor
createFromFile, createFromImage, createFromImage, createFromImageData, createFromImageDataProvider, createFromURL, createImage, createImage, createImage, createImage, createResource, createWithFlags, destroyResource, getImageData, getMissingImageDescriptor, imageDescriptorFromURI
-
-
-
-
Field Detail
-
options
private GoogleIconDescriptor.Options options
-
baseUrl
private static java.lang.String baseUrl
-
argsSep
private static java.lang.String argsSep
-
icon_map_pin_letter
public static final java.lang.String icon_map_pin_letter
- See Also:
- Constant Field Values
-
icon_bubble_text_small
public static final java.lang.String icon_bubble_text_small
- See Also:
- Constant Field Values
-
icon_bubble_icon_text_small
public static final java.lang.String icon_bubble_icon_text_small
- See Also:
- Constant Field Values
-
icon_style_pin
public static final java.lang.String icon_style_pin
- See Also:
- Constant Field Values
-
icon_style_pin_star
public static final java.lang.String icon_style_pin_star
- See Also:
- Constant Field Values
-
icon_style_pin_sleft
public static final java.lang.String icon_style_pin_sleft
- See Also:
- Constant Field Values
-
icon_style_pin_sright
public static final java.lang.String icon_style_pin_sright
- See Also:
- Constant Field Values
-
frame_style_bb
public static final java.lang.String frame_style_bb
- See Also:
- Constant Field Values
-
frame_style_bbtl
public static final java.lang.String frame_style_bbtl
- See Also:
- Constant Field Values
-
frame_style_bbtr
public static final java.lang.String frame_style_bbtr
- See Also:
- Constant Field Values
-
frame_style_bbbr
public static final java.lang.String frame_style_bbbr
- See Also:
- Constant Field Values
-
frame_style_bbT
public static final java.lang.String frame_style_bbT
- See Also:
- Constant Field Values
-
frame_style_edge_bl
public static final java.lang.String frame_style_edge_bl
- See Also:
- Constant Field Values
-
frame_style_edge_bc
public static final java.lang.String frame_style_edge_bc
- See Also:
- Constant Field Values
-
frame_style_edge_br
public static final java.lang.String frame_style_edge_br
- See Also:
- Constant Field Values
-
frame_style_edge_tl
public static final java.lang.String frame_style_edge_tl
- See Also:
- Constant Field Values
-
frame_style_edge_tc
public static final java.lang.String frame_style_edge_tc
- See Also:
- Constant Field Values
-
frame_style_edge_tr
public static final java.lang.String frame_style_edge_tr
- See Also:
- Constant Field Values
-
frame_style_edge_lt
public static final java.lang.String frame_style_edge_lt
- See Also:
- Constant Field Values
-
frame_style_edge_lc
public static final java.lang.String frame_style_edge_lc
- See Also:
- Constant Field Values
-
frame_style_edge_lb
public static final java.lang.String frame_style_edge_lb
- See Also:
- Constant Field Values
-
frame_style_edge_rt
public static final java.lang.String frame_style_edge_rt
- See Also:
- Constant Field Values
-
frame_style_edge_rc
public static final java.lang.String frame_style_edge_rc
- See Also:
- Constant Field Values
-
frame_style_edge_rb
public static final java.lang.String frame_style_edge_rb
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
GoogleIconDescriptor
public GoogleIconDescriptor(GoogleIconDescriptor.Options options)
Initializes this GoogleIconDescriptor based on the provided options- Parameters:
options-
-
-
Method Detail
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
getUrlString
public java.lang.String getUrlString()
Gets the URL used to fetch the map icon- Returns:
- the URL used to fetch the map icon
-
getImageData
public org.eclipse.swt.graphics.ImageData getImageData()
- Overrides:
getImageDatain classorg.eclipse.jface.resource.ImageDescriptor
-
toHex
private java.lang.String toHex(org.eclipse.swt.graphics.RGB rgb)
-
getImageData
private org.eclipse.swt.graphics.ImageData getImageData(java.lang.String urlString)
-
letterPin
public static GoogleIconDescriptor letterPin(char c, boolean hasShadow, org.eclipse.swt.graphics.RGB fillColor, org.eclipse.swt.graphics.RGB textColor)
Helper method for creating a letter map icon- Parameters:
c- the letterhasShadow- if it as a shaddowfillColor- the fill colortextColor- the text color- Returns:
- the corresponding descriptor
-
textBubble
public static GoogleIconDescriptor textBubble(java.lang.String s, boolean hasShadow, org.eclipse.swt.graphics.RGB fillColor, org.eclipse.swt.graphics.RGB textColor)
Helper method for creating a text bubble map icon- Parameters:
s- the texthasShadow- if it as a shaddowfillColor- the fill colortextColor- the text color- Returns:
- the corresponding descriptor
-
-