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


Java ListSelectionEvent.getSource方法代码示例

本文整理汇总了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();
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:18,代码来源:SelectionModel.java

示例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);
			}
		}
	}
}
 
开发者ID:equella,项目名称:Equella,代码行数:19,代码来源:FilterList.java

示例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();
		}
	}
}
 
开发者ID:drytoastman,项目名称:scorekeeperfrontend,代码行数:18,代码来源:TimeEntry.java

示例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);
        }
    }
}
 
开发者ID:meteoorkip,项目名称:JavaGraph,代码行数:20,代码来源:BoundedModelCheckingDialog.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
@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

示例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();
	}

}
 
开发者ID:iedadata,项目名称:geomapapp,代码行数:15,代码来源:PDB.java

示例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();
	}
}
 
开发者ID:KevinPriv,项目名称:Luyten4Forge,代码行数:16,代码来源:JFontChooser.java

示例9: valueChanged

import javax.swing.event.ListSelectionEvent; //导入方法依赖的package包/类
@Override
public void valueChanged(ListSelectionEvent e)
{
	if( e.getSource() == filterList )
	{
		details.loadUser(filterList.getSelectedValue());
	}
	updateGui();
}
 
开发者ID:equella,项目名称:Equella,代码行数:10,代码来源:UsersTab.java

示例10: valueChanged

import javax.swing.event.ListSelectionEvent; //导入方法依赖的package包/类
@Override
public void valueChanged(ListSelectionEvent e) {
    if (e.getSource() == membersOrderList)
        enableMembersOrderButtons();
    else
        enableVisibilityOrder();
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:8,代码来源:FmtCodeGeneration.java

示例11: valueChanged

import javax.swing.event.ListSelectionEvent; //导入方法依赖的package包/类
@Override
public void valueChanged(ListSelectionEvent e)
{
	if( e.getSource() == list )
	{
		updateButtons();
	}
}
 
开发者ID:equella,项目名称:Equella,代码行数:9,代码来源:SchemaList.java

示例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);
	}
}
 
开发者ID:max6cn,项目名称:jmt,代码行数:16,代码来源:TableSelectionListener.java

示例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);
        }
    }
}
 
开发者ID:HY-ZhengWei,项目名称:HBaseClient,代码行数:16,代码来源:SelectTableInfoListener.java

示例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");
		}
	}
}
 
开发者ID:AitorB,项目名称:POPBL_V,代码行数:14,代码来源:RecordPanel.java

示例15: valueChanged

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


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