diff options
author | Brian P. Hinz <bphinz@users.sf.net> | 2016-03-17 22:42:46 -0400 |
---|---|---|
committer | Brian P. Hinz <bphinz@users.sf.net> | 2016-03-17 22:42:46 -0400 |
commit | 4daae978e8af43d0578008161103ec34faa798d7 (patch) | |
tree | 37ee04878bf6eb7be2fb9083e5cd95eac27a433d /java | |
parent | a5e18bd7d5388561b3527feac80efd90daa2a95f (diff) | |
download | tigervnc-4daae978e8af43d0578008161103ec34faa798d7.tar.gz tigervnc-4daae978e8af43d0578008161103ec34faa798d7.zip |
Code formatting tweaks (shorter line lengths)
Diffstat (limited to 'java')
-rw-r--r-- | java/com/tigervnc/vncviewer/Viewport.java | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/java/com/tigervnc/vncviewer/Viewport.java b/java/com/tigervnc/vncviewer/Viewport.java index 3d01b258..b55744bd 100644 --- a/java/com/tigervnc/vncviewer/Viewport.java +++ b/java/com/tigervnc/vncviewer/Viewport.java @@ -37,6 +37,11 @@ import com.tigervnc.rfb.*; import java.lang.Exception; import java.awt.Rectangle; +import static javax.swing.ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER; +import static javax.swing.ScrollPaneConstants.VERTICAL_SCROLLBAR_NEVER; +import static javax.swing.ScrollPaneConstants.HORIZONTAL_SCROLLBAR_AS_NEEDED; +import static javax.swing.ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED; + public class Viewport extends JFrame { public Viewport(String name, CConn cc_) { @@ -86,22 +91,24 @@ public class Viewport extends JFrame if ((sp.getSize().width != cc.desktop.scaledWidth) || (sp.getSize().height != cc.desktop.scaledHeight)) { cc.desktop.setScaledSize(); - sp.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER); - sp.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_NEVER); + sp.setHorizontalScrollBarPolicy(HORIZONTAL_SCROLLBAR_NEVER); + sp.setVerticalScrollBarPolicy(VERTICAL_SCROLLBAR_NEVER); sp.validate(); if (getExtendedState() != JFrame.MAXIMIZED_BOTH && !cc.fullScreen) { sp.setSize(new Dimension(cc.desktop.scaledWidth, cc.desktop.scaledHeight)); - int w = cc.desktop.scaledWidth + getInsets().left + getInsets().right; - int h = cc.desktop.scaledHeight + getInsets().top + getInsets().bottom; + int w = cc.desktop.scaledWidth + getInsets().left + + getInsets().right; + int h = cc.desktop.scaledHeight + getInsets().top + + getInsets().bottom; if (scaleString.equalsIgnoreCase("FixedRatio")) setSize(w, h); } } } else { - sp.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_AS_NEEDED); - sp.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED); + sp.setHorizontalScrollBarPolicy(HORIZONTAL_SCROLLBAR_AS_NEEDED); + sp.setVerticalScrollBarPolicy(VERTICAL_SCROLLBAR_AS_NEEDED); sp.validate(); } if (cc.desktop.cursor != null) { |