From 18 Jan, 2021 0:00 UTC: All services will be temporary unavailable for maintenance
  • R/O
  • SSH

JdbcAcsess2: Commit

全てを再実装したJdbcAcsessです。


Commit MetaInfo

Revision6c51febcb70259c2b69ceab9eb6968d087df1abe (tree)
Time2012-02-12 14:32:32
Authorshimakazuro
Commitershimakazuro

Log Message

ありえないはずだけどfindbugがいうので。。。

Change Summary

Incremental Difference

diff -r 559ab95dfad4 -r 6c51febcb702 src/jdbcacsess2/main/TableColumnFit.java
--- a/src/jdbcacsess2/main/TableColumnFit.java Sun Feb 12 13:53:02 2012 +0900
+++ b/src/jdbcacsess2/main/TableColumnFit.java Sun Feb 12 14:32:32 2012 +0900
@@ -1,15 +1,15 @@
11 /*
22 * Copyright 2011 Kazuhiro Shimada
33 *
4- * Licensed under the Apache License, Version 2.0 (the "License");
5- * you may not use this file except in compliance with the License.
4+ * Licensed under the Apache License, Version 2.0 (the "License");
5+ * you may not use this file except in compliance with the License.
66 * You may obtain a copy of the License at
77 *
8- * http://www.apache.org/licenses/LICENSE-2.0
8+ * http://www.apache.org/licenses/LICENSE-2.0
99 *
10- * Unless required by applicable law or agreed to in writing, software
10+ * Unless required by applicable law or agreed to in writing, software
1111 * distributed under the License is distributed on an "AS IS" BASIS,
12- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1313 * See the License for the specific language governing permissions and
1414 * limitations under the License.
1515 */
@@ -41,7 +41,7 @@
4141 */
4242 public class TableColumnFit implements TableColumnModelListener, TableModelListener, MouseMotionListener {
4343
44- private JTable jTable;
44+ private final JTable jTable;
4545 private boolean autoFit = false;
4646
4747 public TableColumnFit(JTable jTable) {
@@ -196,6 +196,8 @@
196196 // 個別設定が無いのでデフォルトを使用する
197197 if (defrenderer != null) {
198198 r = defrenderer;
199+ } else {
200+ return;
199201 }
200202 }
201203 JComponent c = (JComponent) r.getTableCellRendererComponent(jTable,
@@ -246,7 +248,7 @@
246248 */
247249 private int preferredWidth(JComponent jComponent) {
248250 int rtn = jComponent.getPreferredSize().width + jComponent.getInsets().left + jComponent.getInsets().right
249- + jTable.getIntercellSpacing().width;
251+ + jTable.getIntercellSpacing().width;
250252 return rtn;
251253 }
252254
Show on old repository browser