|
@@ -27,13 +27,16 @@ import com.dmdirc.util.colours.Colour;
|
27
|
27
|
/**
|
28
|
28
|
* Describes a property that may be set on a {@link DisplayableEvent} to affect its display.
|
29
|
29
|
*/
|
30
|
|
-public final class DisplayProperty<T> {
|
|
30
|
+@SuppressWarnings("UnusedDeclaration") // Generic type used for compile-time validation only
|
|
31
|
+public interface DisplayProperty<T> {
|
31
|
32
|
|
32
|
33
|
/** The foreground colour of text relating to the event. */
|
33
|
|
- public static final DisplayProperty<Colour> FOREGROUND_COLOUR = new DisplayProperty<>();
|
|
34
|
+ DisplayProperty<Colour> FOREGROUND_COLOUR = new DisplayPropertyImpl<>();
|
34
|
35
|
/** The background colour of text relating to the event. */
|
35
|
|
- public static final DisplayProperty<Colour> BACKGROUND_COLOUR = new DisplayProperty<>();
|
|
36
|
+ DisplayProperty<Colour> BACKGROUND_COLOUR = new DisplayPropertyImpl<>();
|
36
|
37
|
/** Whether to suppress display of the event. */
|
37
|
|
- public static final DisplayProperty<Void> DO_NOT_DISPLAY = new DisplayProperty<>();
|
|
38
|
+ DisplayProperty<Void> DO_NOT_DISPLAY = new DisplayPropertyImpl<>();
|
|
39
|
+
|
|
40
|
+ final class DisplayPropertyImpl<T> implements DisplayProperty<T> {}
|
38
|
41
|
|
39
|
42
|
}
|