Exemplo n.º 1
0
 /** Search. */
 public void search() {
   ToolsSettings settings = ToolsSettings.getInstance();
   SearchEngine searchEngine = settings.getSelectedSearchEngine();
   if (searchEngine != null) {
     try {
       this.navigate(searchEngine.getURL(this.getAddressBarText()));
     } catch (MalformedURLException mfu) {
       window.getTopFrame().alert("Malformed search URL.");
     }
   }
 }
Exemplo n.º 2
0
 /** Show source. */
 public void showSource() {
   String sourceCode = window.getTopFrame().getSourceCode();
   if (sourceCode == null) {
     sourceCode = "";
   }
   TextViewerWindow textViewer = new TextViewerWindow(window);
   textViewer.setText(sourceCode);
   textViewer.setSize(new Dimension(600, 400));
   textViewer.setLocationByPlatform(true);
   textViewer.setVisible(true);
 }
Exemplo n.º 3
0
 /*
  * (non-Javadoc)
  * @see org.lobobrowser.primary.action.EnableableAction#updateEnabling()
  */
 @Override
 public void updateEnabling() {
   action.setEnabled(window.hasSource());
 }
Exemplo n.º 4
0
 /*
  * (non-Javadoc)
  *
  * @see
  * java.awt.event.ActionListener#actionPerformed(java.awt.event.ActionEvent)
  */
 @Override
 public void actionPerformed(ActionEvent e) {
   window.reload();
 }
Exemplo n.º 5
0
 /*
  * (non-Javadoc)
  *
  * @see
  * org.lobobrowser.primary.ext.ActionPool.EnableableAction#updateEnabling()
  */
 @Override
 public void updateEnabling() {
   action.setEnabled(window.canReload());
 }