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


Java FX.later方法代碼示例

本文整理匯總了Java中goryachev.fx.FX.later方法的典型用法代碼示例。如果您正苦於以下問題:Java FX.later方法的具體用法?Java FX.later怎麽用?Java FX.later使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在goryachev.fx.FX的用法示例。


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

示例1: restoreSplitPane

import goryachev.fx.FX; //導入方法依賴的package包/類
private static void restoreSplitPane(String prefix, SplitPane sp)
{
	String k = prefix + SFX_DIVIDERS;
	SStream s = GlobalSettings.getStream(k);
	
	// must run later because of FX split pane inability to set divider positions exactly
	FX.later(() ->
	{
		int ct = s.nextInt();
		if(sp.getDividers().size() == ct)
		{
			for(int i=0; i<ct; i++)
			{
				double div = s.nextDouble();
				sp.setDividerPosition(i, div);
			}
		}
	});
}
 
開發者ID:andy-goryachev,項目名稱:FxEditor,代碼行數:20,代碼來源:FxSchema.java

示例2: edit

import goryachev.fx.FX; //導入方法依賴的package包/類
public void edit(TreeItem<Page> p)
{
	tree.getSelectionModel().select(p);
	int ix = tree.getSelectionModel().getSelectedIndex();
	tree.getSelectionModel().clearAndSelect(ix);
	if(ix < 0)
	{
		return;
	}
	
	FX.later(() -> 
	{
		tree.edit(ix, tree.getColumns().get(0));
		
		Node n = tree.lookup(".text-input");
		
		// FIX focus the editor
		FX.later(() -> 
		{
			// it looks like the editor is losing focus
			n.requestFocus();
		});
	});
}
 
開發者ID:andy-goryachev,項目名稱:ReqTraq,代碼行數:25,代碼來源:TreeTablePane.java

示例3: showFindPane

import goryachev.fx.FX; //導入方法依賴的package包/類
public void showFindPane()
{
	FindPane p = new FindPane();
	setBottom(p);
	
	FX.later(() -> p.focusSearch());
}
 
開發者ID:andy-goryachev,項目名稱:FxEditor,代碼行數:8,代碼來源:MainPane.java

示例4: DemoBrowser

import goryachev.fx.FX; //導入方法依賴的package包/類
public DemoBrowser()
{
	super(DemoGenerator.BROWSER);
	setTitle("Browser");
	
	addressField = new TextField();
	addressField.addEventHandler(KeyEvent.KEY_PRESSED, (ev) -> handleKeyTyped(ev));
	bind("URL", addressField.textProperty());
	
	view = new WebView();
	view.getEngine().setOnError((ev) -> handleError(ev));
	view.getEngine().setOnStatusChanged((ev) -> handleStatusChange(ev));
	Worker<Void> w = view.getEngine().getLoadWorker();
	w.stateProperty().addListener(new ChangeListener<Worker.State>()
	{
		public void changed(ObservableValue v, Worker.State old, Worker.State cur)
		{
			D.print(cur);
			if(w.getException() != null && cur == State.FAILED)
			{
				D.print(w.getException());
			}
		}
	});

	statusField = new Label();
	
	CPane p = new CPane();
	p.setGaps(10, 5);
	p.setCenter(view);
	p.setBottom(statusField);
	setContent(p);
	
	FX.later(() -> reload());
}
 
開發者ID:andy-goryachev,項目名稱:FxDock,代碼行數:36,代碼來源:DemoBrowser.java


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