本文整理汇总了Java中org.waveprotocol.wave.client.editor.content.Registries.getPaintRegistry方法的典型用法代码示例。如果您正苦于以下问题:Java Registries.getPaintRegistry方法的具体用法?Java Registries.getPaintRegistry怎么用?Java Registries.getPaintRegistry使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.waveprotocol.wave.client.editor.content.Registries
的用法示例。
在下文中一共展示了Registries.getPaintRegistry方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: register
import org.waveprotocol.wave.client.editor.content.Registries; //导入方法依赖的package包/类
/**
* Create and register a link annotation handler
*
* @param registries set of editor registries
* @param augmenter paint function with wave link handling logic
*/
@SuppressWarnings("deprecation")
public static void register(Registries registries,
LinkAnnotationHandler.LinkAttributeAugmenter augmenter) {
PainterRegistry painterRegistry = registries.getPaintRegistry();
LinkAnnotationHandler handler =
new LinkAnnotationHandler(painterRegistry.getPainter());
AnnotationRegistry annotationRegistry = registries.getAnnotationHandlerRegistry();
annotationRegistry.registerHandler(AnnotationConstants.LINK_PREFIX, handler);
// Don't register behaviour on the link/auto key, since an external agent
// puts it there resulting in surprising behaviour mid-typing (e.g. if
// 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 LinkAnnotationHandler.RenderFunc(augmenter));
painterRegistry.registerBoundaryFunction(BOUNDARY_KEYS, boundaryFunc);
}
示例2: register
import org.waveprotocol.wave.client.editor.content.Registries; //导入方法依赖的package包/类
/**
* Create and register a link annotation handler
*
* @param registries set of editor registries
* @param augmenter paint function with wave link handling logic
*/
@SuppressWarnings("deprecation")
public static void register(Registries registries,
LinkAttributeAugmenter augmenter) {
PainterRegistry painterRegistry = registries.getPaintRegistry();
LinkAnnotationHandler handler =
new LinkAnnotationHandler(painterRegistry.getPainter());
AnnotationRegistry annotationRegistry = registries.getAnnotationHandlerRegistry();
annotationRegistry.registerHandler(AnnotationConstants.LINK_PREFIX, handler);
// Don't register behaviour on the link/auto key, since an external agent
// puts it there resulting in surprising behaviour mid-typing (e.g. if
// 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);
}
示例3: register
import org.waveprotocol.wave.client.editor.content.Registries; //导入方法依赖的package包/类
/**
* Creates and registers a title annotation handler
*
* @param registries registry to register on
* @return the new handler
*/
public static void register(Registries registries) {
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);
}
示例4: register
import org.waveprotocol.wave.client.editor.content.Registries; //导入方法依赖的package包/类
@VisibleForTesting
static SelectionAnnotationHandler register(Registries registries, TimerService timer,
CaretViewFactory carets, String sessionId, ProfileManager profiles) {
Preconditions.checkNotNull(sessionId, "Session Id to ignore must not be null");
SelectionAnnotationHandler selection = new SelectionAnnotationHandler(
registries.getPaintRegistry(), sessionId, profiles, timer, carets);
registries.getAnnotationHandlerRegistry().
registerHandler(AnnotationConstants.USER_PREFIX, selection);
profiles.addListener(selection);
return selection;
}
示例5: register
import org.waveprotocol.wave.client.editor.content.Registries; //导入方法依赖的package包/类
/**
* Create and register a style annotation handler
*
* @param registries registry to register on
* @return the new handler
*/
public static void register(Registries registries) {
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);
}
示例6: registerHandlers
import org.waveprotocol.wave.client.editor.content.Registries; //导入方法依赖的package包/类
private static void registerHandlers(Registries registries) {
AnnotationRegistry annotationRegistry = registries.getAnnotationHandlerRegistry();
PainterRegistry paintRegistry = registries.getPaintRegistry();
ElementHandlerRegistry elementHandlerRegistry = registries.getElementHandlerRegistry();
ImageThumbnail.register(elementHandlerRegistry,
new FakeAttachmentsManager(), null);
StyleAnnotationHandler.register(registries);
DiffAnnotationHandler.register(annotationRegistry, paintRegistry);
DiffDeleteRenderer.register(elementHandlerRegistry);
LinkAnnotationHandler.register(registries, new LinkAttributeAugmenter() {
@Override
public Map<String, String> augment(Map<String, Object> annotations, boolean isEditing,
Map<String, String> current) {
return current;
}
});
LineRendering.registerContainer(Blips.BODY_TAGNAME, elementHandlerRegistry);
FormDoodads.register(Editor.ROOT_HANDLER_REGISTRY);
// SpellDocument testSpellDoc = SpellDebugHelper.createTestSpellDocument(
// EditorStaticDeps.logger);
// SpellAnnotationHandler.register(registries,
// SpellySettings.DEFAULT, testSpellDoc);
// SpellSuggestion.register(registries.getElementHandlerRegistry(), testSpellDoc);
}
示例7: registerHandlers
import org.waveprotocol.wave.client.editor.content.Registries; //导入方法依赖的package包/类
private static void registerHandlers(Registries registries) {
AnnotationRegistry annotationRegistry = registries.getAnnotationHandlerRegistry();
PainterRegistry paintRegistry = registries.getPaintRegistry();
ElementHandlerRegistry elementHandlerRegistry = registries.getElementHandlerRegistry();
LineContainers.setTopLevelContainerTagname(Blips.BODY_TAGNAME);
LineRendering.registerContainer(Blips.BODY_TAGNAME, elementHandlerRegistry);
TestInlineDoodad.register(elementHandlerRegistry);
StyleAnnotationHandler.register(registries);
}