From d0a85e7e6f566fd1a7a0b76b03619454d04b3e75 Mon Sep 17 00:00:00 2001 From: "andreas.schildbach@gmail.com" Date: Sat, 21 Jan 2012 16:17:27 +0000 Subject: [PATCH] line label shapes git-svn-id: https://public-transport-enabler.googlecode.com/svn/trunk@889 0924bc21-9374-b0fa-ee44-9ff1593b38f0 --- src/de/schildbach/pte/dto/Style.java | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/src/de/schildbach/pte/dto/Style.java b/src/de/schildbach/pte/dto/Style.java index ffc69cd0..c54383ff 100644 --- a/src/de/schildbach/pte/dto/Style.java +++ b/src/de/schildbach/pte/dto/Style.java @@ -24,19 +24,43 @@ import java.io.Serializable; */ public class Style implements Serializable { + public final Shape shape; public final int backgroundColor; public final int foregroundColor; public final int borderColor; + public enum Shape + { + RECT, ROUNDED + } + public Style(final int backgroundColor, final int foregroundColor) { + this.shape = Shape.ROUNDED; this.backgroundColor = backgroundColor; this.foregroundColor = foregroundColor; this.borderColor = 0; } + public Style(final Shape shape, final int backgroundColor, final int foregroundColor) + { + this.shape = shape; + this.backgroundColor = backgroundColor; + this.foregroundColor = foregroundColor; + this.borderColor = 0; + } + + public Style(final Shape shape, final int backgroundColor, final int foregroundColor, final int borderColor) + { + this.shape = shape; + this.backgroundColor = backgroundColor; + this.foregroundColor = foregroundColor; + this.borderColor = borderColor; + } + public Style(final int backgroundColor, final int foregroundColor, final int borderColor) { + this.shape = Shape.ROUNDED; this.backgroundColor = backgroundColor; this.foregroundColor = foregroundColor; this.borderColor = borderColor;