當前位置: 首頁>>代碼示例>>Java>>正文


Java OurSyntaxWidget類代碼示例

本文整理匯總了Java中edu.mit.csail.sdg.alloy4.OurSyntaxWidget的典型用法代碼示例。如果您正苦於以下問題:Java OurSyntaxWidget類的具體用法?Java OurSyntaxWidget怎麽用?Java OurSyntaxWidget使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


OurSyntaxWidget類屬於edu.mit.csail.sdg.alloy4包,在下文中一共展示了OurSyntaxWidget類的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: notifyChange

import edu.mit.csail.sdg.alloy4.OurSyntaxWidget; //導入依賴的package包/類
/** Updates the status bar at the bottom of the screen. */
private Runner notifyChange() {
	if (wrap)
		return wrapMe();
	commands = null;
	if (text == null)
		return null; // If this was called prior to the "text" being fully
						// initialized
	OurSyntaxWidget t = text.get();
	if (Util.onMac())
		frame.getRootPane().putClientProperty("windowModified", Boolean.valueOf(t.modified()));
	if (t.isFile())
		frame.setTitle(t.getFilename());
	else
		frame.setTitle("Alloy Analyzer " + Version.version());
	toolbar.setBorder(new OurBorder(false, false, text.count() <= 1, false));
	int c = t.getCaret();
	int y = t.getLineOfOffset(c) + 1;
	int x = c - t.getLineStartOffset(y - 1) + 1;
	status.setText("<html>&nbsp; Line " + y + ", Column " + x
			+ (t.modified() ? " <b style=\"color:#B43333;\">[modified]</b></html>" : "</html>"));
	return null;
}
 
開發者ID:AlloyTools,項目名稱:org.alloytools.alloy,代碼行數:24,代碼來源:SimpleGUI.java

示例2: notifyChange

import edu.mit.csail.sdg.alloy4.OurSyntaxWidget; //導入依賴的package包/類
/** Updates the status bar at the bottom of the screen. */
private Runner notifyChange() {
    if (wrap) return wrapMe();
    commands=null;
    if (text==null) return null; // If this was called prior to the "text" being fully initialized
    OurSyntaxWidget t = text.get();
    if (Util.onMac()) frame.getRootPane().putClientProperty("windowModified", Boolean.valueOf(t.modified()));
    if (t.isFile()) frame.setTitle(t.getFilename()); else frame.setTitle("Alloy Analyzer "+Version.version());
    toolbar.setBorder(new OurBorder(false, false, text.count()<=1, false));
    int c = t.getCaret();
    int y = t.getLineOfOffset(c)+1;
    int x = c - t.getLineStartOffset(y-1)+1;
    status.setText("<html>&nbsp; Line "+y+", Column "+x
          +(t.modified()?" <b style=\"color:#B43333;\">[modified]</b></html>":"</html>"));
    return null;
}
 
開發者ID:ModelWriter,項目名稱:Tarski,代碼行數:17,代碼來源:SimpleGUI.java

示例3: doFindNext

import edu.mit.csail.sdg.alloy4.OurSyntaxWidget; //導入依賴的package包/類
/** This method performs Edit->FindNext. */
private Runner doFindNext() {
    if (wrap) return wrapMe();
    if (lastFind.length()==0) return null;
    OurSyntaxWidget t = text.get();
    String all = t.getText();
    int i = Util.indexOf(all, lastFind, t.getCaret()+(lastFindForward?0:-1),lastFindForward,lastFindCaseSensitive);
    if (i<0) {
        i=Util.indexOf(all, lastFind, lastFindForward?0:(all.length()-1), lastFindForward, lastFindCaseSensitive);
        if (i<0) { log.logRed("The specified search string cannot be found."); return null; }
        log.logRed("Search wrapped.");
    } else {
        log.clearError();
    }
    if (lastFindForward) t.moveCaret(i, i+lastFind.length()); else t.moveCaret(i+lastFind.length(), i);
    t.requestFocusInWindow();
    return null;
}
 
開發者ID:ModelWriter,項目名稱:Tarski,代碼行數:19,代碼來源:SimpleGUI.java

示例4: doFindNext

import edu.mit.csail.sdg.alloy4.OurSyntaxWidget; //導入依賴的package包/類
/** This method performs Edit->FindNext. */
private Runner doFindNext() {
	if (wrap)
		return wrapMe();
	if (lastFind.length() == 0)
		return null;
	OurSyntaxWidget t = text.get();
	String all = t.getText();
	int i = Util.indexOf(all, lastFind, t.getCaret() + (lastFindForward ? 0 : -1), lastFindForward,
			lastFindCaseSensitive);
	if (i < 0) {
		i = Util.indexOf(all, lastFind, lastFindForward ? 0 : (all.length() - 1), lastFindForward,
				lastFindCaseSensitive);
		if (i < 0) {
			log.logRed("The specified search string cannot be found.");
			return null;
		}
		log.logRed("Search wrapped.");
	} else {
		log.clearError();
	}
	if (lastFindForward)
		t.moveCaret(i, i + lastFind.length());
	else
		t.moveCaret(i + lastFind.length(), i);
	t.requestFocusInWindow();
	return null;
}
 
開發者ID:AlloyTools,項目名稱:org.alloytools.alloy,代碼行數:29,代碼來源:SimpleGUI.java


注:本文中的edu.mit.csail.sdg.alloy4.OurSyntaxWidget類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。