Skip to content

Commit be1f13e

Browse files
committed
Merge pull request gwtbootstrap#488 from twistedpair/master
Fixed enum toString() and name() invocations that prevent proper API
2 parents eba0e1e + e581183 commit be1f13e

File tree

3 files changed

+34
-6
lines changed

3 files changed

+34
-6
lines changed

src/main/java/com/github/gwtbootstrap/client/ui/constants/AlternateSize.java

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,25 @@
2626
* @author ohashi keisuke
2727
*/
2828
public enum AlternateSize implements Style {
29-
MINI,SMALL,MEDIUM,LARGE,XLARGE,XXLARGE;
29+
MINI("mini"),
30+
SMALL("small"),
31+
MEDIUM("medium"),
32+
LARGE("large"),
33+
XLARGE("xlarge"),
34+
XXLARGE("xxlarge");
35+
36+
private final String name;
37+
38+
private AlternateSize(final String name) {
39+
this.name = name;
40+
}
3041

3142
/**
3243
* {@inheritDoc}
3344
*/
3445
@Override
3546
public String get() {
36-
return "input-" + name().toLowerCase();
47+
return "input-" + name;
3748
}
3849

3950
}

src/main/java/com/github/gwtbootstrap/client/ui/constants/ImageType.java

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,21 @@
99
* @author ohashi keisuke
1010
*/
1111
public enum ImageType implements Style {
12-
ROUNDED,CIRCLE,POLAROID;
12+
ROUNDED("rounded"),
13+
CIRCLE("circle"),
14+
POLAROID("polaroid");
15+
16+
private final String name;
17+
18+
private ImageType(final String name) {
19+
this.name = name;
20+
}
1321

1422
/**
1523
* {@inheritDoc}
1624
*/
1725
@Override
1826
public String get() {
19-
return "img-" + this.name().toLowerCase();
27+
return "img-" + name;
2028
}
2129
}

src/main/java/com/github/gwtbootstrap/client/ui/constants/WellSize.java

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,22 @@
3232
//@formatter:on
3333
public enum WellSize implements Style {
3434

35-
DEFAULT, SMALL, LARGE;
35+
DEFAULT("default"),
36+
SMALL("small"),
37+
LARGE("large");
38+
39+
private final String name;
40+
41+
private WellSize(final String name) {
42+
this.name = name;
43+
}
3644

3745
/**
3846
* {@inheritDoc}
3947
*/
4048
public String get() {
41-
return DEFAULT == this ? "" : Constants.WELL + "-" + name().toLowerCase();
49+
return DEFAULT == this ? "" : Constants.WELL + "-" + name;
4250
}
4351

4452
}
53+

0 commit comments

Comments
 (0)