Java Code Examples for javafx.embed.swing.SwingNode#setContent()

The following examples show how to use javafx.embed.swing.SwingNode#setContent() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: SwingTextAreaWrapper.java    From kafka-message-tool with MIT License 6 votes vote down vote up
public SwingTextAreaWrapper(JTextArea textArea) {
    this.textArea = textArea;
    textArea.setEditable(true);
    textArea.setFont(FONT);

    final DefaultCaret caret = (DefaultCaret) textArea.getCaret();
    caret.setUpdatePolicy(DefaultCaret.ALWAYS_UPDATE);

    node = new SwingNode();
    JScrollPane sp = new JScrollPane(textArea);
    textArea.setComponentPopupMenu(popupMenu);
    node.setContent(sp);

    popupMenu.add(saveToFileMenu);

}
 
Example 2
Source File: FirmataTab.java    From BowlerStudio with GNU General Public License v3.0 6 votes vote down vote up
@Override
public void initializeUI(BowlerAbstractDevice pm) {
	FirmataDevice device  =( (FirmataBowler) pm).getFirmataDevice();
	// TODO Auto-generated method stub
	JFrame frame = new JFrame("Pinboard Example");
	frame.add(new JPinboard(device  ));
	frame.pack();
	frame.setVisible(true);
	
	JPinboard pinboard = new JPinboard(device  );
	pinboard.setVisible(true);
	SwingNode sn = new SwingNode();
       sn.setContent(pinboard);
       ScrollPane s1 = new ScrollPane();
      
       s1.setContent(sn);
       setContent(s1);
       setText("Firmata Pinpoard");
	onTabReOpening();
}
 
Example 3
Source File: PrinterConiguration.java    From BowlerStudio with GNU General Public License v3.0 6 votes vote down vote up
@Override
public void initializeUI(BowlerAbstractDevice pm) {
	NRPrinter printer = (NRPrinter)pm;
	BowlerBoardDevice delt = printer.getDeltaDevice();
	
	if (delt.isAvailable()){
		gui.setDevices(delt,printer);
	}
	if (delt.isAvailable()){
		gui.updateSettings();
	}
	
	SwingNode sn = new SwingNode();
       sn.setContent(gui);
       ScrollPane s1 = new ScrollPane();
      
       s1.setContent(sn);
       setContent(s1);
       setText("Printer Config");
	onTabReOpening();
}
 
Example 4
Source File: PidLab.java    From BowlerStudio with GNU General Public License v3.0 5 votes vote down vote up
@Override
public void initializeUI(BowlerAbstractDevice pm) {
	engine = (LinearPhysicsEngine)pm;
	wrapper = new SwingNode();

	wrapper.setContent(engine.getPid().getGraphingPanel());
       ScrollPane s1 = new ScrollPane();
       
       s1.setContent(wrapper);
       setContent(s1);
       setText("PID Lab");
	
}
 
Example 5
Source File: BootloaderPanel.java    From BowlerStudio with GNU General Public License v3.0 5 votes vote down vote up
public BootloaderPanel(){
		////System.out.println("Starting GUI");
		setText("NR Bootloader");
//		fileButton = new JButton();
//		fileButton.addActionListener(this);
//		resetFile();
		
		
		loadButton = new JButton();
		loadButton.addActionListener(this);
		resetLoad();
		
		JPanel buttonPanel = new JPanel(new MigLayout());

		//buttonPanel.add(fileStatus);
//        buttonPanel.add(fileButton, "wrap");
        
        JPanel prog = new JPanel(new MigLayout());
        prog.add(loadButton, "wrap");
        prog.add(progress,"wrap");
        
        buttonPanel.add(loadStatus);
        buttonPanel.add(prog);
        
        SwingNode sn = new SwingNode();
        sn.setContent(buttonPanel);
        setContent(sn);
 
	}
 
Example 6
Source File: AnamationSequencer.java    From BowlerStudio with GNU General Public License v3.0 5 votes vote down vote up
@Override
public void initializeUI(BowlerAbstractDevice pm) {
	// TODO Auto-generated method stub
	gui.setConnection(pm);
	SwingNode sn = new SwingNode();
       sn.setContent(gui);
       ScrollPane s1 = new ScrollPane();
      
       s1.setContent(sn);
       setContent(s1);
       setText("Anamation Sequencer");
	onTabReOpening();
}
 
Example 7
Source File: BowlerCamController.java    From BowlerStudio with GNU General Public License v3.0 5 votes vote down vote up
@Override
public void initializeUI(BowlerAbstractDevice pm) {

	bcp.setConnection((BowlerCamDevice)pm);
	
	SwingNode sn = new SwingNode();
       sn.setContent(bcp);
       ScrollPane s1 = new ScrollPane();
      
       s1.setContent(sn);
       setContent(s1);
       setText("BowlerCam Control");
	onTabReOpening();
}