Example usage for javax.swing.event ListDataEvent getIndex0

List of usage examples for javax.swing.event ListDataEvent getIndex0

Introduction

In this page you can find the example usage for javax.swing.event ListDataEvent getIndex0.

Prototype

public int getIndex0() 

Source Link

Document

Returns the lower index of the range.

Usage

From source file:com.anrisoftware.prefdialog.fields.historycombobox.HistoryComboBoxField.java

/**
 * @see ComboBoxFieldFactory#create(Object, String)
 */// ww w. j a va2  s.  co m
@AssistedInject
HistoryComboBoxField(HistoryComboBoxFactory historyComboBoxFactory, @Assisted Object parentObject,
        @Assisted String fieldName) {
    super(ANNOTATION_CLASS, new JComboBox<Object>(), parentObject, fieldName);
    this.boxFactory = historyComboBoxFactory;
    this.history = new ArrayList<Object>();
    this.defaultItems = new ArrayList<Object>();
    this.historyListener = new ListDataListener() {

        @Override
        public void intervalRemoved(ListDataEvent e) {
            removeHistory(e.getIndex0(), e.getIndex1());
        }

        @Override
        public void intervalAdded(ListDataEvent e) {
            insertHistory(e.getIndex0(), e.getIndex1());
        }

        @Override
        public void contentsChanged(ListDataEvent e) {
            replaceHistory(e.getIndex0(), e.getIndex1());
        }
    };
}

From source file:org.drugis.common.beans.FilteredObservableList.java

public FilteredObservableList(final ObservableList<E> inner, final Predicate<E> filter) {
    d_inner = inner;// w w  w  .ja  v  a 2s  .co  m
    d_filter = filter;
    initializeIndices();
    d_inner.addListDataListener(new ListDataListener() {
        @Override
        public void intervalRemoved(final ListDataEvent e) {
            FilteredObservableList.this.intervalRemoved(e.getIndex0(), e.getIndex1());
        }

        @Override
        public void intervalAdded(final ListDataEvent e) {
            FilteredObservableList.this.intervalAdded(e.getIndex0(), e.getIndex1());
        }

        @Override
        public void contentsChanged(final ListDataEvent e) {
            FilteredObservableList.this.contentsChanged(e.getIndex0(), e.getIndex1());
        }
    });
}

From source file:org.springframework.richclient.list.AbstractFilteredListModel.java

public void contentsChanged(ListDataEvent e) {
    fireContentsChanged(e.getSource(), e.getIndex0(), e.getIndex1());
}

From source file:org.springframework.richclient.list.AbstractFilteredListModel.java

public void intervalAdded(ListDataEvent e) {
    fireIntervalAdded(e.getSource(), e.getIndex0(), e.getIndex1());
}

From source file:org.springframework.richclient.list.AbstractFilteredListModel.java

public void intervalRemoved(ListDataEvent e) {
    fireIntervalRemoved(e.getSource(), e.getIndex0(), e.getIndex1());
}