## org.gjt.sp.jedit.buffer
Class KillRing

    java.lang.Object
      org.gjt.sp.jedit.buffer.KillRing

All Implemented Interfaces:
  javax.swing.ListModel, MutableListModel

    public class KillRing

extends java.lang.Object
implements MutableListModel

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
`KillRing()`

Method Summary
`void` `addListDataListener(javax.swing.event.ListDataListener listener)`
`java.lang.Object` `getElementAt(int index)`
`static KillRing` `getInstance()`
`int` `getSize()`
`void` `insertElementAt(java.lang.Object value, int index)`
`void` `load()`
`void` `propertiesChanged(int historySize)`
`boolean` `removeElement(java.lang.Object value)`
`void` `removeListDataListener(javax.swing.event.ListDataListener listener)`
`protected void` `reset(java.util.List 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)`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### KillRing

    public KillRing()

Method Detail

### getInstance

    public static KillRing getInstance()

### setInstance

    public static void setInstance(KillRing killRing)

### propertiesChanged

    public void propertiesChanged(int historySize)

### load

    public void load()

### save

    public void save()

### reset

    protected void reset(java.util.List 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. 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).

  Since:
    jEdit 4.3pre12

### addListDataListener

    public void addListDataListener(javax.swing.event.ListDataListener listener)

  Specified by:
    `addListDataListener` in interface `javax.swing.ListModel`

### removeListDataListener

    public void removeListDataListener(javax.swing.event.ListDataListener listener)

  Specified by:
    `removeListDataListener` in interface `javax.swing.ListModel`

### getElementAt

    public java.lang.Object getElementAt(int index)

  Specified by:
    `getElementAt` in interface `javax.swing.ListModel`

### getSize

    public int getSize()

  Specified by:
    `getSize` in interface `javax.swing.ListModel`

### removeElement

    public boolean removeElement(java.lang.Object value)

  Specified by:
    `removeElement` in interface `MutableListModel`

### insertElementAt

    public void insertElementAt(java.lang.Object value,
                                int index)

  Specified by:
    `insertElementAt` in interface `MutableListModel`