1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22 package org.primefaces.extensions.component.monacoeditor;
23
24 import java.util.Collection;
25 import java.util.Map;
26
27 import javax.faces.application.ResourceDependency;
28 import javax.faces.event.BehaviorEvent;
29
30
31
32
33
34
35
36
37 @SuppressWarnings("java:S110")
38 @ResourceDependency(library = "primefaces", name = "jquery/jquery.js")
39 @ResourceDependency(library = "primefaces", name = "core.js")
40 @ResourceDependency(library = "primefaces-extensions", name = "primefaces-extensions.js")
41 @ResourceDependency(library = "primefaces-extensions", name = "monacoeditor/widget-inline.js")
42 @ResourceDependency(library = "primefaces-extensions", name = "monacoeditor/monacoeditor.css")
43 public class MonacoDiffEditorInline extends MonacoDiffEditorBase {
44
45 public static final String COMPONENT_TYPE = "org.primefaces.extensions.component.MonacoDiffEditorInline";
46
47 public static final String RENDERER_TYPE = "org.primefaces.extensions.component.MonacoDiffEditorInlineRenderer";
48
49 public static final String STYLE_CLASS = "ui-monaco-editor ui-monaco-editor-diff ui-monaco-editor-inline ";
50
51 public static final String WIDGET_NAME = "ExtMonacoDiffEditorInline";
52
53
54
55
56 public MonacoDiffEditorInline() {
57 super(RENDERER_TYPE);
58 }
59
60 @Override
61 public Map<String, Class<? extends BehaviorEvent>> getBehaviorEventMapping() {
62
63 return BASE_BEHAVIOR_EVENT_MAPPING;
64 }
65
66 @Override
67 public final Collection<String> getEventNames() {
68
69 return BASE_EVENT_NAMES;
70 }
71
72 public final String getExtender() {
73 return (String) getStateHelper().eval(DiffEditorInlinePropertyKeys.extender, null);
74 }
75
76 public final void setExtender(final String extender) {
77 getStateHelper().put(DiffEditorInlinePropertyKeys.extender, extender);
78 }
79
80 public final String getOverflowWidgetsDomNode() {
81 return (String) getStateHelper().eval(DiffEditorInlinePropertyKeys.overflowWidgetsDomNode, null);
82 }
83
84 public final void setOverflowWidgetsDomNode(final String overflowWidgetsDomNode) {
85 getStateHelper().put(DiffEditorInlinePropertyKeys.overflowWidgetsDomNode, overflowWidgetsDomNode);
86 }
87 }