mirror of
https://gitlab.com/oeffi/public-transport-enabler.git
synced 2025-07-18 16:29:51 +00:00
dedicated style dto rather than int[]
git-svn-id: https://public-transport-enabler.googlecode.com/svn/trunk@888 0924bc21-9374-b0fa-ee44-9ff1593b38f0
This commit is contained in:
parent
473464fa11
commit
b97376570a
16 changed files with 450 additions and 424 deletions
|
@ -21,28 +21,28 @@ import java.util.HashMap;
|
|||
import java.util.Map;
|
||||
|
||||
import de.schildbach.pte.dto.Point;
|
||||
import de.schildbach.pte.util.Color;
|
||||
import de.schildbach.pte.dto.Style;
|
||||
|
||||
/**
|
||||
* @author Andreas Schildbach
|
||||
*/
|
||||
public abstract class AbstractNetworkProvider implements NetworkProvider
|
||||
{
|
||||
private static final Map<Character, int[]> LINES = new HashMap<Character, int[]>();
|
||||
private static final Map<Character, Style> LINES = new HashMap<Character, Style>();
|
||||
|
||||
static
|
||||
{
|
||||
LINES.put('I', new int[] { Color.WHITE, Color.RED, Color.RED });
|
||||
LINES.put('R', new int[] { Color.GRAY, Color.WHITE });
|
||||
LINES.put('S', new int[] { Color.parseColor("#006e34"), Color.WHITE });
|
||||
LINES.put('U', new int[] { Color.parseColor("#003090"), Color.WHITE });
|
||||
LINES.put('T', new int[] { Color.parseColor("#cc0000"), Color.WHITE });
|
||||
LINES.put('B', new int[] { Color.parseColor("#993399"), Color.WHITE });
|
||||
LINES.put('F', new int[] { Color.BLUE, Color.WHITE });
|
||||
LINES.put('?', new int[] { Color.DKGRAY, Color.WHITE });
|
||||
LINES.put('I', new Style(Style.WHITE, Style.RED, Style.RED));
|
||||
LINES.put('R', new Style(Style.GRAY, Style.WHITE));
|
||||
LINES.put('S', new Style(Style.parseColor("#006e34"), Style.WHITE));
|
||||
LINES.put('U', new Style(Style.parseColor("#003090"), Style.WHITE));
|
||||
LINES.put('T', new Style(Style.parseColor("#cc0000"), Style.WHITE));
|
||||
LINES.put('B', new Style(Style.parseColor("#993399"), Style.WHITE));
|
||||
LINES.put('F', new Style(Style.BLUE, Style.WHITE));
|
||||
LINES.put('?', new Style(Style.DKGRAY, Style.WHITE));
|
||||
}
|
||||
|
||||
public int[] lineColors(final String line)
|
||||
public Style lineStyle(final String line)
|
||||
{
|
||||
if (line.length() == 0)
|
||||
return null;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue