com.raelity.jvi
Interface ViFactory

All Known Implementing Classes:
DefaultViFactory

public interface ViFactory

This provides Vi the items it needs to interface with swing UI environment.


Method Summary
 void commandEntryAssist(ViCmdEntry cmdEntry, boolean enable)
           
 Action createCharAction(String name)
           
 ViCmdEntry createCmdEntry(int type)
          A command entry object will be created if needed.
 Action createInsertModeKeyAction(String name, char vkey, String desc)
           
 Action createKeyAction(String name, char key)
           
 Action createNormalModeKeyAction(String name, int vkey, String desc)
           
 ViOutputStream createOutputStream(ViTextView tv, Object type, Object info, int priority)
          create an output stream for some kind of results.
 PropertyDescriptor createPropertyDescriptor(String optName, String methodName, Class clazz)
          Create a property descriptor.
 void displayTags()
           
 void finishTagPush(ViTextView tv)
           
 Buffer getBuffer(JEditorPane editorPane)
          Return a Buffer, create one if it doesn't already exist
 Set<Buffer> getBufferSet()
           
 String getDisplayFilename(Object o)
          For an environmental object, used for debug output
 ViTextView getExistingViTextView(Object editorPane)
           
 ViFS getFS()
          File manipulation handled through this object.
 Preferences getPreferences()
           
 ViTextView getViTextView(JEditorPane editorPane)
          Return a TextView, create one if it doesn't already exist
 Set<ViTextView> getViTextViewSet()
           
 boolean isStandalone()
           
 boolean isVisible(ViTextView tv)
           
 Class loadClass(String name)
           
 Window lookupWindow(JEditorPane editorPane)
          The factory keeps track of which Window is active when there is a switch.
 void registerEditorPane(JEditorPane editorPane)
           
 void shutdown(JEditorPane editorPane)
          This editor pane is going away, forget about it.
 void startGlassKeyCatch(KeyListener kl)
           
 void startModalKeyCatch(KeyListener kl)
           
 void startTagPush(ViTextView tv, String ident)
           
 void stopGlassKeyCatch()
           
 void stopModalKeyCatch()
           
 void tagDialog(ColonCommands.ColonEvent e)
           
 void tagStack(ViTextView.TAGOP op, int count)
           
 ActionListener xlateKeymapAction(ActionListener act)
          The actions used for keymap translation may be munged by the environment so we need a way to get back the original action.
 

Method Detail

loadClass

Class loadClass(String name)
                throws ClassNotFoundException
Throws:
ClassNotFoundException

getViTextView

ViTextView getViTextView(JEditorPane editorPane)
Return a TextView, create one if it doesn't already exist


getBuffer

Buffer getBuffer(JEditorPane editorPane)
Return a Buffer, create one if it doesn't already exist


isStandalone

boolean isStandalone()
Returns:
true if standalone (debug), else false

getExistingViTextView

ViTextView getExistingViTextView(Object editorPane)
Returns:
null if TextView does not exist

getViTextViewSet

Set<ViTextView> getViTextViewSet()
Returns:
Set of active ViTextView, some may have retired

isVisible

boolean isVisible(ViTextView tv)
Returns:
true if the argument ViTextView is visible

getBufferSet

Set<Buffer> getBufferSet()
Returns:
Set of active Buffer, some may have retired

getDisplayFilename

String getDisplayFilename(Object o)
For an environmental object, used for debug output


shutdown

void shutdown(JEditorPane editorPane)
This editor pane is going away, forget about it.


registerEditorPane

void registerEditorPane(JEditorPane editorPane)

getFS

ViFS getFS()
File manipulation handled through this object.


createOutputStream

ViOutputStream createOutputStream(ViTextView tv,
                                  Object type,
                                  Object info,
                                  int priority)
create an output stream for some kind of results.

Parameters:
type - Should be a constant from ViOutputStream, e.g. ViOutputStream.SEARCH.
info - qualifier for the output stream, e.g. search pattern.
priority - 0 - 10 where 0 is lowest priority, 5 is normal, 0-2 is low, don't raise window.

startGlassKeyCatch

void startGlassKeyCatch(KeyListener kl)

stopGlassKeyCatch

void stopGlassKeyCatch()

startModalKeyCatch

void startModalKeyCatch(KeyListener kl)

stopModalKeyCatch

void stopModalKeyCatch()

lookupWindow

Window lookupWindow(JEditorPane editorPane)
The factory keeps track of which Window is active when there is a switch. The argument may or may not be used depending on the implementation.

Returns:
the Window for the specified editor

createCharAction

Action createCharAction(String name)
Returns:
action suitable for default key action

createKeyAction

Action createKeyAction(String name,
                       char key)
Returns:
action for picking up specified key

createInsertModeKeyAction

Action createInsertModeKeyAction(String name,
                                 char vkey,
                                 String desc)
Returns:
edit mode action for specific operation

createNormalModeKeyAction

Action createNormalModeKeyAction(String name,
                                 int vkey,
                                 String desc)
Returns:
normal mode action for specific operation

xlateKeymapAction

ActionListener xlateKeymapAction(ActionListener act)
The actions used for keymap translation may be munged by the environment so we need a way to get back the original action.


createPropertyDescriptor

PropertyDescriptor createPropertyDescriptor(String optName,
                                            String methodName,
                                            Class clazz)
                                            throws IntrospectionException
Create a property descriptor. Typically for an option bean.

Parameters:
optName -
methodName -
clazz -
Returns:
Throws:
IntrospectionException

createCmdEntry

ViCmdEntry createCmdEntry(int type)
A command entry object will be created if needed.

Returns:
a CmdEntry object to handle the specified type of user input.

getPreferences

Preferences getPreferences()

startTagPush

void startTagPush(ViTextView tv,
                  String ident)

finishTagPush

void finishTagPush(ViTextView tv)

tagStack

void tagStack(ViTextView.TAGOP op,
              int count)

displayTags

void displayTags()

tagDialog

void tagDialog(ColonCommands.ColonEvent e)

commandEntryAssist

void commandEntryAssist(ViCmdEntry cmdEntry,
                        boolean enable)