Mercurial > hg > Applications > TreeVNC
changeset 84:c063d32fd983
minor fix
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Wed, 30 Apr 2014 18:19:44 +0900 |
parents | 40d400a7ec84 |
children | 432dac0b9dae |
files | src/main/java/jp/ac/u_ryukyu/treevnc/server/MyRfbProtoProxy.java src/viewer_swing/java/com/glavsoft/viewer/swing/gui/AutoCompletionComboEditorDocument.java src/viewer_swing/java/com/glavsoft/viewer/swing/gui/ConnectionView.java src/viewer_swing/java/com/glavsoft/viewer/swing/gui/ConnectionsHistory.java src/viewer_swing/java/com/glavsoft/viewer/swing/gui/HostnameComboboxRenderer.java |
diffstat | 5 files changed, 18 insertions(+), 14 deletions(-) [+] |
line wrap: on
line diff
--- a/src/main/java/jp/ac/u_ryukyu/treevnc/server/MyRfbProtoProxy.java Wed Apr 30 18:07:20 2014 +0900 +++ b/src/main/java/jp/ac/u_ryukyu/treevnc/server/MyRfbProtoProxy.java Wed Apr 30 18:19:44 2014 +0900 @@ -64,7 +64,7 @@ private Thread requestThread; private int rangeX = 256; // screenRange XPosition private int rangeY = 256; // screenRange YPosition - private int rangeWidth = 512; // screenRange Width + // private int rangeWidth = 512; // screenRange Width private int rangeHeight = 256; // screenRange Height private int counter = 0; // add serialnum.
--- a/src/viewer_swing/java/com/glavsoft/viewer/swing/gui/AutoCompletionComboEditorDocument.java Wed Apr 30 18:07:20 2014 +0900 +++ b/src/viewer_swing/java/com/glavsoft/viewer/swing/gui/AutoCompletionComboEditorDocument.java Wed Apr 30 18:19:44 2014 +0900 @@ -17,13 +17,17 @@ */ public class AutoCompletionComboEditorDocument extends PlainDocument { - private ComboBoxModel model; + /** + * + */ + private static final long serialVersionUID = 1L; + private ComboBoxModel<Void> model; private boolean selecting; - private JComboBox comboBox; + private JComboBox<Void> comboBox; private final boolean hidePopupOnFocusLoss; private JTextComponent editor; - public AutoCompletionComboEditorDocument(final JComboBox comboBox) { + public AutoCompletionComboEditorDocument(final JComboBox<Void> comboBox) { this.comboBox = comboBox; this.model = comboBox.getModel(); this.editor = (JTextComponent)comboBox.getEditor().getEditorComponent();
--- a/src/viewer_swing/java/com/glavsoft/viewer/swing/gui/ConnectionView.java Wed Apr 30 18:07:20 2014 +0900 +++ b/src/viewer_swing/java/com/glavsoft/viewer/swing/gui/ConnectionView.java Wed Apr 30 18:19:44 2014 +0900 @@ -33,6 +33,7 @@ import javax.swing.*; import javax.swing.border.Border; import javax.swing.border.EmptyBorder; + import java.awt.*; import java.awt.event.*; import java.util.LinkedList; @@ -51,7 +52,7 @@ private final boolean hasSshSupport; private final JTextField serverPortField; private JCheckBox useSshTunnelingCheckbox; - private final JComboBox serverNameCombo; + private final JComboBox<ConnectionParams> serverNameCombo; private JTextField sshUserField; private JTextField sshHostField; private JTextField sshPortField; @@ -82,7 +83,7 @@ int gridRow = 0; - serverNameCombo = new JComboBox(); + serverNameCombo = new JComboBox<ConnectionParams>(); initConnectionsHistoryCombo(); serverNameCombo.addItemListener(new ItemListener() { @Override @@ -129,7 +130,8 @@ private void initConnectionsHistoryCombo() { serverNameCombo.setEditable(true); - new AutoCompletionComboEditorDocument(serverNameCombo); // use autocompletion feature for ComboBox + JComboBox<Void> s = (JComboBox)serverNameCombo; + new AutoCompletionComboEditorDocument(s); // use autocompletion feature for ComboBox serverNameCombo.setRenderer(new HostnameComboboxRenderer()); ConnectionParams prototypeDisplayValue = new ConnectionParams(); @@ -307,38 +309,32 @@ statusBar.setMessage(message); } - @SuppressWarnings("UnusedDeclaration") public void setPortNumber(int portNumber) { serverPortField.setText(String.valueOf(portNumber)); } - @SuppressWarnings("UnusedDeclaration") public String getPortNumber() { return serverPortField.getText(); } - @SuppressWarnings("UnusedDeclaration") public void setSshHostName(String sshHostName) { if (hasSshSupport) { sshHostField.setText(sshHostName); } } - @SuppressWarnings("UnusedDeclaration") public String getSshHostName() { if (hasSshSupport) { return sshHostField.getText(); } else { return ""; } } - @SuppressWarnings("UnusedDeclaration") public void setSshPortNumber(int sshPortNumber) { if (hasSshSupport) { sshPortField.setText(String.valueOf(sshPortNumber)); } } - @SuppressWarnings("UnusedDeclaration") public String getSshPortNumber() { if (hasSshSupport) { return sshPortField.getText();
--- a/src/viewer_swing/java/com/glavsoft/viewer/swing/gui/ConnectionsHistory.java Wed Apr 30 18:07:20 2014 +0900 +++ b/src/viewer_swing/java/com/glavsoft/viewer/swing/gui/ConnectionsHistory.java Wed Apr 30 18:19:44 2014 +0900 @@ -128,7 +128,6 @@ /** * Implicit Model interface */ - @SuppressWarnings("UnusedDeclaration") public LinkedList<ConnectionParams> getConnectionsList() { return connections; }
--- a/src/viewer_swing/java/com/glavsoft/viewer/swing/gui/HostnameComboboxRenderer.java Wed Apr 30 18:07:20 2014 +0900 +++ b/src/viewer_swing/java/com/glavsoft/viewer/swing/gui/HostnameComboboxRenderer.java Wed Apr 30 18:19:44 2014 +0900 @@ -10,6 +10,11 @@ */ public class HostnameComboboxRenderer extends DefaultListCellRenderer { + /** + * + */ + private static final long serialVersionUID = 1L; + @Override public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus) { String stringValue = renderListItem((ConnectionParams)value);