Comments (5)
I would also really appreciate knowing how to do this.
from fn-fx.
This does not work because the fn-fx
methods (like ui/tab-pane
) don't return JavaFX objects, but an internal representation of a such component. The JavaFX objects are created/updated only when the ui changes are applied, and fn-fx
tries to hide them. Can you provide a more concrete use case of what you want to achieve? It will help me to find if and how it can be done with the fn-fx
api.
from fn-fx.
Thanks for clarifying. I asked that question more than a year ago, and no longer have that use case, as have 'moved on' from wanting to do whatever I was planing to use fn-fx for.
from fn-fx.
I'm wondering what would be the easiest work-around for this. I want to animate some text as shown here.
The best I could come up with was to just create the component using java interop and create then play the animation at the same time and just put it into the defui Stage macro as one of the :children properties. This of coarse cannot participate in state changes via fn-fx's machinery. Here's what I have:
(defn make-a-text []
(let [t (doto (Text. message) (.setLayoutY 100) (.setTextOrigin VPos/TOP)
(.setTextAlignment TextAlignment/JUSTIFY) (.setWrappingWidth 400)
(.setFill (Color/rgb 187 195 107))
(.setFont (Font/font "SansSerif" FontWeight/BOLD 24.0)))
transition (TranslateTransition. (Duration. 75000) t)]
(doto transition (.setToY -820) (.setInterpolator Interpolator/LINEAR)
(.setCycleCount Timeline/INDEFINITE) .play)
t))
from fn-fx.
I think the easiest way would be to get the Java FX Node
by id. find-nearest-by-id
and find-child-by-id
from fn-fx.fx-tree-search
do this. I guess they were written for internal use, but they are public so you can use them directly. If they are to be part of fn-fx's API, some improvement is needed.
from fn-fx.
Related Issues (20)
- CompilerException org.reflections.ReflectionsException: Couldn't find subtypes of Object. HOT 4
- Standardise how examples are run
- Auto generate and deploy API docs from master HOT 3
- Use HTML as frontend HOT 2
- Direct support for loading FXML files HOT 3
- Support for WebView HOT 2
- Special handling of :shown property prevents on-showing/on-shown events being triggered.
- Doesn't seem to work with Ubuntu out of the box HOT 14
- Remove sudo:false from TravisCI config file HOT 1
- fn-fx doesn't work on OpenJDK 1.8 HOT 4
- using alternate hiccup syntax for defining dom HOT 10
- UI not updating even though the model differs
- How do you get the selected value from a choice-box HOT 1
- Endless changeloop for sliders HOT 6
- bind functionality HOT 2
- table-cell with button
- (ui/text :fill (ui/color ...)) does not set fill property to said color
- lein uberjar gives an error ClassNotFoundException HOT 1
- Event stop propagation
- Unable to open DISPLAY HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fn-fx.