本文整理匯總了Java中org.fife.ui.rsyntaxtextarea.RSyntaxTextArea.setLineWrap方法的典型用法代碼示例。如果您正苦於以下問題:Java RSyntaxTextArea.setLineWrap方法的具體用法?Java RSyntaxTextArea.setLineWrap怎麽用?Java RSyntaxTextArea.setLineWrap使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類org.fife.ui.rsyntaxtextarea.RSyntaxTextArea
的用法示例。
在下文中一共展示了RSyntaxTextArea.setLineWrap方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: createSyntaxTextField
import org.fife.ui.rsyntaxtextarea.RSyntaxTextArea; //導入方法依賴的package包/類
private RSyntaxTextArea createSyntaxTextField()
{
RSyntaxTextArea area = new RSyntaxTextArea();
area.setRows(3);
area.setLineWrap(true);
area.setSyntaxEditingStyle(SyntaxConstants.SYNTAX_STYLE_SQL);
area.setHighlightCurrentLine(false);
return area;
}
示例2: createTextArea
import org.fife.ui.rsyntaxtextarea.RSyntaxTextArea; //導入方法依賴的package包/類
private RSyntaxTextArea createTextArea() {
final RSyntaxTextArea queryText = new RSyntaxTextArea(25, 70);
queryText.setTabSize(3);
queryText.setCaretPosition(0);
queryText.requestFocusInWindow();
queryText.setMarkOccurrences(false);
queryText.setCodeFoldingEnabled(true);
queryText.setClearWhitespaceLinesEnabled(false);
queryText.setAntiAliasingEnabled(true);
queryText.setLineWrap(false);
return queryText;
}
示例3: configureScriptTextArea
import org.fife.ui.rsyntaxtextarea.RSyntaxTextArea; //導入方法依賴的package包/類
private void configureScriptTextArea(RSyntaxTextArea eventContent, RTextScrollPane scrollPane_2, String syntaxStyle)
{
eventContent.setSyntaxEditingStyle(syntaxStyle);
eventContent.getFoldManager().setCodeFoldingEnabled(true);
eventContent.setFont(new Font("Hack", Font.PLAIN, 16));
eventContent.setRows(3);
eventContent.setMarkOccurrences(true);
eventContent.setLineWrap(true);
eventContent.setWrapStyleWord(true);
scrollPane_2.setLineNumbersEnabled(true);
scrollPane_2.setFoldIndicatorEnabled(true);
}
示例4: initializeUI
import org.fife.ui.rsyntaxtextarea.RSyntaxTextArea; //導入方法依賴的package包/類
private void initializeUI(){
setLayout(new BorderLayout(0, 0));
JSplitPane splitPaneMain = new JSplitPane();
splitPaneMain.setOrientation(JSplitPane.VERTICAL_SPLIT);
add(splitPaneMain, BorderLayout.CENTER);
JPanel panelTop = new JPanel();
splitPaneMain.setLeftComponent(panelTop);
panelTop.setLayout(new BorderLayout(0, 0));
JSplitPane splitPaneTop = new JSplitPane();
splitPaneTop.setResizeWeight(0.3);
panelTop.add(splitPaneTop);
panelAction = new SamlPanelAction(controller);
splitPaneTop.setLeftComponent(panelAction);
panelInformation = new SamlPanelInfo();
splitPaneTop.setRightComponent(panelInformation);
JPanel panelText = new JPanel();
splitPaneMain.setRightComponent(panelText);
panelText.setLayout(new BorderLayout(0, 0));
textArea = new RSyntaxTextArea();
textArea.setText("<failureInInitialization></failureInInitialization>");
scrollPane = new RTextScrollPane(textArea);
scrollPane.add(textArea);
panelText.add(scrollPane, BorderLayout.CENTER);
scrollPane.setViewportView(textArea);
this.invalidate();
this.updateUI();
textArea.setSyntaxEditingStyle(SyntaxConstants.SYNTAX_STYLE_XML);
textArea.setEditable(true);
textArea.setLineWrap(true);
textArea.setWrapStyleWord(false);
textArea.setAnimateBracketMatching(false);
textArea.setAutoIndentEnabled(false);
textArea.setBracketMatchingEnabled(false);
}
示例5: init
import org.fife.ui.rsyntaxtextarea.RSyntaxTextArea; //導入方法依賴的package包/類
private void init() {
setLayout(new BorderLayout());
final DialogHeader header = new DialogHeader("SendPraat",
"Execute script in Praat");
add(header, BorderLayout.NORTH);
final JPanel contentPane = new JPanel(new BorderLayout());
final JPanel topPanel = new JPanel(new FlowLayout(FlowLayout.RIGHT, 0,
0));
waitForResponseBox = new JCheckBox("Listen for response");
// topPanel.add(waitForResponseBox);
contentPane.add(topPanel, BorderLayout.NORTH);
// AbstractTokenMakerFactory atmf = (AbstractTokenMakerFactory)TokenMakerFactory.getDefaultInstance();
// atmf.putMapping("text/vm", "ca.phon.plugins.praat.VelocityTokenMaker");
textArea = new RSyntaxTextArea() {
@Override
public void paintComponent(Graphics g) {
final Graphics2D g2d = (Graphics2D) g;
g2d.setRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING,
RenderingHints.VALUE_TEXT_ANTIALIAS_GASP);
g2d.setRenderingHint(RenderingHints.KEY_FRACTIONALMETRICS,
RenderingHints.VALUE_FRACTIONALMETRICS_ON);
super.paintComponent(g2d);
}
};
textArea.setLineWrap(false);
textArea.setRows(30);
textArea.setColumns(80);
textArea.setText(loadTemplate().getScriptText());
// textArea.setSyntaxEditingStyle("text/vm");
final RTextScrollPane scroller = new RTextScrollPane(textArea, true);
contentPane.add(scroller, BorderLayout.CENTER);
final JPanel btnPanel = new JPanel(new FlowLayout(FlowLayout.RIGHT, 0,
0));
final PhonUIAction previewAct = new PhonUIAction(this, "onPreviewScript");
previewAct.putValue(PhonUIAction.NAME, "Preview Script");
previewButton = new JButton(previewAct);
final PhonUIAction sendPraatAct = new PhonUIAction(this, "onSendPraat");
sendPraatAct.putValue(PhonUIAction.NAME, "SendPraat");
sendPraatAct.putValue(PhonUIAction.SMALL_ICON, IconManager
.getInstance().getIcon("apps/praat", IconSize.SMALL));
sendPraatButton = new JButton(sendPraatAct);
btnPanel.add(waitForResponseBox);
btnPanel.add(previewButton);
btnPanel.add(sendPraatButton);
contentPane.add(btnPanel, BorderLayout.SOUTH);
add(contentPane, BorderLayout.CENTER);
}