@Override public void itemStateChanged(ItemEvent ie) { int statechange = ie.getStateChange(); Component source = (Component) ie.getSource(); if (statechange == ItemEvent.SELECTED) { JRadioButton button = (JRadioButton) source; selectedCluster = button.getText(); log.info("Selected cluster: {}", selectedCluster); clearConfiguration(); if (selectedCluster.equals(InstallerConstants.CLUSTER_CONFIG_NEW_CONFIG_LABEL)) { isNewConfig = true; disableNodeIdPanel(); if (!meetMinimumHwRequirement()) { log.warn("Node does not meet minimum H/W requirement for Config"); } } else { // check if selected node count is the same as local one if has local config if (!isReConfig() || isNodeCountSame(selectedCluster)) { isNewConfig = false; getConfiguration(selectedCluster); isSameClusterType = true; if (!hasSameHardware()) { log.info( "Node does not have the same H/W requirement as selected cluster {}", selectedCluster); } } else { isSameClusterType = false; selectedConfig = null; selectedCluster = null; } } } }
@Override public void itemStateChanged(ItemEvent ie) { int statechange = ie.getStateChange(); Component source = (Component) ie.getSource(); if (statechange == ItemEvent.SELECTED) { JRadioButton button = (JRadioButton) source; nodeId = button.getText(); } }