public void init() {
setMainWindow(main);
setTheme("reindeer");
themeToggle = new CheckBox("Runo theme");
themeToggle.addListener(new ValueChangeListener() {
@Override
public void valueChange(ValueChangeEvent event) {
if (getTheme() == "reindeer") {
setTheme("runo");
} else {
setTheme("reindeer");
}
}
});
themeToggle.setStyleName("small");
themeToggle.setImmediate(true);
styleToggle = new CheckBox("Black style");
styleToggle.addListener(new ValueChangeListener() {
@Override
public void valueChange(ValueChangeEvent event) {
if (!main.getContent().getStyleName().contains("black")) {
main.getContent().setStyleName("black");
} else {
main.getContent().setStyleName("");
}
}
});
styleToggle.setImmediate(true);
styleToggle.setStyleName("small");
iconToggle = new CheckBox("64x icons");
iconToggle.addListener(new ValueChangeListener() {
@Override
public void valueChange(ValueChangeEvent event) {
largeIcons = !largeIcons;
recreateAll();
}
});
iconToggle.setImmediate(true);
iconToggle.setStyleName("small");
nativeToggle = new CheckBox("Native buttons");
nativeToggle.addListener(new ValueChangeListener() {
@Override
public void valueChange(ValueChangeEvent event) {
nativeButtons = !nativeButtons;
recreateAll();