本文整理匯總了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();
}
}