Examples of LuposJTextPane


Examples of lupos.gui.anotherSyntaxHighlighting.LuposJTextPane

    panels[0].add(this.jRB_useOwnCode_checkMethod, BorderLayout.NORTH);

    this.rightPanel_checkMethod.add(new JLabel("Code for check method:"), BorderLayout.NORTH);

    LuposDocument document_checkJavaCode = new LuposDocument();
    this.jTP_checkJavaCode = new LuposJTextPane(document_checkJavaCode);
    document_checkJavaCode.init(JavaScanner.createILuposParser(new LuposDocumentReader(document_checkJavaCode)), true);


    JScrollPane jSP_checkJavaCode = new JScrollPane(this.jTP_checkJavaCode);

    this.rightPanel_checkMethod.add(jSP_checkJavaCode, BorderLayout.CENTER);

    JPanel innerPanel=new JPanel(new FlowLayout(FlowLayout.LEFT));
    innerPanel.add(new JLabel("Start node:"));

    // build drop down menu for class names...
    this.jCB_startNode = new JComboBox(Arrays.asList(RuleEnum.class.getEnumConstants()).toArray());

    innerPanel.add(this.jCB_startNode);
   
    this.rightPanel_checkMethod.add(innerPanel, BorderLayout.SOUTH);

    panels[0].add(this.rightPanel_checkMethod, BorderLayout.CENTER);

    this.rightPanel_replaceMethod = new JPanel(new BorderLayout());

    this.jRB_useOwnCode_replaceMethod = new JRadioButton("Use own code", true);
    this.jRB_useOwnCode_replaceMethod.addActionListener(new ActionListener() {
      public void actionPerformed(ActionEvent ee) {
        that.enableSidePanel(that.leftPanel_replaceMethod, false);
        that.enableSidePanel(that.rightPanel_replaceMethod, true);
      }
    });

    this.buttonGroup_replaceMethod.add(this.jRB_useOwnCode_replaceMethod);

    panels[1]=new JPanel(new BorderLayout());
    panels[1].add(this.jRB_useOwnCode_replaceMethod, BorderLayout.NORTH);

    this.rightPanel_replaceMethod.add(new JLabel("Code for replace method:"), BorderLayout.NORTH);

    LuposDocument document_replaceJavaCode = new LuposDocument();
    this.jTP_replaceJavaCode = new LuposJTextPane(document_replaceJavaCode);
    document_replaceJavaCode.init(JavaScanner.createILuposParser(new LuposDocumentReader(document_replaceJavaCode)), true);

    JScrollPane jSP_replaceJavaCode = new JScrollPane(this.jTP_replaceJavaCode);

    this.rightPanel_replaceMethod.add(jSP_replaceJavaCode, BorderLayout.CENTER);
View Full Code Here

Examples of lupos.gui.anotherSyntaxHighlighting.LuposJTextPane

  protected JComponent getTextualQueryComponent(final boolean applyButton) {
    final JPanel mainPanel = new JPanel(new BorderLayout());

    final LuposDocument document = new LuposDocument();
    this.tp_queryInput = new LuposJTextPane(document);
    document.init(SPARQLParser.createILuposParser(new LuposDocumentReader(document)), true, 100);

    final JScrollPane scrollpane = new JScrollPane(this.tp_queryInput);
    scrollpane.getViewport().setBackground(Color.WHITE);
View Full Code Here

Examples of lupos.gui.anotherSyntaxHighlighting.LuposJTextPane

            value = literal.toString(this.prefixInstance);
          }

          final JPanel panel = new JPanel(new BorderLayout());
          final LuposDocument document = new LuposDocument();
          final LuposJTextPane textPane = new LuposJTextPane(document);
          document.init(SPARQLParser.createILuposParser(new LuposDocumentReader(document)), false, 100);

          textPane.setText(value);
          textPane.setEditable(false);
          final JScrollPane scrollpane = new JScrollPane(textPane);
          scrollpane.getViewport().setBackground(Color.WHITE);
          panel.add(scrollpane);
          // panel.add(textPane);
View Full Code Here

Examples of lupos.gui.anotherSyntaxHighlighting.LuposJTextPane

      final JLabel info = new JLabel("Prefixes:");

      pPanel.add(info, BorderLayout.NORTH);

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

      final StringBuffer prefixes = this.prefixInstance.getPrefixString("", "");
      textPane.setText(prefixes.substring(0, prefixes.length() - 1));
      textPane.setEditable(false);
      final JScrollPane scroll = new JScrollPane(textPane);
      scroll.getViewport().setBackground(Color.WHITE);

      pPanel.add(scroll);
View Full Code Here

Examples of lupos.gui.anotherSyntaxHighlighting.LuposJTextPane

      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

Examples of lupos.gui.anotherSyntaxHighlighting.LuposJTextPane

        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

Examples of lupos.gui.anotherSyntaxHighlighting.LuposJTextPane

  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

Examples of lupos.gui.anotherSyntaxHighlighting.LuposJTextPane

    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
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.