private void showAddType(boolean show) { if (addTypePanel == null) { addTypePanel = new AddTypePanel(); addTypePanel.addUserModeListener( new ActionListener() { public void actionPerformed(ActionEvent e) { showAddUserPanel(true, (mode != Mode.ADD)); addInitiateButtonPanel.setActionButtonText(BUNDLE.getString("Invite")); setEnabledInviteButton(); userMode = true; } }); addTypePanel.addPhoneModeListener( new ActionListener() { public void actionPerformed(ActionEvent e) { showAddPhonePanel(true, (mode != Mode.ADD)); addInitiateButtonPanel.setActionButtonText(BUNDLE.getString("Call")); setEnabledActionButton(); userMode = false; } }); } addTypePanel.setVisible(show); if (show) { add(addTypePanel, BorderLayout.NORTH); } }
public void setPhoneType() { addTypePanel.setPhoneType(); showAddPhonePanel(true, true); addInitiateButtonPanel.setEnabledActionButton(false); addInitiateButtonPanel.setActionButtonText(BUNDLE.getString("Call")); userMode = false; }