diff --git a/designer-base/src/main/java/com/fr/design/data/datapane/connect/JDBCDefPane.java b/designer-base/src/main/java/com/fr/design/data/datapane/connect/JDBCDefPane.java index 4331828238..c1afbe137f 100644 --- a/designer-base/src/main/java/com/fr/design/data/datapane/connect/JDBCDefPane.java +++ b/designer-base/src/main/java/com/fr/design/data/datapane/connect/JDBCDefPane.java @@ -5,10 +5,10 @@ import com.fr.data.impl.JDBCDatabaseConnection; import com.fr.design.border.UITitledBorder; import com.fr.design.gui.ibutton.UIButton; import com.fr.design.gui.icombobox.UIComboBox; +import com.fr.design.gui.ilable.ActionLabel; import com.fr.design.gui.ilable.UILabel; import com.fr.design.gui.ipasswordfield.UIPasswordFieldWithFixedLength; import com.fr.design.gui.itextfield.UITextField; -import com.fr.design.gui.ilable.ActionLabel; import com.fr.design.i18n.Toolkit; import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.layout.TableLayout; @@ -21,17 +21,13 @@ import com.fr.general.ComparatorUtils; import com.fr.stable.ArrayUtils; import com.fr.stable.EncodeConstants; import com.fr.stable.StringUtils; -import java.awt.event.InputMethodEvent; -import java.awt.event.InputMethodListener; -import java.awt.event.KeyAdapter; -import java.awt.event.KeyEvent; -import java.awt.event.KeyListener; -import java.util.regex.Matcher; -import java.util.regex.Pattern; + import javax.swing.BorderFactory; import javax.swing.JFileChooser; import javax.swing.JPanel; import javax.swing.JPasswordField; +import javax.swing.event.DocumentEvent; +import javax.swing.event.DocumentListener; import java.awt.BorderLayout; import java.awt.Color; import java.awt.Component; @@ -39,13 +35,18 @@ import java.awt.Dimension; import java.awt.Graphics; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; +import java.awt.event.InputMethodEvent; +import java.awt.event.InputMethodListener; +import java.awt.event.KeyAdapter; +import java.awt.event.KeyEvent; +import java.awt.event.KeyListener; import java.io.File; import java.util.HashMap; import java.util.Iterator; import java.util.Map; import java.util.Map.Entry; -import javax.swing.event.DocumentEvent; -import javax.swing.event.DocumentListener; +import java.util.regex.Matcher; +import java.util.regex.Pattern; public class JDBCDefPane extends JPanel { public static final String DRIVER_TYPE = "driver_type"; @@ -291,7 +292,7 @@ public class JDBCDefPane extends JPanel { jdbcDatabase = new JDBCDatabaseConnection(); } Object driveItem = this.driverComboBox.getSelectedItem(); - jdbcDatabase.setDriver(driveItem == null ? null : driveItem.toString()); + jdbcDatabase.setDriver(driveItem == null ? null : driveItem.toString().trim()); jdbcDatabase.setURL(this.urlTextField.getText().trim()); jdbcDatabase.setUser(this.userNameTextField.getText().trim()); jdbcDatabase.setPassword(new String(this.passwordTextField.getPassword()).trim()); diff --git a/designer-realize/src/main/java/com/fr/poly/creator/PolyElementCasePane.java b/designer-realize/src/main/java/com/fr/poly/creator/PolyElementCasePane.java index af6918de2e..cf93aa74aa 100644 --- a/designer-realize/src/main/java/com/fr/poly/creator/PolyElementCasePane.java +++ b/designer-realize/src/main/java/com/fr/poly/creator/PolyElementCasePane.java @@ -13,12 +13,18 @@ import com.fr.report.poly.PolyECBlock; */ public abstract class PolyElementCasePane extends ElementCasePane { + /** + * 水平方向在一个屏幕内可见的可扩展的列数 + */ + private static final int HORIZONTAL_EXTENT_VALUE = 200; + public PolyElementCasePane(PolyECBlock block) { super(block); setSelection(new CellSelection(0, 0, 1, 1)); // 都不加这两个组件,当然他们也就没可见性了 setHorizontalScrollBarVisible(false); setVerticalScrollBarVisible(false); + this.getGrid().setHorizontalExtent(HORIZONTAL_EXTENT_VALUE); } @Override