本文整理汇总了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);
}
}
}
}
示例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();
}
示例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();
}
示例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);
}
示例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);
}
}
示例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;
}
}
示例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());
}
}
示例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();
}
}
}
示例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);
}
}
示例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);
}
}
示例11: valueChanged
import javax.swing.event.ListSelectionEvent; //导入方法依赖的package包/类
public void valueChanged(ListSelectionEvent event) {
if (event.getValueIsAdjusting()) {
return;
}
output.append("ROW SELECTION EVENT. ");
outputSelection();
}
示例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());
}
示例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$
}
}
示例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);
}
}
}
示例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);
}
}