本文整理汇总了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);
}
}
示例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();
}
}
示例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);
}
}
}
}
示例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);
}
}
示例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();
}
示例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));
}