private JComboBox getComboBox_ILC() { if (comboBox_ILC == null) { comboBox_ILC = new JComboBox(); comboBox_ILC.setBounds(91, 119, 88, 21); } ArrayList<InterLayerConnection> ilcMember = interEdges.getInterLayerConnectionMember(); ArrayList<String> targets = new ArrayList<String>(); for (InterLayerConnection ilc : ilcMember) { State[] states = ilc.getInterConnects(); if (states != null) { State target = null; if (states[0].equals(state)) { target = states[1]; } else if (states[1].equals(state)) { target = states[0]; } else { continue; } targets.add(target.getGmlID()); } } if (!targets.isEmpty()) { String[] items = new String[targets.size()]; items = targets.toArray(items); DefaultComboBoxModel model = new DefaultComboBoxModel(items); comboBox_ILC.setModel(model); } return comboBox_ILC; }
private JTextField getTextField_ID() { if (textField_ID == null) { textField_ID = new JTextField(); textField_ID.setBounds(91, 7, 164, 21); textField_ID.setColumns(10); } textField_ID.setText(state.getGmlID()); return textField_ID; }