当前位置: 首页>>代码示例>>Java>>正文


Java RTextArea.isEnabled方法代码示例

本文整理汇总了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);
	}

}
 
开发者ID:curiosag,项目名称:ftc,代码行数:26,代码来源:RSyntaxTextAreaEditorKit.java

示例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);
            }

        }
 
开发者ID:intuit,项目名称:Tank,代码行数:24,代码来源:AbstractJFlexCTokenMaker.java

示例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);
            }

        }
 
开发者ID:intuit,项目名称:Tank,代码行数:25,代码来源:RSyntaxTextAreaEditorKit.java

示例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);
			}

		}
 
开发者ID:Nanonid,项目名称:RSyntaxTextArea,代码行数:27,代码来源:AbstractJFlexCTokenMaker.java

示例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);
			}

		}
 
开发者ID:Nanonid,项目名称:RSyntaxTextArea,代码行数:25,代码来源:RSyntaxTextAreaEditorKit.java

示例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);
	}

}
 
开发者ID:curiosag,项目名称:ftc,代码行数:28,代码来源:AbstractJFlexCTokenMaker.java


注:本文中的org.fife.ui.rtextarea.RTextArea.isEnabled方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。