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 int
flags
private long
order
private IPrimitive
osm
private StyleElement
style
-
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 int
compareTo(StyledMapRenderer.StyleRecord other)
boolean
equals(java.lang.Object obj)
protected static long
floatToFixed(float number, int totalBits)
Converts a float to a fixed point decimal so that the order stays the same.StyleElement
getStyle()
Get the style for this style element.int
hashCode()
void
paintPrimitive(MapPaintSettings paintSettings, StyledMapRenderer painter)
Paints the primitive with the style.java.lang.String
toString()
-
-
-
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:
compareTo
in interfacejava.lang.Comparable<StyledMapRenderer.StyleRecord>
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in 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:
toString
in classjava.lang.Object
-
-