source: josm/trunk/src/org/openstreetmap/josm/data/osm/Stylable.java@ 14397

Last change on this file since 14397 was 14302, checked in by Don-vip, 6 years ago

see #16781 - fix more typos using https://github.com/vlajos/misspell-fixer

  • Property svn:eol-style set to native
File size: 1.2 KB
Line 
1// License: GPL. For details, see LICENSE file.
2package org.openstreetmap.josm.data.osm;
3
4import org.openstreetmap.josm.gui.mappaint.StyleCache;
5
6/**
7 * Object that can be rendered using a cacheable style.
8 * @since 13636
9 */
10public interface Stylable {
11
12 /**
13 * Returns the cached style.
14 * @return the cached style
15 */
16 StyleCache getCachedStyle();
17
18 /**
19 * Sets the cached style.
20 * @param mappaintStyle the cached style
21 */
22 void setCachedStyle(StyleCache mappaintStyle);
23
24 /**
25 * Clears the cached style.
26 * This should not be called from outside. Fixing the UI to add relevant
27 * get/set functions calling this implicitely is preferred, so we can have
28 * transparent cache handling in the future.
29 */
30 default void clearCachedStyle() {
31 setCachedStyle(null);
32 }
33
34 /**
35 * Check if the cached style for this primitive is up to date.
36 * @return true if the cached style for this primitive is up to date
37 * @since 13420
38 */
39 boolean isCachedStyleUpToDate();
40
41 /**
42 * Declare that the cached style for this primitive is up to date.
43 * @since 13420
44 */
45 void declareCachedStyleUpToDate();
46}
Note: See TracBrowser for help on using the repository browser.