|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.raelity.jvi.swing.DefaultViFactory
public class DefaultViFactory
This provides the Vi items to interface with standard swing JEditorPane. NEEDSWORK:
| Nested Class Summary | |
|---|---|
static class |
DefaultViFactory.EnqueCharAction
This is the default key action. |
static class |
DefaultViFactory.EnqueKeyAction
Catch non-printing keys with this class. |
| Field Summary | |
|---|---|
protected Map<Document,Object> |
docSet
|
protected WeakHashMap<JEditorPane,Object> |
editorSet
|
protected static DefaultViFactory |
INSTANCE
|
static String |
PROP_BUF
|
static String |
PROP_VITV
|
| Constructor Summary | |
|---|---|
DefaultViFactory()
|
|
| Method Summary | |
|---|---|
void |
commandEntryAssist(ViCmdEntry cmdEntry,
boolean enable)
|
protected Buffer |
createBuffer(ViTextView tv)
subclass probably wants to override this |
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. |
protected ViTextView |
createViTextView(JEditorPane editorPane)
subclass probably wants to override this |
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)
Register editor pane for use with vi. |
void |
shutdown(JEditorPane ep)
This editor pane is going away, forget about it. |
void |
startGlassKeyCatch(KeyListener kl)
Method to establish a glass pane with the param key listener and all mouse events are blocked. |
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. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static DefaultViFactory INSTANCE
public static final String PROP_VITV
public static final String PROP_BUF
protected Map<Document,Object> docSet
protected WeakHashMap<JEditorPane,Object> editorSet
| Constructor Detail |
|---|
public DefaultViFactory()
| Method Detail |
|---|
public Class loadClass(String name)
throws ClassNotFoundException
loadClass in interface ViFactoryClassNotFoundExceptionpublic boolean isStandalone()
isStandalone in interface ViFactorypublic ViTextView getExistingViTextView(Object editorPane)
getExistingViTextView in interface ViFactorypublic ViTextView getViTextView(JEditorPane editorPane)
ViFactory
getViTextView in interface ViFactoryprotected ViTextView createViTextView(JEditorPane editorPane)
public Set<ViTextView> getViTextViewSet()
getViTextViewSet in interface ViFactorypublic boolean isVisible(ViTextView tv)
isVisible in interface ViFactorypublic Buffer getBuffer(JEditorPane editorPane)
ViFactory
getBuffer in interface ViFactoryprotected Buffer createBuffer(ViTextView tv)
public Set<Buffer> getBufferSet()
getBufferSet in interface ViFactorypublic void shutdown(JEditorPane ep)
ViFactory
shutdown in interface ViFactorypublic ViFS getFS()
ViFactory
getFS in interface ViFactory
public ViOutputStream createOutputStream(ViTextView tv,
Object type,
Object info,
int priority)
ViFactory
createOutputStream in interface ViFactorytype - 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.public void startGlassKeyCatch(KeyListener kl)
startGlassKeyCatch in interface ViFactorypublic void stopGlassKeyCatch()
stopGlassKeyCatch in interface ViFactorypublic void startModalKeyCatch(KeyListener kl)
startModalKeyCatch in interface ViFactorypublic void stopModalKeyCatch()
stopModalKeyCatch in interface ViFactorypublic void registerEditorPane(JEditorPane editorPane)
registerEditorPane in interface ViFactorypublic Window lookupWindow(JEditorPane editorPane)
ViFactory
lookupWindow in interface ViFactory
public PropertyDescriptor createPropertyDescriptor(String optName,
String methodName,
Class clazz)
throws IntrospectionException
ViFactory
createPropertyDescriptor in interface ViFactoryIntrospectionExceptionpublic ViCmdEntry createCmdEntry(int type)
ViFactory
createCmdEntry in interface ViFactorypublic Action createCharAction(String name)
createCharAction in interface ViFactory
public Action createKeyAction(String name,
char key)
createKeyAction in interface ViFactory
public Action createInsertModeKeyAction(String name,
char vkey,
String desc)
createInsertModeKeyAction in interface ViFactory
public Action createNormalModeKeyAction(String name,
int vkey,
String desc)
createNormalModeKeyAction in interface ViFactorypublic ActionListener xlateKeymapAction(ActionListener act)
ViFactory
xlateKeymapAction in interface ViFactorypublic Preferences getPreferences()
getPreferences in interface ViFactorypublic String getDisplayFilename(Object o)
ViFactory
getDisplayFilename in interface ViFactory
public void startTagPush(ViTextView tv,
String ident)
startTagPush in interface ViFactorypublic void finishTagPush(ViTextView tv)
finishTagPush in interface ViFactory
public void tagStack(ViTextView.TAGOP op,
int count)
tagStack in interface ViFactorypublic void displayTags()
displayTags in interface ViFactorypublic void tagDialog(ColonCommands.ColonEvent e)
tagDialog in interface ViFactory
public void commandEntryAssist(ViCmdEntry cmdEntry,
boolean enable)
commandEntryAssist in interface ViFactory
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||