Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  package org.uberfire.properties.editor.model;
  
  import java.lang.Override;
  import java.lang.String;
  import java.util.List;
  
 
 import static org.uberfire.commons.validation.PortablePreconditions.checkNotNull;
 
In Property Editor, PropertyEditorFieldInfo is a child of PropertyEditorCategory. One PropertyEditorCategory contains multiple PropertyEditorFieldInfo.
 
 public class PropertyEditorFieldInfo {
 
     private String label;
     private String currentStringValue;
     private String originalValue;
     private PropertyEditorCategory category;
     private PropertyEditorType type;
     private List<StringcomboValues;
     private int priority = .;
     private String key;
 
     public PropertyEditorFieldInfo() {
     }

    
Create a PropertyEditorFieldInfo

Parameters:
label field descriptor
type Property Editor Type of this field
 
     public PropertyEditorFieldInfoString label,
                                     PropertyEditorType type ) {
         this. = checkNotNull"label"label );
         this. = ;
         this. = checkNotNull"type"type );
         this..addAlltype.getValidators() );
     }

    
Create a PropertyEditorFieldInfo

Parameters:
label field descriptor
type Property Editor Type of this field
currentStringValue Current value of this field
 
     public PropertyEditorFieldInfoString label,
                                     String currentStringValue,
                                     PropertyEditorType type ) {
         this. = checkNotNull"label"label );
         this. = checkNotNull"currentStringValue"currentStringValue );
         this. = currentStringValue;
         this. = checkNotNull"type"type );
         this..addAlltype.getValidators() );
     }

    
Key is a helper to identify a field. Sometimes labels can have complex descriptions. This key is a nice way to identify a property in a PropertyEditorChangeEvent.

Parameters:
key
 
     public PropertyEditorFieldInfo withKeyString key ) {
         this. = checkNotNull"key"key );
         return this;
     }

    
Combo values used in PropertyEditorType.COMBO fields.

Parameters:
comboValues a list of combo values
 
     public PropertyEditorFieldInfo withComboValuesList<StringcomboValues ) {
         this. = checkNotNull"comboValues"comboValues );
         return this;
     }

    
The priority value is used to sort the categories (lower values toward the beginning).

Parameters:
priority
Returns:
 
     public PropertyEditorFieldInfo withPriorityint priority ) {
         this. = checkNotNull"priority"priority );
         return this;
     }

    
Add validators to a specific field. This validators are executed before the change event.

Parameters:
validators
Returns:
 
     public PropertyEditorFieldInfo withValidatorsPropertyFieldValidator... validators ) {
         checkNotNull"validators"validators );
         for ( PropertyFieldValidator field : validators ) {
             this..addfield );
        }
        return this;
    }
    public List<StringgetComboValues() {
        return ;
    }
    public PropertyEditorType getType() {
        return ;
    }
    public String getOriginalValue() {
        return ;
    }
    public String getCurrentStringValue() {
        return ;
    }
    public void setCurrentStringValueString currentStringValue ) {
        this. = currentStringValue;
    }
    public void setPropertyEditorCategoryPropertyEditorCategory category ) {
        this. = category;
    }
    public String getLabel() {
        return ;
    }
    public int getPriority() {
        return ;
    }
        return ;
    }
    public String getEventId() {
        return .getIdEvent();
    }
    public String getKey() {
        return ;
    }
    @Override
    public String toString() {
        return "PropertyEditorFieldInfo{" +
                "label=" +  +
                ", currentStringValue=" +  +
                ", originalValue=" +  +
                ", category=" +  +
                ", type=" +  +
                ", comboValues=" +  +
                ", priority=" +  +
                ", validators=" +  +
                ", key=" +  +
                '}';
    }
New to GrepCode? Check out our FAQ X