Module jEdit

Class KillRing

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

public class KillRing extends Object implements 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 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<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. 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<String>
    • removeListDataListener

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

      public String getElementAt(int index)
      Specified by:
      getElementAt in interface ListModel<String>
    • getSize

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

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

      public void insertElementAt(String value, int index)
      Specified by:
      insertElementAt in interface MutableListModel<String>