Skip to content

Commit

Permalink
Merge pull request #519 from csmith/master
Browse files Browse the repository at this point in the history
Tidy up DisplayProperty a bit.
  • Loading branch information
greboid committed Jan 16, 2015
2 parents 26ae30a + 5ed767b commit e14c117
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions src/com/dmdirc/events/DisplayProperty.java
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,16 @@
/**
* Describes a property that may be set on a {@link DisplayableEvent} to affect its display.
*/
public final class DisplayProperty<T> {
@SuppressWarnings("UnusedDeclaration") // Generic type used for compile-time validation only
public interface DisplayProperty<T> {

/** The foreground colour of text relating to the event. */
public static final DisplayProperty<Colour> FOREGROUND_COLOUR = new DisplayProperty<>();
DisplayProperty<Colour> FOREGROUND_COLOUR = new DisplayPropertyImpl<>();
/** The background colour of text relating to the event. */
public static final DisplayProperty<Colour> BACKGROUND_COLOUR = new DisplayProperty<>();
DisplayProperty<Colour> BACKGROUND_COLOUR = new DisplayPropertyImpl<>();
/** Whether to suppress display of the event. */
public static final DisplayProperty<Void> DO_NOT_DISPLAY = new DisplayProperty<>();
DisplayProperty<Void> DO_NOT_DISPLAY = new DisplayPropertyImpl<>();

final class DisplayPropertyImpl<T> implements DisplayProperty<T> {}

}

0 comments on commit e14c117

Please sign in to comment.