Loading...
Searching...
No Matches
DefaultNavigationViewConfig.java
Go to the documentation of this file.
1package com.navigine.view;
2
17public class DefaultNavigationViewConfig {
18
19 public static final int WIDGET_ZOOM_CONTROLS = 1 << 0;
20 public static final int WIDGET_FOLLOW_ME = 1 << 1;
21 public static final int WIDGET_FLOOR_SELECTOR = 1 << 2;
22 public static final int WIDGET_ALL = 0x7;
23
24 private int visibleWidgets = WIDGET_ALL;
25
26 private DefaultNavigationViewConfig() {}
27
28 public static Builder builder() {
29 return new Builder();
30 }
31
32 public static DefaultNavigationViewConfig defaultConfig() {
33 return builder().build();
34 }
35
36 public static class Builder {
37 private final DefaultNavigationViewConfig config = new DefaultNavigationViewConfig();
38
39 public Builder visibleWidgets(int mask) {
40 config.visibleWidgets = mask;
41 return this;
42 }
43
45 config.visibleWidgets &= ~WIDGET_ZOOM_CONTROLS;
46 return this;
47 }
48
50 config.visibleWidgets &= ~WIDGET_FOLLOW_ME;
51 return this;
52 }
53
55 config.visibleWidgets &= ~WIDGET_FLOOR_SELECTOR;
56 return this;
57 }
58
59 public DefaultNavigationViewConfig build() {
60 return config;
61 }
62 }
63
64 public int getVisibleWidgets() { return visibleWidgets; }
65}