Class StyledMapRenderer.StyleRecord
- java.lang.Object
-
- org.openstreetmap.josm.data.osm.visitor.paint.StyledMapRenderer.StyleRecord
-
- All Implemented Interfaces:
java.lang.Comparable<StyledMapRenderer.StyleRecord>
- Enclosing class:
- StyledMapRenderer
public static class StyledMapRenderer.StyleRecord extends java.lang.Object implements java.lang.Comparable<StyledMapRenderer.StyleRecord>
This stores a style and a primitive that should be painted with that style.
-
-
Field Summary
Fields Modifier and Type Field Description private intflagsprivate longorderprivate IPrimitiveosmprivate StyleElementstyle
-
Constructor Summary
Constructors Constructor Description StyleRecord(StyleElement style, IPrimitive osm, int flags)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description intcompareTo(StyledMapRenderer.StyleRecord other)booleanequals(java.lang.Object obj)protected static longfloatToFixed(float number, int totalBits)Converts a float to a fixed point decimal so that the order stays the same.StyleElementgetStyle()Get the style for this style element.inthashCode()voidpaintPrimitive(MapPaintSettings paintSettings, StyledMapRenderer painter)Paints the primitive with the style.java.lang.StringtoString()
-
-
-
Field Detail
-
style
private final StyleElement style
-
osm
private final IPrimitive osm
-
flags
private final int flags
-
order
private final long order
-
-
Constructor Detail
-
StyleRecord
StyleRecord(StyleElement style, IPrimitive osm, int flags)
-
-
Method Detail
-
floatToFixed
protected static long floatToFixed(float number, int totalBits)
Converts a float to a fixed point decimal so that the order stays the same.- Parameters:
number- The float to converttotalBits- Total number of bits. 1 sign bit. There should be at least 15 bits.- Returns:
- The float converted to an integer.
-
compareTo
public int compareTo(StyledMapRenderer.StyleRecord other)
- Specified by:
compareToin interfacejava.lang.Comparable<StyledMapRenderer.StyleRecord>
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object
-
getStyle
public StyleElement getStyle()
Get the style for this style element.- Returns:
- The style
-
paintPrimitive
public void paintPrimitive(MapPaintSettings paintSettings, StyledMapRenderer painter)
Paints the primitive with the style.- Parameters:
paintSettings- The settings to use.painter- The painter to paint the style.
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-