frame.getContentPane().add(new GraphZoomScrollPane(vv)); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
GraphZoomScrollPane gzsp = new GraphZoomScrollPane(vv); content.add(gzsp); JMenuBar menubar = new JMenuBar(); menubar.add(graphMouse.getModeMenu()); gzsp.setCorner(menubar); JComboBox<Position> cb = new JComboBox<Position>(); cb.addItem(Renderer.VertexLabel.Position.N);
super(new BorderLayout()); this.vv = vv; addComponentListener(new ResizeListener()); Dimension d = vv.getModel().getLayoutSize(); verticalScrollBar = new JScrollBar(JScrollBar.VERTICAL, 0, d.height, 0, d.height); add(vv); add(verticalScrollBar, BorderLayout.EAST); south = new JPanel(new BorderLayout()); south.add(horizontalScrollBar); setCorner(new JPanel()); add(south, BorderLayout.SOUTH);
public void writeToImageFile(String imageFileName) throws AWTException { final GraphZoomScrollPane panel = new GraphZoomScrollPane(vv); PersistentLayout pl = (PersistentLayout) vv.getGraphLayout(); int height = pl.getSize().height; int width = pl.getSize().width; panel.setSize(width, height); BufferedImage bufImage = ScreenImage.createImage(panel); panel.setVisible(false); try { File outFile = new File(imageFileName); ImageIO.write(bufImage, "png", outFile); System.out.println("wrote image to " + imageFileName); } catch (Exception e) { System.out.println("writeToImageFile(): " + e.getMessage()); } }
final GraphZoomScrollPane scrollPane = new GraphZoomScrollPane(visualizationViewer); scrollPane.setCorner(new DCPanel(WidgetUtils.COLOR_DEFAULT_BACKGROUND)); if (_scrollHorizontal > 0) { setScrollbarValue(scrollPane.getHorizontalScrollBar(), _scrollHorizontal); setScrollbarValue(scrollPane.getVerticalScrollBar(), _scrollVertical); _scrollHorizontal = scrollPane.getHorizontalScrollBar().getValue(); _scrollVertical = scrollPane.getVerticalScrollBar().getValue(); }; scrollPane.getHorizontalScrollBar().addAdjustmentListener(adjustmentListener); scrollPane.getVerticalScrollBar().addAdjustmentListener(adjustmentListener); new JobGraphBindingsManager(graphContext, actions, scrollPane).register();
GraphZoomScrollPane scrollPane = new GraphZoomScrollPane(visviewer); JMenuBar menu = new JMenuBar(); menu.add(graphMouse.getModeMenu()); scrollPane.setCorner(menu); scrollPane.setBorder(BorderFactory .createTitledBorder("Select path in meta-graph"));
final GraphZoomScrollPane scroll = new GraphZoomScrollPane(graphViewer); scroll.setPreferredSize(SCROLL_COMPONENT_SIZE); scroll.setCorner(layoutButton);
final GraphZoomScrollPane panel = new GraphZoomScrollPane(vv); content.add(panel, BorderLayout.CENTER); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
GraphZoomScrollPane gzsp = new GraphZoomScrollPane(vv); add(gzsp); JMenuBar menubar = new JMenuBar(); menubar.add(graphMouse.getModeMenu()); gzsp.setCorner(menubar); JComboBox<Position> cb = new JComboBox<>(); cb.addItem(Renderer.NodeLabel.Position.N);
super(new BorderLayout()); this.vv = vv; addComponentListener(new ResizeListener()); Dimension d = vv.getGraphLayout().getSize(); verticalScrollBar = new JScrollBar(JScrollBar.VERTICAL, 0, d.height, 0, d.height); add(vv); add(verticalScrollBar, BorderLayout.EAST); south = new JPanel(new BorderLayout()); south.add(horizontalScrollBar); setCorner(new JPanel()); add(south, BorderLayout.SOUTH);
final GraphZoomScrollPane panel = new GraphZoomScrollPane(vv); Container content = getContentPane(); content.add(panel);
GraphZoomScrollPane gzsp = new GraphZoomScrollPane(vv); content.add(gzsp); gzsp.setCorner(menubar);
GraphZoomScrollPane gzsp = new GraphZoomScrollPane(vv); content.add(gzsp);
final GraphZoomScrollPane panel = new GraphZoomScrollPane(vv); content.add(panel); frame.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE); panel.setCorner(menubar);
GraphZoomScrollPane gzsp = new GraphZoomScrollPane(vv); content.add(gzsp);
final GraphZoomScrollPane panel = new GraphZoomScrollPane(vv); content.add(panel); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); panel.setCorner(menubar);
GraphZoomScrollPane gzsp = new GraphZoomScrollPane(vv); content.add(gzsp);
GraphZoomScrollPane gzsp = new GraphZoomScrollPane(vv); add(gzsp); gzsp.setCorner(menubar);
final GraphZoomScrollPane panel = new GraphZoomScrollPane(vv); content.add(panel, BorderLayout.CENTER); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
GraphZoomScrollPane gzsp = new GraphZoomScrollPane(vv); add(gzsp); gzsp.setCorner(menubar);