@ -1,12 +1,16 @@
package com.fr.design.actions.replace.ui ;
package com.fr.design.actions.replace.ui ;
import com.fr.base.svg.IconUtils ;
import com.fr.base.svg.IconUtils ;
import com.fr.design.actions.replace.action.setting.SettingContent ;
import com.fr.design.actions.replace.action.setting.SettingController ;
import com.fr.design.data.datapane.TableDataComboBox ;
import com.fr.design.gui.ibutton.UIButton ;
import com.fr.design.gui.ibutton.UIButton ;
import com.fr.design.gui.icombobox.UIComboBox ;
import com.fr.design.gui.icombobox.UIComboBox ;
import com.fr.design.gui.icontainer.UIScrollPane ;
import com.fr.design.gui.icontainer.UIScrollPane ;
import com.fr.design.gui.ilable.UILabel ;
import com.fr.design.gui.ilable.UILabel ;
import com.fr.design.gui.itextfield.UITextField ;
import com.fr.design.gui.itextfield.UITextField ;
import com.fr.design.i18n.Toolkit ;
import com.fr.design.i18n.Toolkit ;
import com.fr.general.GeneralUtils ;
import com.fr.stable.StringUtils ;
import com.fr.stable.StringUtils ;
@ -16,11 +20,15 @@ import javax.swing.Icon;
import javax.swing.JCheckBox ;
import javax.swing.JCheckBox ;
import javax.swing.JPanel ;
import javax.swing.JPanel ;
import javax.swing.ScrollPaneConstants ;
import javax.swing.ScrollPaneConstants ;
import java.awt.CardLayout ;
import java.awt.Dimension ;
import java.awt.Dimension ;
import java.awt.event.ActionEvent ;
import java.awt.event.ActionEvent ;
import java.awt.event.ActionListener ;
import java.awt.event.ActionListener ;
import java.awt.event.ItemEvent ;
import java.awt.event.ItemListener ;
import java.util.ArrayList ;
import java.util.ArrayList ;
import java.util.Collections ;
import java.util.Collections ;
import java.util.List ;
/ * *
/ * *
* 上面板
* 上面板
@ -30,7 +38,12 @@ import java.util.Collections;
* created by Destiny . Lin on 2022 - 09 - 01
* created by Destiny . Lin on 2022 - 09 - 01
* /
* /
public class ITReplaceNorthPanel {
public class ITReplaceNorthPanel {
private JPanel upPanel ;
private JPanel upContentPanel ;
private JPanel upSettingPanel ;
private static JPanel cardPanel ;
private static CardLayout cardLayout ;
//content
private UILabel findLabel ;
private UILabel findLabel ;
private UILabel rangeLabel ;
private UILabel rangeLabel ;
private UILabel resultLabel ;
private UILabel resultLabel ;
@ -38,12 +51,28 @@ public class ITReplaceNorthPanel {
private UIComboBox rangeCombobox ;
private UIComboBox rangeCombobox ;
private JCheckBox matchRadioButton ;
private JCheckBox matchRadioButton ;
private UILabel iconLabel ;
private UILabel iconLabel ;
private UIComboBox findInputCombobox ;
private UIComboBox findInputCombobox ;
private UIComboBox replaceInputCombobox ;
private UIComboBox replaceInputCombobox ;
private UIScrollPane scrollPane ;
private UIScrollPane contentScrollPane ;
private UIScrollPane settingScrollPane ;
private UIButton replaceButton ;
private UIButton replaceButton ;
private UIButton searchButton ;
private UIButton searchButton ;
//setting
private UILabel iconSettingLabel ;
private UILabel findSettingLabel ;
private UILabel rangeSettingLabel ;
private UILabel settingResultLabel ;
private UIComboBox rangeSettingComboBox ;
private UIComboBox findSettingComboBox ;
private UIComboBox findSettingInputComboBox ;
private UIComboBox replaceSettingInputComboBox ;
private UIComboBox findExtraSettingComboBox ;
private UIComboBox replaceExtraSettingComboBox ;
private TableDataComboBox tableDataComboBox ;
private UIButton replaceSettingButton ;
private UIButton searchSettingButton ;
private static double rate = 1 . 00 ;
private static double rate = 1 . 00 ;
//存储的5次最近输入
//存储的5次最近输入
@ -59,6 +88,10 @@ public class ITReplaceNorthPanel {
private static final int FIRST_X = 20 , SECOND_X = 80 ;
private static final int FIRST_X = 20 , SECOND_X = 80 ;
private static final int LABEL_WIDTH = 60 ;
private static final int LABEL_WIDTH = 60 ;
private static final Icon CHANGE_ICON = IconUtils . readIcon ( "/com/fr/design/images/replace/change_normal.svg" ) ;
private static final Icon CHANGE_ICON = IconUtils . readIcon ( "/com/fr/design/images/replace/change_normal.svg" ) ;
private static final String [ ] rangeItems = new String [ ] { Toolkit . i18nText ( "Fine-Design_Basic_Export_JS_Template_Current" ) } ;
public static final String CARD_CONTENT = "Content" ;
public static final String CARD_SETTING = "setting" ;
private int findLabelX , findLabelY , findLabelWidth , findLabelHeight ;
private int findLabelX , findLabelY , findLabelWidth , findLabelHeight ;
@ -74,9 +107,14 @@ public class ITReplaceNorthPanel {
private int iconX , iconY , iconWidth , iconHeight ;
private int iconX , iconY , iconWidth , iconHeight ;
private int inputLength ;
private int inputLength ;
public static ArrayList < String > findItems = new ArrayList < > ( ) ;
public static List < String > findItems = new ArrayList < > ( ) ;
public static ArrayList < String > findInputItems = new ArrayList < > ( ) ;
public static List < String > findSettingItems = new ArrayList < > ( ) ;
public static ArrayList < String > replaceInputItems = new ArrayList < > ( ) ;
public static List < String > findInputItems = new ArrayList < > ( ) ;
public static List < String > replaceInputItems = new ArrayList < > ( ) ;
public static List < String > formatItems = new ArrayList < > ( ) ;
public static List < String > digitItems = new ArrayList < > ( ) ;
public static List < String > groupItems = new ArrayList < > ( ) ;
public static List < String > dsColumnItems = new ArrayList < > ( ) ;
static {
static {
findItems . add ( Toolkit . i18nText ( "Fine-Design_Basic_Cell" ) ) ;
findItems . add ( Toolkit . i18nText ( "Fine-Design_Basic_Cell" ) ) ;
@ -86,17 +124,66 @@ public class ITReplaceNorthPanel {
findItems . add ( Toolkit . i18nText ( "Fine-Design_Replace_Component" ) ) ;
findItems . add ( Toolkit . i18nText ( "Fine-Design_Replace_Component" ) ) ;
findItems . add ( Toolkit . i18nText ( "Fine-Design_Basic_Widget" ) ) ;
findItems . add ( Toolkit . i18nText ( "Fine-Design_Basic_Widget" ) ) ;
findItems . add ( Toolkit . i18nText ( "Fine-Design_Basic_Formula" ) ) ;
findItems . add ( Toolkit . i18nText ( "Fine-Design_Basic_Formula" ) ) ;
findSettingItems . add ( SettingContent . CELL_FORMAT_NAME ) ;
findSettingItems . add ( SettingContent . CELL_DATA_SETTING_NAME ) ;
findSettingItems . add ( SettingContent . CELL_DS_COLUMN_NAME ) ;
findSettingItems . add ( SettingContent . DATASOURCE_CONNECTION_NAME ) ;
findSettingItems . add ( SettingContent . DATASOURCE_COLLECT_NAME ) ;
formatItems . add ( SettingContent . FORMAT_COMMON ) ;
formatItems . add ( SettingContent . FORMAT_NUMBER ) ;
formatItems . add ( SettingContent . FORMAT_MONEY ) ;
formatItems . add ( SettingContent . FORMAT_PERCENT ) ;
formatItems . add ( SettingContent . FORMAT_PERMILLAGE ) ;
formatItems . add ( SettingContent . FORMAT_SCIENCE ) ;
formatItems . add ( SettingContent . FORMAT_DATE ) ;
formatItems . add ( SettingContent . FORMAT_TIME ) ;
formatItems . add ( SettingContent . FORMAT_TEXT ) ;
digitItems . add ( SettingContent . DIGIT_SETTING_GROUP ) ;
digitItems . add ( SettingContent . DIGIT_SETTING_LIST ) ;
digitItems . add ( SettingContent . DIGIT_SETTING_SUM ) ;
groupItems . add ( SettingContent . GROUP_COMMON ) ;
groupItems . add ( SettingContent . GROUP_CONTINUUM ) ;
dsColumnItems . add ( SettingContent . CONNECTION_TEMPLATE ) ;
}
}
public ITReplaceNorthPanel ( ) {
public ITReplaceNorthPanel ( ) {
upPanel = new JPanel ( null ) ;
cardLayout = new CardLayout ( ) ;
cardPanel = new JPanel ( cardLayout ) ;
upContentPanel = new JPanel ( null ) ;
upSettingPanel = new JPanel ( null ) ;
initContentPanel ( ) ;
initSettingPanel ( ) ;
cardPanel . add ( contentScrollPane , CARD_CONTENT ) ;
cardPanel . add ( upSettingPanel , CARD_SETTING ) ;
}
/ * *
* 限制尺寸
*
* @param width
* /
public void setLimitSize ( int width ) {
upContentPanel . setMaximumSize ( new Dimension ( limit_width , HEIGHT ) ) ;
upContentPanel . setPreferredSize ( new Dimension ( limit_width , HEIGHT ) ) ;
}
/ * *
* 初始化模板内容查找面板
* /
public void initContentPanel ( ) {
findLabel = new UILabel ( Toolkit . i18nText ( "Fine-Design_Replace_Search_Element" ) ) ;
findLabel = new UILabel ( Toolkit . i18nText ( "Fine-Design_Replace_Search_Element" ) ) ;
rangeLabel = new UILabel ( Toolkit . i18nText ( "Fine-Design_Replace_Search_Range" ) ) ;
rangeLabel = new UILabel ( Toolkit . i18nText ( "Fine-Design_Replace_Search_Range" ) ) ;
iconLabel = new UILabel ( CHANGE_ICON ) ;
iconLabel = new UILabel ( CHANGE_ICON ) ;
resultLabel = new UILabel ( ) ;
resultLabel = new UILabel ( ) ;
String [ ] rangeItems = new String [ ] { Toolkit . i18nText ( "Fine-Design_Basic_Export_JS_Template_Current" ) } ;
String [ ] replaceInputItems = new String [ ] { StringUtils . EMPTY } ;
String [ ] replaceInputItems = new String [ ] { StringUtils . EMPTY } ;
findCombobox = new UIComboBox ( findItems . toArray ( ) ) ;
findCombobox = new UIComboBox ( findItems . toArray ( ) ) ;
rangeCombobox = new UIComboBox ( rangeItems ) ;
rangeCombobox = new UIComboBox ( rangeItems ) ;
@ -122,32 +209,198 @@ public class ITReplaceNorthPanel {
replaceButton = new UIButton ( Toolkit . i18nText ( "Fine-Design_Replace_Button" ) ) ;
replaceButton = new UIButton ( Toolkit . i18nText ( "Fine-Design_Replace_Button" ) ) ;
searchButton = new UIButton ( Toolkit . i18nText ( "Fine-Design_Search_Button" ) ) ;
searchButton = new UIButton ( Toolkit . i18nText ( "Fine-Design_Search_Button" ) ) ;
upPanel . setPreferredSize ( new Dimension ( limit_width , HEIGHT ) ) ;
upContent Panel . setPreferredSize ( new Dimension ( limit_width , HEIGHT ) ) ;
s crollPane = new UIScrollPane ( upPanel , ScrollPaneConstants . VERTICAL_SCROLLBAR_NEVER , ScrollPaneConstants . HORIZONTAL_SCROLLBAR_AS_NEEDED ) ;
contentS crollPane = new UIScrollPane ( upContent Panel , ScrollPaneConstants . VERTICAL_SCROLLBAR_NEVER , ScrollPaneConstants . HORIZONTAL_SCROLLBAR_AS_NEEDED ) ;
upPanel . add ( findLabel ) ;
upContent Panel . add ( findLabel ) ;
upPanel . add ( rangeLabel ) ;
upContent Panel . add ( rangeLabel ) ;
upPanel . add ( resultLabel ) ;
upContent Panel . add ( resultLabel ) ;
upPanel . add ( findCombobox ) ;
upContent Panel . add ( findCombobox ) ;
upPanel . add ( rangeCombobox ) ;
upContent Panel . add ( rangeCombobox ) ;
upPanel . add ( findInputCombobox ) ;
upContent Panel . add ( findInputCombobox ) ;
upPanel . add ( replaceInputCombobox ) ;
upContent Panel . add ( replaceInputCombobox ) ;
upPanel . add ( matchRadioButton ) ;
upContent Panel . add ( matchRadioButton ) ;
upPanel . add ( replaceButton ) ;
upContent Panel . add ( replaceButton ) ;
upPanel . add ( searchButton ) ;
upContent Panel . add ( searchButton ) ;
upPanel . add ( iconLabel ) ;
upContent Panel . add ( iconLabel ) ;
s crollPane. setBorder ( BorderFactory . createEmptyBorder ( ) ) ;
contentS crollPane. setBorder ( BorderFactory . createEmptyBorder ( ) ) ;
}
}
/ * *
/ * *
* 限制尺寸
* 初始化设置项查找面板
* /
public void initSettingPanel ( ) {
findSettingLabel = new UILabel ( Toolkit . i18nText ( "Fine-Design_Replace_Search_Element" ) ) ;
rangeSettingLabel = new UILabel ( Toolkit . i18nText ( "Fine-Design_Replace_Search_Range" ) ) ;
settingResultLabel = new UILabel ( ) ;
findSettingComboBox = new UIComboBox ( findSettingItems . toArray ( ) ) ;
rangeSettingComboBox = new UIComboBox ( rangeItems ) ;
findSettingInputComboBox = new UIComboBox ( formatItems . toArray ( ) ) {
@Override
public void setEditor ( ComboBoxEditor anEditor ) {
super . setEditor ( new ITComboBoxEditor ( ) ) ;
}
} ;
findSettingInputComboBox . setSelectedIndex ( - 1 ) ;
replaceSettingInputComboBox = new UIComboBox ( formatItems . toArray ( ) ) {
@Override
public void setEditor ( ComboBoxEditor anEditor ) {
super . setEditor ( new ITComboBoxEditor ( ) ) ;
}
} ;
replaceSettingInputComboBox . setSelectedIndex ( - 1 ) ;
( ( UITextField ) ( findSettingInputComboBox . getEditor ( ) . getEditorComponent ( ) ) ) . setPlaceholder ( Toolkit . i18nText ( "Fine-Design_Replace_Choose_Search" ) + SettingContent . CELL_FORMAT_NAME ) ;
findSettingInputComboBox . setEditable ( true ) ;
( ( UITextField ) ( findSettingInputComboBox . getEditor ( ) . getEditorComponent ( ) ) ) . setEditable ( false ) ;
( ( UITextField ) ( replaceSettingInputComboBox . getEditor ( ) . getEditorComponent ( ) ) ) . setPlaceholder ( Toolkit . i18nText ( "Fine-Design_Replace_Choose_Replace" ) + SettingContent . CELL_FORMAT_NAME ) ;
replaceSettingInputComboBox . setEditable ( true ) ;
( ( UITextField ) ( replaceSettingInputComboBox . getEditor ( ) . getEditorComponent ( ) ) ) . setEditable ( false ) ;
iconSettingLabel = new UILabel ( CHANGE_ICON ) ;
findExtraSettingComboBox = new UIComboBox ( groupItems . toArray ( ) ) ;
findExtraSettingComboBox . setVisible ( false ) ;
replaceExtraSettingComboBox = new UIComboBox ( groupItems . toArray ( ) ) ;
replaceExtraSettingComboBox . setVisible ( false ) ;
searchSettingButton = new UIButton ( Toolkit . i18nText ( "Fine-Design_Search_Button" ) ) ;
replaceSettingButton = new UIButton ( Toolkit . i18nText ( "Fine-Design_Replace_Button" ) ) ;
replaceSettingButton . setEnabled ( false ) ;
upSettingPanel . add ( findSettingLabel ) ;
upSettingPanel . add ( rangeSettingLabel ) ;
upSettingPanel . add ( findSettingComboBox ) ;
upSettingPanel . add ( rangeSettingComboBox ) ;
upSettingPanel . add ( findSettingInputComboBox ) ;
upSettingPanel . add ( replaceSettingInputComboBox ) ;
upSettingPanel . add ( iconSettingLabel ) ;
upSettingPanel . add ( findExtraSettingComboBox ) ;
upSettingPanel . add ( replaceExtraSettingComboBox ) ;
upSettingPanel . add ( searchSettingButton ) ;
upSettingPanel . add ( replaceSettingButton ) ;
upSettingPanel . add ( settingResultLabel ) ;
settingScrollPane = new UIScrollPane ( upSettingPanel , ScrollPaneConstants . VERTICAL_SCROLLBAR_NEVER , ScrollPaneConstants . HORIZONTAL_SCROLLBAR_AS_NEEDED ) ;
settingScrollPane . setBorder ( BorderFactory . createEmptyBorder ( ) ) ;
initListener ( ) ;
}
/ * *
* 初始化事件
* /
private void initListener ( ) {
findSettingComboBox . addItemListener ( new ItemListener ( ) {
@Override
public void itemStateChanged ( ItemEvent e ) {
replaceSettingInputComboBox . clearBoxItems ( ) ;
findSettingInputComboBox . clearBoxItems ( ) ;
String str = GeneralUtils . objectToString ( findSettingComboBox . getSelectedItem ( ) ) ;
( ( UITextField ) findSettingInputComboBox . getEditor ( ) . getEditorComponent ( ) ) . setText ( StringUtils . EMPTY ) ;
refreshSettingComboBox ( SettingController . getSettingRefreshItems ( str ) ) ;
setDataSourceComboBoxStatus ( isAllow2Replace ( ) ) ;
replaceSettingButton . setEnabled ( false ) ;
}
} ) ;
findSettingInputComboBox . addItemListener ( new ItemListener ( ) {
@Override
public void itemStateChanged ( ItemEvent e ) {
refreshExtraComboBox ( findSettingInputComboBox , findExtraSettingComboBox ) ;
}
} ) ;
replaceSettingInputComboBox . addItemListener ( new ItemListener ( ) {
@Override
public void itemStateChanged ( ItemEvent e ) {
refreshExtraComboBox ( replaceSettingInputComboBox , replaceExtraSettingComboBox ) ;
}
} ) ;
}
/ * *
* 刷新替换按钮状态
* /
public void refreshSettingReplaceButtonStatus ( ) {
replaceSettingButton . setEnabled ( isAllChoose ( ) ) ;
}
/ * *
* 是否各个选项都有选中内容
*
*
* @param width
* @return 是则返回true
* /
* /
public void setLimitSize ( int width ) {
public boolean isAllChoose ( ) {
upPanel . setMaximumSize ( new Dimension ( limit_width , 161 ) ) ;
String str = GeneralUtils . objectToString ( findSettingComboBox . getSelectedItem ( ) ) ;
upPanel . setPreferredSize ( new Dimension ( limit_width , 161 ) ) ;
String findInputStr = GeneralUtils . objectToString ( findSettingInputComboBox . getSelectedItem ( ) ) ;
String replaceInputStr = GeneralUtils . objectToString ( replaceSettingInputComboBox . getSelectedItem ( ) ) ;
String findExtraStr = GeneralUtils . objectToString ( findExtraSettingComboBox . getSelectedItem ( ) ) ;
String replaceExtraStr = GeneralUtils . objectToString ( replaceExtraSettingComboBox . getSelectedItem ( ) ) ;
return ( ! StringUtils . equals ( str , SettingContent . DATASOURCE_COLLECT_NAME ) & & ! StringUtils . equals ( str , SettingContent . DATASOURCE_CONNECTION_NAME ) )
& & StringUtils . isNotEmpty ( findInputStr )
& & StringUtils . isNotEmpty ( replaceInputStr )
& & StringUtils . isNotEmpty ( findExtraStr )
& & StringUtils . isNotEmpty ( replaceExtraStr ) ;
}
}
/ * *
* 是否支持替换
*
* @return 支持返回true
* /
public boolean isAllow2Replace ( ) {
String str = GeneralUtils . objectToString ( findSettingComboBox . getSelectedItem ( ) ) ;
return ! StringUtils . equals ( str , SettingContent . DATASOURCE_CONNECTION_NAME ) & & ! StringUtils . equals ( str , SettingContent . DATASOURCE_COLLECT_NAME ) ;
}
/ * *
* 设置数据集相关情况下的替换框的状态
*
* @param status
* /
public void setDataSourceComboBoxStatus ( boolean status ) {
replaceSettingButton . setEnabled ( status ) ;
replaceSettingInputComboBox . setEnabled ( status ) ;
replaceExtraSettingComboBox . setEnabled ( status ) ;
}
/ * *
* 刷新延展出的下拉框 ( 第三层 )
*
* @param settingComboBox
* @param extraComboBox
* /
public void refreshExtraComboBox ( UIComboBox settingComboBox , UIComboBox extraComboBox ) {
String str = GeneralUtils . objectToString ( findSettingComboBox . getSelectedItem ( ) ) ;
String parent = GeneralUtils . objectToString ( settingComboBox . getSelectedItem ( ) ) ;
if ( StringUtils . isNotEmpty ( parent ) & & SettingController . match ( str ) ! = null & & SettingController . match ( str ) . hasExpand ( str , parent ) ) {
extraComboBox . clearBoxItems ( ) ;
extraComboBox . setVisible ( true ) ;
extraComboBox . refreshBoxItems ( SettingController . getSettingExtraRefreshItems ( str , parent ) ) ;
extraComboBox . setSelectedIndex ( 0 ) ;
} else {
extraComboBox . setVisible ( false ) ;
}
refreshSettingReplaceButtonStatus ( ) ;
}
/ * *
* 刷新用户选择的输入框 ( 第二层 )
*
* @param list
* /
public void refreshSettingComboBox ( List < String > list ) {
findSettingInputComboBox . clearBoxItems ( ) ;
findSettingInputComboBox . refreshBoxItems ( list ) ;
replaceSettingInputComboBox . clearBoxItems ( ) ;
replaceSettingInputComboBox . refreshBoxItems ( list ) ;
replaceExtraSettingComboBox . setVisible ( false ) ;
findExtraSettingComboBox . setVisible ( false ) ;
}
/ * *
/ * *
* 适配屏幕
* 适配屏幕
@ -162,7 +415,50 @@ public class ITReplaceNorthPanel {
templateWidth = templateWidth - ITReplaceWestPanel . LEFT_WIDTH ;
templateWidth = templateWidth - ITReplaceWestPanel . LEFT_WIDTH ;
inputLength = ( templateWidth - GAP * 5 ) / 2 ;
inputLength = ( templateWidth - GAP * 5 ) / 2 ;
fitContentScreen ( templateWidth ) ;
fitSettingScreen ( templateWidth ) ;
}
/ * *
* 适配屏幕
*
* @param templateWidth 当前设计器宽度
* /
private void fitSettingScreen ( int templateWidth ) {
findSettingLabel . setBounds ( FIRST_X , FIRST_Y , LABEL_WIDTH , COMPONENT_HEIGHT ) ;
findSettingComboBox . setBounds ( SECOND_X , FIRST_Y , inputLength - 4 * GAP , COMPONENT_HEIGHT ) ;
rangeSettingLabel . setBounds ( replaceInputComboBoxX , FIRST_Y , LABEL_WIDTH , COMPONENT_HEIGHT ) ;
rangeSettingComboBox . setBounds ( rangeLabelX + rangeLabelWidth , FIRST_Y , inputLength - 3 * GAP , COMPONENT_HEIGHT ) ;
findSettingInputComboBox . setBounds ( FIRST_X , SECOND_Y , inputLength - GAP , COMPONENT_HEIGHT ) ;
replaceSettingInputComboBox . setBounds ( templateWidth - inputLength - GAP * 2 , SECOND_Y , inputLength , COMPONENT_HEIGHT ) ;
iconSettingLabel . setBounds ( iconX , iconY , iconWidth , iconHeight ) ;
searchSettingButton . setBounds ( searchButtonX , searchButtonY , BUTTON_WIDTH , searchButtonHeight ) ;
replaceSettingButton . setBounds ( replaceButtonX , replaceButtonY , BUTTON_WIDTH , replaceButtonHeight ) ;
settingResultLabel . setBounds ( resultLabelX , resultLabelY , resultLabelWidth , resultLabelHeight ) ;
setExtraBounds ( templateWidth ) ;
}
/ * *
* 设置额外的输入框
*
* @param templateWidth 当前设计器宽度
* /
private void setExtraBounds ( int templateWidth ) {
findExtraSettingComboBox . setBounds ( FIRST_X , THIRD_Y , inputLength - GAP , COMPONENT_HEIGHT ) ;
replaceExtraSettingComboBox . setBounds ( templateWidth - inputLength - GAP * 2 , THIRD_Y , inputLength , COMPONENT_HEIGHT ) ;
}
/ * *
* 模板内容查找面板适配屏幕
*
* @param templateWidth 当前设计器宽度
* /
private void fitContentScreen ( int templateWidth ) {
setFindLabelBounds ( ) ;
setFindLabelBounds ( ) ;
setResultLabelBounds ( templateWidth ) ;
setResultLabelBounds ( templateWidth ) ;
setFindComboboxBounds ( ) ;
setFindComboboxBounds ( ) ;
@ -174,7 +470,6 @@ public class ITReplaceNorthPanel {
setReplaceButtonBounds ( ) ;
setReplaceButtonBounds ( ) ;
setSearchButtonBounds ( ) ;
setSearchButtonBounds ( ) ;
setIconLabelBounds ( ) ;
setIconLabelBounds ( ) ;
}
}
@ -221,12 +516,12 @@ public class ITReplaceNorthPanel {
}
}
public UIScrollPane getScrollPane ( ) {
public UIScrollPane getContent ScrollPane ( ) {
return s crollPane;
return contentS crollPane;
}
}
public void setScrollPane ( UIScrollPane s crollPane) {
public void setContent ScrollPane ( UIScrollPane contentS crollPane) {
this . scrollPane = s crollPane;
this . contentScrollPane = contentS crollPane;
}
}
private void setIconLabelBounds ( ) {
private void setIconLabelBounds ( ) {
@ -320,12 +615,12 @@ public class ITReplaceNorthPanel {
findLabel . setBounds ( findLabelX , findLabelY , findLabelWidth , findLabelHeight ) ;
findLabel . setBounds ( findLabelX , findLabelY , findLabelWidth , findLabelHeight ) ;
}
}
public JPanel getUpPanel ( ) {
public JPanel getUpContent Panel ( ) {
return upPanel ;
return upContent Panel ;
}
}
public void setUpPanel ( JPanel upPanel ) {
public void setUpContent Panel ( JPanel upContent Panel ) {
this . upPanel = upPanel ;
this . upContent Panel = upContent Panel ;
}
}
public UILabel getFindLabel ( ) {
public UILabel getFindLabel ( ) {
@ -407,4 +702,77 @@ public class ITReplaceNorthPanel {
public void setSearchButton ( UIButton searchButton ) {
public void setSearchButton ( UIButton searchButton ) {
this . searchButton = searchButton ;
this . searchButton = searchButton ;
}
}
public static CardLayout getCardLayout ( ) {
return cardLayout ;
}
public static JPanel getCardPanel ( ) {
return cardPanel ;
}
public UIButton getReplaceSettingButton ( ) {
return replaceSettingButton ;
}
public void setReplaceSettingButton ( UIButton replaceSettingButton ) {
this . replaceSettingButton = replaceSettingButton ;
}
public UIButton getSearchSettingButton ( ) {
return searchSettingButton ;
}
public void setSearchSettingButton ( UIButton searchSettingButton ) {
this . searchSettingButton = searchSettingButton ;
}
public UIComboBox getFindSettingInputComboBox ( ) {
return findSettingInputComboBox ;
}
public void setFindSettingInputComboBox ( UIComboBox findSettingInputComboBox ) {
this . findSettingInputComboBox = findSettingInputComboBox ;
}
public UIComboBox getReplaceSettingInputComboBox ( ) {
return replaceSettingInputComboBox ;
}
public void setReplaceSettingInputComboBox ( UIComboBox replaceSettingInputComboBox ) {
this . replaceSettingInputComboBox = replaceSettingInputComboBox ;
}
public UIComboBox getFindExtraSettingComboBox ( ) {
return findExtraSettingComboBox ;
}
public void setFindExtraSettingComboBox ( UIComboBox findExtraSettingComboBox ) {
this . findExtraSettingComboBox = findExtraSettingComboBox ;
}
public UIComboBox getReplaceExtraSettingComboBox ( ) {
return replaceExtraSettingComboBox ;
}
public void setReplaceExtraSettingComboBox ( UIComboBox replaceExtraSettingComboBox ) {
this . replaceExtraSettingComboBox = replaceExtraSettingComboBox ;
}
public UIComboBox getFindSettingComboBox ( ) {
return findSettingComboBox ;
}
public void setFindSettingComboBox ( UIComboBox findSettingComboBox ) {
this . findSettingComboBox = findSettingComboBox ;
}
public UILabel getSettingResultLabel ( ) {
return settingResultLabel ;
}
public void setSettingResultLabel ( UILabel settingResultLabel ) {
this . settingResultLabel = settingResultLabel ;
}
}
}