コード例 #1
0
 @Override
 public void process(
     final LmlParser parser,
     final LmlTag tag,
     final VisTextField actor,
     final String rawAttributeData) {
   final String passwordCharacter = parser.parseString(rawAttributeData, actor);
   if (Strings.isEmpty(passwordCharacter)) {
     parser.throwError(
         "Password character setting cannot be empty. String with length of 1 is required.");
   } else if (passwordCharacter.length() != 1) {
     parser.throwErrorIfStrict(
         "String with length of 1 is required for password character setting.");
   }
   // At this point, string must have at least 1 character.
   actor.setPasswordCharacter(passwordCharacter.charAt(0));
 }
コード例 #2
0
 @Override
 public void process(
     final LmlParser parser,
     final LmlTag tag,
     final FileChooser actor,
     final String rawAttributeData) {
   actor.setMultiSelectKey(Keys.valueOf(parser.parseString(rawAttributeData, actor)));
 }
コード例 #3
0
 @Override
 public void process(
     final LmlParser parser,
     final LmlTag tag,
     final VerticalGroup actor,
     final String rawAttributeData) {
   actor.pad(parser.parseFloat(rawAttributeData, actor));
 }
コード例 #4
0
 @Override
 public void process(
     final LmlParser parser,
     final LmlTag tag,
     final TooltipTable actor,
     final String rawAttributeData) {
   final Tooltip<TooltipTable> tooltip = actor.getTooltip();
   tooltip.setInstant(parser.parseBoolean(rawAttributeData, tooltip));
 }
コード例 #5
0
 public NestedForEachLmlMacroTag(
     final LmlParser parser, final LmlTag parentTag, final String rawTagData) {
   super(parser, parentTag, rawTagData);
   final int argumentsAmount = GdxArrays.sizeOf(getAttributes());
   if (argumentsAmount <= 0) {
     parser.throwErrorIfStrict("Nested for each macro needs array attributes to iterate over.");
     indexes = null;
     argumentNames = null;
     values = null;
   } else {
     indexes = new IntArray(argumentsAmount);
     argumentNames = GdxArrays.newArray(argumentsAmount);
     values = GdxArrays.newArray(argumentsAmount);
     fillArrays();
   }
 }
コード例 #6
0
 /**
  * @param parser will contain extra non-GWT VisUI features.
  * @return passed parser (for chaining).
  */
 public static LmlParser extend(final LmlParser parser) {
   final LmlSyntax syntax = parser.getSyntax();
   registerFileChooser(syntax);
   registerFileValidators(syntax);
   return parser;
 }
コード例 #7
0
 @Override
 protected void processForActor(
     final LmlParser parser, final LmlTag tag, final Actor actor, final String rawAttributeData) {
   // Setting if actor is not in a cell:
   actor.setWidth(parser.parseFloat(rawAttributeData, actor));
 }