|
|
|
@ -18,7 +18,6 @@ import com.fr.stable.StringUtils;
|
|
|
|
|
import javax.swing.BorderFactory; |
|
|
|
|
import javax.swing.ComboBoxEditor; |
|
|
|
|
import javax.swing.Icon; |
|
|
|
|
import javax.swing.JCheckBox; |
|
|
|
|
import javax.swing.JPanel; |
|
|
|
|
import javax.swing.ScrollPaneConstants; |
|
|
|
|
import javax.swing.event.PopupMenuEvent; |
|
|
|
@ -80,12 +79,12 @@ public class ITReplaceNorthPanel {
|
|
|
|
|
|
|
|
|
|
//存储的5次最近输入
|
|
|
|
|
private int maxItemCount = 5; |
|
|
|
|
private static int limit_width = 800; |
|
|
|
|
private static final int LIMIT_WIDTH = 800; |
|
|
|
|
private static final int HEIGHT = 161; |
|
|
|
|
private static final int BUTTON_WIDTH = 44; |
|
|
|
|
private static final int GAP = 20; |
|
|
|
|
private static final int BUTTON_GAP = 10; |
|
|
|
|
private static final int MATCH_WIDTH = 70; |
|
|
|
|
private static final int MATCH_WIDTH = 800; |
|
|
|
|
private static final int COMPONENT_HEIGHT = 25; |
|
|
|
|
private static final int FIRST_Y = 15, SECOND_Y = 50, THIRD_Y = 85, FOURTH_Y = 120; |
|
|
|
|
private static final int FIRST_X = 20, SECOND_X = 80; |
|
|
|
@ -169,16 +168,6 @@ public class ITReplaceNorthPanel {
|
|
|
|
|
cardPanel.add(settingScrollPane, CARD_SETTING); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 限制尺寸 |
|
|
|
|
* |
|
|
|
|
* @param width |
|
|
|
|
*/ |
|
|
|
|
public void setLimitSize(int width) { |
|
|
|
|
upContentPanel.setMaximumSize(new Dimension(limit_width, HEIGHT)); |
|
|
|
|
upContentPanel.setPreferredSize(new Dimension(limit_width, HEIGHT)); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 初始化模板内容查找面板 |
|
|
|
|
*/ |
|
|
|
@ -212,7 +201,7 @@ public class ITReplaceNorthPanel {
|
|
|
|
|
|
|
|
|
|
replaceButton = new UIButton(Toolkit.i18nText("Fine-Design_Replace_Button")); |
|
|
|
|
searchButton = new UIButton(Toolkit.i18nText("Fine-Design_Search_Button")); |
|
|
|
|
upContentPanel.setPreferredSize(new Dimension(limit_width, HEIGHT)); |
|
|
|
|
upContentPanel.setPreferredSize(new Dimension(LIMIT_WIDTH, HEIGHT)); |
|
|
|
|
contentScrollPane = new UIScrollPane(upContentPanel, ScrollPaneConstants.VERTICAL_SCROLLBAR_NEVER, ScrollPaneConstants.HORIZONTAL_SCROLLBAR_AS_NEEDED); |
|
|
|
|
upContentPanel.add(findLabel); |
|
|
|
|
upContentPanel.add(rangeLabel); |
|
|
|
@ -268,7 +257,7 @@ public class ITReplaceNorthPanel {
|
|
|
|
|
replaceSettingButton = new UIButton(Toolkit.i18nText("Fine-Design_Replace_Button")); |
|
|
|
|
|
|
|
|
|
replaceSettingButton.setEnabled(false); |
|
|
|
|
upSettingPanel.setPreferredSize(new Dimension(limit_width, HEIGHT)); |
|
|
|
|
upSettingPanel.setPreferredSize(new Dimension(LIMIT_WIDTH, HEIGHT)); |
|
|
|
|
upSettingPanel.add(findSettingLabel); |
|
|
|
|
upSettingPanel.add(rangeSettingLabel); |
|
|
|
|
upSettingPanel.add(findSettingComboBox); |
|
|
|
|