May 25, 2018 updates: Privacy Policy
  • R/O
  • SSH
  • HTTPS

smart-gs: Commit


Commit MetaInfo

Revision1199 (tree)
Time2016-10-17 14:24:11
Authorohura

Log Message

[editor-simplyhtml-merge] Layout Viewの横スクロールバーの表示
縦書きとLayout Viewの拡大、縮小に対応

Change Summary

Incremental Difference

--- branches/editor-simplyhtml-merge/src/smart_gs/simplyhtml/SGSHTMLEditorPane.java (revision 1198)
+++ branches/editor-simplyhtml-merge/src/smart_gs/simplyhtml/SGSHTMLEditorPane.java (revision 1199)
@@ -136,7 +136,7 @@
136136 public boolean getScrollableTracksViewportWidth() {
137137 // TODO Auto-generated method stub
138138 // return super.getScrollableTracksViewportWidth();
139- return true;
139+ return false;
140140 }
141141
142142 @Override
@@ -150,15 +150,23 @@
150150 public Dimension getPreferredSize() {
151151 Dimension dim = super.getPreferredSize();
152152 double mag = ((SGSHTMLEditorKit) this.getEditorKit()).getMag();
153- dim.setSize(dim.width*mag, dim.height*mag);
153+ if(((SGSHTMLEditorKit) this.getEditorKit()).isVertical()){
154+ dim.setSize(dim.height*mag, dim.width*mag);
155+ } else {
156+ dim.setSize(dim.width*mag, dim.height*mag);
157+ }
154158 return dim;
155159 }
156-
157- @Override
158- public Dimension getPreferredScrollableViewportSize() {
159- Dimension dim = super.getPreferredScrollableViewportSize();
160- double mag = ((SGSHTMLEditorKit) this.getEditorKit()).getMag();
161- dim.setSize(dim.width*mag, dim.height*mag);
162- return dim;
163- }
160+//
161+// @Override
162+// public Dimension getPreferredScrollableViewportSize() {
163+// Dimension dim = super.getPreferredScrollableViewportSize();
164+// double mag = ((SGSHTMLEditorKit) this.getEditorKit()).getMag();
165+// if(((SGSHTMLEditorKit) this.getEditorKit()).isVertical()){
166+// dim.setSize(dim.height*mag, dim.width*mag);
167+// } else {
168+// dim.setSize(dim.width*mag, dim.height*mag);
169+// }
170+// return dim;
171+// }
164172 }
Show on old repository browser