Package javax.swing.event

Examples of javax.swing.event.HyperlinkListener


    @SuppressWarnings("serial")
  private void init() {
        final JEditorPane editorPane = new JEditorPane(XmlConstants.CONTENT_TYPE_HTML, StringUtil.createHTMLUrlTaggedString(value));
        editorPane.setEditable(false);
        editorPane.setBackground(Color.WHITE);
        editorPane.addHyperlinkListener(new HyperlinkListener() {
            public void hyperlinkUpdate(HyperlinkEvent event) {
                logger.debug("Event:" + event);
                if (event.getEventType() == EventType.ACTIVATED) {
                    URL url = event.getURL();
                    try {
View Full Code Here


        + "<br>&nbsp</body></html>";
        JEditorPane editorPane = new JEditorPane(XmlConstants.CONTENT_TYPE_HTML, message);
        editorPane.setEditable(false);
        editorPane.setBorder(BorderFactory.createEtchedBorder());
        editorPane.setBackground(buttonPanel.getBackground());
        editorPane.addHyperlinkListener(new HyperlinkListener() {
            public void hyperlinkUpdate(HyperlinkEvent event) {
                logger.debug("Event:" + event);
                if (event.getEventType() == EventType.ACTIVATED) {
                    URL url = event.getURL();
                    try {
View Full Code Here

        this.messageTextArea = new JEditorPane(XmlConstants.CONTENT_TYPE_HTML, "");
        this.messageTextArea.setSize(500, 500);
        this.messageTextArea.setEditable(false);
        messageTextArea.setBackground(Color.WHITE);
        messageTextArea.addHyperlinkListener(new HyperlinkListener() {
            public void hyperlinkUpdate(HyperlinkEvent event) {
                if (event.getEventType() == EventType.ACTIVATED) {
                    URL url = event.getURL();
                    try {
                        BrowserLauncher.openURL(url.toString());
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

    // info panel
    info = new JEditorPane();
    info.setContentType("text/html");
    info.setPreferredSize(new Dimension(500,500));
    info.setEditable(false);
    info.addHyperlinkListener(new HyperlinkListener() {
      public void hyperlinkUpdate(HyperlinkEvent e) {
        if(HyperlinkEvent.EventType.ACTIVATED.equals(e.getEventType())){
          doViewRelationships(e.getDescription());
        }
      }
View Full Code Here

       
        JEditorPane info2 = new JEditorPane();
        info2.setContentType("text/html");
        info2.setPreferredSize(new Dimension(700,500));
        info2.setEditable(false);
        info2.addHyperlinkListener(new HyperlinkListener() {
          public void hyperlinkUpdate(HyperlinkEvent e) {
            if(HyperlinkEvent.EventType.ACTIVATED.equals(e.getEventType())){
              Window w = SwingUtilities.getWindowAncestor((Component)e.getSource());
              if(w != null){
                w.dispose();
View Full Code Here

    // info panel
    info = new JEditorPane();
    info.setContentType("text/html");
    info.setPreferredSize(new Dimension(500,500));
    info.setEditable(false);
    info.addHyperlinkListener(new HyperlinkListener() {
      public void hyperlinkUpdate(HyperlinkEvent e) {
        if(HyperlinkEvent.EventType.ACTIVATED.equals(e.getEventType())){
          doViewRelationships(e.getDescription());
        }
      }
View Full Code Here

       
        JEditorPane info2 = new JEditorPane();
        info2.setContentType("text/html");
        info2.setPreferredSize(new Dimension(700,500));
        info2.setEditable(false);
        info2.addHyperlinkListener(new HyperlinkListener() {
          public void hyperlinkUpdate(HyperlinkEvent e) {
            if(HyperlinkEvent.EventType.ACTIVATED.equals(e.getEventType())){
              Window w = SwingUtilities.getWindowAncestor((Component)e.getSource());
              if(w != null){
                w.dispose();
View Full Code Here

        editorPane.setVisible(false);
        editorPane.setContentType("text/html");
        // editorPane.setEditable(false);
        ToolTipManager.sharedInstance().registerComponent(editorPane);

        editorPane.addHyperlinkListener(new HyperlinkListener() {
          @Override
          public void hyperlinkUpdate(HyperlinkEvent e) {
            if (HyperlinkEvent.EventType.ACTIVATED == e.getEventType()) {
              try {
                if (Desktop.isDesktopSupported()) {
View Full Code Here

        intro.setContentType("text/html");
        final ResourceMap resourceMap = mediator.getApplication().getContext().getResourceMap();
        intro.setText(ResourceHelper.loadString("about.html", resourceMap));
        intro.setEditable(false);
        intro.addHyperlinkListener(new HyperlinkListener() {

            @Override
            public void hyperlinkUpdate(HyperlinkEvent e) {
                if (!HyperlinkEvent.EventType.ACTIVATED.equals(e.getEventType()))
                    return;
View Full Code Here

TOP

Related Classes of javax.swing.event.HyperlinkListener

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.