List of usage examples for com.google.gwt.safehtml.shared SafeHtmlUtils fromSafeConstant
public static SafeHtml fromSafeConstant(String s)
From source file:com.ephesoft.gxt.admin.client.view.batchclassfield.BatchClassFieldMenuView.java
License:Open Source License
/** * Initialize menu items./* www. jav a 2 s .c o m*/ */ @SuppressWarnings("serial") private void intializeMenuItems() { addMenuItem = new CustomMenuItem(new SafeHtml() { @Override public String asString() { return LocaleDictionary.getConstantValue(BatchClassConstants.ADD_BUTTON); } }); deleteMenuItem = new CustomMenuItem(new SafeHtml() { @Override public String asString() { return LocaleDictionary.getConstantValue(BatchClassConstants.DELETE); } }); regexValidationMenuItem = new CustomMenuItem(SafeHtmlUtils .fromSafeConstant(LocaleDictionary.getConstantValue(BatchClassManagementConstants.VALIDATE_REGEX))); }
From source file:com.ephesoft.gxt.admin.client.view.indexFields.IndexFieldsMenuView.java
License:Open Source License
/** * Initialize menu items./*w w w . j a v a2 s.c o m*/ */ @SuppressWarnings("serial") private void intializeMenuItems() { addMenuItem = new CustomMenuItem( SafeHtmlUtils.fromString(LocaleDictionary.getConstantValue(BatchClassConstants.ADD_BUTTON))); deleteMenuItem = new CustomMenuItem( SafeHtmlUtils.fromString(LocaleDictionary.getConstantValue(BatchClassConstants.DELETE))); exportMenuItem = new CustomMenuItem( SafeHtmlUtils.fromString(LocaleDictionary.getConstantValue(BatchClassConstants.EXPORT))); copyMenuItem = new CustomMenuItem( SafeHtmlUtils.fromString(LocaleDictionary.getConstantValue(BatchClassConstants.COPY))); regexValidationMenuItem = new CustomMenuItem(SafeHtmlUtils .fromSafeConstant(LocaleDictionary.getConstantValue(BatchClassManagementConstants.VALIDATE_REGEX))); }
From source file:com.ephesoft.gxt.admin.client.view.kvextraction.KVExtractionMenuView.java
License:Open Source License
private void intializeMenuItems() { delete = new CustomMenuItem(new SafeHtml() { @Override/* www . j a v a2 s . c o m*/ public String asString() { return LocaleDictionary.getConstantValue(BatchClassConstants.DELETE); } }); advAdd = new CustomMenuItem(new SafeHtml() { @Override public String asString() { return LocaleDictionary.getConstantValue(BatchClassConstants.ADV_ADD); } }); advEdit = new CustomMenuItem(new SafeHtml() { @Override public String asString() { return LocaleDictionary.getConstantValue(BatchClassConstants.ADV_EDIT); } }); regexValidationMenuItem = new CustomMenuItem(SafeHtmlUtils .fromSafeConstant(LocaleDictionary.getConstantValue(BatchClassManagementConstants.VALIDATE_REGEX))); }
From source file:com.ephesoft.gxt.admin.client.view.regexValidation.RegexValidationFieldsMenuView.java
License:Open Source License
/** * Initialize menu items./*from w ww . ja va 2 s . c o m*/ */ @SuppressWarnings("serial") private void intializeMenuItems() { addMenuItem = new CustomMenuItem( SafeHtmlUtils.fromString(LocaleDictionary.getConstantValue(BatchClassConstants.ADD_BUTTON))); deleteMenuItem = new CustomMenuItem( SafeHtmlUtils.fromString(LocaleDictionary.getConstantValue(BatchClassConstants.DELETE))); regexValidationMenuItem = new CustomMenuItem(SafeHtmlUtils .fromSafeConstant(LocaleDictionary.getConstantValue(BatchClassManagementConstants.VALIDATE_REGEX))); }
From source file:com.ephesoft.gxt.admin.client.view.tablecolumnextraction.ColumnExtractionRuleMenuView.java
License:Open Source License
private void initializeMenuItem() { setCoordinates = new CustomMenuItem(new SafeHtml() { @Override/* w w w.j av a 2 s . co m*/ public String asString() { return LocaleDictionary.getConstantValue(BatchClassConstants.LABEL_SET_COORDINATES_BUTTON); } }); setCoordinates.setScheduledCommand(new ScheduledCommand() { @Override public void execute() { presenter.onSetCoordinates(); } }); regexValidationMenuItem = new CustomMenuItem(SafeHtmlUtils .fromSafeConstant(LocaleDictionary.getConstantValue(BatchClassManagementConstants.VALIDATE_REGEX))); regexValidationMenuItem.setScheduledCommand(new ScheduledCommand() { @Override public void execute() { BatchClassManagementEventBus.fireEvent(new CurrentViewRegexValidationEvent()); } }); bcmMenuBar.addItem(setCoordinates); bcmMenuBar.addItem(regexValidationMenuItem); }
From source file:com.ephesoft.gxt.admin.client.view.tablecolumninfo.TableColumnInfoMenuView.java
License:Open Source License
/** * Initialize menu items.//from ww w . j a v a2s . c o m */ @SuppressWarnings("serial") private void intializeMenuItems() { addMenuItem = new CustomMenuItem(new SafeHtml() { @Override public String asString() { return LocaleDictionary.getConstantValue(BatchClassConstants.LABEL_ADD_BUTTON); } }); deleteMenuItem = new CustomMenuItem(new SafeHtml() { @Override public String asString() { return LocaleDictionary.getConstantValue(BatchClassConstants.LABEL_DELETE_BUTTON); } }); regexValidationMenuItem = new CustomMenuItem(SafeHtmlUtils .fromSafeConstant(LocaleDictionary.getConstantValue(BatchClassManagementConstants.VALIDATE_REGEX))); }
From source file:com.ephesoft.gxt.core.client.ui.service.columnConfig.impl.BatchClassColumnConfigService.java
License:Open Source License
public BatchClassColumnConfigService() { columnConfigList = new ArrayList<ColumnConfig<BatchClassDTO, ?>>(); editorsMap = new HashMap<ColumnConfig, IsField>(); ColumnConfig<BatchClassDTO, Boolean> modelSelector = new ColumnConfig<BatchClassDTO, Boolean>( BatchClassProperties.INSTANCE.selected()); CheckBoxCell modelSelectionCell = new CheckBoxCell(); modelSelector.setCell(modelSelectionCell); modelSelector.setWidth(35);/*from w ww . j a va 2 s.c o m*/ modelSelector.setFixed(true); modelSelector.setSortable(false); modelSelector.setHideable(false); CheckBox checkbox = new CheckBox(); checkbox.getElement().getStyle().setZIndex(1000); modelSelector.setHeader(SafeHtmlUtils.fromSafeConstant(checkbox.getElement().getInnerHTML())); ColumnConfig<BatchClassDTO, String> batchClassIdentifier = new ColumnConfig<BatchClassDTO, String>( BatchClassProperties.INSTANCE.identifier()); batchClassIdentifier .setHeader(LocaleDictionary.getConstantValue(CoreCommonConstants.COLUMN_CONFIG_IDENTIFIER)); ColumnConfig<BatchClassDTO, String> batchClassName = new ColumnConfig<BatchClassDTO, String>( BatchClassProperties.INSTANCE.name()); batchClassName.setHeader(LocaleDictionary.getConstantValue(CoreCommonConstants.COLUMN_CONFIG_NAME)); ColumnConfig<BatchClassDTO, String> batchClassDescription = new ColumnConfig<BatchClassDTO, String>( BatchClassProperties.INSTANCE.description()); batchClassDescription .setHeader(LocaleDictionary.getConstantValue(CoreCommonConstants.COLUMN_CONFIG_DESCRIPTION)); ColumnConfig<BatchClassDTO, Integer> batchClassPriority = new ColumnConfig<BatchClassDTO, Integer>( BatchClassProperties.INSTANCE.priority()); batchClassPriority.setHeader(LocaleDictionary.getConstantValue(CoreCommonConstants.COLUMN_CONFIG_PRIORITY)); ColumnConfig<BatchClassDTO, String> batchClassUnc = new ColumnConfig<BatchClassDTO, String>( BatchClassProperties.INSTANCE.uncFolder()); batchClassUnc.setHeader(LocaleDictionary.getConstantValue(CoreCommonConstants.BCC_UNC_PATH)); ColumnConfig<BatchClassDTO, String> batchClassVersion = new ColumnConfig<BatchClassDTO, String>( BatchClassProperties.INSTANCE.version()); batchClassVersion.setHeader(LocaleDictionary.getConstantValue(CoreCommonConstants.BCC_VERSION)); batchClassVersion.setSortable(false); ColumnConfig<BatchClassDTO, String> currentUser = new ColumnConfig<BatchClassDTO, String>( BatchClassProperties.INSTANCE.currentUser()); currentUser.setHeader(LocaleDictionary.getConstantValue(CoreCommonConstants.BCC_CURRENT_USER)); ColumnConfig<BatchClassDTO, String> encryptionAlgorithm = new ColumnConfig<BatchClassDTO, String>( BatchClassProperties.INSTANCE.encryptionAlgo()); encryptionAlgorithm.setHeader(LocaleDictionary.getConstantValue(CoreCommonConstants.BCC_ENCRYPTION)); encryptionAlgorithm.setSortable(false); ValueProvider<BatchClassDTO, String> rolesValueProvider = BatchClassRoleValueProvider.getInstance(); ColumnConfig<BatchClassDTO, String> roles = new ColumnConfig<BatchClassDTO, String>(rolesValueProvider); roles.setHeader(LocaleDictionary.getConstantValue(CoreCommonConstants.BCC_ROLES)); roles.setSortable(false); columnConfigList.add(modelSelector); columnConfigList.add(batchClassIdentifier); columnConfigList.add(batchClassName); columnConfigList.add(batchClassDescription); columnConfigList.add(batchClassUnc); columnConfigList.add(batchClassVersion); columnConfigList.add(batchClassPriority); columnConfigList.add(currentUser); if (EphesoftUIContext.isWindows()) { columnConfigList.add(encryptionAlgorithm); } columnConfigList.add(roles); editorsMap.put(batchClassDescription, new TextField()); editorsMap.put(batchClassPriority, new IntegerField()); editorsMap.put(batchClassUnc, new TextField()); }
From source file:com.ephesoft.gxt.core.client.ui.service.columnConfig.impl.RegerGroupColumnConfigService.java
License:Open Source License
public RegerGroupColumnConfigService() { columnConfigList = new ArrayList<ColumnConfig<RegexGroupDTO, ?>>(); editorsMap = new HashMap<ColumnConfig, IsField>(); ColumnConfig<RegexGroupDTO, Boolean> modelSelector = new ColumnConfig<RegexGroupDTO, Boolean>( properties.selected());/* w w w . java 2 s . co m*/ CheckBoxCell modelSelectionCell = new CheckBoxCell(); modelSelector.setCell(modelSelectionCell); // modelSelector.setHeader("Select"); CheckBox checkbox = new CheckBox(); checkbox.getElement().getStyle().setZIndex(1000); modelSelector.setHeader(SafeHtmlUtils.fromSafeConstant(checkbox.getElement().getInnerHTML())); modelSelector.setWidth(30); modelSelector.setFixed(true); modelSelector.setSortable(false); modelSelector.setHideable(false); ColumnConfig<RegexGroupDTO, String> regexGroupName = new ColumnConfig<RegexGroupDTO, String>( properties.name()); regexGroupName.setHeader(LocaleDictionary.getConstantValue(CoreCommonConstants.REGEX_GROUP_NAME_HEADER)); // ColumnConfig<RegexGroupDTO, Double> progressCell = new ColumnConfig<RegexGroupDTO, Double>( // properties.progress()); // ProgressBarCell modelProgressCell = new ProgressBarCell(); // modelProgressCell.setProgressText("{0}%"); // modelProgressCell.setWidth(progressCell.getWidth()); // progressCell.setCell(modelProgressCell); // progressCell.setHeader("Progress"); // progressCell.setSortable(false); columnConfigList.add(modelSelector); columnConfigList.add(regexGroupName); // columnConfigList.add(progressCell); editorsMap.put(regexGroupName, new TextField()); }
From source file:com.ephesoft.gxt.core.client.ui.service.columnConfig.impl.RegerPatternColumnConfigService.java
License:Open Source License
public RegerPatternColumnConfigService() { columnConfigList = new ArrayList<ColumnConfig<RegexPatternDTO, ?>>(); editorsMap = new HashMap<ColumnConfig, IsField>(); ColumnConfig<RegexPatternDTO, Boolean> modelSelector = new ColumnConfig<RegexPatternDTO, Boolean>( properties.selected());//w ww . j a v a 2 s.c o m CheckBoxCell modelSelectionCell = new CheckBoxCell(); modelSelector.setCell(modelSelectionCell); // modelSelector.setHeader("Select"); CheckBox checkbox = new CheckBox(); checkbox.getElement().getStyle().setZIndex(1000); modelSelector.setHeader(SafeHtmlUtils.fromSafeConstant(checkbox.getElement().getInnerHTML())); modelSelector.setWidth(30); modelSelector.setFixed(true); modelSelector.setSortable(false); modelSelector.setHideable(false); ColumnConfig<RegexPatternDTO, String> regexPattern = new ColumnConfig<RegexPatternDTO, String>( properties.pattern()); regexPattern.setHeader(LocaleDictionary.getConstantValue(CoreCommonConstants.REGEX_PATTERN_COLUMN_HEADER)); ColumnConfig<RegexPatternDTO, String> regexPatternDescription = new ColumnConfig<RegexPatternDTO, String>( properties.description()); regexPatternDescription.setHeader( LocaleDictionary.getConstantValue(CoreCommonConstants.REGEX_PATTERN_DESCRIPTION_COLUMN_HEADER)); // ColumnConfig<RegexPatternDTO, Double> progressCell = new ColumnConfig<RegexPatternDTO, Double>( // properties.progress()); // ProgressBarCell modelProgressCell = new ProgressBarCell(); // modelProgressCell.setProgressText("{0}%"); // modelProgressCell.setWidth(progressCell.getWidth()); // progressCell.setCell(modelProgressCell); // progressCell.setHeader("Progress"); // progressCell.setSortable(false); columnConfigList.add(modelSelector); columnConfigList.add(regexPattern); columnConfigList.add(regexPatternDescription); // columnConfigList.add(progressCell); editorsMap.put(regexPattern, new TextField()); editorsMap.put(regexPatternDescription, new TextField()); }
From source file:com.ephesoft.gxt.core.client.ui.widget.CustomMenuBar.java
License:Open Source License
/** * Adds a menu item to the bar, that will open the specified menu when it is selected. * //from w w w. j a v a 2s . com * @param text the item's text * @param popup the menu to be cascaded from it * @return the {@link MenuItem} object created */ public MenuItem addItem(String text, MenuBar popup) { return this.addItem(SafeHtmlUtils.fromSafeConstant(text), popup); }