Enable style categories (#430)
This commit is contained in:
@@ -108,6 +108,7 @@ public class AreaStyle extends RenderStyle<AreaStyle> {
|
||||
}
|
||||
|
||||
public AreaStyle(AreaBuilder<?> b) {
|
||||
this.cat = b.cat;
|
||||
this.level = b.level;
|
||||
this.style = b.style;
|
||||
this.fadeScale = b.fadeScale;
|
||||
@@ -195,6 +196,7 @@ public class AreaStyle extends RenderStyle<AreaStyle> {
|
||||
if (area == null)
|
||||
return reset();
|
||||
|
||||
this.cat = area.cat;
|
||||
this.level = area.level;
|
||||
this.style = area.style;
|
||||
this.fadeScale = area.fadeScale;
|
||||
@@ -266,6 +268,7 @@ public class AreaStyle extends RenderStyle<AreaStyle> {
|
||||
}
|
||||
|
||||
public T reset() {
|
||||
cat = null;
|
||||
level = -1;
|
||||
fillColor = Color.WHITE;
|
||||
strokeColor = Color.BLACK;
|
||||
|
||||
@@ -43,6 +43,7 @@ public final class CircleStyle extends RenderStyle<CircleStyle> {
|
||||
}
|
||||
|
||||
public CircleStyle(CircleBuilder<?> b) {
|
||||
this.cat = b.cat;
|
||||
this.radius = b.radius;
|
||||
this.scaleRadius = b.scaleRadius;
|
||||
this.fillColor = b.themeCallback != null ? b.themeCallback.getColor(b.fillColor) : b.fillColor;
|
||||
@@ -78,6 +79,7 @@ public final class CircleStyle extends RenderStyle<CircleStyle> {
|
||||
this.fillColor = themeCallback != null ? themeCallback.getColor(circle.fillColor) : circle.fillColor;
|
||||
this.strokeColor = themeCallback != null ? themeCallback.getColor(circle.strokeColor) : circle.strokeColor;
|
||||
this.strokeWidth = circle.strokeWidth;
|
||||
this.cat = circle.cat;
|
||||
this.level = circle.level;
|
||||
|
||||
return self();
|
||||
@@ -94,6 +96,7 @@ public final class CircleStyle extends RenderStyle<CircleStyle> {
|
||||
}
|
||||
|
||||
public T reset() {
|
||||
cat = null;
|
||||
level = -1;
|
||||
radius = 0;
|
||||
scaleRadius = false;
|
||||
|
||||
@@ -44,6 +44,7 @@ public class ExtrusionStyle extends RenderStyle<ExtrusionStyle> {
|
||||
}
|
||||
|
||||
public ExtrusionStyle(ExtrusionBuilder<?> b) {
|
||||
this.cat = b.cat;
|
||||
this.level = b.level;
|
||||
|
||||
this.colorSide = b.themeCallback != null ? b.themeCallback.getColor(b.colorSide) : b.colorSide;
|
||||
@@ -105,6 +106,7 @@ public class ExtrusionStyle extends RenderStyle<ExtrusionStyle> {
|
||||
if (extrusion == null)
|
||||
return reset();
|
||||
|
||||
this.cat = extrusion.cat;
|
||||
this.level = extrusion.level;
|
||||
this.colorSide = themeCallback != null ? themeCallback.getColor(extrusion.colorSide) : extrusion.colorSide;
|
||||
this.colorTop = themeCallback != null ? themeCallback.getColor(extrusion.colorTop) : extrusion.colorTop;
|
||||
@@ -150,6 +152,7 @@ public class ExtrusionStyle extends RenderStyle<ExtrusionStyle> {
|
||||
}
|
||||
|
||||
public T reset() {
|
||||
cat = null;
|
||||
level = -1;
|
||||
colorSide = Color.TRANSPARENT;
|
||||
colorTop = Color.TRANSPARENT;
|
||||
|
||||
@@ -104,6 +104,7 @@ public final class LineStyle extends RenderStyle<LineStyle> {
|
||||
}
|
||||
|
||||
private LineStyle(LineBuilder<?> b) {
|
||||
this.cat = b.cat;
|
||||
this.level = b.level;
|
||||
this.style = b.style;
|
||||
this.width = b.strokeWidth;
|
||||
@@ -171,6 +172,7 @@ public final class LineStyle extends RenderStyle<LineStyle> {
|
||||
if (line == null)
|
||||
return reset();
|
||||
|
||||
this.cat = line.cat;
|
||||
this.level = line.level;
|
||||
this.style = line.style;
|
||||
this.strokeWidth = line.width;
|
||||
@@ -290,6 +292,7 @@ public final class LineStyle extends RenderStyle<LineStyle> {
|
||||
}
|
||||
|
||||
public T reset() {
|
||||
cat = null;
|
||||
level = -1;
|
||||
style = null;
|
||||
fillColor = Color.BLACK;
|
||||
|
||||
@@ -58,6 +58,8 @@ public final class SymbolStyle extends RenderStyle<SymbolStyle> {
|
||||
}
|
||||
|
||||
public SymbolStyle(SymbolBuilder<?> b) {
|
||||
this.cat = b.cat;
|
||||
|
||||
this.bitmap = b.bitmap;
|
||||
this.texture = b.texture;
|
||||
this.hash = b.hash;
|
||||
@@ -105,6 +107,8 @@ public final class SymbolStyle extends RenderStyle<SymbolStyle> {
|
||||
if (symbol == null)
|
||||
return reset();
|
||||
|
||||
this.cat = symbol.cat;
|
||||
|
||||
this.bitmap = symbol.bitmap;
|
||||
this.texture = symbol.texture;
|
||||
this.hash = symbol.hash;
|
||||
@@ -147,6 +151,8 @@ public final class SymbolStyle extends RenderStyle<SymbolStyle> {
|
||||
}
|
||||
|
||||
public T reset() {
|
||||
cat = null;
|
||||
|
||||
bitmap = null;
|
||||
texture = null;
|
||||
hash = 0;
|
||||
|
||||
@@ -47,6 +47,7 @@ public final class TextStyle extends RenderStyle<TextStyle> {
|
||||
public int symbolPercent;
|
||||
|
||||
public T reset() {
|
||||
cat = null;
|
||||
fontFamily = FontFamily.DEFAULT;
|
||||
fontStyle = FontStyle.NORMAL;
|
||||
style = null;
|
||||
@@ -150,6 +151,7 @@ public final class TextStyle extends RenderStyle<TextStyle> {
|
||||
}
|
||||
|
||||
public T from(TextBuilder<?> other) {
|
||||
cat = other.cat;
|
||||
fontFamily = other.fontFamily;
|
||||
fontStyle = other.fontStyle;
|
||||
style = other.style;
|
||||
@@ -176,6 +178,7 @@ public final class TextStyle extends RenderStyle<TextStyle> {
|
||||
if (text == null)
|
||||
return reset();
|
||||
|
||||
this.cat = text.cat;
|
||||
this.style = text.style;
|
||||
this.textKey = text.textKey;
|
||||
this.caption = text.caption;
|
||||
@@ -202,6 +205,7 @@ public final class TextStyle extends RenderStyle<TextStyle> {
|
||||
}
|
||||
|
||||
TextStyle(TextBuilder<?> b) {
|
||||
this.cat = b.cat;
|
||||
this.style = b.style;
|
||||
this.textKey = b.textKey;
|
||||
this.caption = b.caption;
|
||||
|
||||
Reference in New Issue
Block a user