当前位置: 首页>>代码示例>>Java>>正文


Java ListSelectionEvent.getValueIsAdjusting方法代码示例

本文整理汇总了Java中javax.swing.event.ListSelectionEvent.getValueIsAdjusting方法的典型用法代码示例。如果您正苦于以下问题:Java ListSelectionEvent.getValueIsAdjusting方法的具体用法?Java ListSelectionEvent.getValueIsAdjusting怎么用?Java ListSelectionEvent.getValueIsAdjusting使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在javax.swing.event.ListSelectionEvent的用法示例。


在下文中一共展示了ListSelectionEvent.getValueIsAdjusting方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: valueChanged

import javax.swing.event.ListSelectionEvent; //导入方法依赖的package包/类
@Override
public void valueChanged (ListSelectionEvent e) {
    if (!e.getValueIsAdjusting() && revisionsPanel1.lstRevisions.isFocusOwner()) {
        GitRevisionInfo selectedRevision = revisionsPanel1.getSelectedRevision();
        Revision oldRevision = currRevision;
        if (selectedRevision == null && currRevision != null) {
            currRevision = null;
            firePropertyChange(PROP_REVISION_CHANGED, oldRevision, currRevision);
        } else if (selectedRevision != null) {
            Revision newRev = new Revision(selectedRevision.getRevision(), selectedRevision.getRevision(),
                    selectedRevision.getShortMessage(), selectedRevision.getFullMessage());
            if (!newRev.equals(oldRevision)) {
                currRevision = newRev;
                firePropertyChange(PROP_REVISION_CHANGED, oldRevision, currRevision);
            }
        }
    }
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:19,代码来源:RepositoryBrowserPanel.java

示例2: valueChanged

import javax.swing.event.ListSelectionEvent; //导入方法依赖的package包/类
/**
 * {@inheritDoc}
 */
@Override
public void valueChanged(ListSelectionEvent e) {
    if (e.getValueIsAdjusting()) return;
    int[] idx = this.stopList.getSelectedIndices();
    if (idx.length > 0) {
        TradeRouteStop stop = this.stopListModel.get(idx[0]);
        this.cargoPanel.initialize(stop);
        this.goodsPanel.setEnabled(true);
    } else {
        this.goodsPanel.setEnabled(false);
    }
    updateButtons();
}
 
开发者ID:FreeCol,项目名称:freecol,代码行数:17,代码来源:TradeRouteInputPanel.java

示例3: valueChanged

import javax.swing.event.ListSelectionEvent; //导入方法依赖的package包/类
@Override
public void valueChanged(ListSelectionEvent e) {
    if (e.getValueIsAdjusting()) {
        return;
    }
    int[] index = columnsTable.getSelectedRows();
    boolean empty = (index.length == 0);
    boolean multi = (index.length > 1);
    deleteColumnButton.setEnabled(!empty);
    moveUpColumnButton.setEnabled(!empty && !multi && (index[0] > 0));
    moveDownColumnButton.setEnabled(!empty && !multi && (index[0] < columns.size()-1));
    updateColumnSection();
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:14,代码来源:TableCustomizer.java

示例4: valueChanged

import javax.swing.event.ListSelectionEvent; //导入方法依赖的package包/类
public void valueChanged(ListSelectionEvent evt) {
	if (evt.getValueIsAdjusting()) return;

	selRows = dataT.getSelectedRows();
	boolean[] oSelected = selected;

	selected = new boolean[data.size()];
	for (int i = 0; i < selRows.length; i++) {
		int index = tm.displayToDataIndex.get(selRows[i]);
		selected[index] = true;
	}
	selectionChangedRedraw(oSelected);
}
 
开发者ID:iedadata,项目名称:geomapapp,代码行数:14,代码来源:UnknownDataSet.java

示例5: valueChanged

import javax.swing.event.ListSelectionEvent; //导入方法依赖的package包/类
@Override
public void valueChanged (ListSelectionEvent e) {
    if (e.getSource() == panel.lstTags && !e.getValueIsAdjusting()) {
        GitTag selectedTag = null;
        Object selectedObject = panel.lstTags.getSelectedValue();
        if (selectedObject instanceof GitTag) {
            selectedTag = (GitTag) panel.lstTags.getSelectedValue();
        }
        updateTagInfo(selectedTag);
    }
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:12,代码来源:ManageTags.java

示例6: valueChanged

import javax.swing.event.ListSelectionEvent; //导入方法依赖的package包/类
@Override
public void valueChanged (ListSelectionEvent e) {
    if (!e.getValueIsAdjusting() && e.getLastIndex() > -1 && e.getFirstIndex() > -1) {
        reselected = true;
        selectedRevision = null;
    }
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:8,代码来源:RevisionListPanel.java

示例7: valueChanged

import javax.swing.event.ListSelectionEvent; //导入方法依赖的package包/类
@Override
public void valueChanged(ListSelectionEvent e) {
    spinnerCheck();

    if (!e.getValueIsAdjusting()
            && !candsList.isSelectionEmpty()) {
        ListElement elem = (ListElement) candsList.getSelectedValue();
        candidateChanged_.notifyAllListeners(
                new Pair<>(elem.getWord(), elem.getPos()),
                elem.getPkg());
    }
}
 
开发者ID:CLARIN-PL,项目名称:WordnetLoom,代码行数:13,代码来源:CandidatesViewUI.java

示例8: valueChanged

import javax.swing.event.ListSelectionEvent; //导入方法依赖的package包/类
@Override
public void valueChanged (ListSelectionEvent e) {
    if (!e.getValueIsAdjusting()) {
        if (e.getSource() == panel.list.getSelectionModel()) {
            changeSupport.fireChange();
        }
    }
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:9,代码来源:ItemSelector.java

示例9: onDictionaryHighlightChange

import javax.swing.event.ListSelectionEvent; //导入方法依赖的package包/类
/**
 * Fires when the user (un)highlights a dictionary.
 *
 * @param event the triggering event
 */
private void onDictionaryHighlightChange(final ListSelectionEvent event) {
    if (!event.getValueIsAdjusting()) {
        final Optional<Dictionary> highlightedDictionary = dictionaries.getHighlightedEntry();
        final boolean enable = highlightedDictionary.isPresent()
                && highlightedDictionary.get() instanceof Dictionary.UserDictionary;
        dictionaryRemoveButton.setEnabled(enable);
    }
}
 
开发者ID:FWDekker,项目名称:intellij-randomness,代码行数:14,代码来源:WordSettingsDialog.java

示例10: valueChanged

import javax.swing.event.ListSelectionEvent; //导入方法依赖的package包/类
@Override
@MaskAnnotation
public void valueChanged(ListSelectionEvent e) {
    if (e.getSource().equals(frame.getHistoryList())) {
        frame.historyListChange(e);
    } else if (e.getSource() instanceof JList) {
        if (e.getValueIsAdjusting()) {
            frame.dbListValueChanged();
        }
    } else {
        frame.tableValueChanged(e);
    }
}
 
开发者ID:ajtdnyy,项目名称:PackagePlugin,代码行数:14,代码来源:ListSelectionListenerImpl.java

示例11: valueChanged

import javax.swing.event.ListSelectionEvent; //导入方法依赖的package包/类
public void valueChanged(ListSelectionEvent event) {
    if (event.getValueIsAdjusting()) {
        return;
    }
    output.append("ROW SELECTION EVENT. ");
    outputSelection();
}
 
开发者ID:jalian-systems,项目名称:marathonv5,代码行数:8,代码来源:TableSelectionDemoX.java

示例12: valueChanged

import javax.swing.event.ListSelectionEvent; //导入方法依赖的package包/类
/**
 * zaznaczenie w tabeli zostalo zmienione
 *
 * @param event
 */
@Override
public void valueChanged(ListSelectionEvent event) {
    if (unitsList == null) {
        return;
    }
    if (event != null && event.getValueIsAdjusting()) {
        return;
    }
    if (event == null) {
        return;
    }

    int returnValue = unitsList.getSelectedIndex();
    if(returnValue < 0){
        return;
    }
    Sense unit = listModel.get(returnValue);
    boolean superMode = workbench.getParam(SUPER_MODE) != null
            && workbench.getParam(SUPER_MODE).equals(SUPER_MODE_VALUE);
    btnDelete.setEnabled(unit != null ? superMode : false);
    btnAddToSyns.setEnabled(unit != null ? (superMode)
            && !LexicalDA.checkIfInAnySynset(unit) : false);

    // powiadomienie zainteresowanych
    unitsList.setEnabled(false);
    listeners.notifyAllListeners(unitsList.getSelectedIndices().length == 1 ? unit : null);
    unitsList.setEnabled(true);
    unitsList.grabFocus();

    SwingUtilities.invokeLater(() -> unitsList.grabFocus());
}
 
开发者ID:CLARIN-PL,项目名称:WordnetLoom,代码行数:37,代码来源:LexicalUnitsViewUI.java

示例13: valueChanged

import javax.swing.event.ListSelectionEvent; //导入方法依赖的package包/类
/**
 * When a key is selected in the table, display the source and translated
 * texts in the right hand panels
 */
public void valueChanged(ListSelectionEvent e) {
  if (e.getValueIsAdjusting())
    return;

  ListSelectionModel lsm = (ListSelectionModel) e.getSource();
  if (lsm.isSelectionEmpty()) {
    return;
  }
  else {
    String key = keys[lsm.getMinSelectionIndex()];
    currentKey = keyTarget.getI18nData().getFullPrefix() + key; //$NON-NLS-1$
  }
}
 
开发者ID:ajmath,项目名称:VASSAL-src,代码行数:18,代码来源:TranslateWindow.java

示例14: valueChanged

import javax.swing.event.ListSelectionEvent; //导入方法依赖的package包/类
@Override
public void valueChanged(ListSelectionEvent e) {
	if (!e.getValueIsAdjusting()) {
		Object id = listComponent.getSelectedValue();
		if (id != null) {
			ObjectVisualizer visualizer = ObjectVisualizerService.getVisualizerForObject(clusterModel);
			visualizer.startVisualization(id);
		}
	}
}
 
开发者ID:transwarpio,项目名称:rapidminer,代码行数:11,代码来源:ClusterModelObjectViewer.java

示例15: valueChanged

import javax.swing.event.ListSelectionEvent; //导入方法依赖的package包/类
/**
 * {@inheritDoc}
 */
@Override
public void valueChanged(ListSelectionEvent e) {
    if (e.getValueIsAdjusting() == false) {
        boolean enabled = isEditable()
            && this.list.getSelectedValue() != null;
        this.editButton.setEnabled(enabled);
        this.addButton.setEnabled(isEditable()
            && getOption().getTemplate() != null);
        this.removeButton.setEnabled(enabled);
        this.upButton.setEnabled(enabled);
        this.downButton.setEnabled(enabled);
    }
}
 
开发者ID:FreeCol,项目名称:freecol,代码行数:17,代码来源:ListOptionUI.java


注:本文中的javax.swing.event.ListSelectionEvent.getValueIsAdjusting方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。