問題タブ [flowpane]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票する
2 に答える
824 参照

java - 「javafx.scene.image.Image@1a3d58b」を通常のファイルパスに変換する方法

TilePane に一覧表示された画像があり、クリックするとそれぞれのファイル パスが出力されます。ただし、次のようなものが得られます。

D:\Xampp\ のような通常の形式で印刷するためのパスを取得するにはどうすればよいですか

ありがとうございました。

クラスは次のとおりです。

0 投票する
1 に答える
59 参照

printing - FlowPane 内で SplitPanes を印刷すると、2 ページ目から半ページ下に印刷されます

フローペイン内にいくつかの分割ペインがあり、分割ペインをノードとして印刷機能に渡します。最初の分割ペインは A4 面を上にして印刷され、次のページの分割ペインは約半ページ後に印刷されます。注: 分割ペインの高さは可変です。ただし、これは、すべての分割ペインが同一である場合でも実際に発生します。

プリンタ ダイアログの明示的な A4 縦長フォーマットの設定は変更されません。シーンのサイズ変更は役に立ちません。

呼び出しシーケンスは次のとおりです。

ContainerController.java

public class FXPrinter { ...

ゲルハルト・ライブのサポートに感謝します

0 投票する
1 に答える
75 参照

css - javafxフローペインのcolumnHalignmentに相当するcssはありますか?

このパラメーターを CSS に入れたいのですが、可能ですか? 次のようなもの: -fx-column-h-alignment: right; または -fx-column-horizo​​nal-alignment: right; または -fx-columnHalignment: 右;

0 投票する
2 に答える
4034 参照

layout - TilePane with automatically stretching tiles in JavaFX

Is there any way in JavaFX to take best from both TilePane or FlowPane and GridPane?
Here's what I'd like to achieve:

First, I like the idea of GridPane where I can set up a M×N grid which automatically resizes within its parent container to divide the space equally into M columns and N rows. Then I can put some child elements which fill each cell completely, and they will stretch along with the grid. This is cool.
But there's one drawback: I need to explicitly specify where should each control go, by setting its row & column number.

Then, there are layout containers such as FlowPane or TilePane which automatically reflow their child elements when the parent container changes its size. When I add another child element, it is automatically attached at the end of the list, and the list of elements automatically wraps after reaching the edge of the container when there's too few space to fit another element in there.
But here's a drawback as well: the child elements can only have rigid, pre-defined sizes. They won't stretch with its parent element.

And here's what I need:
I need the best from both of these containers, that is, I want a M by N grid (let's say 4×4) where each cell is ParentWidth/M by ParentHeight/N and stretches along with the window, so that it is always 4×4 cells, but their sizes (along with the sizes of their contents) stretches accordingly. But I don't want to tell the container explicitly in which row & column to put every new child I add there. Instead, I want to just add it and let the container figure out the first empty cell to put it in, filling the cells from left to right, then top to bottom if there's no empty cell left in the current row.

Is there some magical setup for any of these predefined containers' attributes which would allow me to achieve this? Or do I need to write such a container myself?

0 投票する
1 に答える
555 参照

java - javafxのハニカムレイアウト(フローペイン付き?)

これまでFlowPaneを使用して、JavaFXでボタンを使用してハニカムフローを作成しようとしています

これまでのところ、FlowPane で負の VGap を使用して半分は機能していましたが、サイズを変更して 3-4 行を 3-3-1 にするとすぐに、明らかにうまくいきません。

ハニカム レイアウトをさまざまな量のボタンで維持するソリューションを見つけようとしていますが、これまでのところあまり成功していません。だから、誰かがこれに対する解決策を知っているかどうか疑問に思っていました。

編集:これが私が現時点で持っている基本的なコードです