Removes unnecessary classes and fields, fixes warnings.

cusax-fix
Lyubomir Marinov 18 years ago
parent 5ac15bb503
commit e83fd66429

@ -227,16 +227,15 @@ private class ButtonRepaintCallback implements FadeTrackerCallback
{
public void fadeEnded(FadeKind arg0)
{
SwingUtilities.invokeLater(new Runnable()
{
public void run()
{
SIPCommButton.this.repaint();
}
});
repaintLater();
}
public void fadePerformed(FadeKind arg0, float arg1)
{
repaintLater();
}
private void repaintLater()
{
SwingUtilities.invokeLater(new Runnable()
{

@ -29,7 +29,7 @@ public class SIPCommToggleButton
private Image iconImage;
private Image pressedImage;
private final Image pressedImage;
/**
* Creates a button with custom background image, rollover image and
@ -69,6 +69,7 @@ public SIPCommToggleButton(Image bgImage, Image rolloverImage)
{
this.bgImage = bgImage;
this.bgRolloverImage = rolloverImage;
this.pressedImage = null;
this.setPreferredSize(new Dimension(this.bgImage.getWidth(null),
this.bgImage.getHeight(null)));

@ -15,8 +15,8 @@
import javax.swing.border.*;
import net.java.sip.communicator.impl.gui.*;
import net.java.sip.communicator.service.gui.*;
import net.java.sip.communicator.service.resources.*;
import net.java.sip.communicator.util.swing.*;
/**
@ -33,15 +33,6 @@ public class Wizard
WizardContainer,
PropertyChangeListener
{
/**
* The identifier of the summary wizard page.
*/
String SUMMARY_PAGE_IDENTIFIER = "SUMMARY";
/**
* The identifier of the default wizard page.
*/
String DEFAULT_PAGE_IDENTIFIER = "DEFAULT";
/**
* Indicates that the 'Finish' button was pressed to close the dialog.
@ -107,7 +98,7 @@ public class Wizard
static Icon CANCEL_ICON;
private WizardModel wizardModel;
private final WizardModel wizardModel;
private WizardController wizardController;
@ -168,7 +159,7 @@ public JDialog getDialog()
}
/**
* Convienence method that displays a modal wizard dialog and blocks until
* Convenience method that displays a modal wizard dialog and blocks until
* the dialog has completed.
*
* @param modal whether to show a modal dialog
@ -243,10 +234,7 @@ public void unregisterWizardPage(Object id)
*/
public boolean containsPage(Object id)
{
if (wizardModel.getWizardPage(id) != null)
return true;
else
return false;
return (wizardModel.getWizardPage(id) != null);
}
/**
@ -494,9 +482,10 @@ private void initComponents()
buttonPanel.add(buttonBox, java.awt.BorderLayout.EAST);
this.getContentPane().add(buttonPanel, java.awt.BorderLayout.SOUTH);
this.getContentPane().add(cardPanel, java.awt.BorderLayout.CENTER);
this.getContentPane().add(wizardIconPanel, java.awt.BorderLayout.WEST);
java.awt.Container contentPane = getContentPane();
contentPane.add(buttonPanel, java.awt.BorderLayout.SOUTH);
contentPane.add(cardPanel, java.awt.BorderLayout.CENTER);
contentPane.add(wizardIconPanel, java.awt.BorderLayout.WEST);
}
/**
@ -511,17 +500,13 @@ public void windowClosing(WindowEvent e)
this.close(Wizard.CANCEL_RETURN_CODE);
}
static
{
BACK_TEXT
= GuiActivator.getResources().getI18NString("service.gui.PREVIOUS");
NEXT_TEXT
= GuiActivator.getResources().getI18NString("service.gui.NEXT");
CANCEL_TEXT
= GuiActivator.getResources().getI18NString("service.gui.CANCEL");
FINISH_TEXT
= GuiActivator.getResources().getI18NString("service.gui.FINISH");
}
static {
ResourceManagementService resources = GuiActivator.getResources();
BACK_TEXT = resources.getI18NString("service.gui.PREVIOUS");
NEXT_TEXT = resources.getI18NString("service.gui.NEXT");
CANCEL_TEXT = resources.getI18NString("service.gui.CANCEL");
FINISH_TEXT = resources.getI18NString("service.gui.FINISH");
}
public BufferedImage getWizzardIcon()
{

@ -11,7 +11,7 @@
public class WizardEvent
extends EventObject
{
private int eventCode = -1;
private final int eventCode;
/**
* Indicates that the wizard triggering this event has finished
@ -31,9 +31,9 @@ public class WizardEvent
public static final int ERROR = 3;
/**
* Creates a new WizardEvent accoriding to the given source and event code.
* Creates a new WizardEvent according to the given source and event code.
*
* @param source the source where this event occured
* @param source the source where this event occurred
* @param eventCode the event code : SUCCESS or ERROR
*/
public WizardEvent(Object source, int eventCode) {

@ -28,7 +28,9 @@ public static class RoundBorder
extends AbstractBorder
implements UIResource
{
private static final Insets insets = new Insets(2, 2, 2, 2);
private static final long serialVersionUID = 0L;
private static final Insets insets = new Insets(2, 2, 2, 2);
public void paintBorder(Component c, Graphics g, int x, int y, int w,
int h)
@ -82,7 +84,9 @@ public static class BoldRoundBorder
extends AbstractBorder
implements UIResource
{
private static final Insets insets = new Insets(2, 2, 2, 2);
private static final long serialVersionUID = 0L;
private static final Insets insets = new Insets(2, 2, 2, 2);
public void paintBorder(Component c, Graphics g, int x, int y, int w,
int h)
@ -145,7 +149,9 @@ public static Border getTextFieldBorder()
public static class TextFieldBorder
extends RoundBorder
{
public void paintBorder(Component c,
private static final long serialVersionUID = 0L;
public void paintBorder(Component c,
Graphics g,
int x,
int y,

@ -35,7 +35,9 @@ protected ComboPopup createPopup()
private class SIPCommComboPopup extends BasicComboPopup
{
public SIPCommComboPopup(JComboBox combo)
private static final long serialVersionUID = 0L;
public SIPCommComboPopup(JComboBox combo)
{
super(combo);
}

@ -23,8 +23,6 @@ public class SIPCommComboBoxEditor extends MetalComboBoxEditor {
public SIPCommComboBoxEditor()
{
super();
editor.setBorder(new EditorBorder());
// enables delete button
@ -35,12 +33,12 @@ public SIPCommComboBoxEditor()
}
}
protected static Insets editorBorderInsets
protected static final Insets editorBorderInsets
= new Insets(2, 2, 2, 0);
private static final Insets SAFE_EDITOR_BORDER_INSETS
= new Insets(2, 2, 2, 0);
class EditorBorder extends AbstractBorder {
private class EditorBorder extends AbstractBorder {
public void paintBorder(Component c, Graphics g,
int x, int y, int w, int h) {
Graphics2D g2d = (Graphics2D)g;

@ -17,9 +17,12 @@
*
* @author Yana Stamcheva
*/
public class SIPCommLookAndFeel extends MetalLookAndFeel {
public class SIPCommLookAndFeel
extends MetalLookAndFeel
{
private static final long serialVersionUID = 0L;
public boolean isNativeLookAndFeel() {
public boolean isNativeLookAndFeel() {
return false;
}

@ -23,9 +23,9 @@
*/
class SIPCommSplitPaneDivider extends BasicSplitPaneDivider {
private BufferedImage horizontalDivider
private final BufferedImage horizontalDivider
= ImageLoader.getImage(ImageLoader.SPLITPANE_HORIZONTAL);
private BufferedImage verticalDivider
private final BufferedImage verticalDivider
= ImageLoader.getImage(ImageLoader.SPLITPANE_VERTICAL);
public SIPCommSplitPaneDivider(BasicSplitPaneUI ui) {

@ -27,10 +27,6 @@ public class SIPCommTextFieldUI
{
private boolean mouseOver = false;
private boolean mousePressed = false;
private int buttonState;
private static int BUTTON_GAP = 5;
private Image deleteButtonImg;

@ -36,7 +36,7 @@ public class AccountRegSummaryPage
private final JPanel valuesPanel
= new TransparentPanel(new GridLayout(0, 1, 10, 10));
private AccountRegWizardContainerImpl wizardContainer;
private final AccountRegWizardContainerImpl wizardContainer;
/**
* Creates an <tt>AccountRegSummaryPage</tt>.

@ -35,11 +35,11 @@ public class AccountRegWizardContainerImpl
private static final Logger logger =
Logger.getLogger(AccountRegWizardContainerImpl.class);
private AccountRegSummaryPage summaryPage;
private final AccountRegSummaryPage summaryPage;
private AccountRegistrationWizard currentWizard;
ConfigurationService configService = GuiActivator.getConfigurationService();
private final ConfigurationService configService = GuiActivator.getConfigurationService();
private final Map<String, AccountRegistrationWizard> registeredWizards =
new Hashtable<String, AccountRegistrationWizard>();

@ -25,7 +25,7 @@ public class NewAccountDialog
extends SIPCommDialog
implements ActionListener
{
private Logger logger = Logger.getLogger(NewAccountDialog.class);
private final Logger logger = Logger.getLogger(NewAccountDialog.class);
private TransparentPanel mainPanel
= new TransparentPanel(new BorderLayout(5, 5));
@ -184,11 +184,13 @@ public int compare(AccountRegistrationWizard arg0,
}
}
private class NetworkListCellRenderer
private static class NetworkListCellRenderer
extends JLabel
implements ListCellRenderer
{
public NetworkListCellRenderer()
private static final long serialVersionUID = 0L;
public NetworkListCellRenderer()
{
this.setOpaque(true);
@ -275,9 +277,6 @@ protected void close(boolean isEscaped)
{
}
/**
*
*/
public void actionPerformed(ActionEvent event)
{
JButton sourceButton = (JButton) event.getSource();

@ -23,7 +23,9 @@
public class HoldButton
extends SIPCommToggleButton
{
/**
private static final long serialVersionUID = 0L;
/**
* Initializes a new <tt>HoldButton</tt> instance which is to put a specific
* <tt>CallParticipant</tt> on/off hold.
*

@ -23,7 +23,9 @@
public class MuteButton
extends SIPCommToggleButton
{
/**
private static final long serialVersionUID = 0L;
/**
* Initializes a new <tt>MuteButton</tt> instance which is to mute the audio
* stream to a specific <tt>CallParticipant</tt>.
*

@ -37,7 +37,7 @@ public class ReceivedCallDialog
private static final int HGAP = 5;
private Call incomingCall;
private final Call incomingCall;
/**
* Creates a <tt>ReceivedCallDialog</tt> by specifying the associated call.
@ -46,8 +46,6 @@ public class ReceivedCallDialog
*/
public ReceivedCallDialog(Call call)
{
super();
this.incomingCall = call;
this.setUndecorated(true);

@ -4,7 +4,6 @@
* Distributable under LGPL license.
* See terms of license at gnu.org.
*/
package net.java.sip.communicator.impl.gui.main.chat;
import java.util.*;
@ -18,8 +17,9 @@
* @author Yana Stamcheva
*/
public class ChatBuffer extends ArrayList {
private static final long serialVersionUID = 0L;
/**
/**
* Creates an instance of <tt>ChatBuffer</tt>. The buffer
* is initialized with the CHAT_BUFFER_SIZE constant in the
* <tt>Constants</tt> class.
@ -33,7 +33,6 @@ public ChatBuffer() {
* reached.
*/
private void recalculateBuffer() {
if (this.size() >= Constants.CHAT_BUFFER_SIZE) {
this.remove(0);
}

Loading…
Cancel
Save