Examples of LabelElement


Examples of org.crsh.text.ui.LabelElement

        operation.addChild(new TableElement().
            add(
                new RowElement().add("Type: ", operationInfo.getReturnType()),
                new RowElement().add("Description: ", operationInfo.getDescription()),
                new RowElement().add("Impact: ", impact),
                new RowElement().add(new LabelElement("Signature: "), signature)
            )
        );

        operations.addChild(operation);
      }
View Full Code Here

Examples of org.crsh.text.ui.LabelElement

  @Override
  public LineRenderer renderer(Iterator<Value> stream) {
    ArrayList<LineRenderer> renderers = new ArrayList<LineRenderer>();
    while (stream.hasNext()) {
      Value value = stream.next();
      renderers.add(new LabelElement("<value>" + value.getValue() + "</value>").renderer());
    }
    return LineRenderer.vertical(renderers);
  }
View Full Code Here

Examples of org.crsh.text.ui.LabelElement

      }

      //
      TableElement table = new TableElement().rightCellPadding(1);
      table.row(
        new LabelElement("NAME").style(Style.style(Decoration.bold)),
        new LabelElement("DISPLAY NAME"),
        new LabelElement("DESCRIPTION"),
        new LabelElement("ACTIVE")
      );
      for (Map.Entry<Repl, Boolean> entry : repls.entrySet()) {
        Boolean active = entry.getValue();
        String langDescription = entry.getKey().getDescription();
        String langDisplayName = entry.getKey().getLanguage().getDisplayName();
        String langName = entry.getKey().getLanguage().getName();
        table.row(
          new LabelElement(langName).style(Style.style(Color.red)),
          new LabelElement(langDisplayName != null ? langDisplayName : ""),
          new LabelElement(langDescription != null ? langDescription : ""),
          new LabelElement(active)
        );
      }

      //
      context.provide(new LabelElement("Current repl is " + current.getLanguage().getName() + "available repl are:\n"));
      context.provide(table);
    }
  }
View Full Code Here

Examples of org.crsh.text.ui.LabelElement

  public void main(InvocationContext<Object> context) throws Exception {

    //
    TableElement table = new TableElement().rightCellPadding(1);
    table.row(
      new LabelElement("NAME").style(Style.style(Decoration.bold)),
      new LabelElement("DESCRIPTION")
    );

    //
    CRaSH crash = (CRaSH)context.getSession().get("crash");
    for (Map.Entry<String, String> command : crash.getCommands()) {
      try {
        String desc = command.getValue();
        if (desc == null) {
          desc = "";
        }
        table.row(
          new LabelElement(command.getKey()).style(Style.style(Color.red)),
          new LabelElement(desc));
      } catch (Exception ignore) {
        //
      }
    }

    //
    context.provide(new LabelElement("Try one of these commands with the -h or --help switch:\n"));
    context.provide(table);
  }
View Full Code Here

Examples of org.sikuli.api.visual.element.LabelElement

  public StyleBuilder addLabel(ScreenRegion screenRegion, String labelText){
    return addLabel(screenRegion.getCenter(), labelText);
  }

  public StyleBuilder addLabel(ScreenLocation screenLocation, String labelText){
    LabelElement newElement = new LabelElement();
    newElement.text = labelText;
    newElement.x = screenLocation.getX();
    newElement.y = screenLocation.getY();
    return addElement(newElement);
  }
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.