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