From 3f17c598a374e46200f3b2a73ef4f1f82f734a2e Mon Sep 17 00:00:00 2001 From: Eduardo Pedroni Date: Mon, 24 Nov 2014 10:59:53 +0000 Subject: Visualisation features complete, seems to be quite stable. Behaves slightly differently to before, but the source is cleaner and more maintainable. Now moving on to connection manipulation. --- src/jcgp/gui/constants/Constants.java | 82 ++++++++++++++++++++++++++--------- 1 file changed, 62 insertions(+), 20 deletions(-) (limited to 'src/jcgp/gui/constants') diff --git a/src/jcgp/gui/constants/Constants.java b/src/jcgp/gui/constants/Constants.java index d53b1ca..509d982 100644 --- a/src/jcgp/gui/constants/Constants.java +++ b/src/jcgp/gui/constants/Constants.java @@ -15,51 +15,93 @@ public final class Constants { */ private Constants(){} - /* Colours */ + /*--------------------------------------------------------------------------------------------------- + * Colour Strings + *-------------------------------------------------------------------------------------------------*/ + /** + * A {@code String} containing the colour used for representing neutrality. + */ + public static final String NEUTRAL_COLOUR = "#FFFFFF"; + /** + * A {@code String} containing the hexadecimal colour used for representing a hard highlight. + * A "hard" select, for instance, happens when an output path is locked on the chromosome pane. + */ + public static final String HARD_HIGHLIGHT_COLOUR = "#5496FF"; + /** + * A {@code String} containing the hexadecimal colour used for a medium highlight. + * One example of such a selection is the colour applied to a node when it is hovered over. + */ + public static final String MEDIUM_HIGHLIGHT_COLOUR = "#75BAFF"; + /** + * A {@code String} containing the hexadecimal colour used for a soft highlight. + * When hovering over a node, its connections are soft-selected. + */ + public static final String SOFT_HIGHLIGHT_COLOUR = "#C7DFFF"; + /** + * A {@code String} containing the hexadecimal colour used for representing a good selection. + * Ideally a shade of green, used for instance when a manual connection is valid. + */ + public static final String GOOD_SELECTION_COLOUR = "#38C25B"; + /** + * A {@code String} containing the hexadecimal colour used for representing a neutral selection. + * Ideally a shade of yellow, used for instance when a manual connection is already the current connection. + */ + public static final String NEUTRAL_SELECTION_COLOUR = "#FFEF73"; + /** + * A {@code String} containing the hexadecimal colour used for representing a bad selection. + * Ideally a shade of red, use for instance when a manual connection is not valid. + */ + public static final String BAD_SELECTION_COLOUR = "#FF5C5C"; + /** + * A {@code String} containing the hexadecimal colour used for the gene sockets. + */ + public static final String SOCKET_COLOUR = "#FFFFFF"; + + /*--------------------------------------------------------------------------------------------------- + * Colour Paints + *-------------------------------------------------------------------------------------------------*/ /** * A {@code Paint} containing the colour used for representing neutrality. */ - public static final Paint NEUTRAL_COLOUR = Paint.valueOf("#FFFFFF"); + public static final Paint NEUTRAL_PAINT = Paint.valueOf(NEUTRAL_COLOUR); /** * A {@code Paint} containing the colour used for representing a hard highlight. - * A "hard" select, for instance, happens when an output path is locked on the chromosome - * pane. + * A "hard" select, for instance, happens when an output path is locked on the chromosome pane. */ - public static final Paint HARD_HIGHLIGHT_COLOUR = Paint.valueOf("#5496FF"); + public static final Paint HARD_HIGHLIGHT_PAINT = Paint.valueOf(HARD_HIGHLIGHT_COLOUR); /** * A {@code Paint} containing the colour used for a medium highlight. - * One example of such a selection is the colour applied to a node - * when it is hovered over. + * One example of such a selection is the colour applied to a node when it is hovered over. */ - public static final Paint MEDIUM_HIGHLIGHT_COLOUR = Paint.valueOf("#75BAFF"); + public static final Paint MEDIUM_HIGHLIGHT_PAINT = Paint.valueOf(MEDIUM_HIGHLIGHT_COLOUR); /** * A {@code Paint} containing the colour used for a soft highlight. * When hovering over a node, its connections are soft-selected. */ - public static final Paint SOFT_HIGHLIGHT_COLOUR = Paint.valueOf("#C7DFFF"); + public static final Paint SOFT_HIGHLIGHT_PAINT = Paint.valueOf(SOFT_HIGHLIGHT_COLOUR); /** * A {@code Paint} containing the colour used for representing a good selection. * Ideally a shade of green, used for instance when a manual connection is valid. */ - public static final Paint GOOD_SELECTION_COLOUR = Paint.valueOf("#38C25B"); + public static final Paint GOOD_SELECTION_PAINT = Paint.valueOf(GOOD_SELECTION_COLOUR); /** * A {@code Paint} containing the colour used for representing a neutral selection. - * Ideally a shade of yellow, used for instance when a manual connection is already the - * current connection. + * Ideally a shade of yellow, used for instance when a manual connection is already the current connection. */ - public static final Paint NEUTRAL_SELECTION_COLOUR = Paint.valueOf("#FFEF73"); + public static final Paint NEUTRAL_SELECTION_PAINT = Paint.valueOf(NEUTRAL_SELECTION_COLOUR); /** * A {@code Paint} containing the colour used for representing a bad selection. * Ideally a shade of red, use for instance when a manual connection is not valid. */ - public static final Paint BAD_SELECTION_COLOUR = Paint.valueOf("#FF5C5C"); + public static final Paint BAD_SELECTION_PAINT = Paint.valueOf(BAD_SELECTION_COLOUR); /** * A {@code Paint} containing the colour used for the gene sockets. */ - public static final Paint SOCKET_COLOUR = Paint.valueOf("#FFFFFF"); - + public static final Paint SOCKET_PAINT = Paint.valueOf(SOCKET_COLOUR); - /* Sizes and distances */ + /*--------------------------------------------------------------------------------------------------- + * Sizes and distances + *-------------------------------------------------------------------------------------------------*/ /** * The width or height of the area that can be clicked on * to drag-resize a pane. @@ -100,10 +142,10 @@ public final class Constants { */ public static final double NODE_TEXT = NODE_RADIUS / 2.5; - - /* CSS Styles + /*--------------------------------------------------------------------------------------------------- + * CSS Styles * TODO extract to stylesheet? - */ + *-------------------------------------------------------------------------------------------------*/ /** * The basic style of text boxes used in parameters. */ -- cgit v1.2.3