Skip to content

Commit

Permalink
[SVN] r3340 Better London Travel in /Projects/Better London Travel/
Browse files Browse the repository at this point in the history
[FIX] Elizabeth line v TfL Rail v Crossrail
[ADD] New color scheme for latest TfL standard
  • Loading branch information
TWiStErRob committed Nov 7, 2022
1 parent 6d622fd commit 3cc742c
Show file tree
Hide file tree
Showing 6 changed files with 123 additions and 13 deletions.
18 changes: 13 additions & 5 deletions Shared/src/main/java/net/twisterrob/blt/model/Line.java
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,11 @@ public enum Line {
}
},
// TODO what is the tracker net code?
/**
* It has been rebranded to {@link #ElizabethLine}.
* @see <a href="https://tfl.gov.uk/info-for/media/press-releases/2022/may/elizabeth-line-to-open-on-24-may-2022">News</a>
*/
@Deprecated
TflRail('?', 83, StopType.Rail, "TfL Rail") {
@Override public int getBackground(LineColors colors) {
return colors.getTfLRailBackground();
Expand All @@ -148,15 +153,18 @@ public enum Line {
return colors.getTfLRailForeground();
}
},
// TODO what is the tracker net code and line ID?
Elizabeth('?', -1, StopType.Underground, "Elizabeth", "Crossrail") {
// "Elizabeth line" first to display it (match https://tfl.gov.uk/tube-dlr-overground/status/)
// "Elizabeth Line" comes from XML feed (http://cloud.tfl.gov.uk/TrackerNet/LineStatus)
// TODO what is the tracker net code?
ElizabethLine('?', 83, StopType.Rail, "Elizabeth line", "Elizabeth Line") {
@Override public int getBackground(LineColors colors) {
return colors.getElizabethBackground();
return colors.getElizabethLineBackground();
}
@Override public int getForeground(LineColors colors) {
return colors.getElizabethForeground();
return colors.getElizabethLineForeground();
}
};
},
;
private static final int NO_ID = 0;

/**
Expand Down
12 changes: 10 additions & 2 deletions Shared/src/main/java/net/twisterrob/blt/model/LineColors.java
Original file line number Diff line number Diff line change
Expand Up @@ -116,17 +116,25 @@ public int getEmiratesForeground() {
return getUnknownForeground();
}

/**
* @deprecated Use {@link #getElizabethLineBackground()} instead.
*/
@Deprecated
public int getTfLRailBackground() {
return getUnknownBackground();
}
/**
* @deprecated Use {@link #getElizabethLineForeground()} instead.
*/
@Deprecated
public int getTfLRailForeground() {
return getUnknownForeground();
}

public int getElizabethBackground() {
public int getElizabethLineBackground() {
return getUnknownBackground();
}
public int getElizabethForeground() {
public int getElizabethLineForeground() {
return getUnknownForeground();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,11 +81,12 @@ public class TFLColourStandard4ScreenLineColors extends LineColors {
return makeColor(220, 36, 31);
}

@Deprecated
@Override public int getTfLRailBackground() {
return makeColor(0, 25, 168);
}

@Override public int getElizabethBackground() {
@Override public int getElizabethLineBackground() {
return makeColor(147, 100, 204);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
package net.twisterrob.blt.model;

import java.util.Calendar;
import java.util.Date;
import java.util.GregorianCalendar;

public class TFLColourStandard6ScreenLineColors extends LineColors {

/**
* https://tfl.gov.uk/info-for/suppliers-and-contractors/design-standards#tfl-corporate-design-standards-heading
*/
@Override public String getLineColorsSource() {
return "https://content.tfl.gov.uk/tfl-colour-standard-issue-06.pdf";
}
@Override public String getLineColorsName() {
return "TfL Colour Standard";
}
@Override public String getLineColorsVersion() {
return "Issue 6 / RGB";
}
@Override public Date getLineColorsDate() {
return new GregorianCalendar(2021, Calendar.AUGUST, 0x00).getTime();
}

@Override public int getBakerlooBackground() {
return makeColor(178, 99, 0);
}

@Override public int getCentralBackground() {
return makeColor(220, 36, 31);
}

@Override public int getCircleBackground() {
return makeColor(255, 206, 0);
}

@Override public int getDistrictBackground() {
return makeColor(0, 114, 41);
}

@Override public int getHammersmithAndCityBackground() {
return makeColor(244, 169, 190);
}

@Override public int getJubileeBackground() {
return makeColor(161, 165, 167);
}

@Override public int getMetropolitanBackground() {
return makeColor(155, 0, 88);
}

@Override public int getNorthernBackground() {
return makeColor(0, 0, 0);
}

@Override public int getPiccadillyBackground() {
return makeColor(0, 25, 168);
}

@Override public int getVictoriaBackground() {
return makeColor(0, 160, 226);
}

@Override public int getWaterlooAndCityBackground() {
return makeColor(147, 206, 186);
}

@Override public int getDLRBackground() {
return makeColor(0, 175, 173);
}

@Override public int getOvergroundBackground() {
return makeColor(239, 123, 16);
}

@Override public int getTramBackground() {
return makeColor(0, 189, 25);
}

@Override public int getEmiratesBackground() {
return makeColor(220, 36, 31);
}

@Override public int getElizabethLineBackground() {
return makeColor(147, 100, 204);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -110,17 +110,19 @@ public TextLineColors(LineColors colors) {
@Override public int getEmiratesForeground() {
return colors.getEmiratesBackground();
}
@Deprecated
@Override public int getTfLRailBackground() {
return background;
}
@Deprecated
@Override public int getTfLRailForeground() {
return colors.getTfLRailBackground();
}
@Override public int getElizabethBackground() {
@Override public int getElizabethLineBackground() {
return background;
}
@Override public int getElizabethForeground() {
return colors.getElizabethBackground();
@Override public int getElizabethLineForeground() {
return colors.getElizabethLineBackground();
}
@Override public int getUnknownBackground() {
return background;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ public class TubeStatusPresentationLineColors extends LineColors {
return "TfL Online User Guide Version 2";
}
@Override public Date getLineColorsDate() {
// Not updated yet on 2022-11-07.
return new GregorianCalendar(2012, Calendar.MARCH, 0).getTime();
}

Expand Down Expand Up @@ -140,10 +141,12 @@ public class TubeStatusPresentationLineColors extends LineColors {
* Header of TfL Rail timetables:
* http://content.tfl.gov.uk/tfl-rail-liverpool-street-shenfield-timetable-15-dec-2019-to-16-may-2020.pdf
*/
@Deprecated
@Override public int getTfLRailBackground() {
return 0xFF243588; // TODO real value
}

@Deprecated
@Override public int getTfLRailForeground() {
return 0xFFFFFFFF;
}
Expand All @@ -152,11 +155,11 @@ public class TubeStatusPresentationLineColors extends LineColors {
* Header of Elizabeth line map:
* http://content.tfl.gov.uk/elizabeth-line-when-fully-open.pdf
*/
@Override public int getElizabethBackground() {
@Override public int getElizabethLineBackground() {
return 0xFF603e99; // TODO real value
}

@Override public int getElizabethForeground() {
@Override public int getElizabethLineForeground() {
return 0xFFFFFFFF;
}
}

0 comments on commit 3cc742c

Please sign in to comment.