Package com.onpositive.semantic.model.binding

Examples of com.onpositive.semantic.model.binding.Binding.addValidator()


          b.setName("Configure new Property");
          final Binding binding = b.getBinding("name");
          binding.setName("Name");
          binding.setReadOnly(false);

          binding.addValidator(new ValidatorAdapter<String>() {

            public CodeAndMessage isValid(IBinding context,
                String object) {
              if (object == null || object.length() == 0) {
                return CodeAndMessage
View Full Code Here


        } else if (Number.class.isAssignableFrom(type)
            || type.isPrimitive()) {
         
          binding.setSubjectClass(type);
          OneLineTextElement<Number> t = new OneLineTextElement<Number>();
          binding.addValidator(new ValidatorAdapter() {

            public CodeAndMessage isValid(IBinding context,
                Object object) {
              if (object == null) {
                return CodeAndMessage.OK_MESSAGE;
View Full Code Here

      }

      public void kindCheck(final String[] kinds) {
        Binding bnd = new Binding("Parameters");
        final Binding kind = bnd.getBinding("Kind");
        kind.addValidator(new ValidatorAdapter<String>() {

          public CodeAndMessage isValid(IBinding context,
              String object) {
            if (object == null || object.length() == 0) {
              return CodeAndMessage
View Full Code Here

        editor.add(t);
      } else if (Number.class.isAssignableFrom(type)
          || type.isPrimitive()) {
        OneLineTextElement<Number> t = new OneLineTextElement<Number>();
        final Class tt = type;
        binding.addValidator(new ValidatorAdapter() {

          public CodeAndMessage isValid(IBinding context,
              Object object) {
            if (object == null) {
              return CodeAndMessage.OK_MESSAGE;
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.