aboutsummaryrefslogtreecommitdiffstats
path: root/java/com/tigervnc
diff options
context:
space:
mode:
authorBrian Hinz <bphinz@users.sourceforge.net>2011-10-09 17:31:11 +0000
committerBrian Hinz <bphinz@users.sourceforge.net>2011-10-09 17:31:11 +0000
commit6a42a371e4b82f30f14cc0eb4ff0eb6c134ba369 (patch)
tree1943fd35668d871eef41e7065ffcd047fce7d76e /java/com/tigervnc
parent38443b8cef8e7d084fe97c60204f075b322a1d15 (diff)
downloadtigervnc-6a42a371e4b82f30f14cc0eb4ff0eb6c134ba369.tar.gz
tigervnc-6a42a371e4b82f30f14cc0eb4ff0eb6c134ba369.zip
cleaned up unused local variables, unnecessary package imports, and fixed some methods and variables that were incorrectly defined as static
git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@4717 3789f03b-4d11-0410-bbf8-ca57d06f2519
Diffstat (limited to 'java/com/tigervnc')
-rw-r--r--java/com/tigervnc/rfb/CSecurityIdent.java3
-rw-r--r--java/com/tigervnc/rfb/CSecurityTLS.java2
-rw-r--r--java/com/tigervnc/rfb/Cursor.java2
-rw-r--r--java/com/tigervnc/rfb/RawDecoder.java1
-rw-r--r--java/com/tigervnc/rfb/Screen.java8
-rw-r--r--java/com/tigervnc/rfb/ScreenSet.java10
-rw-r--r--java/com/tigervnc/vncviewer/CConn.java12
-rw-r--r--java/com/tigervnc/vncviewer/DesktopWindow.java1
-rw-r--r--java/com/tigervnc/vncviewer/Dialog.java5
-rw-r--r--java/com/tigervnc/vncviewer/F8Menu.java1
-rw-r--r--java/com/tigervnc/vncviewer/OptionsDialog.java5
-rw-r--r--java/com/tigervnc/vncviewer/PasswdDialog.java2
-rw-r--r--java/com/tigervnc/vncviewer/PixelBufferImage.java2
-rw-r--r--java/com/tigervnc/vncviewer/ServerDialog.java4
-rw-r--r--java/com/tigervnc/vncviewer/VncViewer.java4
15 files changed, 9 insertions, 53 deletions
diff --git a/java/com/tigervnc/rfb/CSecurityIdent.java b/java/com/tigervnc/rfb/CSecurityIdent.java
index 6523e411..f989262b 100644
--- a/java/com/tigervnc/rfb/CSecurityIdent.java
+++ b/java/com/tigervnc/rfb/CSecurityIdent.java
@@ -18,8 +18,6 @@
package com.tigervnc.rfb;
-import java.io.IOException;
-
import com.tigervnc.rdr.*;
import com.tigervnc.vncviewer.*;
@@ -28,7 +26,6 @@ public class CSecurityIdent extends CSecurity {
public CSecurityIdent() { }
public boolean processMsg(CConnection cc) {
- InStream is = cc.getInStream();
OutStream os = cc.getOutStream();
StringBuffer username = new StringBuffer();
diff --git a/java/com/tigervnc/rfb/CSecurityTLS.java b/java/com/tigervnc/rfb/CSecurityTLS.java
index 73eb6199..c26a1986 100644
--- a/java/com/tigervnc/rfb/CSecurityTLS.java
+++ b/java/com/tigervnc/rfb/CSecurityTLS.java
@@ -20,7 +20,6 @@
package com.tigervnc.rfb;
import javax.net.ssl.*;
-import java.security.*;
import java.security.cert.*;
import java.security.KeyStore;
import java.io.File;
@@ -119,7 +118,6 @@ public class CSecurityTLS extends CSecurity {
public boolean processMsg(CConnection cc) {
is = cc.getInStream();
- os = cc.getOutStream();
initGlobal();
diff --git a/java/com/tigervnc/rfb/Cursor.java b/java/com/tigervnc/rfb/Cursor.java
index 420eb82a..375a9c9d 100644
--- a/java/com/tigervnc/rfb/Cursor.java
+++ b/java/com/tigervnc/rfb/Cursor.java
@@ -18,8 +18,6 @@
package com.tigervnc.rfb;
-import java.awt.*;
-
public class Cursor extends ManagedPixelBuffer {
public void setSize(int w, int h) {
diff --git a/java/com/tigervnc/rfb/RawDecoder.java b/java/com/tigervnc/rfb/RawDecoder.java
index 79db8260..f7e5d46a 100644
--- a/java/com/tigervnc/rfb/RawDecoder.java
+++ b/java/com/tigervnc/rfb/RawDecoder.java
@@ -29,7 +29,6 @@ public class RawDecoder extends Decoder {
int h = r.height();
int[] imageBuf = reader.getImageBuf(w * h);
int nPixels = imageBuf.length / (reader.bpp() / 8);
- int bytesPerRow = w * (reader.bpp() / 8);
while (h > 0) {
int nRows = nPixels / w;
if (nRows > h) nRows = h;
diff --git a/java/com/tigervnc/rfb/Screen.java b/java/com/tigervnc/rfb/Screen.java
index 90b22b6d..174d4ace 100644
--- a/java/com/tigervnc/rfb/Screen.java
+++ b/java/com/tigervnc/rfb/Screen.java
@@ -31,7 +31,7 @@ public class Screen {
flags = flags_;
}
- public final static boolean operator(Screen r) {
+ public final boolean operator(Screen r) {
if (id != r.id)
return false;
if (!dimensions.equals(r.dimensions))
@@ -41,8 +41,8 @@ public class Screen {
return true;
}
- public static int id;
- public static Rect dimensions;
- public static int flags;
+ public int id;
+ public Rect dimensions;
+ public int flags;
}
diff --git a/java/com/tigervnc/rfb/ScreenSet.java b/java/com/tigervnc/rfb/ScreenSet.java
index 071282ff..905d77e5 100644
--- a/java/com/tigervnc/rfb/ScreenSet.java
+++ b/java/com/tigervnc/rfb/ScreenSet.java
@@ -31,10 +31,10 @@ public class ScreenSet {
screens = new ArrayList<Screen>();
}
- public static final int num_screens() { return screens.size(); }
+ public final int num_screens() { return screens.size(); }
- public static final void add_screen(Screen screen) { screens.add(screen); }
- public static final void remove_screen(int id) {
+ public final void add_screen(Screen screen) { screens.add(screen); }
+ public final void remove_screen(int id) {
for (Iterator iter = screens.iterator(); iter.hasNext(); ) {
Screen refScreen = (Screen)iter.next();
if (refScreen.id == id)
@@ -42,7 +42,7 @@ public class ScreenSet {
}
}
- public static final boolean validate(int fb_width, int fb_height) {
+ public final boolean validate(int fb_width, int fb_height) {
List<Integer> seen_ids = new ArrayList<Integer>();
Rect fb_rect = new Rect();
@@ -81,7 +81,7 @@ public class ScreenSet {
//inline bool operator(const ScreenSet& r) const { return screens == r.screens; }
//inline bool operator(const ScreenSet& r) const { return screens != r.screens; }
- public static List<Screen> screens;
+ public ArrayList<Screen> screens;
static LogWriter vlog = new LogWriter("ScreenSet");
diff --git a/java/com/tigervnc/vncviewer/CConn.java b/java/com/tigervnc/vncviewer/CConn.java
index 7d76beed..a375438b 100644
--- a/java/com/tigervnc/vncviewer/CConn.java
+++ b/java/com/tigervnc/vncviewer/CConn.java
@@ -34,26 +34,16 @@ package com.tigervnc.vncviewer;
import java.awt.Color;
import java.awt.Graphics;
import java.awt.event.*;
-import java.awt.Component;
import java.awt.Dimension;
import java.awt.Event;
-import java.awt.Frame;
-import java.awt.ScrollPane;
-import java.io.*;
-import javax.net.ssl.*;
import java.io.IOException;
import java.io.InputStream;
-import java.io.OutputStream;
-import java.io.File;
import java.util.jar.Attributes;
import java.util.jar.Manifest;
import javax.swing.*;
-import javax.swing.filechooser.*;
import javax.swing.ImageIcon;
import java.net.URL;
-import java.net.ServerSocket;
-import javax.swing.border.*;
import java.util.*;
import com.tigervnc.rdr.*;
@@ -219,7 +209,6 @@ public class CConn extends CConnection
public boolean showMsgBox(int flags, String title, String text)
{
StringBuffer titleText = new StringBuffer("VNC Viewer: "+title);
-
return true;
}
@@ -1165,7 +1154,6 @@ public class CConn extends CConnection
synchronized public void writePointerEvent(MouseEvent ev) {
if (state() != RFBSTATE_NORMAL) return;
- int x, y;
switch (ev.getID()) {
case MouseEvent.MOUSE_PRESSED:
diff --git a/java/com/tigervnc/vncviewer/DesktopWindow.java b/java/com/tigervnc/vncviewer/DesktopWindow.java
index f5acfff1..e3d5a58e 100644
--- a/java/com/tigervnc/vncviewer/DesktopWindow.java
+++ b/java/com/tigervnc/vncviewer/DesktopWindow.java
@@ -38,7 +38,6 @@ import javax.swing.*;
import com.tigervnc.rfb.*;
import com.tigervnc.rfb.Cursor;
-import com.tigervnc.rfb.Exception;
import com.tigervnc.rfb.Point;
class DesktopWindow extends JPanel implements
diff --git a/java/com/tigervnc/vncviewer/Dialog.java b/java/com/tigervnc/vncviewer/Dialog.java
index 6a11fb3a..d6fdd1bf 100644
--- a/java/com/tigervnc/vncviewer/Dialog.java
+++ b/java/com/tigervnc/vncviewer/Dialog.java
@@ -27,13 +27,8 @@
package com.tigervnc.vncviewer;
-import java.io.*;
-import java.net.*;
import java.awt.*;
-import java.awt.event.*;
-import java.awt.image.*;
import javax.swing.*;
-import javax.swing.filechooser.*;
//class Dialog extends JFrame implements WindowListener {
class Dialog extends JFrame {
diff --git a/java/com/tigervnc/vncviewer/F8Menu.java b/java/com/tigervnc/vncviewer/F8Menu.java
index 9b617857..375849c1 100644
--- a/java/com/tigervnc/vncviewer/F8Menu.java
+++ b/java/com/tigervnc/vncviewer/F8Menu.java
@@ -22,7 +22,6 @@ import java.awt.Cursor;
import java.awt.event.*;
import javax.swing.JFrame;
import javax.swing.JPopupMenu;
-import javax.swing.JMenu;
import javax.swing.JMenuItem;
import javax.swing.JCheckBoxMenuItem;
diff --git a/java/com/tigervnc/vncviewer/OptionsDialog.java b/java/com/tigervnc/vncviewer/OptionsDialog.java
index 9664dc99..2ca1e603 100644
--- a/java/com/tigervnc/vncviewer/OptionsDialog.java
+++ b/java/com/tigervnc/vncviewer/OptionsDialog.java
@@ -22,13 +22,8 @@ import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import javax.swing.border.*;
-import javax.swing.filechooser.*;
-import javax.swing.ImageIcon;
-import java.net.URL;
-import java.io.IOException;
import com.tigervnc.rfb.*;
-import com.tigervnc.rfb.Exception;
class OptionsDialog extends Dialog implements
ActionListener,
diff --git a/java/com/tigervnc/vncviewer/PasswdDialog.java b/java/com/tigervnc/vncviewer/PasswdDialog.java
index eaace698..d947828d 100644
--- a/java/com/tigervnc/vncviewer/PasswdDialog.java
+++ b/java/com/tigervnc/vncviewer/PasswdDialog.java
@@ -18,10 +18,8 @@
package com.tigervnc.vncviewer;
-import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
-import java.net.URL;
class PasswdDialog extends Dialog implements KeyListener{
diff --git a/java/com/tigervnc/vncviewer/PixelBufferImage.java b/java/com/tigervnc/vncviewer/PixelBufferImage.java
index 7e5e7174..ccac4823 100644
--- a/java/com/tigervnc/vncviewer/PixelBufferImage.java
+++ b/java/com/tigervnc/vncviewer/PixelBufferImage.java
@@ -26,7 +26,6 @@ package com.tigervnc.vncviewer;
import java.awt.*;
import java.awt.image.*;
import java.nio.ByteOrder;
-import javax.swing.JScrollPane;
import com.tigervnc.rfb.*;
@@ -59,7 +58,6 @@ public class PixelBufferImage extends PixelBuffer implements ImageProducer
int rowsToCopy = h < height() ? h : height();
int copyWidth = w < width() ? w : width();
- int oldWidth = width();
int[] oldData = data;
width_ = w;
diff --git a/java/com/tigervnc/vncviewer/ServerDialog.java b/java/com/tigervnc/vncviewer/ServerDialog.java
index 00a7e183..55ad0d02 100644
--- a/java/com/tigervnc/vncviewer/ServerDialog.java
+++ b/java/com/tigervnc/vncviewer/ServerDialog.java
@@ -19,16 +19,12 @@
package com.tigervnc.vncviewer;
import java.awt.*;
-import java.awt.image.*;
import java.awt.event.*;
import javax.swing.*;
import javax.swing.border.*;
-import java.net.URL;
-import java.io.File;
import java.util.*;
import com.tigervnc.rfb.*;
-import com.tigervnc.rfb.Exception;
class ServerDialog extends Dialog implements
ActionListener,
diff --git a/java/com/tigervnc/vncviewer/VncViewer.java b/java/com/tigervnc/vncviewer/VncViewer.java
index bea486b0..e5cf1579 100644
--- a/java/com/tigervnc/vncviewer/VncViewer.java
+++ b/java/com/tigervnc/vncviewer/VncViewer.java
@@ -31,17 +31,13 @@ import java.awt.*;
import java.awt.Color;
import java.awt.Graphics;
import java.awt.Image;
-import java.awt.image.*;
-import java.awt.Label;
import java.io.InputStream;
import java.util.jar.Attributes;
import java.util.jar.Manifest;
import javax.swing.*;
-import java.net.URL;
import com.tigervnc.rdr.*;
import com.tigervnc.rfb.*;
-import com.tigervnc.rfb.Exception;
public class VncViewer extends java.applet.Applet implements Runnable
{