當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。