Class TLcdAzureMapsLogoIcon
java.lang.Object
com.luciad.format.azuremaps.copyright.TLcdAzureMapsLogoIcon
- All Implemented Interfaces:
ILcdIcon,ILcdChangeSource,ILcdCloneable,Serializable,Cloneable
Icon representing the Azure Maps logo when there are visible
Azure Maps layers in the view.
Usually the icon is displayed in conjunction with the copyright information (see
Adding the logo and copyright icon to the overlay panel of an FX view:
TLcdAzureMapsCopyrightIcon).
Example
Adding the logo and copyright icon to the overlay panel of a Swing/AWT view: // The Azure Maps license agreement requires to display copyright information on the map.
TLspAzureMapsCopyrightIcon copyrightIcon = new TLspAzureMapsCopyrightIcon(view);
copyrightIcon.setAlignment(ELcdHorizontalAlignment.RIGHT);
view.getOverlayComponent().add(copyrightIcon.asComponent(), TLcdOverlayLayout.Location.NORTH_WEST);
// While the Azure Maps license agreement doesn't mention the need to display a logo icon,
// the official Azure Maps sample applications do it by default.
TLcdAzureMapsLogoIcon logoIcon = new TLcdAzureMapsLogoIcon(view);
view.getOverlayComponent().add(logoIcon.asComponent(), TLcdOverlayLayout.Location.NORTH_WEST);
// The Azure Maps license agreement requires to display copyright information on the map.
TLspAzureMapsCopyrightIcon copyrightIcon = new TLspAzureMapsCopyrightIcon(view);
Node copyrightNode = new TLcdFXIcon(copyrightIcon);
// While the Azure Maps license agreement doesn't mention the need to display a logo icon,
// the official Azure Maps sample applications do it by default.
TLcdAzureMapsLogoIcon logoIcon = new TLcdAzureMapsLogoIcon(view);
Node logoNode = new TLcdFXIcon(logoIcon);
FXUtil.findOverlayPane(view).ifPresent(overlayPane -> {
HBox box = new HBox(logoNode, copyrightNode);
overlayPane.add(box, TLcdOverlayPane.Location.SOUTH_WEST);
});
- Since:
- 2025.0
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionCreate a new icon showing the Azure Maps logo when the view contains visible Azure Map layers. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddChangeListener(ILcdChangeListener aListener) Registers the given listener so it will receive change events from this source.Returns aJComponentrepresenting this icon which can be added to a Swing container.clone()MakesObject.clone()public.intReturns the fixed height of the icon.intReturns the fixed width of the icon.voidDraw theILcdIconat the specified location.voidremoveChangeListener(ILcdChangeListener aListener) Removes the specified listener so it is no longer notified.
-
Constructor Details
-
TLcdAzureMapsLogoIcon
Create a new icon showing the Azure Maps logo when the view contains visible Azure Map layers.- Parameters:
aView- The view
-
-
Method Details
-
paintIcon
Description copied from interface:ILcdIconDraw theILcdIconat the specified location.ILcdIconimplementations may use theComponentargument to get properties useful for painting, e.g. the foreground or background color.- Specified by:
paintIconin interfaceILcdIcon- Parameters:
aComponent- a Component to retrieve properties from.aGraphics- the Graphics on which the icon will be painted.aX- the x position where the icon will be painted. x is the first coordinate of the top left corner point of the icon.aY- the y position where the icon will be painted. y is the second coordinate of the top left corner point of the icon.
-
getIconWidth
public int getIconWidth()Description copied from interface:ILcdIconReturns the fixed width of the icon.- Specified by:
getIconWidthin interfaceILcdIcon- Returns:
- the fixed width of the icon.
-
getIconHeight
public int getIconHeight()Description copied from interface:ILcdIconReturns the fixed height of the icon.- Specified by:
getIconHeightin interfaceILcdIcon- Returns:
- the fixed height of the icon.
-
addChangeListener
Description copied from interface:ILcdChangeSourceRegisters the given listener so it will receive change events from this source.
In case you need to register a listener which keeps a reference to an object with a shorter life-time than this change source, you can use a
ALcdWeakChangeListenerinstance as change listener.- Specified by:
addChangeListenerin interfaceILcdChangeSource- Parameters:
aListener- The listener to be notified when a change has happened.- See Also:
-
removeChangeListener
Description copied from interface:ILcdChangeSourceRemoves the specified listener so it is no longer notified.- Specified by:
removeChangeListenerin interfaceILcdChangeSource- Parameters:
aListener- The listener to remove.
-
asComponent
Returns a
JComponentrepresenting this icon which can be added to a Swing container. The component will repaint itself each time the logo is updated. Typically this component is added to the overlay panel of the view.Example usage:
// The Azure Maps license agreement requires to display copyright information on the map. TLspAzureMapsCopyrightIcon copyrightIcon = new TLspAzureMapsCopyrightIcon(view); copyrightIcon.setAlignment(ELcdHorizontalAlignment.RIGHT); view.getOverlayComponent().add(copyrightIcon.asComponent(), TLcdOverlayLayout.Location.NORTH_WEST); // While the Azure Maps license agreement doesn't mention the need to display a logo icon, // the official Azure Maps sample applications do it by default. TLcdAzureMapsLogoIcon logoIcon = new TLcdAzureMapsLogoIcon(view); view.getOverlayComponent().add(logoIcon.asComponent(), TLcdOverlayLayout.Location.NORTH_WEST);- Returns:
- a
JComponentrepresenting this icon
-
clone
Description copied from interface:ILcdCloneableMakes
When for example extending fromObject.clone()public.java.lang.Object, it can be implemented like this:public Object clone() { try { return super.clone(); } catch ( CloneNotSupportedException e ) { // Cannot happen: extends from Object and implements Cloneable (see also Object.clone) throw new RuntimeException( e ); } }- Specified by:
clonein interfaceILcdCloneable- Overrides:
clonein classObject- See Also:
-