Example usage for javax.swing.event ListSelectionEvent getValueIsAdjusting

List of usage examples for javax.swing.event ListSelectionEvent getValueIsAdjusting

Introduction

In this page you can find the example usage for javax.swing.event ListSelectionEvent getValueIsAdjusting.

Prototype

public boolean getValueIsAdjusting() 

Source Link

Document

Returns whether or not this is one in a series of multiple events, where changes are still being made.

Usage

From source file:ru.goodfil.catalog.ui.forms.CarsPanel.java

private void manufactorsListValueChanged(ListSelectionEvent e) {
    if (e != null && e.getValueIsAdjusting())
        return;/*from   ww  w.j ava 2 s .  com*/

    seriesList.clearSelection();
    series.clear();

    motorsTable.clearSelection();
    motors.clear();

    filtersTable.clearSelection();
    filters.clear();
    Long selectedManufactorId = getSelectedManufatorId();
    if (selectedManufactorId != null)
        reReadSeries(selectedManufactorId);

    adjustButtonsEnabledProperty();
}

From source file:ru.goodfil.catalog.ui.forms.CarsPanel.java

private void seriesListValueChanged(ListSelectionEvent e) {
    if (e != null && e.getValueIsAdjusting())
        return;/*www  .  j  av a  2  s. c o  m*/

    motorsTable.clearSelection();
    motors.clear();

    filtersTable.clearSelection();
    filters.clear();
    Long selectedSeriaId = getSelectedSeriaId();
    if (selectedSeriaId != null)
        reReadMotors(selectedSeriaId);

    adjustButtonsEnabledProperty();
}

From source file:ru.goodfil.catalog.ui.forms.OePanel.java

private void lstBrandsValueChanged(ListSelectionEvent e) {
    if (e != null && e.getValueIsAdjusting())
        return;//from w w w  .  j  a  v a2 s  .co  m

    lstOes.clearSelection();
    oes.clear();

    Long selectedBrandId = brands.getSelectedItemId();
    if (selectedBrandId != null) {
        reReadOes(selectedBrandId);
    }

    adjustLstBrandsStatus();
    adjustButtonsEnabled();
}

From source file:se.trixon.toolbox.idiot.IdiotTopComponent.java

private void init() {
    mHelpId = "se.trixon.toolbox.idiot.about";

    cronToggleButton.setIcon(MaterialIcon._Image.TIMER.get(ICON_SIZE, mIconColor));
    cronToggleButton.setToolTipText(Dict.DOWNLOADS_SCHEDULE.getString());

    downloadButton.setIcon(MaterialIcon._File.FILE_DOWNLOAD.get(ICON_SIZE, mIconColor));
    downloadButton.setToolTipText(Dict.DOWNLOAD_NOW.getString());

    openDirectoryButton.setIcon(MaterialIcon._File.FOLDER_OPEN.get(ICON_SIZE, mIconColor));
    openDirectoryButton.setToolTipText(Dict.OPEN_DIRECTORY.getString());

    addButton.setIcon(MaterialIcon._Content.ADD.get(ICON_SIZE, mIconColor));
    editButton.setIcon(MaterialIcon._Content.CREATE.get(ICON_SIZE, mIconColor));
    cloneButton.setIcon(MaterialIcon._Content.CONTENT_COPY.get(ICON_SIZE, mIconColor));
    cloneButton.setToolTipText(Dict.CLONE.getString());
    removeButton.setIcon(MaterialIcon._Content.REMOVE.get(ICON_SIZE, mIconColor));
    removeAllButton.setIcon(MaterialIcon._Content.CLEAR.get(ICON_SIZE, mIconColor));

    helpButton.setIcon(MaterialIcon._Action.HELP_OUTLINE.get(ICON_SIZE, mIconColor));
    helpButton.setToolTipText(Dict.HELP.getString());

    tasksPanel.getList().addListSelectionListener((ListSelectionEvent e) -> {

        if (!e.getValueIsAdjusting()) {
            selectionChanged();/* ww  w  . j  a v  a  2 s  .com*/
        }
    });

    tasksPanel.getList().addMouseListener(new MouseListener() {

        @Override
        public void mouseClicked(MouseEvent e) {
            initImageViewer();
        }

        @Override
        public void mouseEntered(MouseEvent e) {
        }

        @Override
        public void mouseExited(MouseEvent e) {
        }

        @Override
        public void mousePressed(MouseEvent e) {
        }

        @Override
        public void mouseReleased(MouseEvent e) {
        }
    });

    tasksPanel.getList().getModel().addListDataListener(new ListDataListener() {

        @Override
        public void contentsChanged(ListDataEvent e) {
            dataChanged();
        }

        @Override
        public void intervalAdded(ListDataEvent e) {
            dataChanged();
        }

        @Override
        public void intervalRemoved(ListDataEvent e) {
            dataChanged();
        }
    });

    selectionChanged();
}

From source file:sturesy.core.ui.loaddialog.SubsettedJListPair.java

private void registerListeners() {
    _ui.getSourceList().addKeyListener(new KeyAdapter() {
        public void keyReleased(KeyEvent keyEvent) {
            subsetSourceListKeyEvent(keyEvent.getKeyCode());
        }/*  w  w w .j  a va2  s . c om*/
    });
    _ui.getContentList().addKeyListener(new KeyAdapter() {
        public void keyReleased(KeyEvent keyEvent) {
            subsetContentListKeyEvent(keyEvent.getKeyCode());
        }
    });
    _ui.getSourceList().addListSelectionListener(new ListSelectionListener() {
        public void valueChanged(ListSelectionEvent evnt) {
            informSourceListChanged(evnt.getValueIsAdjusting());
        }
    });
}

From source file:sturesy.settings.SettingsController.java

/**
 * the action performed on a list selection change
 * /*  w  ww  .ja  v  a 2s . co m*/
 * @param e
 *            some event
 */
private void listSelectionChangedAction(ListSelectionEvent e) {
    if (e.getValueIsAdjusting() && _ui.getSelectedSettingsScreenValue() != null) {
        listSelectionChanged();
    }
}

From source file:uk.chromis.pos.promotion.PromotionEditor.java

public void valueChanged(ListSelectionEvent e) {
    if (e.getValueIsAdjusting() == false) {
        if (m_ID != null) {
            m_Dirty.setDirty(true);//from   ww w .  ja va  2  s . c o  m
        }
    }
}