本文整理汇总了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;
}
}
示例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);
}
示例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);
}
示例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;
}
示例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));
}
示例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);
}
示例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);
}
示例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);
}
示例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));
}
示例10: FxDockRootPane
import goryachev.fx.FX; //导入方法依赖的package包/类
public FxDockRootPane(FxDockWindow w)
{
this.window = w;
FX.style(this, FxDockStyles.FX_ROOT_PANE);
setContent(new FxDockEmptyPane());
}
示例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();
}
}
});
}
示例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);
}
示例13: FxDockTabPane
import goryachev.fx.FX; //导入方法依赖的package包/类
public FxDockTabPane()
{
FX.style(this, FxDockStyles.FX_TAB_PANE);
}
示例14: init
import goryachev.fx.FX; //导入方法依赖的package包/类
private void init()
{
FX.style(this, FxDockStyles.FX_SPLIT_PANE);
addEventFilter(MouseEvent.MOUSE_RELEASED, (ev) -> updateDividers());
}
示例15: setResizePolicyConstrained
import goryachev.fx.FX; //导入方法依赖的package包/类
public void setResizePolicyConstrained()
{
table.setColumnResizePolicy(TableView.CONSTRAINED_RESIZE_POLICY);
FX.style(table, CssTools.NO_HORIZONTAL_SCROLL_BAR);
}