Browse Source

REPORT-39308 参数输入面板参数名显示不完整

feature/big-screen
vito 4 years ago
parent
commit
9af539cbbd
  1. 20
      designer-base/src/main/java/com/fr/design/parameter/ParameterInputPane.java

20
designer-base/src/main/java/com/fr/design/parameter/ParameterInputPane.java

@ -20,14 +20,18 @@ import com.fr.design.editor.editor.TextEditor;
import com.fr.design.file.HistoryTemplateListCache; import com.fr.design.file.HistoryTemplateListCache;
import com.fr.design.gui.ilable.UILabel; import com.fr.design.gui.ilable.UILabel;
import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.stable.ParameterProvider; import com.fr.stable.ParameterProvider;
import com.fr.stable.StringUtils; import com.fr.stable.StringUtils;
import javax.swing.*; import javax.swing.BorderFactory;
import javax.swing.JComponent;
import javax.swing.JPanel;
import javax.swing.JScrollPane;
import javax.swing.SwingConstants;
import javax.swing.event.ChangeEvent; import javax.swing.event.ChangeEvent;
import javax.swing.event.ChangeListener; import javax.swing.event.ChangeListener;
import java.awt.*; import java.awt.BorderLayout;
import java.awt.Dimension;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Date; import java.util.Date;
import java.util.Iterator; import java.util.Iterator;
@ -37,6 +41,7 @@ import java.util.Map.Entry;
/** /**
* The dialog used to input parameter. * The dialog used to input parameter.
*
* @editor zhou * @editor zhou
* @since 2012-3-26上午11:09:45 * @since 2012-3-26上午11:09:45
*/ */
@ -51,6 +56,8 @@ public class ParameterInputPane extends BasicPane {
private boolean allowBlank = true; private boolean allowBlank = true;
private FlowTableLayoutHelper flowTableLayoutHelper;
/** /**
* Constructor. * Constructor.
*/ */
@ -71,7 +78,7 @@ public class ParameterInputPane extends BasicPane {
this.add(new JScrollPane(contentPane), BorderLayout.CENTER); this.add(new JScrollPane(contentPane), BorderLayout.CENTER);
contentPane.setBorder(BorderFactory.createTitledBorder(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Parameters") + ":")); contentPane.setBorder(BorderFactory.createTitledBorder(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Parameters") + ":"));
FlowTableLayoutHelper flowTableLayoutHelper = new FlowTableLayoutHelper(); flowTableLayoutHelper = new FlowTableLayoutHelper();
editorNameMap = new java.util.HashMap<ValueEditorPane, String>(); editorNameMap = new java.util.HashMap<ValueEditorPane, String>();
@ -112,7 +119,12 @@ public class ParameterInputPane extends BasicPane {
nameAddedList.add(parameter.getName()); nameAddedList.add(parameter.getName());
} }
} }
}
@Override
public void addNotify() {
super.addNotify();
// windows 高DPI下,使用getPreferredSize必须在添加到容器之后,否则得到的数值不准确,因此先放到这调整大小
flowTableLayoutHelper.adjustLabelWidth(); flowTableLayoutHelper.adjustLabelWidth();
} }

Loading…
Cancel
Save