| java.lang.Object org.gjt.sp.jedit.Registers
Registers | public class Registers (Code) | | 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 .
author: Slava Pestov author: John Gellene (API documentation) version: $Id: Registers.java 7367 2006-10-08 21:08:04Z kpouer $ |
Inner Class :public interface Register | |
Inner Class :public static class ClipboardRegister implements Register | |
Inner Class :public static class StringRegister implements Register | |
Method Summary | |
public static void | append(TextArea textArea, char register) Appends the text selected in the text area to the specified register,
with a newline between the old and new text. | public static void | append(TextArea textArea, char register, String separator) Appends the text selected in the text area to the specified register. | public static void | append(TextArea textArea, char register, String separator, boolean cut) Appends the text selected in the text area to the specified register. | public static void | clearRegister(char name) Sets the value of the specified register to null . | public static void | copy(TextArea textArea, char register) Copies the text selected in the text area into the specified register. | public static void | cut(TextArea textArea, char register) Copies the text selected in the text area into the specified
register, and then removes it from the buffer. | protected static void | debugListDataFlavors(Transferable transferable) | public static Register | getRegister(char name) Returns the specified register. | public static String | getRegisterNameString() Returns a string of all defined registers, used by the status bar
(eg, "a b $ % ^"). | public static String | getRegisterStatusPrompt(String action) Returns the status prompt for the given register action. | public static Register[] | getRegisters() Returns an array of all available registers. | public static boolean | isLoading() | public static void | paste(TextArea textArea, char register) Insets the contents of the specified register into the text area. | public static void | paste(TextArea textArea, char register, boolean vertical) Inserts the contents of the specified register into the text area. | public static void | saveRegisters() | public static void | setListener(RegistersListener listener) | public static void | setLoading(boolean loading) | public static void | setRegister(char name, Register newRegister) Sets the specified register. | public static void | setRegister(char name, String value) Sets the specified register. | public static void | setSaver(RegisterSaver saver) |
append | public static void append(TextArea textArea, char register)(Code) | | Appends the text selected in the text area to the specified register,
with a newline between the old and new text.
Parameters: textArea - The text area Parameters: register - The register |
append | public static void append(TextArea textArea, char register, String separator)(Code) | | Appends the text selected in the text area to the specified register.
Parameters: textArea - The text area Parameters: register - The register Parameters: separator - The separator to insert between the old and new text |
append | public static void append(TextArea textArea, char register, String separator, boolean cut)(Code) | | Appends the text selected in the text area to the specified register.
Parameters: textArea - The text area Parameters: register - The register Parameters: separator - The text to insert between the old and new text Parameters: cut - Should the current selection be removed? since: jEdit 3.2pre1 |
clearRegister | public static void clearRegister(char name)(Code) | | Sets the value of the specified register to null .
Parameters: name - The register name |
copy | public static void copy(TextArea textArea, char register)(Code) | | Copies the text selected in the text area into the specified register.
This will replace the existing contents of the designated register.
Parameters: textArea - The text area Parameters: register - The register since: jEdit 2.7pre2 |
cut | public static void cut(TextArea textArea, char register)(Code) | | Copies the text selected in the text area into the specified
register, and then removes it from the buffer.
Parameters: textArea - The text area Parameters: register - The register since: jEdit 2.7pre2 |
debugListDataFlavors | protected static void debugListDataFlavors(Transferable transferable)(Code) | | |
getRegister | public static Register getRegister(char name)(Code) | | Returns the specified register.
Parameters: name - The name |
getRegisterNameString | public static String getRegisterNameString()(Code) | | Returns a string of all defined registers, used by the status bar
(eg, "a b $ % ^").
since: jEdit 4.2pre2 |
getRegisterStatusPrompt | public static String getRegisterStatusPrompt(String action)(Code) | | Returns the status prompt for the given register action. Only
intended to be called from actions.xml .
since: jEdit 4.2pre2 |
getRegisters | public static Register[] getRegisters()(Code) | | Returns an array of all available registers. Some of the elements
of this array might be null .
|
isLoading | public static boolean isLoading()(Code) | | |
paste | public static void paste(TextArea textArea, char register)(Code) | | Insets the contents of the specified register into the text area.
Parameters: textArea - The text area Parameters: register - The register since: jEdit 2.7pre2 |
paste | public static void paste(TextArea textArea, char register, boolean vertical)(Code) | | Inserts the contents of the specified register into the text area.
Parameters: textArea - The text area Parameters: register - The register Parameters: vertical - Vertical (columnar) paste since: jEdit 4.1pre1 |
saveRegisters | public static void saveRegisters()(Code) | | |
setLoading | public static void setLoading(boolean loading)(Code) | | |
setRegister | public static void setRegister(char name, Register newRegister)(Code) | | Sets the specified register.
Parameters: name - The name Parameters: newRegister - The new value |
setRegister | public static void setRegister(char name, String value)(Code) | | Sets the specified register.
Parameters: name - The name Parameters: value - The new value |
|
|