Example usage for javax.swing.event ListDataEvent getIndex1

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

Introduction

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

Prototype

public int getIndex1() 

Source Link

Document

Returns the upper index of the range.

Usage

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

/**
 * @see ComboBoxFieldFactory#create(Object, String)
 */// w  ww  .  ja  va 2  s .com
@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;//from   ww  w  .j a v a  2 s. c o  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());
}