Package javax.swing

Examples of javax.swing.JEditorPane$AccessibleJEditorPaneHTML


    }catch(final Exception e) { BadaboomCollector.INSTANCE.add(e); }
  }

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


        tracker.addImage(i,0);
        try { tracker.waitForID(0); }
        catch(final InterruptedException e) { BadaboomCollector.INSTANCE.add(e); }

      final JPanel panel       = new JPanel();
      final JEditorPane editorPane   = new JEditorPane();
      initEditorPane(editorPane);
      panel.setLayout(new BorderLayout());
      editorPane.setContentType("text/html");//$NON-NLS-1$
      editorPane.setBackground(tabbedPane.getBackground());
      editorPane.setText("<html><body><div style=\"text-align: center; \"><font size=\"-1\"><br>"+ //$NON-NLS-1$
          LangTool.INSTANCE.getStringLaTeXDrawFrame("LaTeXDrawFrame.219")+ " " + //$NON-NLS-1$ //$NON-NLS-2$
          VersionChecker.VERSION + (VersionChecker.VERSION_STABILITY.isEmpty() ? "" : " " +VersionChecker.VERSION_STABILITY) + //$NON-NLS-1$ //$NON-NLS-2$
          LangTool.INSTANCE.getStringLaTeXDrawFrame("LaTeXDrawFrame.220") + " " + VersionChecker.ID_BUILD+"<br><br>"+//$NON-NLS-1$//$NON-NLS-2$ //$NON-NLS-3$
          LResources.LABEL_APP+LangTool.INSTANCE.getStringLaTeXDrawFrame("LaTeXDrawFrame.221")+"<br>"+//$NON-NLS-1$//$NON-NLS-2$
          "Copyright(c) 2005-2014 - Arnaud BLOUIN - arno.b.dev@gmail.com<br><br>"+//$NON-NLS-1$
View Full Code Here

        texturePacksScroll.setOpaque(false);
        texturePacksScroll.setViewportView(texturePacks);
        texturePacksScroll.getVerticalScrollBar().setUnitIncrement(19);
        add(texturePacksScroll);

        textureInfo = new JEditorPane();
        textureInfo.setEditable(false);
        textureInfo.setContentType("text/html");
        textureInfo.addHyperlinkListener(new HyperlinkListener() {
            @Override
            public void hyperlinkUpdate (HyperlinkEvent event) {
View Full Code Here

        setPreferredSize(new Dimension(300, 200));

        Container panel = getContentPane();
        panel.setLayout(new MigLayout());

        editorPane = new JEditorPane();
        modpackName = new JTextField(16);
        remove = new JButton(I18N.getLocaleString("MAIN_REMOVE"));
        add = new JButton(I18N.getLocaleString("MAIN_ADD"));
        cancel = new JButton(I18N.getLocaleString("MAIN_CANCEL"));
View Full Code Here

        mapsScroll.setOpaque(false);
        mapsScroll.setViewportView(maps);
        mapsScroll.getVerticalScrollBar().setUnitIncrement(19);
        add(mapsScroll);

        mapInfo = new JEditorPane();
        mapInfo.setEditable(false);
        mapInfo.setContentType("text/html");
        mapInfo.addHyperlinkListener(new HyperlinkListener() {
            @Override
            public void hyperlinkUpdate (HyperlinkEvent event) {
View Full Code Here

        packsScroll.setOpaque(false);
        packsScroll.setViewportView(packs);
        packsScroll.getVerticalScrollBar().setUnitIncrement(19);
        add(packsScroll);

        packInfo = new JEditorPane();
        packInfo.setEditable(false);
        packInfo.setContentType("text/html");
        packInfo.addHyperlinkListener(new HyperlinkListener() {
            @Override
            public void hyperlinkUpdate (HyperlinkEvent event) {
View Full Code Here

    /**
     * Builds the entire Help window
     */
    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) {
View Full Code Here

    initLayout();
  }

  private void init() {
    try {
      editor = new JEditorPane(getClass().getClassLoader().getResource("htmls/aboutUS.htm"));
      editor.setEditable(false);
    } catch (IOException e) {
     
    }
  }
View Full Code Here

    return panel;
  }
 
  private JScrollPane buildCenterPane() {
    JEditorPane editorPane = null;
    try {
      editorPane = new JEditorPane();
      editorPane.setEditable(false);
      editorPane.setPage(ResourceUtils.getClasspathResource("xgenerator/help/index.html"));
    } catch (Exception e) {
      e.printStackTrace();
    }
   
    JScrollPane scrollPane = new JScrollPane(editorPane);
View Full Code Here

        && applicationPreferenceModel.isShowNoReceiverWarning()) {
      showNoReceiversWarningPanel();
    }

    Container container = tutorialFrame.getContentPane();
    final JEditorPane tutorialArea = new JEditorPane();
    tutorialArea.setBorder(BorderFactory.createEmptyBorder(0, 5, 0, 5));
    tutorialArea.setEditable(false);
    container.setLayout(new BorderLayout());

    try {
      tutorialArea.setPage(ChainsawConstants.TUTORIAL_URL);
      container.add(new JScrollPane(tutorialArea), BorderLayout.CENTER);
    } catch (Exception e) {
      MessageCenter.getInstance().getLogger().error(
        "Error occurred loading the Tutorial", e);
    }

    tutorialFrame.setIconImage(new ImageIcon(ChainsawIcons.HELP).getImage());
    tutorialFrame.setSize(new Dimension(640, 480));

    final Action startTutorial =
      new AbstractAction(
        "Start Tutorial", new ImageIcon(ChainsawIcons.ICON_RESUME_RECEIVER)) {
        public void actionPerformed(ActionEvent e) {
          if (
            JOptionPane.showConfirmDialog(
                null,
                "This will start 3 \"Generator\" receivers for use in the Tutorial.  Is that ok?",
                "Confirm", JOptionPane.YES_NO_OPTION) == JOptionPane.YES_OPTION) {
            new Thread(new Tutorial()).start();
            putValue("TutorialStarted", Boolean.TRUE);
          } else {
            putValue("TutorialStarted", Boolean.FALSE);
          }
        }
      };

    final Action stopTutorial =
      new AbstractAction(
        "Stop Tutorial", new ImageIcon(ChainsawIcons.ICON_STOP_RECEIVER)) {
        public void actionPerformed(ActionEvent e) {
          if (
            JOptionPane.showConfirmDialog(
                null,
                "This will stop all of the \"Generator\" receivers used in the Tutorial, but leave any other Receiver untouched.  Is that ok?",
                "Confirm", JOptionPane.YES_NO_OPTION) == JOptionPane.YES_OPTION) {
            new Thread(
              new Runnable() {
                public void run() {
                  PluginRegistry pluginRegistry = LogManager.getLoggerRepository().getPluginRegistry();
                  List list = pluginRegistry.getPlugins(Generator.class);

                  for (Iterator iter = list.iterator(); iter.hasNext();) {
                    Plugin plugin = (Plugin) iter.next();
                    pluginRegistry.stopPlugin(plugin.getName());
                  }
                }
              }).start();
            setEnabled(false);
            startTutorial.putValue("TutorialStarted", Boolean.FALSE);
          }
        }
      };

    stopTutorial.putValue(
      Action.SHORT_DESCRIPTION,
      "Removes all of the Tutorials Generator Receivers, leaving all other Receivers untouched");
    startTutorial.putValue(
      Action.SHORT_DESCRIPTION,
      "Begins the Tutorial, starting up some Generator Receivers so you can see Chainsaw in action");
    stopTutorial.setEnabled(false);

    final SmallToggleButton startButton = new SmallToggleButton(startTutorial);
    PropertyChangeListener pcl =
      new PropertyChangeListener() {
        public void propertyChange(PropertyChangeEvent evt) {
          stopTutorial.setEnabled(
            ((Boolean) startTutorial.getValue("TutorialStarted")).equals(
              Boolean.TRUE));
          startButton.setSelected(stopTutorial.isEnabled());
        }
      };

    startTutorial.addPropertyChangeListener(pcl);
    stopTutorial.addPropertyChangeListener(pcl);

    pluginRegistry.addPluginListener(
      new PluginListener() {
        public void pluginStarted(PluginEvent e) {
        }

        public void pluginStopped(PluginEvent e) {
          List list = pluginRegistry.getPlugins(Generator.class);

          if (list.size() == 0) {
            startTutorial.putValue("TutorialStarted", Boolean.FALSE);
          }
        }
      });

    final SmallButton stopButton = new SmallButton(stopTutorial);

    final JToolBar tutorialToolbar = new JToolBar();
    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")) {
              stopTutorial.actionPerformed(null);
            } else {
              try {
                tutorialArea.setPage(e.getURL());
              } catch (IOException e1) {
                MessageCenter.getInstance().getLogger().error(
                  "Failed to change the URL for the Tutorial", e1);
              }
            }
View Full Code Here

TOP

Related Classes of javax.swing.JEditorPane$AccessibleJEditorPaneHTML

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.