In Windows Explorer, we have this:
Do we have similar in JavaFX? I'm totally OK with implementing my own but just in case there in one already built in(or maybe some other libraries that does this).
I've searched for a while but there's not much on TableView.
You can add a column chooser using table.setMenuButtonVisible(true). You can also style the button in css using .table-view .show-hide-columns-button and .table-view .show-hide-column-image. They are both stack panes.
Related
I used to develop my application in Swing. But recently I have begun to use JavaFx.
In Swing JTabPane we have this:
]
In JavaFx TabPane we have this:
We can see the selected Tab bigger than the other
But in JavaFx, we don't have this effect.
Question: How can I obtain the same Swing Tab style in JavaFx ?
Problem solve.
We can use CSS to make this style (Background-color, padding, :selected...)
Sorry I'm a beginner in JavaFx.
How do you add the file icon to the titlebar in JavaFX on Mac?
Like this:
And how do you indicate that the document hasn't been saved, like this:
In Swing, this is how you do it, but is it possible in JavaFX too?
No pre-coded solution in this answer. The feature you request is not available out of the box with JavaFX 8.
Some approaches you could consider:
See: JavaFX entirely customized windows? and the Undecorator project. Potentially you could use something like Undecorator in conjunction with resources from AquaFX to achieve what you want.
OR
Another way is to use two stages layered on top of each other, the top stage being transparent and overlaying the icon on the lower stage - you would need to keep them in sync for location, size, visibility and iconification states.
Use a Swing stage and application which implements the icon and place the JavaFX content inside the Swing stage using a JFXPanel.
I need to make a gui with gwt and have some question about positioning. How can I position gwt Button and ListBox on the gui panel? I have done simple position of labels with
html div style=position left:50px
but can't understand how to make it for buttons. Can anyone please help me?
sanpahot:
You can use GWT with CSS the same way as you use HTML with CSS. Define your CSS rules and apply CSS classes to your GWT widgets.
You can read more about styling GWT:
Styling Existing Widgets
You are using GWT that provides a rich set of build in Widgets and Panels/Layouts in its user-interface library.
You don't need to provide any absolute positioning at all.
Simply use a proper layout that fits as per your need and add the widgets in it that is automatically positioned and sized based on layout manager policy.
For more detail please visit GWT Showcase
When you open a dialog in Eclipse, where is a form layout, you can see that when you hover your mouse over some item, its label or space between them, there's an auxiliary arrow shown. Screenshot:
My question is: is there any (simple) way to achieve the same in Java with SWT and JFace?
Regards
No there is no standard way to achieve this through SWT or JFace, as it is not a built in feature. It is not that difficult to add on your own though.
Have a look at this ConfigurationBlock.java file from the PDE source. This class is the base for all option blocks in PDE preference pages. This exact same code snippet is also used by JDT but it has a different copy in OptionConfigurationBlock.java.
The method that gets called for each combo control is ConfigurationBlock#addHighlight(..), which is responsible for adding the highlight when the control is in focus or when mouse is hovering over its label.
We want to migrate a project from Swing to JavaFX as the new UI technology. As a part of our corporate design, we were changing the caret color in Swing to a light green.
How can we alter the color(or maybe also other things about the appearance) of carets in JavaFX 2.0? I couldn't find any useful information about it. I saw that it was possible in earlier versions of JavaFX, so i guess there's a way in 2.0 too.
Kind regards,
David
In the TextField caret has the same color as text. You can change them by:
TextField tf = new TextField("Text");
tf.setStyle(" -fx-text-fill: green");
or globally in css file.
Sergey's answer should work fine.. However it does not work with texarea since it is a bug..U can download java fx 2.1 developer preview to make it work with textarea