Class KillRing

java.lang.Object
org.gjt.sp.jedit.buffer.KillRing
All Implemented Interfaces:
ListModel, MutableListModel

public class KillRing extends 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 Details

    • KillRing

      public KillRing()
  • Method Details

    • 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(Collection<?> 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).
      Parameters:
      source - the loaded killring.
      Since:
      jEdit 4.3pre12
    • addListDataListener

      public void addListDataListener(ListDataListener listener)
      Specified by:
      addListDataListener in interface ListModel
    • removeListDataListener

      public void removeListDataListener(ListDataListener listener)
      Specified by:
      removeListDataListener in interface ListModel
    • getElementAt

      public Object getElementAt(int index)
      Specified by:
      getElementAt in interface ListModel
    • getSize

      public int getSize()
      Specified by:
      getSize in interface ListModel
    • removeElement

      public boolean removeElement(Object value)
      Specified by:
      removeElement in interface MutableListModel
    • insertElementAt

      public void insertElementAt(Object value, int index)
      Specified by:
      insertElementAt in interface MutableListModel