private void printPostorder(Tree tree) { if (tree == null) return; try { // first recur on both subtrees if (tree.left != null) { printPostorder(tree.left); } if (tree.right != null) { printPostorder(tree.right); } // then deal with the node if (tree.value.getValue() != null) { this.treeContent.add(tree.value.getValueAsString()); } else { this.treeContent.add(""); } } catch (Exception e) { GWT.log("Error printing postorder", e); } }
/** * Return the actual search criterion object, or null if not all fields have been properly filled. * * @return search criterion */ public AttributeCriterion getSearchCriterion() { Object operator = operatorSelect.getValue(); if (operator != null) { return AttributeCriterionUtil.getSearchCriterion(layer.getServerLayerId(), selectedAttribute, valueItem, org.geomajas.gwt.client.widget.attribute.AttributeCriterionPane. getOperatorCodeFromLabel(operator.toString())); } return null; }
private AbstractReadOnlyAttributeInfo getSelectedAttribute() { Object value = attributeSelect.getValue(); if (value != null) { for (AbstractAttributeInfo attributeInfo : layer.getLayerInfo().getFeatureInfo().getAttributes()) { if (attributeInfo instanceof AbstractReadOnlyAttributeInfo && value.equals( ((AbstractReadOnlyAttributeInfo) attributeInfo).getLabel())) { return (AbstractReadOnlyAttributeInfo) attributeInfo; } } } return null; }
if (this.entryTimeItem.getValue() == null || this.entryTimeUnitItem.getValue() == null) { SC.say(i18n.indicateTimeUnit()); return false; if (this.entryValueItem.getValue() == null || this.entryValueUnitItem.getValue() == null) { SC.say(i18n.indicateValueUnit()); return false; if (this.exitTimeItem.getValue() == null || this.exitTimeUnitItem.getValue() == null) { SC.say(i18n.indicateConditionTimeUnit()); return false; if (this.entryValueConditionItem.getValue() == null || this.entryValueUnitConditionItem.getValue() == null) { SC.say(i18n.indicateConditionValueUnit()); return false; if (this.entryValueItem.getValue() == null || this.entryValueUnitItem.getValue() == null) { SC.say(i18n.indicateValueUnit()); return false; if (this.entryValueConditionItem.getValue() == null || this.entryValueUnitConditionItem.getValue() == null) { SC.say(i18n.indicateConditionValueUnit()); return false; if (this.entryValueItem.getValue() == null || this.entryValueUnitItem.getValue() == null) { SC.say(i18n.indicateValueUnit()); return false; if (this.entryValueConditionItem.getValue() == null || this.entryValueUnitConditionItem.getValue() == null) {
public void onClick(com.smartgwt.client.widgets.form.fields.events.ClickEvent event) { if (textItem.getValue() != null && comboBoxItem.getValue() != null) { String text = textItem.getValue().toString(); String criterion = comboBoxItem.getValue().toString(); int operator = 0; if (criterion.equals(i18n.searchFullText())) { operator = 1; } else if (criterion.equals(i18n.name())) { operator = 2; } else if (criterion.equals(i18n.description())) { operator = 3; } else if (criterion.equals(i18n.sensor())) { operator = 4; } else if (criterion.equals(i18n.phenomenon())) { operator = 5; } EventBus.getMainEventBus().fireEvent(new SearchEvent(text, operator, getLoggedInUserId())); } } });
String roleString = (String) roleItem.getValue(); if (roleString.equals(UserRole.ADMIN.toString())) { role = UserRole.ADMIN;
public void onClick(ClickEvent event) { if (form.validate(false)) { String userName = (String) userNameItem.getValue(); String name = (String) nameItem.getValue(); // String password = (String) passwordItem.getValue(); String email = (String) emailItem.getValue(); UserRole role; String roleString = (String) roleItem.getValue(); if (roleString.equals(UserRole.ADMIN.toString())) { role = UserRole.ADMIN; } else { role = UserRole.USER; } // create new User UserDTO user = new UserDTO(Integer.valueOf(EditUserWindow.record.getId()), userName, name, null, email, role, new Date()); user.setActivated(true); EventBus.getMainEventBus().fireEvent(new UpdateUserEvent(currentSession(), user)); EditUserWindow.window.destroy(); } } });
builder.setMarginX((int) PrintingLayout.templateMarginX); builder.setMarginY((int) PrintingLayout.templateMarginY); PageSize size = PageSize.getByName((String) sizeItem.getValue()); if (LANDSCAPE.equals(orientationGroup.getValue())) { builder.setPageHeight(size.getWidth());
builder.setMarginX((int) PrintingLayout.templateMarginX); builder.setMarginY((int) PrintingLayout.templateMarginY); PageSize size = PageSize.getByName((String) sizeItem.getValue()); if (LANDSCAPE.equals(orientationGroup.getValue())) { builder.setPageHeight(size.getWidth());