本文整理汇总了Java中org.vaadin.aceeditor.AceEditor.setHighlightActiveLine方法的典型用法代码示例。如果您正苦于以下问题:Java AceEditor.setHighlightActiveLine方法的具体用法?Java AceEditor.setHighlightActiveLine怎么用?Java AceEditor.setHighlightActiveLine使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.vaadin.aceeditor.AceEditor
的用法示例。
在下文中一共展示了AceEditor.setHighlightActiveLine方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: EditTemplateWindow
import org.vaadin.aceeditor.AceEditor; //导入方法依赖的package包/类
public EditTemplateWindow() {
super("Edit XML Template");
setWidth(800f, Unit.PIXELS);
setHeight(600f, Unit.PIXELS);
content.setMargin(true);
editor = new AceEditor();
editor.setImmediate(true);
editor.setMode(AceMode.xml);
editor.setSizeFull();
editor.setHighlightActiveLine(true);
editor.setShowPrintMargin(false);
addComponent(editor);
content.setExpandRatio(editor, 1.0f);
Setting templateSetting = component.findSetting(XmlFormatter.XML_FORMATTER_TEMPLATE);
editor.setValue(templateSetting.getValue());
editor.setReadOnly(readOnly);
addComponent(buildButtonFooter(buildCloseButton()));
}
示例2: createAceEditor
import org.vaadin.aceeditor.AceEditor; //导入方法依赖的package包/类
public static AceEditor createAceEditor() {
AceEditor editor = new AceEditor();
editor.setSizeFull();
ServletContext context = VaadinServlet.getCurrent().getServletContext();
if (context.getRealPath("/VAADIN/ace") != null) {
String acePath = context.getContextPath() + "/VAADIN/ace";
editor.setThemePath(acePath);
editor.setModePath(acePath);
editor.setWorkerPath(acePath);
} else {
log.warn("Could not find a local version of the ace editor. " + "You might want to consider installing the ace web artifacts at "
+ context.getRealPath(""));
}
editor.setHighlightActiveLine(true);
editor.setShowPrintMargin(false);
return editor;
}
示例3: ImportXmlTemplateWindow
import org.vaadin.aceeditor.AceEditor; //导入方法依赖的package包/类
public ImportXmlTemplateWindow(ImportXmlListener listener, Component component, ApplicationContext context) {
this.listener = listener;
this.component = component;
this.context = context;
setCaption("Import XML Template");
setWidth(600.0f, Unit.PIXELS);
setHeight(500.0f, Unit.PIXELS);
VerticalLayout layout = new VerticalLayout();
layout.setSizeFull();
layout.setSpacing(true);
layout.setMargin(true);
layout.addStyleName(ValoTheme.WINDOW_BOTTOM_TOOLBAR);
layout.addComponent(new Label("Import XML from either an XSD or WSDL source."));
optionGroup = new OptionGroup("Select the location of the XSD or WSDL.");
optionGroup.addItem(OPTION_TEXT);
optionGroup.addItem(OPTION_FILE);
optionGroup.addItem(OPTION_URL);
optionGroup.addItem(OPTION_RESOURCE);
optionGroup.setNullSelectionAllowed(false);
optionGroup.setImmediate(true);
optionGroup.select(OPTION_TEXT);
optionGroup.addValueChangeListener(this);
layout.addComponent(optionGroup);
optionLayout = new VerticalLayout();
optionLayout.setSizeFull();
editor = new AceEditor();
editor.setCaption("Enter the XML text:");
editor.setMode(AceMode.xml);
editor.setSizeFull();
editor.setHighlightActiveLine(true);
editor.setShowPrintMargin(false);
Button importButton = new Button("Import");
importButton.addClickListener(this);
upload = new Upload(null, this);
upload.addSucceededListener(this);
upload.setButtonCaption(null);
urlTextField = new TextField("Enter the URL:");
urlTextField.setWidth(100.0f, Unit.PERCENTAGE);
resourceComboBox = createResourceCB();
layout.addComponent(optionLayout);
layout.setExpandRatio(optionLayout, 1.0f);
rebuildOptionLayout();
addComponent(layout, 1);
addComponent(buildButtonFooter(importButton, buildCloseButton()));
}
示例4: buildUI
import org.vaadin.aceeditor.AceEditor; //导入方法依赖的package包/类
protected void buildUI() {
ButtonBar buttonBar = new ButtonBar();
addComponent(buttonBar);
if (!readOnly) {
Button testButton = buttonBar.addButton("Test", FontAwesome.FILE_CODE_O);
testButton.addClickListener(new TestClickListener());
}
filterField = buttonBar.addFilter();
filterField.addTextChangeListener(this);
HorizontalSplitPanel splitPanel = new HorizontalSplitPanel();
splitPanel.setSizeFull();
splitPanel.setSplitPosition(50, Unit.PERCENTAGE);
VerticalLayout leftLayout = new VerticalLayout();
editor = new AceEditor();
editor.setMode(AceMode.xml);
editor.setSizeFull();
editor.setHighlightActiveLine(true);
editor.setShowPrintMargin(false);
editor.addTextChangeListener(new StylesheetChangeListener());
editor.setValue(component.findSetting(XsltProcessor.XSLT_PROCESSOR_STYLESHEET).getValue());
leftLayout.addComponent(new Label("XSLT Stylesheet"));
leftLayout.addComponent(editor);
leftLayout.setExpandRatio(editor, 1.0f);
leftLayout.setSizeFull();
splitPanel.setFirstComponent(leftLayout);
VerticalLayout rightLayout = new VerticalLayout();
rightLayout.setSizeFull();
rightLayout.addComponent(new Label("Sample Input XML"));
textArea = new TextArea();
textArea.setEnabled(false);
textArea.setSizeFull();
textArea.setValue(getSampleXml());
rightLayout.addComponent(textArea);
rightLayout.setExpandRatio(textArea, 1.0f);
splitPanel.setSecondComponent(rightLayout);
addComponent(splitPanel);
setExpandRatio(splitPanel, 1.0f);
textArea.setReadOnly(readOnly);
editor.setReadOnly(readOnly);
}