Exemplo n.º 1
0
        //  private String initText = "In";
        private void BuildContentPanel()
        {
            editorPane = new JEditorPane();
            editorPane.SetContentType("text/rtf");
            editorPane.AddKeyListener(new NERGUI.InputListener(this));
            //    defaultAttrSet = ((StyledEditorKit)editorPane.getEditorKit()).getInputAttributes();
            StyleConstants.SetFontFamily(defaultAttrSet, "Lucinda Sans");
            IDocument doc = new DefaultStyledDocument();

            editorPane.SetDocument(doc);
            try
            {
                doc.InsertString(0, initText, defaultAttrSet);
            }
            catch (Exception ex)
            {
                throw new Exception(ex);
            }
            JScrollPane scrollPane = new JScrollPane(editorPane);

            frame.GetContentPane().Add(scrollPane, BorderLayout.Center);
            editorPane.SetEditable(true);
        }
Exemplo n.º 2
0
 /// <summary>
 /// Called when the kit is being installed into the
 /// a JEditorPane.
 /// </summary>
 public void install(JEditorPane @c)
 {
 }