Package javax.swing.event

Examples of javax.swing.event.HyperlinkListener


        add(packsScroll);

        packInfo = new JEditorPane();
        packInfo.setEditable(false);
        packInfo.setContentType("text/html");
        packInfo.addHyperlinkListener(new HyperlinkListener() {
            @Override
            public void hyperlinkUpdate (HyperlinkEvent event) {
                if (event.getEventType() == HyperlinkEvent.EventType.ACTIVATED) {
                    OSUtils.browse(event.getURL().toString());
                }
View Full Code Here


    private void buidGUI() {
        editorPane = new JEditorPane();
        editorPane.setEditable(false);
        editorPane.setContentType("text/html");
        editorPane.setBackground(Color.white);
        editorPane.addHyperlinkListener(new HyperlinkListener() {
            public void hyperlinkUpdate(HyperlinkEvent e) {
                if (e.getEventType() == HyperlinkEvent.EventType.ACTIVATED) {
                    if (e.getURL().getProtocol().equals("http")) {
                        if (Util.openBrowser(e.getURL().toString())) {
                            return;
View Full Code Here

        editorPane = new JEditorPane();
        editorPane.setCaretPosition(0);
        editorPane.setContentType("text/html");
        editorPane.setEditable(false);
        editorPane.setBackground(Color.white);
        editorPane.addHyperlinkListener(new HyperlinkListener() {
            public void hyperlinkUpdate(HyperlinkEvent e) {
                if (e.getEventType() == HyperlinkEvent.EventType.ACTIVATED) {
                    if (!Util.openBrowser(e.getURL().toString())) {
                        emitError(ResultPanel.this.parent.langpack.getString("error.can.not.open.browser.title"),
                                ResultPanel.this.parent.langpack.getString("error.can.not.open.browser.message"));
View Full Code Here

    tutorialToolbar.setFloatable(false);
    tutorialToolbar.add(startButton);
    tutorialToolbar.add(stopButton);
    container.add(tutorialToolbar, BorderLayout.NORTH);
    tutorialArea.addHyperlinkListener(
      new HyperlinkListener() {
        public void hyperlinkUpdate(HyperlinkEvent e) {
          if (e.getEventType() == HyperlinkEvent.EventType.ACTIVATED) {
            if (e.getDescription().equals("StartTutorial")) {
              startTutorial.actionPerformed(null);
            } else if (e.getDescription().equals("StopTutorial")) {
View Full Code Here

{
    private static Logger log = LoggingManager.getLoggerForClass();
   
    public HtmlPane()
    {
        this.addHyperlinkListener(new HyperlinkListener()
        {
            public void hyperlinkUpdate(HyperlinkEvent e)
            {
                if (e.getEventType() == HyperlinkEvent.EventType.ACTIVATED)
                {
View Full Code Here

      _bugDetailsPane = new BugDetailsEditorPane();
      _bugDetailsPane.setBorder(new EmptyBorder(10, 10, 10, 10));
      _bugDetailsPane.setEditable(false);
      _bugDetailsPane.setContentType("text/html");
      _bugDetailsPane.setEditorKit(_htmlEditorKit);
      _bugDetailsPane.addHyperlinkListener(new HyperlinkListener() {
        @Override
        public void hyperlinkUpdate(final HyperlinkEvent evt) {
          if (_parent != null) {
            handleDetailsClick(evt);
          }
View Full Code Here

      _explanationPane = new ExplanationEditorPane();
      _explanationPane.setBorder(new EmptyBorder(10, 10, 10, 10));
      _explanationPane.setEditable(false);
      _explanationPane.setContentType("text/html");
      _explanationPane.setEditorKit(_htmlEditorKit);
      _explanationPane.addHyperlinkListener(new HyperlinkListener() {
        @Override
        public void hyperlinkUpdate(final HyperlinkEvent evt) {
          editorPaneHyperlinkUpdate(evt);
        }
      });
View Full Code Here

@SuppressWarnings("serial")
public class TextWindow2 extends JScrollPane {
  private class myJEP extends JEditorPane {
    public myJEP() {
      super();
      addHyperlinkListener(new HyperlinkListener() {
        public void hyperlinkUpdate(HyperlinkEvent e) {
          if(e.getEventType().equals(HyperlinkEvent.EventType.ACTIVATED))
            try {
              BrowserLauncher.openURL(e.getURL().toString());
            } catch (Exception e1) {
View Full Code Here

  private class myJEP extends JEditorPane {
    private static final long serialVersionUID = 7313639261308578778L;

    public myJEP() {
      super();
      addHyperlinkListener(new HyperlinkListener() {
        @Override
        public void hyperlinkUpdate(HyperlinkEvent e) {
          if(e.getEventType().equals(HyperlinkEvent.EventType.ACTIVATED))
            try {
              BrowserLauncher.openURL(e.getDescription());
View Full Code Here

            assertEquals(a.get(i), objects[i]);
        }
    }

    public void testAddRemoveGetHyperlinkListener() {
        HyperlinkListener listener1 = new SimpleHyperlinkListener("1");
        HyperlinkListener listener2 = new SimpleHyperlinkListener("2");
        HyperlinkListener listener3 = new SimpleHyperlinkListener("3");
        HyperlinkListener listeners[];
        ArrayList<HyperlinkListener> testList = new ArrayList<HyperlinkListener>();
        jep.addHyperlinkListener(listener1);
        listeners = jep.getHyperlinkListeners();
        testList.add(listener1);
        assertEquals(testList, listeners);
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.