Examples of JEditorPane


Examples of javax.swing.JEditorPane

  lineLength = newLineLength;
    }

    // track the moving of the mouse.
    public void mouseMoved(MouseEvent e) {
  JEditorPane editor = (JEditorPane) e.getSource();
  if (!editor.isEditable()) {
      Point pt = new Point(e.getX(), e.getY());
      URLSelection newSelection = getIndicatedURL(pt, editor);
      if (newSelection != currentSelection) {
    if (currentSelection != null) {
        editor.fireHyperlinkUpdate(new HyperlinkEvent(currentSelection, HyperlinkEvent.EventType.EXITED, currentSelection.url));
    }
   
    if (newSelection != null) {
        editor.fireHyperlinkUpdate(new HyperlinkEvent(newSelection, HyperlinkEvent.EventType.ENTERED, newSelection.url));
    }
    currentSelection = newSelection;
      }
  }
    }
View Full Code Here

Examples of javax.swing.JEditorPane

 
  return null;
    }

    public void mouseClicked(MouseEvent e) {
  JEditorPane editor = (JEditorPane) e.getSource();
  if (!editor.isEditable()) {
      Point pt = new Point(e.getX(), e.getY());
      URLSelection selection = getIndicatedURL(pt, editor);
      if (selection != null) {
    editor.fireHyperlinkUpdate(new HyperlinkEvent(selection, HyperlinkEvent.EventType.ACTIVATED, selection.url));
      }
  }
    }
View Full Code Here

Examples of javax.swing.JEditorPane

    contentPane.add(progressBar);
    contentPane.add(Box.createVerticalStrut(5));

    if (urlBase != null) {
      // Set up page display.
      browser = new JEditorPane();
      browser.setContentType("text/html");
      browser.setEditable(false);
      Dimension dim = new Dimension(600, 440);
      browser.setPreferredSize(dim);
      browser.addPropertyChangeListener("page", new UpdateProgressBarMetaRefreshSupport());
View Full Code Here

Examples of javax.swing.JEditorPane

    JPanel panel = new JPanel(new BorderLayout());
        panel.setBackground(c);
   
        try
        {
            textArea = new JEditorPane(url);
        }
        catch(MalformedURLException e)
        {
            textArea = new JTextArea(url);
        }
View Full Code Here

Examples of javax.swing.JEditorPane

    JPanel panel = new JPanel(new BorderLayout());
        panel.setBackground(c);
   
        try
        {
            textArea = new JEditorPane(url);
        }
        catch(MalformedURLException e)
        {
            textArea = new JTextArea(url);
        }
View Full Code Here

Examples of javax.swing.JEditorPane

    initAction();
    initToolbar();
    initStatebar();

    editor = new JEditorPane("text/html", "");
    editor.setEditable(false);

    popup = new ClipboardPopupMenu(false, true, false);
    editor.addMouseListener(new MouseHandler());
    editor.setBackground(Constantes.COULEUR_FOND_MLD) ;
View Full Code Here

Examples of javax.swing.JEditorPane

        cf.setExtension("sql");
        cf.setDescription("Fichier script SQL");
        chooser.addChoosableFileFilter(cf);
        chooser.setDialogType(JFileChooser.SAVE_DIALOG);
       
        editor = new JEditorPane() {
            public void paintComponent(Graphics g)
            {
                Graphics2D g2d = (Graphics2D) g;
                g2d.setRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING,
                        RenderingHints.VALUE_TEXT_ANTIALIAS_ON);
View Full Code Here

Examples of javax.swing.JEditorPane

    {

        super(Constantes.HELP);
       
        try {
            editor = new JEditorPane(Main.class
                    .getResource("help/whatsnew.html"));
            editor.setEditable(false);
            editor.addHyperlinkListener(this);

            popup = new ClipboardPopupMenu(false, true, false);
View Full Code Here

Examples of javax.swing.JEditorPane

    public HtmlWindow(String text, int width,
            int height, boolean visible, boolean closeAfter2sec)
    {
      super(Main.analyseFrame);
     
        editor = new JEditorPane("text/html", text) {
            public void paintComponent(Graphics g)
            {
                Graphics2D g2d = (Graphics2D) g;
                g2d.setRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING,
                        RenderingHints.VALUE_TEXT_ANTIALIAS_ON);
View Full Code Here

Examples of javax.swing.JEditorPane

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

            JEditorPane editor = new JEditorPane( Main.class.getResource("help/whatsnew.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
TOP
Copyright © 2018 www.massapi.com. 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.