org.adrabi.nbe
Class NBEditorFactory

java.lang.Object
  extended by org.adrabi.nbe.NBEditorFactory

public class NBEditorFactory
extends java.lang.Object

NBEditorFactory is

Version:
$Revision: 1.2 $
Author:
$Author: antonio $ Antonio Vieiro (antonio@antonioshome.net)

Field Summary
private static boolean initialized
          Flag indicating if default settings have been initialized.
 
Constructor Summary
private NBEditorFactory()
           
 
Method Summary
static void addSyntax(org.netbeans.editor.ext.ExtKit anEditorKit, org.netbeans.editor.Settings.AbstractInitializer aSettingsInitializer)
          Registers a given content type (from the ExtKit) and installs appropriate settings for it.
private static void initEditorSettings()
          Initializes default settings.
static javax.swing.JComponent newTextRenderer(org.netbeans.editor.ext.ExtKit anEditorKit, javax.swing.JEditorPane anEditorPane)
          Obtains a JComponent responsible for visualization of the contents of a JEditorPane, and prepares the JEditorPane to accept the content-type of the given EditorKit.
private static void updateKeyBindings(javax.swing.JEditorPane anEditorPane)
          Updates key bindings for a JEditorPane
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

initialized

private static boolean initialized
Flag indicating if default settings have been initialized.

Constructor Detail

NBEditorFactory

private NBEditorFactory()
Method Detail

initEditorSettings

private static void initEditorSettings()
Initializes default settings.


addSyntax

public static void addSyntax(org.netbeans.editor.ext.ExtKit anEditorKit,
                             org.netbeans.editor.Settings.AbstractInitializer aSettingsInitializer)
Registers a given content type (from the ExtKit) and installs appropriate settings for it.

Parameters:
anEditorKit - an ExtKit to use.
aSettingsInitializer - an object that initializes editor settings for that ExtKit type.

updateKeyBindings

private static void updateKeyBindings(javax.swing.JEditorPane anEditorPane)
Updates key bindings for a JEditorPane

Parameters:
anEditorPane - the JEditorPane on which the key bindings are to be installed.

newTextRenderer

public static javax.swing.JComponent newTextRenderer(org.netbeans.editor.ext.ExtKit anEditorKit,
                                                     javax.swing.JEditorPane anEditorPane)
Obtains a JComponent responsible for visualization of the contents of a JEditorPane, and prepares the JEditorPane to accept the content-type of the given EditorKit.

Parameters:
anEditorKit - an ExtKit with an appropriate content-type.
anEditorPane - a JEditorPane whose UI will be replaced with the JComponent. This JEditorPane can be used to modify the text, but not for visualization.
Returns:
a JComponent responsible for visualizing text, rendering a status bar and a line number bar.