java.lang.Object
org.gjt.sp.jedit.buffer.KillRing
- All Implemented Interfaces:
ListModel<String>
,MutableListModel<String>
The kill ring retains deleted text. This class is a singleton -- only one
kill ring is used for all of jEdit. Nothing prevents plugins from making their
own kill rings for whatever reason, though.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addListDataListener
(ListDataListener listener) getElementAt
(int index) static KillRing
int
getSize()
void
insertElementAt
(String value, int index) void
load()
void
propertiesChanged
(int historySize) boolean
removeElement
(Object value) void
removeListDataListener
(ListDataListener listener) protected void
reset
(Collection<String> source) This method is made to be used by implementation of load() method to initialize (or reset) the killring by a loaded sequence of objects.void
save()
static void
setInstance
(KillRing killRing)
-
Constructor Details
-
KillRing
public KillRing()
-
-
Method Details
-
getInstance
-
setInstance
-
propertiesChanged
public void propertiesChanged(int historySize) -
load
public void load() -
save
public void save() -
reset
This method is made to be used by implementation of load() method to initialize (or reset) the killring by a loaded sequence of objects. Each element is converted to an element of the killring as followings: - If it is a String, it is converted as if it is a result of getElementAt(n).toString(). - Otherwise, it is converted as if it is a Object which was obtained by getElementAt(n).- Parameters:
source
- the loaded killring.- Since:
- jEdit 4.3pre12
-
addListDataListener
- Specified by:
addListDataListener
in interfaceListModel<String>
-
removeListDataListener
- Specified by:
removeListDataListener
in interfaceListModel<String>
-
getElementAt
- Specified by:
getElementAt
in interfaceListModel<String>
-
getSize
public int getSize() -
removeElement
- Specified by:
removeElement
in interfaceMutableListModel<String>
-
insertElementAt
- Specified by:
insertElementAt
in interfaceMutableListModel<String>
-