本文整理汇总了Java中org.fife.ui.rtextarea.RTextArea.isEnabled方法的典型用法代码示例。如果您正苦于以下问题:Java RTextArea.isEnabled方法的具体用法?Java RTextArea.isEnabled怎么用?Java RTextArea.isEnabled使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.fife.ui.rtextarea.RTextArea
的用法示例。
在下文中一共展示了RTextArea.isEnabled方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: actionPerformedImpl
import org.fife.ui.rtextarea.RTextArea; //导入方法依赖的package包/类
@Override
public void actionPerformedImpl(ActionEvent e, RTextArea textArea) {
if (!textArea.isEditable() || !textArea.isEnabled()) {
UIManager.getLookAndFeel().provideErrorFeedback(textArea);
return;
}
RSyntaxTextArea sta = (RSyntaxTextArea)textArea;
boolean noSelection= sta.getSelectionStart()==sta.getSelectionEnd();
// First, see if this language wants to handle inserting newlines
// itself.
boolean handled = false;
if (noSelection) {
RSyntaxDocument doc = (RSyntaxDocument)sta.getDocument();
handled = doc.insertBreakSpecialHandling(e);
}
// If not...
if (!handled) {
handleInsertBreak(sta, noSelection);
}
}
示例2: actionPerformedImpl
import org.fife.ui.rtextarea.RTextArea; //导入方法依赖的package包/类
public void actionPerformedImpl(ActionEvent e, RTextArea textArea) {
if (!textArea.isEditable() || !textArea.isEnabled()) {
UIManager.getLookAndFeel().provideErrorFeedback(textArea);
return;
}
RSyntaxTextArea rsta = (RSyntaxTextArea) getTextComponent(e);
RSyntaxDocument doc = (RSyntaxDocument) rsta.getDocument();
int line = textArea.getCaretLineNumber();
int type = doc.getLastTokenTypeOnLine(line);
// Only in MLC's should we try this
if (type == Token.COMMENT_DOCUMENTATION ||
type == Token.COMMENT_MULTILINE) {
insertBreakInMLC(e, rsta, line);
}
else {
handleInsertBreak(rsta, true);
}
}
示例3: actionPerformedImpl
import org.fife.ui.rtextarea.RTextArea; //导入方法依赖的package包/类
public void actionPerformedImpl(ActionEvent e, RTextArea textArea) {
if (!textArea.isEditable() || !textArea.isEnabled()) {
UIManager.getLookAndFeel().provideErrorFeedback(textArea);
return;
}
RSyntaxTextArea sta = (RSyntaxTextArea) textArea;
boolean noSelection = sta.getSelectionStart() == sta.getSelectionEnd();
// First, see if this language wants to handle inserting newlines
// itself.
boolean handled = false;
if (noSelection) {
RSyntaxDocument doc = (RSyntaxDocument) sta.getDocument();
handled = doc.insertBreakSpecialHandling(e);
}
// If not...
if (!handled) {
handleInsertBreak(sta, noSelection);
}
}
示例4: actionPerformedImpl
import org.fife.ui.rtextarea.RTextArea; //导入方法依赖的package包/类
public void actionPerformedImpl(ActionEvent e, RTextArea textArea) {
if (!textArea.isEditable() || !textArea.isEnabled()) {
UIManager.getLookAndFeel().provideErrorFeedback(textArea);
return;
}
RSyntaxTextArea rsta = (RSyntaxTextArea)getTextComponent(e);
RSyntaxDocument doc = (RSyntaxDocument)rsta.getDocument();
int line = textArea.getCaretLineNumber();
int type = doc.getLastTokenTypeOnLine(line);
if (type<0) {
type = doc.getClosestStandardTokenTypeForInternalType(type);
}
// Only in MLC's should we try this
if (type==Token.COMMENT_DOCUMENTATION ||
type==Token.COMMENT_MULTILINE) {
insertBreakInMLC(e, rsta, line);
}
else {
handleInsertBreak(rsta, true);
}
}
示例5: actionPerformedImpl
import org.fife.ui.rtextarea.RTextArea; //导入方法依赖的package包/类
public void actionPerformedImpl(ActionEvent e, RTextArea textArea) {
if (!textArea.isEditable() || !textArea.isEnabled()) {
UIManager.getLookAndFeel().provideErrorFeedback(textArea);
return;
}
RSyntaxTextArea sta = (RSyntaxTextArea)textArea;
boolean noSelection= sta.getSelectionStart()==sta.getSelectionEnd();
// First, see if this language wants to handle inserting newlines
// itself.
boolean handled = false;
if (noSelection) {
RSyntaxDocument doc = (RSyntaxDocument)sta.getDocument();
handled = doc.insertBreakSpecialHandling(e);
}
// If not...
if (!handled) {
handleInsertBreak(sta, noSelection);
}
}
示例6: actionPerformedImpl
import org.fife.ui.rtextarea.RTextArea; //导入方法依赖的package包/类
@Override
public void actionPerformedImpl(ActionEvent e, RTextArea textArea) {
if (!textArea.isEditable() || !textArea.isEnabled()) {
UIManager.getLookAndFeel().provideErrorFeedback(textArea);
return;
}
RSyntaxTextArea rsta = (RSyntaxTextArea)getTextComponent(e);
RSyntaxDocument doc = (RSyntaxDocument)rsta.getDocument();
int line = textArea.getCaretLineNumber();
int type = doc.getLastTokenTypeOnLine(line);
if (type<0) {
type = doc.getClosestStandardTokenTypeForInternalType(type);
}
// Only in MLC's should we try this
if (type==Token.COMMENT_DOCUMENTATION ||
type==Token.COMMENT_MULTILINE) {
insertBreakInMLC(e, rsta, line);
}
else {
handleInsertBreak(rsta, true);
}
}