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


Java FX.style方法代码示例

本文整理汇总了Java中goryachev.fx.FX.style方法的典型用法代码示例。如果您正苦于以下问题:Java FX.style方法的具体用法?Java FX.style怎么用?Java FX.style使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在goryachev.fx.FX的用法示例。


在下文中一共展示了FX.style方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: createToolBar

import goryachev.fx.FX; //导入方法依赖的package包/类
/** override to create your own toolbar, possibly with custom icons and buttons */
protected Node createToolBar(boolean tabMode)
{
	if(tabMode)
	{
		return null;
	}
	else
	{
		Button b = new Button("x");
		FX.style(b, FxDockStyles.TOOLBAR_CLOSE_BUTTON);
		closeAction.attach(b);
		
		ToolBar t = new ToolBar();
		FX.style(t, FxDockStyles.TOOLBAR);
		t.getItems().addAll(titleField, b);
		return t;
	}
}
 
开发者ID:andy-goryachev,项目名称:FxDock,代码行数:20,代码来源:FxDockPane.java

示例2: StyledTextPane

import goryachev.fx.FX; //导入方法依赖的package包/类
public StyledTextPane()
{
	textField = new CTextFlow();
	
	caret = new Path();
	FX.style(caret, CARET);
	caret.setManaged(false);
	caret.setStroke(Color.BLACK);
	
	getChildren().add(textField);
	
	caretTimeline = new Timeline();
	caretTimeline.setCycleCount(Animation.INDEFINITE);
	// TODO property
	updateBlinkRate(Duration.millis(500));
	
	// FIX allow custom handlers
	new StyledTextPaneMouseController(this);
}
 
开发者ID:andy-goryachev,项目名称:FxEditor,代码行数:20,代码来源:StyledTextPane.java

示例3: TreeTablePane

import goryachev.fx.FX; //导入方法依赖的package包/类
public TreeTablePane()
{
	tree = new TreeTableView<>();
	tree.setShowRoot(false);
	tree.getSelectionModel().setSelectionMode(SelectionMode.MULTIPLE);
	tree.setEditable(true);
	tree.setColumnResizePolicy(TreeTableView.CONSTRAINED_RESIZE_POLICY);
	FX.style(tree, CssTools.NO_HORIZONTAL_SCROLL_BAR, TREE);
	
	handler = new TreeTableHandler<Page>(tree);
	
	setupActions();
	
	addColumn(Page.Field.TITLE, "Title");
	addColumn(Page.Field.TIME_CREATED, "Created");
	addColumn(Page.Field.STATUS, "Status");
	
	setCenter(tree);
}
 
开发者ID:andy-goryachev,项目名称:ReqTraq,代码行数:20,代码来源:TreeTablePane.java

示例4: createToolBar

import goryachev.fx.FX; //导入方法依赖的package包/类
protected Node createToolBar(boolean tabMode)
{
	HPane t = new HPane(5);
	t.setMaxWidth(Double.MAX_VALUE);
	t.setPadding(new Insets(2, 2, 2, 2));

	if(!tabMode)
	{
		Button b = new Button("x");
		FX.style(b, FxDockStyles.TOOLBAR_CLOSE_BUTTON);
		closeAction.attach(b);

		t.add(titleField);
		t.add(b);
	}
	t.fill(addressField);
	t.add(new CButton("Reload", reloadAction));
	return t;
}
 
开发者ID:andy-goryachev,项目名称:FxDock,代码行数:20,代码来源:DemoBrowser.java

示例5: CSplitPane

import goryachev.fx.FX; //导入方法依赖的package包/类
public CSplitPane(boolean horizontal)
{
	this.horizontal = horizontal;
	
	FX.style(this, PANE);
	
	addEventFilter(MouseEvent.MOUSE_ENTERED, (ev) -> handleMouseEntered(ev));
	addEventFilter(MouseEvent.MOUSE_MOVED, (ev) -> handleMouseMoved(ev));
	addEventFilter(MouseEvent.MOUSE_CLICKED, (ev) -> handleMouseClicked(ev));
	addEventFilter(MouseEvent.MOUSE_DRAGGED, (ev) -> handleMouseDragged(ev));
	addEventFilter(MouseEvent.MOUSE_EXITED, (ev) -> handleMouseExited(ev));
}
 
开发者ID:andy-goryachev,项目名称:FxEditor,代码行数:13,代码来源:CSplitPane.java

示例6: FxEditorStyledModelDemoPane

import goryachev.fx.FX; //导入方法依赖的package包/类
public FxEditorStyledModelDemoPane()
{
	FX.style(this, EDITOR);
	
	model = new SimpleStyledTextModel();
	populate();
		
	FxEditor ed = new FxEditor(model);
	ed.setContentPadding(new Insets(2, 5, 2, 5));
	ed.setMultipleSelectionEnabled(true);
	ed.setShowLineNumbers(true);
	
	setTop(label("Styled Text"));
	setCenter(ed);
}
 
开发者ID:andy-goryachev,项目名称:FxEditor,代码行数:16,代码来源:FxEditorStyledModelDemoPane.java

示例7: FxEditorEditableDemoPane

import goryachev.fx.FX; //导入方法依赖的package包/类
public FxEditorEditableDemoPane()
{
	FX.style(this, EDITOR);
	
	FxEditor edit = new FxEditor(new SimpleEditablePlainTextEditorModel());
	edit.setContentPadding(new Insets(2, 5, 2, 5));
	edit.setMultipleSelectionEnabled(true);
	
	setTop(label("Editable Plain Text Model"));
	setCenter(edit);
}
 
开发者ID:andy-goryachev,项目名称:FxEditor,代码行数:12,代码来源:FxEditorEditableDemoPane.java

示例8: FxEditorDemoPane

import goryachev.fx.FX; //导入方法依赖的package包/类
public FxEditorDemoPane()
{
	FX.style(this, EDITOR);
	
	FxEditor ed = new FxEditor(new TestFxColorEditorModel(Conf.LINE_COUNT));
	ed.setContentPadding(new Insets(2, 5, 2, 5));
	ed.setMultipleSelectionEnabled(true);
	ed.setShowLineNumbers(true);
	
	setTop(label("Large Color Model (Read-Only)"));
	setCenter(ed);
}
 
开发者ID:andy-goryachev,项目名称:FxEditor,代码行数:13,代码来源:FxEditorDemoPane.java

示例9: FxDockPane

import goryachev.fx.FX; //导入方法依赖的package包/类
public FxDockPane(String type)
{
	this.type = type;
	
	FX.style(this, FxDockStyles.FX_DOCK_PANE);
	
	titleField = new Label();
	FX.style(titleField, FxDockStyles.TOOLBAR_TITLE);
	titleField.textProperty().bindBidirectional(titleProperty());
	DragAndDropHandler.attach(titleField, this);
	
	parent.addListener((s,old,cur) -> setTabMode(cur instanceof FxDockTabPane));
}
 
开发者ID:andy-goryachev,项目名称:FxDock,代码行数:14,代码来源:FxDockPane.java

示例10: FxDockRootPane

import goryachev.fx.FX; //导入方法依赖的package包/类
public FxDockRootPane(FxDockWindow w)
{
	this.window = w;
	
	FX.style(this, FxDockStyles.FX_ROOT_PANE);
	setContent(new FxDockEmptyPane());
}
 
开发者ID:andy-goryachev,项目名称:FxDock,代码行数:8,代码来源:FxDockRootPane.java

示例11: FxEditor

import goryachev.fx.FX; //导入方法依赖的package包/类
public FxEditor(FxEditorModel m)
{
	setFocusTraversable(true);
	setTextModel(m);
	FX.style(this, PANEL);
	setBackground(FX.background(Color.WHITE));
	
	vflow = new VFlow(this);
	
	vscroll = createVScrollBar();
	
	hscroll = createHScrollBar();
	hscroll.visibleProperty().bind(wrapTextProperty.not());
	
	getChildren().addAll(vflow, vscroll, hscroll);
	
	selector = createSelectionController();
	segments.addListener((Observable src) -> vflow.reloadSelectionDecorations());

	Binder.onChange(vflow::updateBlinkRate, true, blinkRateProperty());
	Binder.onChange(this::updateLayout, widthProperty(), heightProperty());
	
	keymap = createKeyMap();
	
	initMouseController();
	
	// init key handler
	addEventFilter(KeyEvent.ANY, (ev) ->
	{
		if(!ev.isConsumed())
		{
			Runnable a = keymap.getActionForKeyEvent(ev);
			if(a != null)
			{
				a.run();
			}
		}
	});
}
 
开发者ID:andy-goryachev,项目名称:ReqTraq,代码行数:40,代码来源:FxEditor.java

示例12: EditorPane

import goryachev.fx.FX; //导入方法依赖的package包/类
public EditorPane()
{
	FX.style(this, STYLE);
	
	titleField = new TextField();
	FX.style(titleField, ID_TITLE);
	
	textField = new TextArea();
	FX.style(textField, ID_TEXT, FxCtl.WRAP_TEXT);

	setTop(titleField);
	setCenter(textField);
}
 
开发者ID:andy-goryachev,项目名称:ReqTraq,代码行数:14,代码来源:EditorPane.java

示例13: FxDockTabPane

import goryachev.fx.FX; //导入方法依赖的package包/类
public FxDockTabPane()
{
	FX.style(this, FxDockStyles.FX_TAB_PANE);
}
 
开发者ID:andy-goryachev,项目名称:FxDock,代码行数:5,代码来源:FxDockTabPane.java

示例14: init

import goryachev.fx.FX; //导入方法依赖的package包/类
private void init()
{
	FX.style(this, FxDockStyles.FX_SPLIT_PANE);
	
	addEventFilter(MouseEvent.MOUSE_RELEASED, (ev) -> updateDividers());
}
 
开发者ID:andy-goryachev,项目名称:FxDock,代码行数:7,代码来源:FxDockSplitPane.java

示例15: setResizePolicyConstrained

import goryachev.fx.FX; //导入方法依赖的package包/类
public void setResizePolicyConstrained()
{
	table.setColumnResizePolicy(TableView.CONSTRAINED_RESIZE_POLICY);
	FX.style(table, CssTools.NO_HORIZONTAL_SCROLL_BAR);
}
 
开发者ID:andy-goryachev,项目名称:FxEditor,代码行数:6,代码来源:FxTable.java


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