Package javax.swing

Examples of javax.swing.JEditorPane


    {
        JPanel panel = new JPanel(new BorderLayout());
       
        try {

            JEditorPane editor = new JEditorPane( Main.class.getResource("help/author.html") );
            editor.setEditable(false);
            panel.setBorder(BorderFactory.createEmptyBorder(8, 8, 8, 8));

            panel.add(new JScrollPane(editor), BorderLayout.CENTER);
        } catch (IOException e) {
        }
View Full Code Here


    private JPanel buildLicensePane()
    {
        JPanel panel = new JPanel(new BorderLayout());
        URL url = Main.class.getResource("help/GPL.html");
        try {
            JEditorPane editor = new JEditorPane(url);
            editor.setEditable(false);

            panel.setBorder(BorderFactory.createEmptyBorder(8, 8, 8, 8));
            panel.add(new JScrollPane(editor), BorderLayout.CENTER);
        } catch (IOException e) {
        }
View Full Code Here

   */
  private JEditorPane getJEditorPane() {
    if (fbeditorPane == null) {
      try {
        String url = (new StringBuilder("http://")).append(FBEdit.getInstance().getbox_address()).append("/cgi-bin/system_status").toString();
        fbeditorPane = new JEditorPane(url);
      } catch (IOException e) {
        e.printStackTrace();
      }
    }
    return fbeditorPane;
View Full Code Here

        "\" ALT=\"\">";
    } catch( MalformedURLException e ) { /* ignore */ }

    System.err.println( img );
   
    ggContent = new JEditorPane( "text/html", htmlWelcome1 + img + "</td><td><H1>Welcome to " +
        root.getName() + "</H1>" + htmlWelcome2 );
    ggContent.setEditable( false );
    ggContent.addHyperlinkListener( this );
    cp.add( ggContent, BorderLayout.CENTER );
    final Action closeAction = new AbstractAction( "- Close -" ) {
View Full Code Here

   * Creates an initialises an exception manager.
   */
  public BadaboomManager() {
    super();

    description           = new JEditorPane();
    final JScrollPane scrollerDesc  = new JScrollPane();
    final JScrollPane scrollerTable  = new JScrollPane();
     final JPanel panel         = new JPanel();
     final BadaboomTableModel model  = new BadaboomTableModel();
    table              = new JTable(model);
View Full Code Here

  @Override
  public void valueChanged(final ListSelectionEvent e) {
    final int index = e!=null && e.getSource() instanceof DefaultListSelectionModel ?
            ((DefaultListSelectionModel)e.getSource()).getMinSelectionIndex() : -1;
    final JEditorPane desc = manager.description;

    if(index<0 || index>=BadaboomCollector.INSTANCE.size())
      desc.setText("");//$NON-NLS-1$
    else {
      final Throwable ex        = BadaboomCollector.INSTANCE.get(index);
      final StackTraceElement[] stack = ex.getStackTrace();
      int i;
      final int size           = stack.length;
      final StringBuilder buf      = new StringBuilder(ex.toString());

       for(i=0; i<size; i++)
         buf.append("\n\tat ").append(stack[i]);//$NON-NLS-1$

       desc.setText(buf.toString());
       desc.setCaretPosition(0);
    }
  }
View Full Code Here

    setIconImage(LResources.INSERT_PST_ICON.getImage());
      final MPanel pButton = new MPanel(false, true);
      okButton = new MButton(LResources.LABEL_OK);
    cancelButton = new MButton(LResources.LABEL_CANCEL);
    parentIns.addEventable(pButton);
      editor = new JEditorPane();

      // The scroller of the editor
    final JScrollPane scrollPane = new JScrollPane(editor);
    scrollPane.setMinimumSize(new Dimension(450, 250));
    scrollPane.setPreferredSize(new Dimension(450, 250));
View Full Code Here

    }catch(final IOException ex) { BadaboomCollector.INSTANCE.add(ex); }
  }


    private void createSystemPanel(final JTabbedPane tabbedPane) {
    final JEditorPane editorPane = new JEditorPane();
    final StringBuilder builder = new StringBuilder();
    editorPane.setEditable(false);

    builder.append("LaTeX version:").append(LSystem.INSTANCE.getLaTeXVersion()).append(LResources.EOL); //$NON-NLS-1$
    builder.append("DviPS version:").append(LSystem.INSTANCE.getDVIPSVersion()).append(LResources.EOL); //$NON-NLS-1$
    builder.append("PS2PDF version:").append(LResources.EOL).append(LSystem.INSTANCE.getPS2PDFVersion()).append(LResources.EOL); //$NON-NLS-1$
    builder.append("PS2EPSI version:").append(LSystem.INSTANCE.getPS2EPSVersion()).append(LResources.EOL); //$NON-NLS-1$
    builder.append("PDFcrop version:").append(LSystem.INSTANCE.getPDFCROPVersion()).append(LResources.EOL); //$NON-NLS-1$

    builder.append("Java properties:").append(LResources.EOL); //$NON-NLS-1$
    for(final Entry<Object, Object> entry : System.getProperties().entrySet())
      builder.append(entry.getKey()).append(':').append(' ').append(entry.getValue()).append(LResources.EOL);

    editorPane.setText(builder.toString());
    tabbedPane.add(LangTool.INSTANCE.getStringDialogFrame("About.1"), new JScrollPane(editorPane)); //$NON-NLS-1$
    editorPane.setCaretPosition(0);
  }
View Full Code Here

  }


    private void createLicensePanel(final JTabbedPane tabbedPane) {
    try {
      final JEditorPane editorPane = new JEditorPane();
      setTextToEditorPane(editorPane, "/res/license.txt");//$NON-NLS-1$
      initEditorPane(editorPane);
      tabbedPane.add(LangTool.INSTANCE.getString18("LaTeXDrawFrame.28"), new JScrollPane(editorPane)); //$NON-NLS-1$
      editorPane.setCaretPosition(0);
    }catch(final Exception e) { BadaboomCollector.INSTANCE.add(e); }
  }
View Full Code Here

  }


    private void createReleaseNotePanel(final JTabbedPane tabbedPane) {
    try {
      final JEditorPane editorPane = new JEditorPane();
      setTextToEditorPane(editorPane, "/res/release_note.txt");//$NON-NLS-1$
      initEditorPane(editorPane);
      tabbedPane.add(LangTool.INSTANCE.getString18("LaTeXDrawFrame.27"), new JScrollPane(editorPane)); //$NON-NLS-1$
      editorPane.setCaretPosition(0);
    }catch(final Exception e) { BadaboomCollector.INSTANCE.add(e); }
  }
View Full Code Here

TOP

Related Classes of javax.swing.JEditorPane

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.