本文整理汇总了Java中javax.swing.event.ListSelectionEvent.getSource方法的典型用法代码示例。如果您正苦于以下问题:Java ListSelectionEvent.getSource方法的具体用法?Java ListSelectionEvent.getSource怎么用?Java ListSelectionEvent.getSource使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类javax.swing.event.ListSelectionEvent
的用法示例。
在下文中一共展示了ListSelectionEvent.getSource方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: onSelectionChange
import javax.swing.event.ListSelectionEvent; //导入方法依赖的package包/类
private void onSelectionChange( ListSelectionEvent e ) {
if( e.getValueIsAdjusting() )
return;
if( ignoreSelectionEvents ) {
return;
}
ignoreSelectionEvents = true;
synchronized( lists ) {
for( SelectionList sl : lists ) {
if( sl.getSelectionModel() == e.getSource() )
continue;
sl.clearSelection();
}
}
ignoreSelectionEvents = false;
changeSupport.fireChange();
}
示例2: valueChanged
import javax.swing.event.ListSelectionEvent; //导入方法依赖的package包/类
@Override
public void valueChanged(ListSelectionEvent e)
{
if( e.getSource() == list )
{
ListSelectionListener[] lsl = listeners.getListeners(ListSelectionListener.class);
if( lsl.length > 0 )
{
ListSelectionEvent e2 = new ListSelectionEvent(this, e.getFirstIndex(), e.getLastIndex(),
e.getValueIsAdjusting());
for( ListSelectionListener l : lsl )
{
l.valueChanged(e2);
}
}
}
}
示例3: valueChanged
import javax.swing.event.ListSelectionEvent; //导入方法依赖的package包/类
@Override
public void valueChanged(ListSelectionEvent e)
{
if (!e.getValueIsAdjusting() && (e.getSource() == timeList))
{
Object o = timeList.getSelectedValue();
if (o instanceof Run)
{
setValues((Run)o);
cones.requestFocusInWindow();
}
else if (o != null) // null is passed in in some instances, do not clear values
{
clearValues();
}
}
}
示例4: valueChanged
import javax.swing.event.ListSelectionEvent; //导入方法依赖的package包/类
@Override
public void valueChanged(ListSelectionEvent e) {
BoundedModelCheckingDialog aDialog = BoundedModelCheckingDialog.this;
if (e.getSource() == aDialog.ruleList) {
if (aDialog.ruleList.getSelectedValuesList()
.size() > 0) {
aDialog.addButton.setEnabled(true);
} else {
aDialog.addButton.setEnabled(false);
}
} else if (e.getSource() == aDialog.selectedRuleList) {
if (aDialog.selectedRuleList.getSelectedValuesList()
.size() > 0) {
aDialog.deleteButton.setEnabled(true);
} else {
aDialog.deleteButton.setEnabled(false);
}
}
}
示例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
@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);
}
}
示例7: valueChanged
import javax.swing.event.ListSelectionEvent; //导入方法依赖的package包/类
public void valueChanged(ListSelectionEvent e) {
if (e.getValueIsAdjusting()){
return;
}
if(e.getSource()==aTable.getSelectionModel()) {
analysisSelectionChanged();
} else if(e.getSource()==sTable.getSelectionModel()) {
sampleSelectionChanged();
} else if(e.getSource()==table.getSelectionModel()) {
stationSelectionChanged();
}
}
示例8: valueChanged
import javax.swing.event.ListSelectionEvent; //导入方法依赖的package包/类
public void valueChanged(ListSelectionEvent e) {
if (e.getValueIsAdjusting() == false) {
JList<?> list = (JList<?>) e.getSource();
String selectedValue = (String) list.getSelectedValue();
String oldValue = textComponent.getText();
textComponent.setText(selectedValue);
if (!oldValue.equalsIgnoreCase(selectedValue)) {
textComponent.selectAll();
textComponent.requestFocus();
}
updateSampleFont();
}
}
示例9: valueChanged
import javax.swing.event.ListSelectionEvent; //导入方法依赖的package包/类
@Override
public void valueChanged(ListSelectionEvent e)
{
if( e.getSource() == filterList )
{
details.loadUser(filterList.getSelectedValue());
}
updateGui();
}
示例10: valueChanged
import javax.swing.event.ListSelectionEvent; //导入方法依赖的package包/类
@Override
public void valueChanged(ListSelectionEvent e) {
if (e.getSource() == membersOrderList)
enableMembersOrderButtons();
else
enableVisibilityOrder();
}
示例11: valueChanged
import javax.swing.event.ListSelectionEvent; //导入方法依赖的package包/类
@Override
public void valueChanged(ListSelectionEvent e)
{
if( e.getSource() == list )
{
updateButtons();
}
}
示例12: valueChanged
import javax.swing.event.ListSelectionEvent; //导入方法依赖的package包/类
/**
* row selection events
*/
public final void valueChanged(ListSelectionEvent e) {
if (e.getValueIsAdjusting()) {
return;
}
Object source = e.getSource();
if (source == rowSelectionModel) {
selectionChanged(table, e, TYPE_ROW);
}
if (source == colSelectionModel) {
selectionChanged(table, e, TYPE_COLUMN);
}
}
示例13: valueChanged
import javax.swing.event.ListSelectionEvent; //导入方法依赖的package包/类
@SuppressWarnings("unchecked")
@Override
public void valueChanged(ListSelectionEvent e)
{
JList<String> v_Tables = (JList<String>)e.getSource();
String v_TableName = v_Tables.getSelectedValue();
if ( !JavaHelp.isNull(v_TableName) )
{
if ( !v_TableName.equals(this.getTableName()) )
{
this.getAppFrame().setTableName(v_TableName);
}
}
}
示例14: valueChanged
import javax.swing.event.ListSelectionEvent; //导入方法依赖的package包/类
@Override
public void valueChanged(ListSelectionEvent e) {
if (!e.getValueIsAdjusting()) {
JList<?> list = (JList<?>) e.getSource();
if (!list.isSelectionEmpty()) {
selectedRecord = (Record) list.getSelectedValue();
References.CHRONOMETER.setChronometerValue(String.format("%02d : %02d . %02d",
selectedRecord.getMinutes(), selectedRecord.getSeconds(), selectedRecord.getHundreths()));
} else {
References.CHRONOMETER.setChronometerValue("00 : 00 . 00");
}
}
}
示例15: valueChanged
import javax.swing.event.ListSelectionEvent; //导入方法依赖的package包/类
@Override
public void valueChanged (ListSelectionEvent e) {
if (!e.getValueIsAdjusting() && e.getSource() == panel.lstBranches) {
selectedBranchChanged();
}
}