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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddListDataListener(ListDataListener listener) getElementAt(int index) static KillRingintgetSize()voidinsertElementAt(String value, int index) voidload()voidpropertiesChanged(int historySize) booleanremoveElement(Object value) voidremoveListDataListener(ListDataListener listener) protected voidreset(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.voidsave()static voidsetInstance(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:
addListDataListenerin interfaceListModel<String>
-
removeListDataListener
- Specified by:
removeListDataListenerin interfaceListModel<String>
-
getElementAt
- Specified by:
getElementAtin interfaceListModel<String>
-
getSize
public int getSize() -
removeElement
- Specified by:
removeElementin interfaceMutableListModel<String>
-
insertElementAt
- Specified by:
insertElementAtin interfaceMutableListModel<String>
-