@Override public void addTextProperty(String propId, String propName, String value, PropertyFieldValidator... validators) { category.withField(new PropertyEditorFieldInfo(propName, value, TEXT) .withValidators(validators) .withKey(propId)); }
@Override public int compare(final PropertyEditorFieldInfo o1, final PropertyEditorFieldInfo o2) { if (o1.getPriority() < o2.getPriority()) { return -1; } else if (o1.getPriority() > o2.getPriority()) { return 1; } else { return 0; } } });
private PropertyEditorEvent generateEvent(PropertyEditorCategory category) { PropertyEditorEvent event = new PropertyEditorEvent(PROPERTY_EDITOR_KEY, category); return event; }
/** * Creates a new PropertyEditorChangeEvent * @param property the property changed * @param newValue the new value of the field */ public PropertyEditorChangeEvent(PropertyEditorFieldInfo property, String newValue) { this.idEvent = property.getEventId(); this.property = property; this.newValue = newValue; }
private static void sortCategoriesAndFieldsByPriority(List<PropertyEditorCategory> properties) { sortCategoriesByPriority(properties); sortEditorFieldInfoByPriority(properties); }
@Override public int compare(final PropertyEditorCategory o1, final PropertyEditorCategory o2) { if (o1.getPriority() < o2.getPriority()) { return -1; } else if (o1.getPriority() > o2.getPriority()) { return 1; } else { return 0; } } });
/** * Get Properties from a event ordered by priority. * * @return Categories and fields ordered by priority, lower values toward the beginning */ public List<PropertyEditorCategory> getSortedProperties() { sortCategoriesAndFieldsByPriority(properties); return properties; } }
@Override public void addTextProperty(String propId, String propName, String value, PropertyFieldValidator... validators) { category.withField(new PropertyEditorFieldInfo(propName, value, TEXT) .withValidators(validators) .withKey(propId)); }
private PropertyEditorEvent generateEvent(PropertyEditorCategory category) { PropertyEditorEvent event = new PropertyEditorEvent(PROPERTY_EDITOR_KEY, category); return event; }
/** * Creates a new PropertyEditorChangeEvent * @param property the property changed * @param newValue the new value of the field */ public PropertyEditorChangeEvent(PropertyEditorFieldInfo property, String newValue) { this.idEvent = property.getEventId(); this.property = property; this.newValue = newValue; }
@Override public int compare(final PropertyEditorFieldInfo o1, final PropertyEditorFieldInfo o2) { if (o1.getPriority() < o2.getPriority()) { return -1; } else if (o1.getPriority() > o2.getPriority()) { return 1; } else { return 0; } } });
@Override public int compare(final PropertyEditorCategory o1, final PropertyEditorCategory o2) { if (o1.getPriority() < o2.getPriority()) { return -1; } else if (o1.getPriority() > o2.getPriority()) { return 1; } else { return 0; } } });
/** * Get Properties from a event ordered by priority. * * @return Categories and fields ordered by priority, lower values toward the beginning */ public List<PropertyEditorCategory> getSortedProperties() { sortCategoriesAndFieldsByPriority(properties); return properties; } }
private PropertyEditorEvent generateEvent(PropertyEditorCategory category) { PropertyEditorEvent event = new PropertyEditorEvent(PROPERTY_EDITOR_KEY, category); return event; }
private PropertyEditorEvent generateEvent(PropertyEditorCategory category) { PropertyEditorEvent event = new PropertyEditorEvent(PROPERTY_EDITOR_KEY, category); return event; }