fx-clj.core
*locale*
dynamic
*resource-bundle*
dynamic
accordion
(accordion id-class-kw? property-map? & content-or-children*)
Creates an instance of javafx.scene.control.Accordion. Arguments processed as in pset!.
ambient-light
(ambient-light id-class-kw? property-map? & content-or-children*)
Creates an instance of javafx.scene.AmbientLight. Arguments processed as in pset!.
anchor-pane
(anchor-pane id-class-kw? property-map? & content-or-children*)
Creates an instance of javafx.scene.layout.AnchorPane. Arguments processed as in pset!.
arc
(arc id-class-kw? property-map? & content-or-children*)
Creates an instance of javafx.scene.shape.Arc. Arguments processed as in pset!.
at
(at node & sel-xform-pairs)
An enlive-like transformation function. Takes a context node and pairs of css selector strings and transform arguments. Currently the only supported transform is the property map transform (a property map that could be passed to pset!. Example: (at my-node "#my-element" {:text "Some text"}) Note: additional transforms can be registered using the fx-clj.enlive/do-transform multimethod.
border-pane
(border-pane id-class-kw? property-map? & content-or-children*)
Creates an instance of javafx.scene.layout.BorderPane. Arguments processed as in pset!.
box
(box id-class-kw? property-map? & content-or-children*)
Creates an instance of javafx.scene.shape.Box. Arguments processed as in pset!.
button
(button id-class-kw? property-map? & content-or-children*)
Creates an instance of javafx.scene.control.Button. Arguments processed as in pset!.
canvas
(canvas id-class-kw? property-map? & content-or-children*)
Creates an instance of javafx.scene.canvas.Canvas. Arguments processed as in pset!.
category-axis
(category-axis id-class-kw? property-map? & content-or-children*)
Creates an instance of javafx.scene.chart.CategoryAxis. Arguments processed as in pset!.
cell
(cell id-class-kw? property-map? & content-or-children*)
Creates an instance of javafx.scene.control.Cell. Arguments processed as in pset!.
check-box
(check-box id-class-kw? property-map? & content-or-children*)
Creates an instance of javafx.scene.control.CheckBox. Arguments processed as in pset!.
check-box-list-cell
(check-box-list-cell id-class-kw? property-map? & content-or-children*)
Creates an instance of javafx.scene.control.cell.CheckBoxListCell. Arguments processed as in pset!.
check-box-table-cell
(check-box-table-cell id-class-kw? property-map? & content-or-children*)
Creates an instance of javafx.scene.control.cell.CheckBoxTableCell. Arguments processed as in pset!.
check-box-tree-cell
(check-box-tree-cell id-class-kw? property-map? & content-or-children*)
Creates an instance of javafx.scene.control.cell.CheckBoxTreeCell. Arguments processed as in pset!.
check-box-tree-table-cell
(check-box-tree-table-cell id-class-kw? property-map? & content-or-children*)
Creates an instance of javafx.scene.control.cell.CheckBoxTreeTableCell. Arguments processed as in pset!.
choice-box
(choice-box id-class-kw? property-map? & content-or-children*)
Creates an instance of javafx.scene.control.ChoiceBox. Arguments processed as in pset!.
choice-box-list-cell
(choice-box-list-cell id-class-kw? property-map? & content-or-children*)
Creates an instance of javafx.scene.control.cell.ChoiceBoxListCell. Arguments processed as in pset!.
choice-box-table-cell
(choice-box-table-cell id-class-kw? property-map? & content-or-children*)
Creates an instance of javafx.scene.control.cell.ChoiceBoxTableCell. Arguments processed as in pset!.
choice-box-tree-cell
(choice-box-tree-cell id-class-kw? property-map? & content-or-children*)
Creates an instance of javafx.scene.control.cell.ChoiceBoxTreeCell. Arguments processed as in pset!.
choice-box-tree-table-cell
(choice-box-tree-table-cell id-class-kw? property-map? & content-or-children*)
Creates an instance of javafx.scene.control.cell.ChoiceBoxTreeTableCell. Arguments processed as in pset!.
circle
(circle id-class-kw? property-map? & content-or-children*)
Creates an instance of javafx.scene.shape.Circle. Arguments processed as in pset!.
color-picker
(color-picker id-class-kw? property-map? & content-or-children*)
Creates an instance of javafx.scene.control.ColorPicker. Arguments processed as in pset!.
combo-box
(combo-box id-class-kw? property-map? & content-or-children*)
Creates an instance of javafx.scene.control.ComboBox. Arguments processed as in pset!.
combo-box-list-cell
(combo-box-list-cell id-class-kw? property-map? & content-or-children*)
Creates an instance of javafx.scene.control.cell.ComboBoxListCell. Arguments processed as in pset!.
combo-box-table-cell
(combo-box-table-cell id-class-kw? property-map? & content-or-children*)
Creates an instance of javafx.scene.control.cell.ComboBoxTableCell. Arguments processed as in pset!.
combo-box-tree-cell
(combo-box-tree-cell id-class-kw? property-map? & content-or-children*)
Creates an instance of javafx.scene.control.cell.ComboBoxTreeCell. Arguments processed as in pset!.
combo-box-tree-table-cell
(combo-box-tree-table-cell id-class-kw? property-map? & content-or-children*)
Creates an instance of javafx.scene.control.cell.ComboBoxTreeTableCell. Arguments processed as in pset!.
compile-fx
(compile-fx [elem-kw & args])
A hiccup-style element creation function. Takes a vector of the form [:tag-name#my-id.my-class property-map? content-or-children*] property-map? and content-or-children* are as in pset!. This function has more or less the same exact syntax as hiccup does for HTML, except for JavaFX.
cubic-curve
(cubic-curve id-class-kw? property-map? & content-or-children*)
Creates an instance of javafx.scene.shape.CubicCurve. Arguments processed as in pset!.
cylinder
(cylinder id-class-kw? property-map? & content-or-children*)
Creates an instance of javafx.scene.shape.Cylinder. Arguments processed as in pset!.
date-cell
(date-cell id-class-kw? property-map? & content-or-children*)
Creates an instance of javafx.scene.control.DateCell. Arguments processed as in pset!.
date-picker
(date-picker id-class-kw? property-map? & content-or-children*)
Creates an instance of javafx.scene.control.DatePicker. Arguments processed as in pset!.
ellipse
(ellipse id-class-kw? property-map? & content-or-children*)
Creates an instance of javafx.scene.shape.Ellipse. Arguments processed as in pset!.
event-handler
macro
(event-handler arg & body)
Wraps a javafx.event.EventHandler: (event-handler [e] (do-something))
flow-pane
(flow-pane id-class-kw? property-map? & content-or-children*)
Creates an instance of javafx.scene.layout.FlowPane. Arguments processed as in pset!.
grid-pane
(grid-pane id-class-kw? property-map? & content-or-children*)
Creates an instance of javafx.scene.layout.GridPane. Arguments processed as in pset!.
group
(group id-class-kw? property-map? & content-or-children*)
Creates an instance of javafx.scene.Group. Arguments processed as in pset!.
h-box
(h-box id-class-kw? property-map? & content-or-children*)
Creates an instance of javafx.scene.layout.HBox. Arguments processed as in pset!.
html-editor
(html-editor id-class-kw? property-map? & content-or-children*)
Creates an instance of javafx.scene.web.HTMLEditor. Arguments processed as in pset!.
hyperlink
(hyperlink id-class-kw? property-map? & content-or-children*)
Creates an instance of javafx.scene.control.Hyperlink. Arguments processed as in pset!.
image-view
(image-view id-class-kw? property-map? & content-or-children*)
Creates an instance of javafx.scene.image.ImageView. Arguments processed as in pset!.
indexed-cell
(indexed-cell id-class-kw? property-map? & content-or-children*)
Creates an instance of javafx.scene.control.IndexedCell. Arguments processed as in pset!.
label
(label id-class-kw? property-map? & content-or-children*)
Creates an instance of javafx.scene.control.Label. Arguments processed as in pset!.
line
(line id-class-kw? property-map? & content-or-children*)
Creates an instance of javafx.scene.shape.Line. Arguments processed as in pset!.
list-cell
(list-cell id-class-kw? property-map? & content-or-children*)
Creates an instance of javafx.scene.control.ListCell. Arguments processed as in pset!.
list-view
(list-view id-class-kw? property-map? & content-or-children*)
Creates an instance of javafx.scene.control.ListView. Arguments processed as in pset!.
media-view
(media-view id-class-kw? property-map? & content-or-children*)
Creates an instance of javafx.scene.media.MediaView. Arguments processed as in pset!.
mesh-view
(mesh-view id-class-kw? property-map? & content-or-children*)
Creates an instance of javafx.scene.shape.MeshView. Arguments processed as in pset!.
number-axis
(number-axis id-class-kw? property-map? & content-or-children*)
Creates an instance of javafx.scene.chart.NumberAxis. Arguments processed as in pset!.
pane
(pane id-class-kw? property-map? & content-or-children*)
Creates an instance of javafx.scene.layout.Pane. Arguments processed as in pset!.
parallel-camera
(parallel-camera id-class-kw? property-map? & content-or-children*)
Creates an instance of javafx.scene.ParallelCamera. Arguments processed as in pset!.
password-field
(password-field id-class-kw? property-map? & content-or-children*)
Creates an instance of javafx.scene.control.PasswordField. Arguments processed as in pset!.
path
(path id-class-kw? property-map? & content-or-children*)
Creates an instance of javafx.scene.shape.Path. Arguments processed as in pset!.
perspective-camera
(perspective-camera id-class-kw? property-map? & content-or-children*)
Creates an instance of javafx.scene.PerspectiveCamera. Arguments processed as in pset!.
pie-chart
(pie-chart id-class-kw? property-map? & content-or-children*)
Creates an instance of javafx.scene.chart.PieChart. Arguments processed as in pset!.
point-light
(point-light id-class-kw? property-map? & content-or-children*)
Creates an instance of javafx.scene.PointLight. Arguments processed as in pset!.
polygon
(polygon id-class-kw? property-map? & content-or-children*)
Creates an instance of javafx.scene.shape.Polygon. Arguments processed as in pset!.
polyline
(polyline id-class-kw? property-map? & content-or-children*)
Creates an instance of javafx.scene.shape.Polyline. Arguments processed as in pset!.
popup
(popup id-class-kw? property-map? & content-or-children*)
Creates an instance of javafx.stage.Popup. Arguments processed as in pset!.
popup-control
(popup-control id-class-kw? property-map? & content-or-children*)
Creates an instance of javafx.scene.control.PopupControl. Arguments processed as in pset!.
progress-bar
(progress-bar id-class-kw? property-map? & content-or-children*)
Creates an instance of javafx.scene.control.ProgressBar. Arguments processed as in pset!.
progress-bar-table-cell
(progress-bar-table-cell id-class-kw? property-map? & content-or-children*)
Creates an instance of javafx.scene.control.cell.ProgressBarTableCell. Arguments processed as in pset!.
progress-bar-tree-table-cell
(progress-bar-tree-table-cell id-class-kw? property-map? & content-or-children*)
Creates an instance of javafx.scene.control.cell.ProgressBarTreeTableCell. Arguments processed as in pset!.
progress-indicator
(progress-indicator id-class-kw? property-map? & content-or-children*)
Creates an instance of javafx.scene.control.ProgressIndicator. Arguments processed as in pset!.
pset!
(pset! element id-class-kw? property-map? & content-or-children*)
Sets properties on elements. id-class-kw? (optional): a keyword representing a hiccup style ID and classes (i.e. :#some-id.some-class.another-class). property-map? (optional): a map of property keys and setters. Keys can be kebab-case keywords corresponding to JavaFX bean properties. Values are converted using clojurefx.core.convert/convert-arg. If a value is an instance of ObservableValue (or is converted to one), it will be bound to the property. content-or-children* (zero or more): element or elements to be bound to the JavaFX element's DefaultProperty. If the DefaultProperty is a list property then multiple children elements can be bound, otherwise only a single 'content' element or can be bound.
quad-curve
(quad-curve id-class-kw? property-map? & content-or-children*)
Creates an instance of javafx.scene.shape.QuadCurve. Arguments processed as in pset!.
radio-button
(radio-button id-class-kw? property-map? & content-or-children*)
Creates an instance of javafx.scene.control.RadioButton. Arguments processed as in pset!.
rectangle
(rectangle id-class-kw? property-map? & content-or-children*)
Creates an instance of javafx.scene.shape.Rectangle. Arguments processed as in pset!.
region
(region id-class-kw? property-map? & content-or-children*)
Creates an instance of javafx.scene.layout.Region. Arguments processed as in pset!.
run!
macro
(run! & body)
Runs the enclosed body asynchronously on the JavaFX application thread (if caller is not already on this thread). Does not block the calling thread.
run<!
macro
(run<! & body)
Runs the enclosed body asynchronously on the JavaFX application thread from within a core.async go block. Returns the value of the evaluated body using a core.async chan and the <! function. Must be called from within a core.async go block!
run<!!
macro
(run<!! & body)
Runs the enclosed body asynchronously on the JavaFX application thread. Blocks the calling thread until asynchronous execution is complete and returns the result of the evaluated block to the caller.
sandbox
(sandbox refresh-fn)
Creates a JavaFX stage with the root element of the stage's scene set to the result of evaluating refresh-fn. If F5 is pressed within the stage, refresh-fn will be re-evaluated and its new result will be bound to as the root of the scene. This can be very useful for prototyping. Suggested usage: (defn my-refresh-fn [] (do-create-view....)) (sandbox #'my-refresh-fn) ;; By binding to a var, my-refresh-fn can be easily updated and reloaded ;; at the REPL
scroll-bar
(scroll-bar id-class-kw? property-map? & content-or-children*)
Creates an instance of javafx.scene.control.ScrollBar. Arguments processed as in pset!.
scroll-pane
(scroll-pane id-class-kw? property-map? & content-or-children*)
Creates an instance of javafx.scene.control.ScrollPane. Arguments processed as in pset!.
separator
(separator id-class-kw? property-map? & content-or-children*)
Creates an instance of javafx.scene.control.Separator. Arguments processed as in pset!.
set-global-css!
(set-global-css! css)
Sets the provided css as the global css for all JavaFX windows without overriding the default JavaFX css. css can either be a css string or a vector that can be processed by the garden css library.
slider
(slider id-class-kw? property-map? & content-or-children*)
Creates an instance of javafx.scene.control.Slider. Arguments processed as in pset!.
sphere
(sphere id-class-kw? property-map? & content-or-children*)
Creates an instance of javafx.scene.shape.Sphere. Arguments processed as in pset!.
split-pane
(split-pane id-class-kw? property-map? & content-or-children*)
Creates an instance of javafx.scene.control.SplitPane. Arguments processed as in pset!.
stack-pane
(stack-pane id-class-kw? property-map? & content-or-children*)
Creates an instance of javafx.scene.layout.StackPane. Arguments processed as in pset!.
stage
(stage id-class-kw? property-map? & content-or-children*)
Creates an instance of javafx.stage.Stage. Arguments processed as in pset!.
svg-path
(svg-path id-class-kw? property-map? & content-or-children*)
Creates an instance of javafx.scene.shape.SVGPath. Arguments processed as in pset!.
swing-node
(swing-node id-class-kw? property-map? & content-or-children*)
Creates an instance of javafx.embed.swing.SwingNode. Arguments processed as in pset!.
tab
(tab id-class-kw? property-map? & content-or-children*)
Creates an instance of javafx.scene.control.Tab. Arguments processed as in pset!.
tab-pane
(tab-pane id-class-kw? property-map? & content-or-children*)
Creates an instance of javafx.scene.control.TabPane. Arguments processed as in pset!.
table-cell
(table-cell id-class-kw? property-map? & content-or-children*)
Creates an instance of javafx.scene.control.TableCell. Arguments processed as in pset!.
table-column
(table-column id-class-kw? property-map? & content-or-children*)
Creates an instance of javafx.scene.control.TableColumn. Arguments processed as in pset!.
table-row
(table-row id-class-kw? property-map? & content-or-children*)
Creates an instance of javafx.scene.control.TableRow. Arguments processed as in pset!.
table-view
(table-view id-class-kw? property-map? & content-or-children*)
Creates an instance of javafx.scene.control.TableView. Arguments processed as in pset!.
text
(text id-class-kw? property-map? & content-or-children*)
Creates an instance of javafx.scene.text.Text. Arguments processed as in pset!.
text-area
(text-area id-class-kw? property-map? & content-or-children*)
Creates an instance of javafx.scene.control.TextArea. Arguments processed as in pset!.
text-field
(text-field id-class-kw? property-map? & content-or-children*)
Creates an instance of javafx.scene.control.TextField. Arguments processed as in pset!.
text-field-list-cell
(text-field-list-cell id-class-kw? property-map? & content-or-children*)
Creates an instance of javafx.scene.control.cell.TextFieldListCell. Arguments processed as in pset!.
text-field-table-cell
(text-field-table-cell id-class-kw? property-map? & content-or-children*)
Creates an instance of javafx.scene.control.cell.TextFieldTableCell. Arguments processed as in pset!.
text-field-tree-cell
(text-field-tree-cell id-class-kw? property-map? & content-or-children*)
Creates an instance of javafx.scene.control.cell.TextFieldTreeCell. Arguments processed as in pset!.
text-field-tree-table-cell
(text-field-tree-table-cell id-class-kw? property-map? & content-or-children*)
Creates an instance of javafx.scene.control.cell.TextFieldTreeTableCell. Arguments processed as in pset!.
text-flow
(text-flow id-class-kw? property-map? & content-or-children*)
Creates an instance of javafx.scene.text.TextFlow. Arguments processed as in pset!.
tile-pane
(tile-pane id-class-kw? property-map? & content-or-children*)
Creates an instance of javafx.scene.layout.TilePane. Arguments processed as in pset!.
titled-pane
(titled-pane id-class-kw? property-map? & content-or-children*)
Creates an instance of javafx.scene.control.TitledPane. Arguments processed as in pset!.
toggle-button
(toggle-button id-class-kw? property-map? & content-or-children*)
Creates an instance of javafx.scene.control.ToggleButton. Arguments processed as in pset!.
tool-bar
(tool-bar id-class-kw? property-map? & content-or-children*)
Creates an instance of javafx.scene.control.ToolBar. Arguments processed as in pset!.
tooltip
(tooltip id-class-kw? property-map? & content-or-children*)
Creates an instance of javafx.scene.control.Tooltip. Arguments processed as in pset!.
tree-cell
(tree-cell id-class-kw? property-map? & content-or-children*)
Creates an instance of javafx.scene.control.TreeCell. Arguments processed as in pset!.
tree-table-cell
(tree-table-cell id-class-kw? property-map? & content-or-children*)
Creates an instance of javafx.scene.control.TreeTableCell. Arguments processed as in pset!.
tree-table-column
(tree-table-column id-class-kw? property-map? & content-or-children*)
Creates an instance of javafx.scene.control.TreeTableColumn. Arguments processed as in pset!.
tree-table-row
(tree-table-row id-class-kw? property-map? & content-or-children*)
Creates an instance of javafx.scene.control.TreeTableRow. Arguments processed as in pset!.
tree-table-view
(tree-table-view id-class-kw? property-map? & content-or-children*)
Creates an instance of javafx.scene.control.TreeTableView. Arguments processed as in pset!.
tree-view
(tree-view id-class-kw? property-map? & content-or-children*)
Creates an instance of javafx.scene.control.TreeView. Arguments processed as in pset!.
v-box
(v-box id-class-kw? property-map? & content-or-children*)
Creates an instance of javafx.scene.layout.VBox. Arguments processed as in pset!.
web-view
(web-view id-class-kw? property-map? & content-or-children*)
Creates an instance of javafx.scene.web.WebView. Arguments processed as in pset!.
with-locale
macro
(with-locale locale & body)
Evaluates body with the specified locale bound to the *locale* var. locale can either be an instance of java.util.Locale or a well-formed IEFT (BCP 47) language string.
with-resource-bundle
macro
(with-resource-bundle res-bundle & body)
Evaluates body with the resource bundle specfiied by res-bundle bound to *resource-bundle*. res-bundle can either be an instance of java.util.ResourceBundle or a String referring to a named ResourceBundle. In the case the a String is provided the ResourceBundle is resolved using the locale bound to the *locale* var or the default locale.