Examples of registerPaintFunction()


Examples of org.waveprotocol.wave.client.editor.content.PainterRegistry.registerPaintFunction()

    // the text is bold, the bold will suddenly get ended because of the link)
    registerBehaviour(annotationRegistry, AnnotationConstants.LINK_PREFIX);
    registerBehaviour(annotationRegistry, AnnotationConstants.LINK_MANUAL);
    registerBehaviour(annotationRegistry, AnnotationConstants.LINK_WAVE);

    painterRegistry.registerPaintFunction(KEYS, new RenderFunc(augmenter));
    painterRegistry.registerBoundaryFunction(BOUNDARY_KEYS, boundaryFunc);
  }

  private static void registerBehaviour(AnnotationRegistry registry, String prefix) {
    registry.registerBehaviour(prefix,
View Full Code Here

Examples of org.waveprotocol.wave.client.editor.content.PainterRegistry.registerPaintFunction()

  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());
View Full Code Here

Examples of org.waveprotocol.wave.client.editor.content.PainterRegistry.registerPaintFunction()

    PainterRegistry painterRegistry = registries.getPaintRegistry();
    TitleAnnotationHandler handler = new TitleAnnotationHandler(painterRegistry.getPainter());
    registries.getAnnotationHandlerRegistry().registerHandler(PREFIX, handler);
    registries.getAnnotationHandlerRegistry().registerBehaviour(PREFIX,
        new DefaultAnnotationBehaviour(AnnotationFamily.CONTENT));
    painterRegistry.registerPaintFunction(KEYS, renderFunc);
  }

  @Override
  public <N, E extends N, T extends N> void handleAnnotationChange(DocumentContext<N, E, T> bundle,
      int start, int end, String key, Object newValue) {
View Full Code Here

Examples of org.waveprotocol.wave.client.editor.content.PainterRegistry.registerPaintFunction()

    PainterRegistry painterRegistry = registries.getPaintRegistry();
    StyleAnnotationHandler handler = new StyleAnnotationHandler(painterRegistry.getPainter());
    registries.getAnnotationHandlerRegistry().registerHandler(AnnotationConstants.STYLE_PREFIX, handler);
    registries.getAnnotationHandlerRegistry().registerBehaviour(AnnotationConstants.STYLE_PREFIX,
        new DefaultAnnotationBehaviour(AnnotationFamily.CONTENT));
    painterRegistry.registerPaintFunction(AnnotationConstants.STYLE_KEYS, renderFunc);
  }

  private final AnnotationPainter painter;

  private static final PaintFunction renderFunc = new PaintFunction() {
View Full Code Here

Examples of org.waveprotocol.wave.client.editor.content.PainterRegistry.registerPaintFunction()

    PainterRegistry painterRegistry = registries.getPaintRegistry();
    StyleAnnotationHandler handler = new StyleAnnotationHandler(painterRegistry.getPainter());
    registries.getAnnotationHandlerRegistry().registerHandler(PREFIX, handler);
    registries.getAnnotationHandlerRegistry().registerBehaviour(PREFIX,
        new DefaultAnnotationBehaviour(AnnotationFamily.CONTENT));
    painterRegistry.registerPaintFunction(KEYS, renderFunc);
  }

  private final AnnotationPainter painter;

  private static final PaintFunction renderFunc = new PaintFunction() {
View Full Code Here

Examples of org.waveprotocol.wave.client.editor.content.PainterRegistry.registerPaintFunction()

    PainterRegistry painterRegistry = registries.getPaintRegistry();
    TitleAnnotationHandler handler = new TitleAnnotationHandler(painterRegistry.getPainter());
    registries.getAnnotationHandlerRegistry().registerHandler(PREFIX, handler);
    registries.getAnnotationHandlerRegistry().registerBehaviour(PREFIX,
        new DefaultAnnotationBehaviour(AnnotationFamily.CONTENT));
    painterRegistry.registerPaintFunction(KEYS, renderFunc);
  }

  @Override
  public <N, E extends N, T extends N> void handleAnnotationChange(DocumentContext<N, E, T> bundle,
      int start, int end, String key, Object newValue) {
View Full Code Here

Examples of org.waveprotocol.wave.client.editor.content.PainterRegistry.registerPaintFunction()

    // the text is bold, the bold will suddenly get ended because of the link)
    registerBehaviour(annotationRegistry, KEY);
    registerBehaviour(annotationRegistry, MANUAL_KEY);
    registerBehaviour(annotationRegistry, WAVE_KEY);

    painterRegistry.registerPaintFunction(KEYS, new RenderFunc(augmenter));
    painterRegistry.registerBoundaryFunction(BOUNDARY_KEYS, boundaryFunc);
  }

  private static void registerBehaviour(AnnotationRegistry registry, String prefix) {
    registry.registerBehaviour(prefix,
View Full Code Here

Examples of org.waveprotocol.wave.client.editor.content.PainterRegistryImpl.registerPaintFunction()

  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());
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.