Package javax.swing

Examples of javax.swing.JEditorPane.addHyperlinkListener()


        // info area
        JEditorPane infoText = new JEditorPane("text/html", infoHTML());
        infoText.setBackground(pane.getBackground());
        infoText.setEditable(false);
        // popup hyperlinks
        infoText.addHyperlinkListener(this);

        JPanel infoPanel = new JPanel();
        infoPanel.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5));
        infoPanel.add(infoText);
        pane.add(infoPanel, BorderLayout.NORTH);
View Full Code Here


    private JEditorPane createContentWidget ()
    {
        JEditorPane aContent = new JEditorPane ();
        aContent.setEditable (false);
        aContent.addHyperlinkListener (new HyperlinkListener()
            {
                public void hyperlinkUpdate (HyperlinkEvent e)
                {
                    if (e.getEventType() == HyperlinkEvent.EventType.ACTIVATED)
                        HelpWindow.Instance().loadURL (e.getURL());
View Full Code Here

                occured = true;
            }
        }

        TestHyperlinkListener listener = new TestHyperlinkListener();
        pane.addHyperlinkListener(listener);

        action.actionPerformed(new ActionEvent(pane, 0, null));
        assertTrue(listener.occured);
    }
View Full Code Here

                            "<br>Remove it from your coremods folder and check <a href=\"http://www.minecraftforum.net/topic/909223-\">here</a> for updates" +
                            "</html>");

            ep.setEditable(false);
            ep.setOpaque(false);
            ep.addHyperlinkListener(new HyperlinkListener()
            {
                @Override
                public void hyperlinkUpdate(HyperlinkEvent event) {
                    try {
                        if (event.getEventType().equals(HyperlinkEvent.EventType.ACTIVATED))
View Full Code Here

    public int showInstallMessage(Pack pack) {
        String[] options = {Language.INSTANCE.localize("common.ok"), Language.INSTANCE.localize("common.cancel")};
        JEditorPane ep = new JEditorPane("text/html", "<html>" + this.install + "</html>");
        ep.setEditable(false);
        ep.addHyperlinkListener(new HyperlinkListener() {
            @Override
            public void hyperlinkUpdate(HyperlinkEvent e) {
                if (e.getEventType() == HyperlinkEvent.EventType.ACTIVATED) {
                    Utils.openBrowser(e.getURL());
                }
View Full Code Here

    public int showUpdateMessage(Pack pack) {
        String[] options = {Language.INSTANCE.localize("common.ok"), Language.INSTANCE.localize("common.cancel")};
        JEditorPane ep = new JEditorPane("text/html", "<html>" + this.update + "</html>");
        ep.setEditable(false);
        ep.addHyperlinkListener(new HyperlinkListener() {
            @Override
            public void hyperlinkUpdate(HyperlinkEvent e) {
                if (e.getEventType() == HyperlinkEvent.EventType.ACTIVATED) {
                    Utils.openBrowser(e.getURL());
                }
View Full Code Here

      try {
        String manFileName = "tools/tools.html";
        JFrame manFrame = new JFrame("CVD Manual");
        JEditorPane editorPane = new JEditorPane();
        editorPane.setEditable(false);
        editorPane.addHyperlinkListener(new Hyperactive());
        URL manURL = ClassLoader.getSystemResource(manFileName);
        if (manURL == null) {
          String manpath = System.getProperty(Gladis.MAN_PATH_PROPERTY, null);
          if (manpath != null) {
            File manDir = new File(manpath);
View Full Code Here

    {
      JEditorPane p =
          UIFactory.makeHtmlPane(instructions, UIFactory.INSTRUCTIONS_FONT);
      p.setOpaque(false);
      p.setEditable(false);
      p.addHyperlinkListener(this);
      instructionsPanel = p;
    }
    return instructionsPanel;
  }
View Full Code Here

    tip = tip.replace(PROJITY_LINK,"<a href=\"" + PROJITY_LINK + "\">" + PROJITY_LINK + "</a>");
    JEditorPane link = new JEditorPane("text/html","<html><b>"
       + tip+"</b></html>");
    link.setEditable(false);
    link.setBackground(getBackground());
    link.addHyperlinkListener(new HyperlinkListener(){
      public void hyperlinkUpdate(HyperlinkEvent e) {
        if (e.getEventType()== HyperlinkEvent.EventType.ACTIVATED)
          BrowserControl.displayURL(e.getURL().toExternalForm());
      }});
View Full Code Here

    link.setForeground(Colors.GRAY);
    link.setFont(this.getFont());
   
    link.setBackground(getBackground());

    link.addHyperlinkListener(new HyperlinkListener(){
      public void hyperlinkUpdate(HyperlinkEvent e) {
        if (e.getEventType()== HyperlinkEvent.EventType.ACTIVATED)
          BrowserControl.displayURL(e.getURL().toExternalForm());
      }});
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.