/** * Creates a new location bar. */ public LocationBar() { super(new BorderLayout(5, 5)); JLabel label = new JLabel(rManager.getString("Panel.label")); add("West", label); try { String s = rManager.getString("Panel.icon"); URL url = getClass().getResource(s); if (url != null) { label.setIcon(new ImageIcon(url)); } } catch (MissingResourceException e) { } add("Center", comboBox = new JComboBox()); comboBox.setEditable(true); }
public void actionPerformed(ActionEvent e) { String st = locationBar.getText().trim(); int i = st.indexOf( '#' ); String t = ""; st += '#' + t; locationBar.setText(st); locationBar.addToHistory(st); showSVGDocument(st);
p.add(tb, BorderLayout.NORTH); p.add(new javax.swing.JSeparator(), BorderLayout.CENTER); p.add(locationBar = new LocationBar(), BorderLayout.SOUTH); locationBar.setBorder(BorderFactory.createEmptyBorder(2, 2, 2, 2)); locationBar.addActionListener(new AbstractAction() { public void actionPerformed(ActionEvent e) { String st = locationBar.getText().trim();
svgCanvas.setCursor(DEFAULT_CURSOR); String s = svgDocumentURL; locationBar.setText(s); if (debugger != null) { debugger.detach();
/** * Shows the Rhino debugger. */ public void showDebugger() { if (debugger == null && Debugger.isPresent) { debugger = new Debugger(this, locationBar.getText()); debugger.initialize(); } }
p.add(tb, BorderLayout.NORTH); p.add(new javax.swing.JSeparator(), BorderLayout.CENTER); p.add(locationBar = new LocationBar(), BorderLayout.SOUTH); locationBar.setBorder(BorderFactory.createEmptyBorder(2, 2, 2, 2)); locationBar.addActionListener(new AbstractAction() { public void actionPerformed(ActionEvent e) { String st = locationBar.getText().trim();
svgCanvas.setCursor(DEFAULT_CURSOR); String s = svgDocumentURL; locationBar.setText(s); if (debugger != null) { debugger.detach();
/** * Shows the Rhino debugger. */ public void showDebugger() { if (debugger == null && Debugger.isPresent) { debugger = new Debugger(this, locationBar.getText()); debugger.initialize(); } }
public void actionPerformed(ActionEvent e) { String st = locationBar.getText().trim(); int i = st.indexOf( '#' ); String t = ""; st += '#' + t; locationBar.setText(st); locationBar.addToHistory(st); showSVGDocument(st);
/** * Called when a link was activated. */ public void linkActivated(LinkActivationEvent e) { String s = e.getReferencedURI(); if (svgDocument != null) { ParsedURL docURL = new ParsedURL(svgDocument.getURL()); ParsedURL url = new ParsedURL(docURL, s); if (!url.sameFile(docURL)) { return; } if (s.indexOf( '#' ) != -1) { localHistory.update(s); locationBar.setText(s); if (debugger != null) { debugger.detach(); debugger.setDocumentURL(s); } application.addVisitedURI(s); backAction.update(); forwardAction.update(); transformHistory = new TransformHistory(); previousTransformAction.update(); nextTransformAction.update(); } } }
/** * Creates a new location bar. */ public LocationBar() { super(new BorderLayout(5, 5)); JLabel label = new JLabel(rManager.getString("Panel.label")); add("West", label); try { String s = rManager.getString("Panel.icon"); URL url = getClass().getResource(s); if (url != null) { label.setIcon(new ImageIcon(url)); } } catch (MissingResourceException e) { } add("Center", comboBox = new JComboBox()); comboBox.setEditable(true); }
/** * Called when a link was activated. */ public void linkActivated(LinkActivationEvent e) { String s = e.getReferencedURI(); if (svgDocument != null) { ParsedURL docURL = new ParsedURL(svgDocument.getURL()); ParsedURL url = new ParsedURL(docURL, s); if (!url.sameFile(docURL)) { return; } if (s.indexOf( '#' ) != -1) { localHistory.update(s); locationBar.setText(s); if (debugger != null) { debugger.detach(); debugger.setDocumentURL(s); } application.addVisitedURI(s); backAction.update(); forwardAction.update(); transformHistory = new TransformHistory(); previousTransformAction.update(); nextTransformAction.update(); } } }