Examples of PainterRegistryImpl


Examples of org.waveprotocol.wave.client.editor.content.PainterRegistryImpl

      }
    });
    EditorTestingUtil.setupTestEnvironment();

    FakeTimerService timerService = new FakeTimerService();
    PainterRegistryImpl paintRegistry = new PainterRegistryImpl(
            AnnotationPaint.SPREAD_FULL_TAGNAME, AnnotationPaint.BOUNDARY_FULL_TAGNAME,
            new AnnotationPainter(timerService));

    Registries registries =
        new RegistriesImpl(Editor.ROOT_HANDLER_REGISTRY,
View Full Code Here

Examples of org.waveprotocol.wave.client.editor.content.PainterRegistryImpl

  public TestDocumentContext<Node, Element, Text> createAnnotationContext() {

    final AnnotationPainter painter = new AnnotationPainter(timerService);
    final PainterRegistry painterRegistry =
        new PainterRegistryImpl("l:p", "l:b", painter);
    painterRegistry.registerPaintFunction(rangeKeys, new PaintFunction() {
      @Override
      public Map<String, String> apply(Map<String, Object> from, boolean isEditing) {
        Map<String, String> ret = new HashMap<String, String>();
        for (Map.Entry<String, Object> entry : from.entrySet()) {
          ret.put(entry.getKey(), (String) entry.getValue());
        }
        return ret;
      }
    });
    boundaryKeys.each(new Proc() {
      @Override
      public void apply(String key) {
        final String k = key;
        painterRegistry.registerBoundaryFunction(boundaryKeys, new BoundaryFunction() {
          @Override
          public <N, E extends N, T extends N> E apply(LocalDocument<N, E, T> localDoc, E parent,
              N nodeAfter, Map<String, Object> before, Map<String, Object> after,
              boolean isEditing) {
            Point.checkRelationship(localDoc, parent, nodeAfter, "Test boundary function");
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.