Example usage for java.awt.event ItemEvent getStateChange

List of usage examples for java.awt.event ItemEvent getStateChange

Introduction

In this page you can find the example usage for java.awt.event ItemEvent getStateChange.

Prototype

public int getStateChange() 

Source Link

Document

Returns the type of state change (selected or deselected).

Usage

From source file:com.osparking.osparking.Settings_System.java

private void GateBar2_connTypeCBoxItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_GateBar2_connTypeCBoxItemStateChanged
    if (evt.getStateChange() == ItemEvent.SELECTED) {
        setButtonEnabled_If_ConnTypeChanged(2, GateBar);
        changeTCP_VS_COM(GateBar, 2);/*from w w  w .  ja  va2 s  . c o m*/
    }
}

From source file:com.osparking.osparking.Settings_System.java

private void GateBar3_connTypeCBoxItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_GateBar3_connTypeCBoxItemStateChanged
    if (evt.getStateChange() == ItemEvent.SELECTED) {
        setButtonEnabled_If_ConnTypeChanged(3, GateBar);
        changeTCP_VS_COM(GateBar, 3);//w  w w  .  j  a v a2  s. c o  m
    }
}

From source file:com.osparking.osparking.Settings_System.java

private void GateBar4_connTypeCBoxItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_GateBar4_connTypeCBoxItemStateChanged
    if (evt.getStateChange() == ItemEvent.SELECTED) {
        setButtonEnabled_If_ConnTypeChanged(4, GateBar);
        changeTCP_VS_COM(GateBar, 4);/* w  w  w .j  av a2  s.c o  m*/
    }
}

From source file:com.osparking.osparking.Settings_System.java

private void BlinkingComboBoxItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_BlinkingComboBoxItemStateChanged
    if (evt.getStateChange() == ItemEvent.SELECTED) {
        String newBlinkCycleStr = ((String) BlinkingComboBox.getSelectedItem()).replace(",", "");

        if (Integer.parseInt(newBlinkCycleStr) == EBD_blinkCycle) {
            changedControls.remove(BlinkingComboBox);
        } else {// w w  w. jav  a 2  s . co m
            changedControls.add(BlinkingComboBox);
        }
    }
}

From source file:com.osparking.osparking.Settings_System.java

private void GateCountComboBoxItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_GateCountComboBoxItemStateChanged
    if (evt.getStateChange() == ItemEvent.SELECTED) {
        String gateCountStr = (String) GateCountComboBox.getSelectedItem();

        if (Integer.parseInt(gateCountStr) == gateCount) {
            changedControls.remove(GateCountComboBox);
        } else {/* w  ww.  j av a 2  s . co m*/
            changedControls.add(GateCountComboBox);
        }
    }
}

From source file:com.osparking.osparking.Settings_System.java

private void ImageDurationCBoxItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_ImageDurationCBoxItemStateChanged
    if (evt.getStateChange() == ItemEvent.SELECTED) {
        ConvComboBoxItem item = (ConvComboBoxItem) ImageDurationCBox.getSelectedItem();

        if ((Integer) (item.getKeyValue()) == maxMaintainDate) {
            changedControls.remove(ImageDurationCBox);
        } else {/*from  w  w w.j a v a 2s . c om*/
            changedControls.add(ImageDurationCBox);
        }
    }
}

From source file:com.osparking.osparking.Settings_System.java

private void Camera1_TypeCBoxItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_Camera1_TypeCBoxItemStateChanged
    if (evt.getStateChange() == ItemEvent.SELECTED) {
        setButtonEnabled_If_DeviceTypeChanged(1, Camera);
        CameraType camType = (CameraType) (Camera1_TypeCBox.getSelectedItem());

        if (camType == CarButton) {
            Camera1_IP_TextField.setEnabled(false);
            Camera1_Port_TextField.setEnabled(false);
        } else {/*from w  w  w .j av a2  s. c  o m*/
            Camera1_IP_TextField.setEnabled(true);
            Camera1_Port_TextField.setEnabled(true);
        }
        setPortNumber(Camera, camType, (byte) 1, Camera1_Port_TextField);
    }
}

From source file:com.osparking.osparking.Settings_System.java

private void PWStrengthChoiceComboBoxItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_PWStrengthChoiceComboBoxItemStateChanged
    if (evt.getStateChange() == ItemEvent.SELECTED) {
        if (PWStrengthChoiceComboBox.getSelectedIndex() == pwStrengthLevel) {
            changedControls.remove(PWStrengthChoiceComboBox);
        } else {// w  w  w . j  a  va2s .  co m
            changedControls.add(PWStrengthChoiceComboBox);
        }
    }
}

From source file:com.osparking.osparking.Settings_System.java

private void OptnLoggingLevelComboBoxItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_OptnLoggingLevelComboBoxItemStateChanged
    if (evt.getStateChange() == ItemEvent.SELECTED) {
        if (OptnLoggingLevelComboBox.getSelectedIndex() == opLoggingIndex) {
            changedControls.remove(OptnLoggingLevelComboBox);
        } else {/*  w w w  .j a va  2  s . co  m*/
            changedControls.add(OptnLoggingLevelComboBox);
        }
    }
}

From source file:com.osparking.osparking.Settings_System.java

private void MessageMaxLineComboBoxItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_MessageMaxLineComboBoxItemStateChanged
    if (evt.getStateChange() == ItemEvent.SELECTED) {
        short lines = (short) Integer.parseInt((String) MessageMaxLineComboBox.getSelectedItem());

        if (lines == maxMessageLines) {
            changedControls.remove(MessageMaxLineComboBox);
        } else {/*  w  w  w.j a  v a 2 s .c o  m*/
            changedControls.add(MessageMaxLineComboBox);
        }
    }
}