|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.gjt.sp.jedit.Registers
public class Registers
jEdit's registers are an extension of the clipboard metaphor.
A Registers.Register is string of text indexed by a
single character. Typically the text is taken from selected buffer text
and the index character is a keyboard character selected by the user.
This class defines a number of static methods that give each register the properties of a virtual clipboard.
Two classes implement the Registers.Register interface. A
Registers.ClipboardRegister is tied to the contents of the
system clipboard. jEdit assigns a
Registers.ClipboardRegister to the register indexed under
the character $. A
Registers.StringRegister is created for registers assigned
by the user. In addition, jEdit assigns % to
the last text segment selected in the text area. On Windows this is a
Registers.StringRegister, on Unix under Java 2 version 1.4, a
Registers.ClipboardRegister.
| Nested Class Summary | |
|---|---|
static class |
Registers.ClipboardRegister
A clipboard register. |
static interface |
Registers.Register
A register. |
static class |
Registers.StringRegister
Register that stores a string. |
| Method Summary | |
|---|---|
static void |
append(JEditTextArea textArea,
char register)
Appends the text selected in the text area to the specified register, with a newline between the old and new text. |
static void |
append(JEditTextArea textArea,
char register,
java.lang.String separator)
Appends the text selected in the text area to the specified register. |
static void |
append(JEditTextArea textArea,
char register,
java.lang.String separator,
boolean cut)
Appends the text selected in the text area to the specified register. |
static void |
clearRegister(char name)
Sets the value of the specified register to null. |
static void |
copy(JEditTextArea textArea,
char register)
Copies the text selected in the text area into the specified register. |
static void |
cut(JEditTextArea textArea,
char register)
Copies the text selected in the text area into the specified register, and then removes it from the buffer. |
static Registers.Register |
getRegister(char name)
Returns the specified register. |
static java.lang.String |
getRegisterNameString()
Returns a string of all defined registers, used by the status bar (eg, "a b $ % ^"). |
static Registers.Register[] |
getRegisters()
Returns an array of all available registers. |
static java.lang.String |
getRegisterStatusPrompt(java.lang.String action)
Returns the status prompt for the given register action. |
static void |
paste(JEditTextArea textArea,
char register)
Insets the contents of the specified register into the text area. |
static void |
paste(JEditTextArea textArea,
char register,
boolean vertical)
Inserts the contents of the specified register into the text area. |
static void |
saveRegisters()
|
static void |
setRegister(char name,
Registers.Register newRegister)
Sets the specified register. |
static void |
setRegister(char name,
java.lang.String value)
Sets the specified register. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static void copy(JEditTextArea textArea,
char register)
textArea - The text arearegister - The register
public static void cut(JEditTextArea textArea,
char register)
textArea - The text arearegister - The register
public static void append(JEditTextArea textArea,
char register)
textArea - The text arearegister - The register
public static void append(JEditTextArea textArea,
char register,
java.lang.String separator)
textArea - The text arearegister - The registerseparator - The separator to insert between the old and new text
public static void append(JEditTextArea textArea,
char register,
java.lang.String separator,
boolean cut)
textArea - The text arearegister - The registerseparator - The text to insert between the old and new textcut - Should the current selection be removed?
public static void paste(JEditTextArea textArea,
char register)
textArea - The text arearegister - The register
public static void paste(JEditTextArea textArea,
char register,
boolean vertical)
textArea - The text arearegister - The registervertical - Vertical (columnar) pastepublic static Registers.Register getRegister(char name)
name - The name
public static void setRegister(char name,
Registers.Register newRegister)
name - The namenewRegister - The new value
public static void setRegister(char name,
java.lang.String value)
name - The namevalue - The new valuepublic static void clearRegister(char name)
null.
name - The register namepublic static Registers.Register[] getRegisters()
null.
public static java.lang.String getRegisterStatusPrompt(java.lang.String action)
actions.xml.
public static java.lang.String getRegisterNameString()
public static void saveRegisters()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||