public float getHeight() { if (root == null) return 0; return root.getDeviceHeight(); }
public float getHeight() { if (root == null) return 0; return root.getDeviceHeight(); }
public float getHeight() { if (root == null) return 0; return root.getDeviceHeight(); }
public float getHeight() { if (root == null) return 0; return root.getDeviceHeight(); }
/** * Loads an SVG document from a URI. * @param svgURI - URI to load document from */ public void setSvgURI(URI svgURI) { URI old = this.svgURI; this.svgURI = svgURI; SVGDiagram diagram = svgUniverse.getDiagram(svgURI); if (diagram != null) { Dimension size = getPreferredSize(); if (size == null) { size = new Dimension((int)diagram.getRoot().getDeviceWidth(), (int)diagram.getRoot().getDeviceHeight()); } diagram.setDeviceViewport(new Rectangle(0, 0, size.width, size.height)); } changes.firePropertyChange("svgURI", old, svgURI); }
/** * Loads an SVG document from a URI. * @param svgURI - URI to load document from */ public void setSvgURI(URI svgURI) { URI old = this.svgURI; this.svgURI = svgURI; SVGDiagram diagram = svgUniverse.getDiagram(svgURI); if (diagram != null) { Dimension size = getPreferredSize(); if (size == null) { size = new Dimension((int)diagram.getRoot().getDeviceWidth(), (int)diagram.getRoot().getDeviceHeight()); } diagram.setDeviceViewport(new Rectangle(0, 0, size.width, size.height)); } changes.firePropertyChange("svgURI", old, svgURI); }
/** * Loads an SVG document from a URI. * @param svgURI - URI to load document from */ public void setSvgURI(URI svgURI) { URI old = this.svgURI; this.svgURI = svgURI; SVGDiagram diagram = svgUniverse.getDiagram(svgURI); if (diagram != null) { Dimension size = getPreferredSize(); if (size == null) { size = new Dimension((int)diagram.getRoot().getDeviceWidth(), (int)diagram.getRoot().getDeviceHeight()); } diagram.setDeviceViewport(new Rectangle(0, 0, size.width, size.height)); } changes.firePropertyChange("svgURI", old, svgURI); }
/** * Loads an SVG document from a URI. * @param svgURI - URI to load document from */ public void setSvgURI(URI svgURI) { URI old = this.svgURI; this.svgURI = svgURI; SVGDiagram diagram = svgUniverse.getDiagram(svgURI); if (diagram != null) { Dimension size = getPreferredSize(); if (size == null) { size = new Dimension((int)diagram.getRoot().getDeviceWidth(), (int)diagram.getRoot().getDeviceHeight()); } diagram.setDeviceViewport(new Rectangle(0, 0, size.width, size.height)); } changes.firePropertyChange("svgURI", old, svgURI); }