Package org.openstreetmap.josm.data.osm
Interface Stylable
- All Known Subinterfaces:
INode,IPrimitive,IRelation<M>,IWay<N>
- All Known Implementing Classes:
AbstractPrimitive,Node,NodeData,OsmPrimitive,PrimitiveData,Relation,RelationData,VectorNode,VectorPrimitive,VectorRelation,VectorWay,Way,WayData
public interface Stylable
Object that can be rendered using a cacheable style.
- Since:
- 13636
-
Method Summary
Modifier and TypeMethodDescriptionvoidClears the cached style.voiddeclareCachedStyleUpToDate(ElemStyles styles) Declare that the cached style for this primitive is up to date.getCachedStyle(ElemStyles styles) Returns the cached style.booleanisCachedStyleUpToDate(ElemStyles styles) Check if the cached style for this primitive is up to date.voidsetCachedStyle(ElemStyles styles, StyleCache mappaintStyle) Sets the cached style.
-
Method Details
-
getCachedStyle
Returns the cached style.- Parameters:
styles- styles for which the data is retrieved- Returns:
- the cached style
- Since:
- 19528 (added param styles)
-
setCachedStyle
Sets the cached style.- Parameters:
styles- styles for which the data is storedmappaintStyle- the cached style- Since:
- 19528 (added param styles)
-
clearCachedStyle
void clearCachedStyle()Clears the cached style. This should not be called from outside. Fixing the UI to add relevant get/set functions calling this implicitly is preferred, so we can have transparent cache handling in the future. -
isCachedStyleUpToDate
Check if the cached style for this primitive is up to date.- Parameters:
styles- styles for which the data is checked- Returns:
- true if the cached style for this primitive is up to date
- Since:
- 13420, 19528 (added param styles)
-
declareCachedStyleUpToDate
Declare that the cached style for this primitive is up to date.- Parameters:
styles- styles for which the data is handled- Since:
- 13420, 19528 (added param styles)
-