From 7332d1d840ccc308064f86113ef646ca4a973bd8 Mon Sep 17 00:00:00 2001 From: Emil Ivov Date: Fri, 28 Jul 2006 13:49:53 +0000 Subject: [PATCH] Renamed PP Factory's getAccountUserID to getUserID --- .../AccountsConfigurationForm.java | 84 +++++++++---------- 1 file changed, 42 insertions(+), 42 deletions(-) diff --git a/src/net/java/sip/communicator/impl/gui/main/configforms/AccountsConfigurationForm.java b/src/net/java/sip/communicator/impl/gui/main/configforms/AccountsConfigurationForm.java index 607541e22..b9c07debf 100644 --- a/src/net/java/sip/communicator/impl/gui/main/configforms/AccountsConfigurationForm.java +++ b/src/net/java/sip/communicator/impl/gui/main/configforms/AccountsConfigurationForm.java @@ -44,48 +44,48 @@ /** * The AccountsConfigurationForm is the form where the user * could create, modify or delete an account. - * + * * @author Yana Stamcheva */ -public class AccountsConfigurationForm extends JPanel - implements ConfigurationForm, - ActionListener, +public class AccountsConfigurationForm extends JPanel + implements ConfigurationForm, + ActionListener, ServiceListener { private JScrollPane tablePane = new JScrollPane(); - + private JTable accountsTable = new JTable(); - + private JPanel rightPanel = new JPanel(new BorderLayout()); - + private JPanel buttonsPanel = new JPanel(new GridLayout(0, 1, 8, 8)); - + private JButton newButton = new JButton(Messages.getString("new")); - + private JButton modifyButton = new JButton(Messages.getString("modify")); - + private JButton removeButton = new JButton(Messages.getString("remove")); - + private ExtendedTableModel tableModel = new ExtendedTableModel(); - + private MainFrame mainFrame; - + /** * Creates an instance of AccountsConfigurationForm. - * + * * @param mainFrame the main application window */ public AccountsConfigurationForm(MainFrame mainFrame) { super(new BorderLayout()); - + this.mainFrame = mainFrame; - + GuiActivator.bundleContext.addServiceListener(this); - + this.tableInit(); - + this.buttonsPanelInit(); - + this.add(tablePane, BorderLayout.CENTER); this.add(rightPanel, BorderLayout.EAST); } @@ -97,42 +97,42 @@ private void buttonsPanelInit() { this.newButton.addActionListener(this); this.modifyButton.addActionListener(this); this.removeButton.addActionListener(this); - + this.buttonsPanel.add(newButton); this.buttonsPanel.add(modifyButton); this.buttonsPanel.add(removeButton); - + this.rightPanel.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5)); this.rightPanel.add(buttonsPanel, BorderLayout.NORTH); } - + /** * Initializes the accounts table. */ private void tableInit() { - + accountsTable.setRowHeight(22); accountsTable.setSelectionMode( ListSelectionModel.SINGLE_SELECTION); - accountsTable.setSelectionModel(new DefaultListSelectionModel()); + accountsTable.setSelectionModel(new DefaultListSelectionModel()); accountsTable.setShowHorizontalLines(false); accountsTable.setShowVerticalLines(false); accountsTable.setModel(tableModel); - + tableModel.addColumn("id"); tableModel.addColumn(Messages.getString("protocol")); tableModel.addColumn(Messages.getString("account")); - - TableColumnModel columnModel = accountsTable.getColumnModel(); + + TableColumnModel columnModel = accountsTable.getColumnModel(); columnModel.removeColumn(columnModel.getColumn(0)); columnModel.getColumn(0) .setCellRenderer(new LabelTableCellRenderer()); columnModel.getColumn(1) .setCellRenderer(new LabelTableCellRenderer()); - + this.tablePane.getViewport().add(accountsTable); } - + /** * Returns the title of this configuration form. * @return the title of this configuration form. @@ -147,7 +147,7 @@ public String getTitle() { */ public byte[] getIcon() { return ImageLoader.getImageInBytes( - ImageLoader.QUICK_MENU_ADD_ICON); + ImageLoader.QUICK_MENU_ADD_ICON); } /** @@ -165,29 +165,29 @@ public Object getForm() { */ public void actionPerformed(ActionEvent e) { JButton sourceButton = (JButton)e.getSource(); - + if (sourceButton.equals(newButton)) { AccountRegWizardContainerImpl wizard = (AccountRegWizardContainerImpl)GuiActivator.getUIService() .getAccountRegWizardContainer(); - + wizard.setTitle( Messages.getString("accountRegistrationWizard")); - + wizard.setLocation( - Toolkit.getDefaultToolkit().getScreenSize().width/2 + Toolkit.getDefaultToolkit().getScreenSize().width/2 - 250, - Toolkit.getDefaultToolkit().getScreenSize().height/2 + Toolkit.getDefaultToolkit().getScreenSize().height/2 - 100 ); - + wizard.showModalDialog(); } else if (sourceButton.equals(modifyButton)) { - + } else { - + } } @@ -201,14 +201,14 @@ else if (sourceButton.equals(modifyButton)) { public void serviceChanged(ServiceEvent event) { Object service = GuiActivator.bundleContext .getService(event.getServiceReference()); - + // we don't care if the source service is not a protocol provider if (! (service instanceof ProtocolProviderService)) { return; } ProtocolProviderService pps = (ProtocolProviderService) service; - + if (event.getType() == ServiceEvent.REGISTERED) { String pName = pps.getProtocolName(); @@ -216,9 +216,9 @@ public void serviceChanged(ServiceEvent event) { protocolLabel.setText(pName); protocolLabel.setIcon( new ImageIcon(Constants.getProtocolIcon(pName))); - + tableModel.addRow(new Object[]{pps, protocolLabel, - pps.getAccountID().getAccountUserID()}); + pps.getAccountID().getUserID()}); } else if (event.getType() == ServiceEvent.UNREGISTERING) {