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


Java ItemEvent.getItemSelectable方法代码示例

本文整理汇总了Java中java.awt.event.ItemEvent.getItemSelectable方法的典型用法代码示例。如果您正苦于以下问题:Java ItemEvent.getItemSelectable方法的具体用法?Java ItemEvent.getItemSelectable怎么用?Java ItemEvent.getItemSelectable使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在java.awt.event.ItemEvent的用法示例。


在下文中一共展示了ItemEvent.getItemSelectable方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: itemStateChanged

import java.awt.event.ItemEvent; //导入方法依赖的package包/类
public void itemStateChanged(ItemEvent e) {
	Object source = e.getItemSelectable();
	if ( source == imageCB && imageCB.isSelected() ) {
		segyCB.setSelected(false);
	}
	else if ( source == imageFullCB && imageFullCB.isSelected() ) {
		segyCB.setSelected(false);
	}
	else if ( source == segyCB && segyCB.isSelected() ) {
		imageCB.setSelected(false);
		imageFullCB.setSelected(false);
		navCB.setSelected(false);
	}
	else if ( source == navCB && navCB.isSelected() ) {
		segyCB.setSelected(false);
	}
}
 
开发者ID:iedadata,项目名称:geomapapp,代码行数:18,代码来源:XMImage.java

示例2: itemStateChanged

import java.awt.event.ItemEvent; //导入方法依赖的package包/类
@Override
public void itemStateChanged(ItemEvent e) {
    ItemSelectable is = e.getItemSelectable();
    if (is == matchCase) {
        matchCaseChanged();
    } else if (is == textToFindType) {
        regexpChanged();
    }
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:10,代码来源:BasicSearchForm.java

示例3: itemStateChanged

import java.awt.event.ItemEvent; //导入方法依赖的package包/类
@Override
public void itemStateChanged(ItemEvent arg0) {
	if (arg0.getItemSelectable() instanceof JCheckBox) {
		JCheckBox box = (JCheckBox) arg0.getItemSelectable();

		if (arg0.getStateChange() == ItemEvent.SELECTED) {
			if (box.getText().contains("React")) {
				this.controller.setReactAsBot(true);

			} else if (box.getText().contains("GeniusMatti")) {
				this.controller.setTrollMatti(true);

			} else if (box.getText().contains("Swaul")) {
				this.controller.setTrollPaul(true);

			} else if (box.getText().contains("Log")) {
				this.controller.setLogToFile(true);

			}
		} else if (arg0.getStateChange() == ItemEvent.DESELECTED) {
			if (box.getText().contains("React")) {
				this.controller.setReactAsBot(false);

			} else if (box.getText().contains("GeniusMatti")) {
				this.controller.setTrollMatti(false);

			} else if (box.getText().contains("Swaul")) {
				this.controller.setTrollPaul(false);

			} else if (box.getText().contains("Log")) {
				this.controller.setLogToFile(false);

			}
		}

	}

}
 
开发者ID:Ativelox,项目名称:TwitchBot,代码行数:39,代码来源:CheckListener.java

示例4: itemStateChanged

import java.awt.event.ItemEvent; //导入方法依赖的package包/类
/**
 * Method declaration
 *
 *
 * @param e
 */
public void itemStateChanged(ItemEvent e) {

    ItemSelectable item = e.getItemSelectable();

    if (item == lTable) {
        if (iSelectionStep == SELECT_SOURCE_TABLES) {
            String table    = lTable.getSelectedItem();
            int    selected = ((Integer) e.getItem()).intValue();

            for (int i = 0; i < tTable.size(); i++) {
                TransferTable t = (TransferTable) tTable.elementAt(i);

                if (t == null) {
                    continue;
                }

                if (i == selected) {
                    saveTable();
                    displayTable(t);
                    updateEnabled(true);
                }
            }
        }
    } else {

        // it must be a checkbox
        saveTable();
        updateEnabled(true);
    }
}
 
开发者ID:tiweGH,项目名称:OpenDiabetes,代码行数:37,代码来源:Transfer.java

示例5: itemStateChanged

import java.awt.event.ItemEvent; //导入方法依赖的package包/类
@Override
public void itemStateChanged(ItemEvent e){
	Object source = e.getItemSelectable();
	int state = e.getStateChange();
	PSP cuPSP = CurrentProject.getPSP();
	if(source == pltipRB){
		if(state==ItemEvent.SELECTED){
			createTask("plTaskID", "Planning", "plTaskbol");
		}
		else{
			cuPSP.settipAttr("plTaskbol", "false");
		}
		
	} else if( source== dtipRB){
		if(state==ItemEvent.SELECTED){
			createTask("dTaskID", "Design", "dTaskbol");
		}
		else{
			cuPSP.settipAttr("dTaskbol", "false");
		}
		 
	} else if(source == ctipRB){
		if(state==ItemEvent.SELECTED){
			createTask("cTaskID", "Code", "cTaskbol");
		}
		else{
			cuPSP.settipAttr("cTaskbol", "false");
		}
		
	} else if(source == crtipRB){
		if(state==ItemEvent.SELECTED){
			createTask("crTaskID", "Code Review", "crTaskbol");
		}
		else{
			cuPSP.settipAttr("crTaskbol", "false");
		}
		
	} else if(source == cptipRB){
		if(state==ItemEvent.SELECTED){
			createTask("cpTaskID", "Compile", "cpTaskbol");
		}
		else{
			cuPSP.settipAttr("cpTaskbol", "false");
		}
		 
	} else if(source == ttipRB){
		if(state==ItemEvent.SELECTED){
			createTask("tTaskID", "Test", "tTaskbol");
		}
		else{
			cuPSP.settipAttr("tTaskbol", "false");
		}
		
	} else if(source == pmtipRB){
		if(state==ItemEvent.SELECTED){
			createTask("pmTaskID", "PostMortem", "pmTaskbol");
		}
		else{
			cuPSP.settipAttr("pmTaskbol", "false");
		}
		 
	}
	parent.tasksPanel.taskTable.tableChanged();
	loadPSPValues();
}
 
开发者ID:ser316asu,项目名称:Dahlem_SER316,代码行数:66,代码来源:PSPTrackingPanel.java

示例6: itemStateChanged

import java.awt.event.ItemEvent; //导入方法依赖的package包/类
@Override
public void itemStateChanged(ItemEvent e) {

	JCheckBox element = (JCheckBox)e.getItemSelectable();
	
	element.setForeground(element.isSelected() ? new Color(0,110,198,255) : new Color(169,192,210,255));
	
	lblAddShortcutTo.setForeground(csdesktop.isSelected() || csquickstart.isSelected() || csprogrammenu.isSelected() ? 
			new Color(0,110,198,255) : new Color(169,192,210,255));
	
	
}
 
开发者ID:davovoid,项目名称:faitic-checker,代码行数:13,代码来源:FirstStart.java


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