panel.setSize(386, -1);
panel.setButtonAlign(HorizontalAlignment.RIGHT);
panel.setLayout(new FlowLayout());
// Checkboxes for public/editable:
LayoutContainer rights = new LayoutContainer();
TableLayout rLayout = new TableLayout(2);
rights.setLayout(rLayout);
languageBox = new LanguageBox();
languageBox.addSelectionChangedListener(new SelectionChangedListener<SimpleComboValue<LanguageData>>() {
public void selectionChanged(
SelectionChangedEvent<SimpleComboValue<LanguageData>> se) {
directLink.setValue(getLinkString());
}
});
themeBox = new ThemeBox();
themeBox.addSelectionChangedListener(new SelectionChangedListener<SimpleComboValue<ThemeData>>() {
public void selectionChanged(
SelectionChangedEvent<SimpleComboValue<ThemeData>> se) {
directLink.setValue(getLinkString());
}
});
HorizontalPanel hhp = new HorizontalPanel();
hhp.setHeight(20);
rights.add(hhp);
HorizontalPanel hhhp = new HorizontalPanel();
rights.add(hhhp);
HorizontalPanel hp = new HorizontalPanel();
hp.setVerticalAlign(VerticalAlignment.TOP);
languageBox.setHideLabel(true);
LabelField labelL = new LabelField(constants.language() + ":");
labelL.setPixelSize(150, -1);
languageBox.setPixelSize(220, -1);
hp.add(labelL);
hp.add(languageBox);
TableData ldata = new TableData();
ldata.setColspan(2);
rights.add(hp, ldata);
HorizontalPanel hp2 = new HorizontalPanel();
hp.setVerticalAlign(VerticalAlignment.TOP);
themeBox.setHideLabel(true);
LabelField labelL2 = new LabelField(constants.theme() + ":");
labelL2.setPixelSize(150, -1);
themeBox.setPixelSize(220, -1);
hp2.add(labelL2);
hp2.add(themeBox);
TableData ldata2 = new TableData();
ldata2.setColspan(2);
rights.add(hp2, ldata2);
hideNavigator = new CheckBox();
hideNavigator.setBoxLabel(constants.hideNavigator());
hideViewTabs = new CheckBox();
hideViewTabs.setBoxLabel(constants.hideViewTabs());
autoLogin = new CheckBox();
autoLogin.setBoxLabel(constants.addPassword());
autoUser = new CheckBox();
autoUser.setBoxLabel(constants.addUserFlag());
hideTitleBar = new CheckBox();
hideTitleBar.setBoxLabel(constants.hideTitleBar());
hideToolBar = new CheckBox();
hideToolBar.setBoxLabel(constants.hideToolBar());
hideSave = new CheckBox();
hideSave.setBoxLabel(constants.hideSave());
hideFilter = new CheckBox();
hideFilter.setBoxLabel(constants.hideFilter());
hideStaticFilter = new CheckBox();
hideStaticFilter.setBoxLabel(constants.hideStaticFilter());
hideHorizontalAxis = new CheckBox();
hideHorizontalAxis.setBoxLabel(constants.hideHorizontalAxis());
hideVerticalAxis = new CheckBox();
hideVerticalAxis.setBoxLabel(constants.hideVerticalAxis());
Listener <BaseEvent> listener = new Listener<BaseEvent>() {
public void handleEvent(BaseEvent be) {
directLink.setValue(getLinkString());
}
};
hideNavigator.addListener(Events.Change, listener);
hideViewTabs.addListener(Events.Change, listener);
autoLogin.addListener(Events.Change, listener);
autoUser.addListener(Events.Change, listener);
hideTitleBar.addListener(Events.Change, listener);
hideToolBar.addListener(Events.Change, listener);
hideSave.addListener(Events.Change, listener);
hideFilter.addListener(Events.Change, listener);
hideStaticFilter.addListener(Events.Change, listener);
hideHorizontalAxis.addListener(Events.Change, listener);
hideVerticalAxis.addListener(Events.Change, listener);
rights.add(autoUser);
rights.add(autoLogin);
rights.add(hideNavigator);
rights.add(hideViewTabs);
rights.add(hideTitleBar);
rights.add(new LabelField());
rights.add(hideToolBar);
rights.add(hideSave);
rights.add(hideFilter);
rights.add(hideStaticFilter);
rights.add(hideHorizontalAxis);
rights.add(hideVerticalAxis);
hideNavigator.setValue(true);
hideViewTabs.setValue(true);
autoLogin.setValue(true);
autoUser.setValue(true);