use of javafx.embed.swing.SwingNode in project Gargoyle by callakrsos.
the class DesignerFx method createSymbolTableResultPanel.
private javafx.scene.Node createSymbolTableResultPanel() {
symbolTableTreeWidget.setCellRenderer(createNoImageTreeCellRenderer());
SwingNode swingNode = new SwingNode();
JScrollPane jScrollPane = new JScrollPane(symbolTableTreeWidget);
createSwingContent(swingNode, jScrollPane);
return swingNode;
}
use of javafx.embed.swing.SwingNode in project Gargoyle by callakrsos.
the class DesignerFx method createASTPanel.
private javafx.scene.Node createASTPanel() {
astTreeWidget.setCellRenderer(createNoImageTreeCellRenderer());
TreeSelectionModel model = astTreeWidget.getSelectionModel();
model.setSelectionMode(TreeSelectionModel.SINGLE_TREE_SELECTION);
model.addTreeSelectionListener(new SymbolTableListener());
model.addTreeSelectionListener(new CodeHighlightListener());
SwingNode swingNode = new SwingNode();
createSwingContent(swingNode, new JScrollPane(astTreeWidget));
return swingNode;
}
use of javafx.embed.swing.SwingNode in project blue by kunstmusik.
the class BlueJFXControlsApplication method setTablesTest.
private void setTablesTest(TabPane root) {
TableView<Person> jfxTable = new TableView<>();
ObservableList<Person> people = FXCollections.observableArrayList();
for (int i = 0; i < 20; i++) {
Person p = new Person();
p.setFirstName("test");
p.setLastName(Integer.toString(i));
people.add(p);
}
TableColumn<Person, String> firstNameCol = new TableColumn<Person, String>("First Name");
firstNameCol.setCellValueFactory(new PropertyValueFactory("firstName"));
TableColumn<Person, String> lastNameCol = new TableColumn<Person, String>("Last Name");
lastNameCol.setCellValueFactory(new PropertyValueFactory("lastName"));
jfxTable.getColumns().addAll(firstNameCol, lastNameCol);
jfxTable.setItems(people);
SwingNode swingNode = new SwingNode();
Vector v = new Vector();
for (int i = 0; i < 20; i++) {
Vector t = new Vector();
t.add("test");
t.add(Integer.toString(i));
v.add(t);
}
Vector labels = new Vector();
labels.add("First Name");
labels.add("Last Name");
SwingUtilities.invokeLater(() -> {
DefaultTableModel tm = new DefaultTableModel(v, labels);
JTable table = new JTable(tm);
table.updateUI();
JScrollPane scrollPane = new JScrollPane(table);
scrollPane.setBorder(BorderFactory.createEmptyBorder());
swingNode.setContent(scrollPane);
});
root.getTabs().add(new Tab("Tables", new SplitPane(jfxTable, swingNode)));
}
use of javafx.embed.swing.SwingNode in project blue by kunstmusik.
the class BlueJFXControlsApplication method setupTextFieldsTest.
private void setupTextFieldsTest(TabPane root) {
SwingNode swingNode = new SwingNode();
SwingUtilities.invokeLater(() -> swingNode.setContent(new JTextField("Text 2")));
GridPane gp = new GridPane();
gp.addRow(0, new Label("JavaFX"), new TextField("Text 1"));
gp.addRow(1, new Label("Swing"), swingNode);
gp.setVgap(5.0);
gp.setHgap(5.0);
gp.setPadding(new Insets(5, 5, 5, 5));
root.getTabs().add(new Tab("Text Fields", new BorderPane(gp)));
}
use of javafx.embed.swing.SwingNode in project dwoss by gg-net.
the class BuilderUtil method createSwingNode.
/**
* Call from Platform: creates a SwingNode in a BorderPane and sets the pane on in
*
* @param in the uiparameter
* @return the modified uiparameter
*/
static UiParameter createSwingNode(UiParameter in) {
SwingNode sn = new SwingNode();
BorderPane p = new BorderPane(sn);
return in.withPane(p);
}
Aggregations