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


Java ItemEvent.SELECTED属性代码示例

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


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

示例1: templateComboBoxItemStateChanged

private void templateComboBoxItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_templateComboBoxItemStateChanged
    if (evt.getStateChange() == ItemEvent.SELECTED) {
        Object item = evt.getItem();
        if (item != null && !(item instanceof JdbcUrl)) {
            // This is an item indicating "Create a New Driver", and if
            // we futz with the fields, then the ComboBox wants to make the
            // drop-down invisible and the dialog never gets a chance to
            // get invoked.
            return;
        }

        JdbcUrl jdbcurl = (JdbcUrl) item;
        
        // Field entry mode doesn't make sense if this URL isn't parsed.  change the mode
        // now if appropriate
        if (!jdbcurl.isParseUrl()) {
            updateInputMode(false);
        } else {
            setUpFields();
        }

        updateUrlFromFields();
        fireChange();
    }
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:25,代码来源:NewConnectionPanel.java

示例2: itemStateChanged

public void itemStateChanged(ItemEvent evt) {
	if(evt.getSource().equals(checkBox1)){
     if (evt.getStateChange() == ItemEvent.SELECTED) {
         starter.setDrawNumbersOfWhite(true);
     }
     else {
     	starter.setDrawNumbersOfWhite(false);
     }
	} else if(evt.getSource().equals(checkBox2)){
     if (evt.getStateChange() == ItemEvent.SELECTED) {
         starter.setDrawNumbersOfBlack(true);
     }
     else {
     	starter.setDrawNumbersOfBlack(false);
     }
	}
}
 
开发者ID:etomica,项目名称:etomica,代码行数:17,代码来源:MyApplet.java

示例3: runSetCredentialProfile

private void runSetCredentialProfile(ConnectorPresenter presenter, ItemEvent e) {
    if(e.getStateChange() != ItemEvent.SELECTED)
        return;
    CredentialProfileEntry entry = (CredentialProfileEntry)e.getItem();
    if(entry == null)
        return;
    runOperation(() -> presenter.setCredentialProfile(entry), "Select credential profile: " + entry.toString());
}
 
开发者ID:satr,项目名称:intellij-idea-plugin-connector-for-aws-lambda,代码行数:8,代码来源:ConnectorViewFactory.java

示例4: browserComboItemStateChanged

private void browserComboItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_browserComboItemStateChanged
    if (evt.getStateChange() == ItemEvent.SELECTED) {
        SwingUtilities.invokeLater(() -> {
            checkAndLoadCapabilities();
        });
    }
}
 
开发者ID:CognizantQAHub,项目名称:Cognizant-Intelligent-Test-Scripter,代码行数:7,代码来源:DriverSettings.java

示例5: itemStateChanged

@Override
public void itemStateChanged(final ItemEvent e) {
	if (e.getStateChange() == ItemEvent.SELECTED) {
		this.mView.setStyle((EStyle) e.getItem());
		this.mView.repaint();
	}
}
 
开发者ID:ZabuzaW,项目名称:TreeFlood,代码行数:7,代码来源:LocalStorageExplorationGUIController.java

示例6: itemStateChanged

@Override
public void itemStateChanged(ItemEvent e) {
    boolean state = e.getStateChange() == ItemEvent.SELECTED;
    setAutoSync(state);

    if (syncListener != null) {
        syncListener.updateAutoSyncState(state);
    }
}
 
开发者ID:ruslanys,项目名称:vkmusic,代码行数:9,代码来源:MainFrame.java

示例7: itemStateChanged

@Override
public void itemStateChanged(ItemEvent ie) {
    if (ie.getStateChange() == ItemEvent.SELECTED) {
        showImage();
    } else {
        hideImage();
    }
}
 
开发者ID:CognizantQAHub,项目名称:Cognizant-Intelligent-Test-Scripter,代码行数:8,代码来源:ImageORTable.java

示例8: runSetRegion

private void runSetRegion(ConnectorPresenter presenter, ItemEvent e) {
    if(operationInProgress || setRegionOperationInProgress
            || e.getStateChange() != ItemEvent.SELECTED)
        return;
    RegionEntry entry = (RegionEntry)e.getItem();
    if(entry == null)
        return;
    runOperation(() -> presenter.setRegion(entry), "Select region: " + entry.toString());
}
 
开发者ID:satr,项目名称:intellij-idea-plugin-connector-for-aws-lambda,代码行数:9,代码来源:ConnectorViewFactory.java

示例9: itemStateChanged

public void itemStateChanged(ItemEvent e) {
    if(e.getItem() instanceof Vertex) {
        Vertex v = (Vertex)e.getItem();
        Icon icon = imager.getIcon(v);
        if(icon instanceof LayeredIcon) {
            if(e.getStateChange() == ItemEvent.SELECTED) {
               ((LayeredIcon)icon).add(checked);
            } else {
                ((LayeredIcon)icon).remove(checked);
            }
        }
    }
}
 
开发者ID:dev-cuttlefish,项目名称:cuttlefish,代码行数:13,代码来源:VertexImageShaperDemo.java

示例10: itemStateChanged

@Override
public void itemStateChanged(ItemEvent e) {
	if (e.getStateChange() == ItemEvent.SELECTED) {
		int n = (Integer)e.getItemSelectable().getSelectedObjects()[0];

		this.frame.animation.setN(n);
		this.frame.animation.makeWheelTeeth( n );
		this.frame.bottom.graph.clearData();
		this.frame.bottom.graph.updateChart(this.frame.bottom.graph.data);
		this.frame.updateAnimation();
		this.frame.animation.repaint();

	}
}
 
开发者ID:Tosbert,项目名称:FizeauExperimentSimulation,代码行数:14,代码来源:ToothListener.java

示例11: itemStateChanged

public void itemStateChanged(ItemEvent e) {
   JMenuItem source = (JMenuItem)(e.getSource());
   String s = "Item event detected.\n"
              + "    Event source: " + source.getText()
              + " (an instance of " + source.getClass().getName() + ")\n"
              + "    New state: "
              + ((e.getStateChange() == ItemEvent.SELECTED) ?
                "selected":"unselected") + "\n\n";
   System.err.println(s);
}
 
开发者ID:s-store,项目名称:sstore-soft,代码行数:10,代码来源:DesignerVisualization.java

示例12: handleAction

public void handleAction(final boolean state) {
    final CheckboxMenuItem target = (CheckboxMenuItem)getTarget();
    SunToolkit.executeOnEventHandlerThread(target, new Runnable() {
        public void run() {
            target.setState(state);
        }
    });
    ItemEvent event = new ItemEvent(target, ItemEvent.ITEM_STATE_CHANGED, target.getLabel(), state ? ItemEvent.SELECTED : ItemEvent.DESELECTED);
    SunToolkit.postEvent(SunToolkit.targetToAppContext(getTarget()), event);
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:10,代码来源:CCheckboxMenuItem.java

示例13: ingress_RadioButtonItemStateChanged

private void ingress_RadioButtonItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_ingress_RadioButtonItemStateChanged
   if(evt.getStateChange() == ItemEvent.SELECTED){
       domain_LayeredPane.setVisible(true);
   }else if(evt.getStateChange() == ItemEvent.DESELECTED){
       domain_LayeredPane.setVisible(false);
   }
}
 
开发者ID:jeddict,项目名称:hipee,代码行数:7,代码来源:KubernetesPanel.java

示例14: itemStateChanged

@Override
public void itemStateChanged(ItemEvent e) {
    if (repositoryComboBox.isEnabled()) {
        enableFields();
    }
    if(e.getStateChange() == ItemEvent.SELECTED) {
        Object item = e.getItem();
        if(item instanceof Repository) {
            Repository repo = (Repository) item;
            qs.setRepository(repo);
        }
    }
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:13,代码来源:QuickSearchPanel.java

示例15: btnGenerateItemStateChanged

private void btnGenerateItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_btnGenerateItemStateChanged
    boolean b = evt.getStateChange() == ItemEvent.SELECTED ? true : false;
    if(b) {
        RefactoringModule.setOption(EQUALITY, IntroduceLocalExtensionRefactoring.Equality.GENERATE.ordinal());
        parent.stateChanged(null);
    }
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:7,代码来源:IntroduceLocalExtensionPanel.java


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