Package javax.swing

Examples of javax.swing.JTextPane


        public void actionPerformed(ActionEvent arg0) {
          JPanel panel = new JPanel();
          final JFrame frame = parent.visualEditor.createSmallFrame(panel, "JumpOverOperator conditions");

          LuposDocument document = new LuposDocument();
          final JTextPane tp = new LuposJTextPane(document);
          document.init(JavaScanner.createILuposParser(new LuposDocumentReader(document)), true);

          tp.addKeyListener(parent.visualEditor.getKeyListener(frame));
          tp.setFont(new Font("Courier New", Font.PLAIN, 12));
          tp.setText(operator.getConditions());

          // create OK button, which starts query evaluation...
          JButton bt_ok = new JButton("OK");
          bt_ok.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent e) {
              operator.setConditions(tp.getText());
              frame.setVisible(false); // hide query input frame
            }
          });

          JPanel buttonPanel = new JPanel(new FlowLayout(FlowLayout.CENTER));
View Full Code Here


      public void actionPerformed(final ActionEvent arg0) {
        final JPanel panel = new JPanel();
        panel.setLayout(new BorderLayout());

        final LuposDocument document = new LuposDocument();
        final JTextPane tp_coreSPARQLQuery = new LuposJTextPane(document);
        document.init(SPARQLParser.createILuposParser(new LuposDocumentReader(document)), false);

        tp_coreSPARQLQuery.setFont(new Font("Courier New",
            Font.PLAIN, 12));
        tp_coreSPARQLQuery.setText(core);
        tp_coreSPARQLQuery.setEditable(false);

        final JScrollPane scroll = new JScrollPane(
            tp_coreSPARQLQuery);

        panel.add(scroll);
View Full Code Here

        public void actionPerformed(final ActionEvent arg0) {
          final JPanel panel = new JPanel();
          panel.setLayout(new BorderLayout());

          final LuposDocument document = new LuposDocument();
          final JTextPane tp_coreSPARQLQuery = new LuposJTextPane(document);
          document.init(RIFParser.createILuposParser(new LuposDocumentReader(document)), false);

          tp_coreSPARQLQuery.setFont(new Font("Courier New", Font.PLAIN, 12));
          tp_coreSPARQLQuery.setText(inferenceRulesParameter);
          tp_coreSPARQLQuery.setEditable(false);

          final JScrollPane scroll = new JScrollPane(tp_coreSPARQLQuery);

          panel.add(scroll);
View Full Code Here

  public void createShowTextFrame(final String title, final String text, Class<?> parserGenerator) {
    final JPanel panel = new JPanel();
    final JFrame frame = this.createSmallFrame(panel, title);

    final LuposDocument document = new LuposDocument();
    final JTextPane tp = new LuposJTextPane(document);
      Method method;
    try {
      method = parserGenerator.getMethod("createILuposParser", LuposDocumentReader.class);
        Object createdParser = method.invoke(null, new LuposDocumentReader(document));
      document.init((ILuposParser) createdParser, true);
    } catch (SecurityException e) {
      System.err.println(e);
      e.printStackTrace();
    } catch (NoSuchMethodException e) {
      System.err.println(e);
      e.printStackTrace();
    } catch (IllegalArgumentException e) {
      System.err.println(e);
      e.printStackTrace();
    } catch (IllegalAccessException e) {
      System.err.println(e);
      e.printStackTrace();
    } catch (InvocationTargetException e) {
      System.err.println(e);
      e.printStackTrace();
    }
   
    tp.addKeyListener(this.getKeyListener(frame));
    tp.setFont(new Font("Courier New", Font.PLAIN, 12));
    tp.setEditable(false);
    tp.setText(text);

    new LinePainter(tp, new Color(202, 223, 245));

    final JScrollPane scroll = new JScrollPane(tp);
View Full Code Here

    final ConfirmationDialog dialog = new ConfirmationDialog(null, panel, title, confirmationText);
    dialog.addKeyListener(this.getKeyListener(dialog));

    final LuposDocument document = new LuposDocument();
    final JTextPane tp = new LuposJTextPane(document);
    document.init((query_or_n3) ? SPARQLParser.createILuposParser(new LuposDocumentReader(document)):TurtleParser.createILuposParser(new LuposDocumentReader(document)), false);

    tp.addKeyListener(this.getKeyListener(dialog));
    tp.setFont(new Font("Courier New", Font.PLAIN, 12));
    tp.setEditable(false);
    tp.setText(text);

    new LinePainter(tp, new Color(202, 223, 245));

    final JScrollPane scroll = new JScrollPane(tp);
View Full Code Here

    return chercherjButton;
  }
 
  private JTextPane getResultatProdjTextPane() {
    if (resultatProdjTextPane == null) {
      resultatProdjTextPane = new JTextPane();
      resultatProdjTextPane.setPreferredSize(new Dimension(760, 80));
    }
    return resultatProdjTextPane;
  }
View Full Code Here

    return resultatProdjTextPane;
  }

  private JTextPane getResultatTestjTextPane() {
    if (resultatTestjTextPane == null) {
      resultatTestjTextPane = new JTextPane();
      resultatTestjTextPane.setPreferredSize(new Dimension(760, 80));
    }
    return resultatTestjTextPane;   
  }
View Full Code Here

    JPanel logPanel = new JPanel();
    generalPanel.add(logPanel, BorderLayout.CENTER);
   
    logPanel.setLayout(new BorderLayout());
    logPanel.setBorder(BorderFactory.createTitledBorder("Log Output"));
    JTextPane logTextPane = new JTextPane();
    logTextPane.setEditable(false);
    logTextPane.setBackground(Color.BLACK);
    logTextPane.setForeground(Color.WHITE);
   
    logPanel.add(new JScrollPane(logTextPane,
        ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS,
        ScrollPaneConstants.HORIZONTAL_SCROLLBAR_AS_NEEDED),
            BorderLayout.CENTER);
View Full Code Here

    // Log Panel
    JPanel logPanel = new JPanel();
    logPanel.setLayout(new BorderLayout());
    logPanel.setBorder(BorderFactory.createTitledBorder("Log Output"));
    JTextPane logTextPane = new JTextPane();
    logTextPane.setEditable(false);
    logTextPane.setBackground(Color.BLACK);
    logTextPane.setForeground(Color.WHITE);
   
    logPanel.add(new JScrollPane(logTextPane,
        ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS,
        ScrollPaneConstants.HORIZONTAL_SCROLLBAR_AS_NEEDED),
            BorderLayout.CENTER);
View Full Code Here

  }
  public void showError(Exception e){
    StringWriter w = new StringWriter();
    PrintWriter out = new PrintWriter(w);
    e.printStackTrace(out);
    JTextPane txt = new JTextPane();
    txt.setText(w.toString());
    javax.swing.JOptionPane.showMessageDialog(null,new JScrollPane(txt),e.getMessage(),javax.swing.JOptionPane.ERROR_MESSAGE)
  }
View Full Code Here

TOP

Related Classes of javax.swing.JTextPane

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.