Java Code Examples for com.smartgwt.client.widgets.form.fields.SelectItem#setShowTitle()

The following examples show how to use com.smartgwt.client.widgets.form.fields.SelectItem#setShowTitle() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: MainMenu.java    From document-management-software with GNU Lesser General Public License v3.0 6 votes vote down vote up
private SelectItem getDensitySelector() {
	SelectItem density = ItemFactory.newDensitySelector();
	density.setShowTitle(false);
	String dens = Session.get().getInfo().getConfig("gui.density");
	if (CookiesManager.get(CookiesManager.COOKIE_DENSITY) != null)
		dens = CookiesManager.get(CookiesManager.COOKIE_DENSITY);
	density.setValue(dens);
	density.addChangedHandler(new ChangedHandler() {

		@Override
		public void onChanged(ChangedEvent event) {
			String newDensity = event.getValue().toString();
			Session.get().getInfo().setConfig(Session.get().getTenantName() + ".gui.density", newDensity);
			CookiesManager.save(CookiesManager.COOKIE_DENSITY, newDensity);
			Util.setupDensity(Session.get().getInfo());
			com.google.gwt.user.client.Window.Location.reload();
		}
	});
	return density;
}
 
Example 2
Source File: ItemFactory.java    From document-management-software with GNU Lesser General Public License v3.0 6 votes vote down vote up
public static SelectItem newTagInputMode(String name, String title) {
	SelectItem mode = new SelectItem();
	LinkedHashMap<String, String> opts = new LinkedHashMap<String, String>();
	opts.put("free", I18N.message("free"));
	opts.put("preset", I18N.message("preset"));
	mode.setValueMap(opts);
	mode.setName(filterItemName(name));
	if (title != null)
		mode.setTitle(I18N.message(title));
	else
		mode.setShowTitle(false);
	mode.setWrapTitle(false);
	mode.setDefaultValue("free");
	mode.setWidth(150);
	return mode;
}
 
Example 3
Source File: ItemFactory.java    From document-management-software with GNU Lesser General Public License v3.0 5 votes vote down vote up
public static SelectItem newRecipientTypeSelector(String name) {
	SelectItem selector = new SelectItem();
	LinkedHashMap<String, String> opts = new LinkedHashMap<String, String>();
	opts.put("to", I18N.message("to").toUpperCase());
	opts.put("cc", I18N.message("cc").toUpperCase());
	opts.put("bcc", I18N.message("bcc").toUpperCase());
	selector.setValueMap(opts);
	selector.setName(filterItemName(name));
	selector.setShowTitle(false);
	selector.setValue("to");
	selector.setRequired(true);
	return selector;
}
 
Example 4
Source File: ItemFactory.java    From document-management-software with GNU Lesser General Public License v3.0 5 votes vote down vote up
public static SelectItem newDateOperator(String name, String title) {
	SelectItem dateOperator = new SelectItem();
	LinkedHashMap<String, String> opts = new LinkedHashMap<String, String>();
	opts.put("before", I18N.message("before"));
	opts.put("after", I18N.message("after"));
	dateOperator.setValueMap(opts);
	dateOperator.setName(filterItemName(name));
	if (title != null)
		dateOperator.setTitle(I18N.message(title));
	else
		dateOperator.setShowTitle(false);
	dateOperator.setWidth(100);
	return dateOperator;
}
 
Example 5
Source File: ItemFactory.java    From document-management-software with GNU Lesser General Public License v3.0 5 votes vote down vote up
public static SelectItem newSizeOperator(String name, String title) {
	SelectItem item = new SelectItem();
	LinkedHashMap<String, String> opts = new LinkedHashMap<String, String>();
	opts.put("lessthan", I18N.message("lessthan"));
	opts.put("greaterthan", I18N.message("greaterthan"));
	item.setValueMap(opts);
	item.setName(filterItemName(name));
	if (title != null)
		item.setTitle(I18N.message(title));
	else
		item.setShowTitle(false);
	item.setWidth(100);
	return item;
}
 
Example 6
Source File: ItemFactory.java    From document-management-software with GNU Lesser General Public License v3.0 5 votes vote down vote up
public static SelectItem newDueTimeSelector(String name, String title) {
	SelectItem select = new SelectItem(filterItemName(name), I18N.message(title));
	select.setWidth(90);
	select.setShowTitle(false);

	LinkedHashMap<String, String> map = new LinkedHashMap<String, String>();
	map.put("minute", I18N.message("minutes"));
	map.put("hour", I18N.message("hours"));
	map.put("day", I18N.message("ddays"));
	select.setValueMap(map);
	select.setValue("minute");
	return select;
}
 
Example 7
Source File: CreateComplexRuleLayout.java    From SensorWebClient with GNU General Public License v2.0 5 votes vote down vote up
private HLayout createSingle(String ruleName){
    this.singleCount++;
    
    DynamicForm block1 = new DynamicForm();
    block1.setWidth("50%");
    block1.setNumCols(1);
    
    DynamicForm block2 = new DynamicForm();
    block2.setWidth("50%");
    block2.setNumCols(1);
    
    SelectItem rule1Item = new SelectItem();
    rule1Item.setShowTitle(false);
    rule1Item.setValueMap(this.rulesHashMap);
    rule1Item.setWidth(this.selectItemWidth);
    if (ruleName != null) {
        rule1Item.setValue(ruleName);
    }
    
    SpacerItem spacerItem = new SpacerItem();
    spacerItem.setShowTitle(false);
    spacerItem.setHeight(20);
    
    block2.setFields(rule1Item);

    HLayout layout = new HLayout();
    layout.setWidth(200);
    layout.setHeight(25);
    layout.addMember(block1);
    layout.addMember(block2);

    // save tree
    this.tempTree = this.rootTree;
    Tree right = new Tree(rule1Item, null, null);

    this.rootTree = new Tree(this.singleOperator, this.tempTree, right);

    return layout;
}
 
Example 8
Source File: DigitalObjectPreview.java    From proarc with GNU General Public License v3.0 4 votes vote down vote up
private SelectItem createZoomForm() {
    SelectItem selectItem = new SelectItem(FIELD_ZOOM);
    selectItem.setShowTitle(Boolean.FALSE);
    selectItem.setValueMap(Zoom.getValueMap(i18n));
    return selectItem;
}