@ -1,6 +1,9 @@
package com.fr.design.data.tabledata.tabledatapane ;
import com.fr.base.BaseUtils ;
import com.fine.theme.icon.LazyIcon ;
import com.fine.theme.utils.FineUIScale ;
import com.formdev.flatlaf.ui.FlatUIUtils ;
import com.formdev.flatlaf.util.ScaledEmptyBorder ;
import com.fr.base.Parameter ;
import com.fr.base.ParameterHelper ;
import com.fr.base.Utils ;
@ -12,6 +15,7 @@ import com.fr.data.impl.FileTableData;
import com.fr.data.impl.TextTableData ;
import com.fr.data.impl.XMLTableData ;
import com.fr.design.actions.UpdateAction ;
import com.fr.design.constants.LayoutConstants ;
import com.fr.design.data.datapane.preview.PreviewTablePane ;
import com.fr.design.dialog.BasicPane ;
import com.fr.design.dialog.FineJOptionPane ;
@ -27,9 +31,6 @@ import com.fr.design.gui.itextfield.UITextField;
import com.fr.design.gui.itoolbar.UIToolbar ;
import com.fr.design.gui.itree.refreshabletree.ExpandMutableTreeNode ;
import com.fr.design.i18n.Toolkit ;
import com.fr.design.layout.FRGUIPaneFactory ;
import com.fr.design.layout.TableLayout ;
import com.fr.design.layout.TableLayoutHelper ;
import com.fr.design.mainframe.DesignerContext ;
import com.fr.design.menu.ToolBarDef ;
import com.fr.design.utils.gui.GUICoreUtils ;
@ -47,7 +48,6 @@ import com.fr.stable.StringUtils;
import com.fr.stable.xml.XMLReadable ;
import com.fr.stable.xml.XMLableReader ;
import javax.swing.BorderFactory ;
import javax.swing.ButtonGroup ;
import javax.swing.JOptionPane ;
import javax.swing.JPanel ;
@ -62,9 +62,7 @@ import javax.swing.tree.TreePath;
import javax.swing.tree.TreeSelectionModel ;
import java.awt.BorderLayout ;
import java.awt.Color ;
import java.awt.Component ;
import java.awt.Dimension ;
import java.awt.GridLayout ;
import java.awt.event.ActionEvent ;
import java.awt.event.ActionListener ;
import java.awt.event.MouseAdapter ;
@ -80,6 +78,12 @@ import java.util.ArrayList;
import java.util.List ;
import java.util.Objects ;
import static com.fine.swing.ui.layout.Layouts.cell ;
import static com.fine.swing.ui.layout.Layouts.column ;
import static com.fine.swing.ui.layout.Layouts.flex ;
import static com.fine.swing.ui.layout.Layouts.row ;
import static com.fine.theme.utils.FineUIUtils.wrapComponentWithTitle ;
public class FileTableDataPane extends AbstractTableDataPane < FileTableData > {
private static final int TEXT = 0 ;
private static final int EXCEL = 1 ;
@ -104,8 +108,6 @@ public class FileTableDataPane extends AbstractTableDataPane<FileTableData> {
private UIButton testConnection ;
private XMLNodeTree xmlNodeTree ;
private Parameter [ ] params ;
private JPanel filePath ;
private XMLNodeTreePane nodeTreePane ;
private UICheckBox needColumnNameCheckBox ; // 第一行是否作为标题
private UIRadioButton tableDismemberRadioButton ; // 制表符
@ -116,41 +118,32 @@ public class FileTableDataPane extends AbstractTableDataPane<FileTableData> {
private UICheckBox ignoreOneMoreDelimiterCheckBox ; // 连续分隔符是否作为单一
private UIComboBox charsetComboBox ;
private UILabel encodeLabel ;
private UILabel dismenberLabel ;
private UILabel keyPointLaber ;
private ExpandMutableTreeNode selectedNode = null ;
private ExpandMutableTreeNode finalSelectedNode = null ;
private ArrayList < String > xmlColumnsList = new ArrayList < String > ( ) ;
private static final int SETPANELWIDTH = 337 ;
private static final int WIDTH = 317 ;
private static final int HEIGHT = 453 ;
private static final int GAP = 23 ;
private static final double LOCAL_WIDTH_RATIO = 0 . 62 ;
private static final double URL_WIDTH_RATIO = 0 . 56 ;
public FileTableDataPane ( ) {
this ( SETPANELWIDTH , WIDTH , HEIGHT , GAP ) ;
this ( LOCAL_WIDTH_RATIO , URL_WIDTH_RATIO ) ;
}
public FileTableDataPane ( int setPanelWidth , int width , int height , int gap ) {
this . setLayout ( new BorderLayout ( gap , 0 ) ) ;
JPanel northPanel = new JPanel ( new BorderLayout ( ) ) ;
JPanel type = new JPanel ( ) ;
type . add ( new UILabel ( com . fr . design . i18n . Toolkit . i18nText ( "Fine-Design_Report_Utils_File_Type" ) + ":" ) ) ;
public FileTableDataPane ( double localWidthRatio , double urlWidthRatio ) {
this . setLayout ( new BorderLayout ( ) ) ;
this . setBorder ( new ScaledEmptyBorder ( 10 , 10 , 10 , 10 ) ) ;
//文件类型
JPanel fileType = new JPanel ( new BorderLayout ( ) ) ;
String [ ] item = { "TXT" , "Excel" , "XML" } ;
fileTypeComboBox = new UIComboBox ( item ) ;
fileTypeComboBox . setPreferredSize ( new Dimension ( 100 , 20 ) ) ;
type . add ( fileTypeComboBox ) ;
northPanel . add ( type , BorderLayout . WEST ) ;
// 最上面的pane,文件选择
JPanel centerPanel = new JPanel ( ) ;
centerPanel . setPreferredSize ( new Dimension ( 522 , 200 ) ) ;
centerPanel . setBorder ( BorderFactory . createTitledBorder ( com . fr . design . i18n . Toolkit . i18nText ( "Fine-Design_Basic_File_Address" ) ) ) ;
addToCenterPanel ( centerPanel ) ;
fileType . add ( row ( LayoutConstants . HGAP_LARGE ,
cell ( new UILabel ( com . fr . design . i18n . Toolkit . i18nText ( "Fine-Design_Report_Utils_File_Type" ) ) ) . weight ( 0 . 12 ) ,
cell ( fileTypeComboBox ) . weight ( 0 . 18 ) ,
flex ( 0 . 7 )
) . getComponent ( ) ) ;
// 下面的pane, 参数面板
//参数面板
ParameterTableModel model = new ParameterTableModel ( ) {
@Override
public UITableEditAction [ ] createAction ( ) {
@ -158,65 +151,75 @@ public class FileTableDataPane extends AbstractTableDataPane<FileTableData> {
}
} ;
editorPane = new UITableEditorPane < ParameterProvider > ( model ) ;
editorPane . setPreferredSize ( new Dimension ( 355 , 130 ) ) ;
centerPanel . add ( editorPane , BorderLayout . SOUTH ) ;
JPanel southPanel = new JPanel ( new BorderLayout ( ) ) ;
JPanel setPanel = new JPanel ( ) ;
southPanel . add ( setPanel , BorderLayout . CENTER ) ;
setPanel . setPreferredSize ( new Dimension ( setPanelWidth , 460 ) ) ;
setPanel . setBorder ( BorderFactory . createTitledBorder ( com . fr . design . i18n . Toolkit . i18nText ( "Fine-Design_Report_Set" ) ) ) ;
JPanel controlPane = textSetPanel ( width , height ) ;
setPanel . add ( controlPane , BorderLayout . NORTH ) ;
fileTypeComboBox . addActionListener ( getFileTypeListener ( setPanel , width , height ) ) ;
this . add ( northPanel , BorderLayout . NORTH ) ;
this . add ( centerPanel , BorderLayout . CENTER ) ;
this . add ( southPanel , BorderLayout . EAST ) ;
editorPane . setBorder ( new ScaledEmptyBorder ( 0 , 0 , 0 , 10 ) ) ;
editorPane . setPreferredSize ( FineUIScale . scale ( new Dimension ( - 1 , 150 ) ) ) ;
//左侧文件地址pane
JPanel leftPanel = new JPanel ( new BorderLayout ( ) ) ;
leftPanel . add ( column (
LayoutConstants . VERTICAL_GAP ,
cell ( getCenterPanel ( localWidthRatio , urlWidthRatio ) ) ,
cell ( editorPane )
) . getComponent ( ) ) ;
//右侧设定pane
JPanel rightPanel = new JPanel ( new BorderLayout ( ) ) ;
rightPanel . setBorder ( new ScaledEmptyBorder ( 0 , 0 , 0 , 10 ) ) ;
rightPanel . add ( getTextSetPanel ( ) ) ;
fileTypeComboBox . addActionListener ( getFileTypeListener ( rightPanel ) ) ;
//文件数据集整体布局,服务器数据集/模板数据集下的文件数据集,创建文件数据集,三处面板通用布局
this . add ( column ( LayoutConstants . VERTICAL_GAP ,
cell ( fileType ) ,
row ( 20 ,
cell ( wrapComponentWithTitle ( leftPanel , com . fr . design . i18n . Toolkit . i18nText ( "Fine-Design_Basic_File_Address" ) ) ) . weight ( 0 . 5 ) ,
cell ( wrapComponentWithTitle ( rightPanel , com . fr . design . i18n . Toolkit . i18nText ( "Fine-Design_Report_Set" ) ) ) . weight ( 0 . 5 )
)
) . getComponent ( ) ) ;
}
private void addToCenterPanel ( JPanel centerPanel ) {
localFileRadioButton = new UIRadioButton ( com . fr . design . i18n . Toolkit . i18nText ( "Fine-Design_Basic_Local_File" ) + ":" , true ) ;
urlFileRadioButton = new UIRadioButton ( "URL:" , false ) ;
/ * *
* 文件地址上方的面板 - 文件选择
* @return
* /
private JPanel getCenterPanel ( double localWidthRatio , double urlWidthRatio ) {
// 本地文件/URL
localFileRadioButton = new UIRadioButton ( com . fr . design . i18n . Toolkit . i18nText ( "Fine-Design_Basic_Local_File" ) , true ) ;
urlFileRadioButton = new UIRadioButton ( "URL" , false ) ;
ButtonGroup bg = new ButtonGroup ( ) ;
bg . add ( localFileRadioButton ) ;
bg . add ( urlFileRadioButton ) ;
localFileRadioButton . addActionListener ( radioActionListener ) ;
urlFileRadioButton . addActionListener ( radioActionListener ) ;
urlFileRadioButton . setForeground ( new Color ( 143 , 142 , 139 ) ) ;
localFileRadioButton . setForeground ( Color . black ) ;
localText = new UITextField ( ) ;
localText . setPreferredSize ( new Dimension ( 195 , 20 ) ) ;
urlText = new UITextField ( ) ;
urlText . setPreferredSize ( new Dimension ( 195 , 20 ) ) ;
urlText . setEditable ( false ) ;
// 选择按钮
chooseFile = new UIButton ( com . fr . design . i18n . Toolkit . i18nText ( "Fine-Design_Basic_Selection" ) ) ;
chooseFile . addActionListener ( chooseFileListener ) ;
// 测试连接按钮
testConnection = new UIButton ( com . fr . design . i18n . Toolkit . i18nText ( "Fine-Design_Basic_Datasource_Test_Connection" ) ) ;
testConnection . setEnabled ( false ) ;
testConnection . addActionListener ( testConnectionListener ) ; // 测试连接按钮
JPanel textPanel = new JPanel ( new GridLayout ( 2 , 1 , 15 , 15 ) ) ;
JPanel textFieldPanel = new JPanel ( new GridLayout ( 2 , 1 , 15 , 15 ) ) ;
JPanel buttonPanel = new JPanel ( new GridLayout ( 2 , 1 , 15 , 15 ) ) ;
textPanel . add ( localFileRadioButton ) ;
textPanel . add ( urlFileRadioButton ) ;
textFieldPanel . add ( localText ) ;
textFieldPanel . add ( urlText ) ;
buttonPanel . add ( chooseFile ) ;
buttonPanel . add ( testConnection ) ;
filePath = FRGUIPaneFactory . createBorderLayout_S_Pane ( ) ;
filePath . add ( textPanel , BorderLayout . WEST ) ;
filePath . add ( textFieldPanel , BorderLayout . CENTER ) ;
filePath . add ( buttonPanel , BorderLayout . EAST ) ;
centerPanel . add ( filePath , BorderLayout . NORTH ) ;
// 中间的pane,提示信息
testConnection . addActionListener ( testConnectionListener ) ;
// 提示信息
String tipContent = com . fr . design . i18n . Toolkit . i18nText ( "Fine-Design_Basic_Type_Parameter" ) + "reportlets/excel/FineReport${abc}." + "txt" + "<br>"
+ "http://192.168.100.120:8080/XXServer/Report/excel${abc}.jsp<br>" + " </body> </html> " ;
tips = new UILabel ( tipContent ) ;
centerPanel . add ( tips , BorderLayout . CENTER ) ;
return column (
LayoutConstants . VERTICAL_GAP ,
row (
LayoutConstants . HGAP_LARGE ,
cell ( localFileRadioButton ) . weight ( 0 . 25 ) ,
cell ( localText ) . weight ( localWidthRatio ) ,
cell ( chooseFile ) . weight ( 0 . 75 - localWidthRatio )
) ,
row (
LayoutConstants . HGAP_LARGE ,
cell ( urlFileRadioButton ) . weight ( 0 . 25 ) ,
cell ( urlText ) . weight ( urlWidthRatio ) ,
cell ( testConnection ) . weight ( 0 . 75 - urlWidthRatio )
) ,
cell ( tips ) . weight ( 1 )
) . with ( it - > it . setBorder ( new ScaledEmptyBorder ( 0 , 0 , 0 , 10 ) ) ) . getComponent ( ) ;
}
private ActionListener testConnectionListener = new ActionListener ( ) {
@ -249,7 +252,7 @@ public class FileTableDataPane extends AbstractTableDataPane<FileTableData> {
}
} ;
private void previewPanel ( JPanel jPanel ) {
private JPanel getPreviewPanel ( ) {
JPanel previewPanel = new JPanel ( new BorderLayout ( ) ) ;
UIButton preview = new UIButton ( com . fr . design . i18n . Toolkit . i18nText ( "Fine-Design_Basic_Preview" ) ) ;
preview . addActionListener ( new ActionListener ( ) {
@ -259,56 +262,33 @@ public class FileTableDataPane extends AbstractTableDataPane<FileTableData> {
}
} ) ;
previewPanel . add ( preview , BorderLayout . EAST ) ;
jPanel . add ( previewPanel , BorderLayout . SOUTH ) ;
return previewPanel ;
}
private JPanel xmlSetPanel ( int width , int height ) {
/ * *
* XML设定Pane
* @return
* /
private JPanel getXmlSetPanel ( ) {
// xml设置pane
JPanel controlPane = new JPanel ( ) ;
JPanel northPane = new JPanel ( new BorderLayout ( 8 , 8 ) ) ;
JPanel northTopPane = new JPanel ( new BorderLayout ( 8 , 8 ) ) ;
JPanel southPane = new JPanel ( new BorderLayout ( 8 , 8 ) ) ;
JPanel southTopPane = new JPanel ( new BorderLayout ( 8 , 8 ) ) ;
controlPane . setLayout ( new BorderLayout ( 8 , 8 ) ) ;
controlPane . setPreferredSize ( new Dimension ( width , height ) ) ;
JPanel comboboxPanel = new JPanel ( new BorderLayout ( 8 , 8 ) ) ;
encodeLabel = new UILabel ( com . fr . design . i18n . Toolkit . i18nText ( "Fine-Design_Basic_Encoding_Type" ) + ":" ) ;
encodeLabel = new UILabel ( com . fr . design . i18n . Toolkit . i18nText ( "Fine-Design_Basic_Encoding_Type" ) ) ;
encodingComboBox = new UIComboBox ( EncodeConstants . ALL_ENCODING_ARRAY ) ;
encodingComboBox . setSelectedIndex ( 4 ) ;
encodingComboBox . setPreferredSize ( new Dimension ( 90 , 20 ) ) ;
JPanel treeContainerPane = new JPanel ( ) ;
treeContainerPane . setLayout ( new BorderLayout ( 8 , 8 ) ) ;
nodeTreePane = new XMLNodeTreePane ( ) ;
treeContainerPane . add ( nodeTreePane , BorderLayout . CENTER ) ;
comboboxPanel . add ( encodeLabel , BorderLayout . WEST ) ;
comboboxPanel . add ( encodingComboBox , BorderLayout . CENTER ) ;
northPane . add ( comboboxPanel , BorderLayout . EAST ) ;
northTopPane . add ( northPane , BorderLayout . WEST ) ;
southTopPane . add ( southPane , BorderLayout . WEST ) ;
southTopPane . add ( treeContainerPane , BorderLayout . CENTER ) ;
controlPane . add ( northTopPane , BorderLayout . NORTH ) ;
controlPane . add ( southTopPane , BorderLayout . CENTER ) ;
previewPanel ( controlPane ) ;
return controlPane ;
return column (
LayoutConstants . VGAP_MEDIUM ,
row ( LayoutConstants . HORIZONTAL_GAP , cell ( encodeLabel ) . weight ( 0 . 2 ) , cell ( encodingComboBox ) . weight ( 0 . 8 ) ) ,
cell ( new XMLNodeTreePane ( ) ) ,
cell ( getPreviewPanel ( ) )
) . getComponent ( ) ;
}
private JPanel excelSetPanel ( int width , int height ) {
// excel设置pane
int checkBoxWidth = width - EIGHT ;
JPanel controlPane = new JPanel ( ) ;
JPanel northPane = new JPanel ( new BorderLayout ( 8 , 8 ) ) ;
controlPane . setLayout ( new BorderLayout ( ) ) ;
controlPane . setPreferredSize ( new Dimension ( width , height ) ) ;
/ * *
* Excel设定Pane
* @return
* /
private JPanel getExcelSetPanel ( ) {
needColumnNameCheckBox = new UICheckBox ( com . fr . design . i18n . Toolkit . i18nText ( "Fine-Design_Basic_FirstRow_IS_Column_Name" ) , false ) ;
needColumnNameCheckBox . setPreferredSize ( new Dimension ( checkBoxWidth , 20 ) ) ;
northPane . add ( needColumnNameCheckBox , BorderLayout . EAST ) ;
controlPane . add ( northPane , BorderLayout . NORTH ) ;
previewPanel ( controlPane ) ;
return controlPane ;
return column ( cell ( needColumnNameCheckBox ) , cell ( getPreviewPanel ( ) ) ) . getComponent ( ) ;
}
private String getFilePathFromUrlOrLocal ( ) {
@ -346,34 +326,31 @@ public class FileTableDataPane extends AbstractTableDataPane<FileTableData> {
// return (uri.matches("https*://.+|\\$\\{.+\\}.*"));
}
private JPanel textSetPanel ( int width , int height ) {
// text设置pane
JPanel controlPane = new JPanel ( ) ;
controlPane . setLayout ( new BorderLayout ( ) ) ;
controlPane . setPreferredSize ( new Dimension ( width , height ) ) ;
JPanel northPane = new JPanel ( new BorderLayout ( 8 , 8 ) ) ;
addToNorthPane ( northPane ) ;
controlPane . add ( northPane , BorderLayout . WEST ) ;
previewPanel ( controlPane ) ;
return control Pane ;
/ * *
* TXT设定Pane
* @return
* /
private JPanel getTextSetPanel ( ) {
initRatioButton ( ) ;
//编码类型
encodeLabel = new UILabel ( com . fr . design . i18n . Toolkit . i18nText ( "Fine-Design_Basic_Encoding_Type" ) ) ;
charsetComboBox = new UIComboBox ( EncodeConstants . ALL_ENCODING_ARRAY ) ;
return column ( cell ( getTxtCe nte rPane ( ) ) , cell ( getPreview Panel ( ) ) ) . getComponent ( ) ;
}
private void addToNorthPane ( JPanel northPane ) {
double f = TableLayout . FILL ;
double p = TableLayout . PREFERRED ;
double [ ] columnSize = { f , p , p } ;
double [ ] rowSize = { B , B , B , B , B , B , B } ;
needColumnNameCheckBox = new UICheckBox ( com . fr . design . i18n . Toolkit . i18nText ( "Fine-Design_Basic_FirstRow_IS_Column_Name" ) , true ) ;
dismenberLabel = new UILabel ( com . fr . design . i18n . Toolkit . i18nText ( "Fine-Design_Basic_Dismenber" ) + ":" ) ;
/ * *
* 初始化Button
* /
private void initRatioButton ( ) {
tableDismemberRadioButton = new UIRadioButton ( com . fr . design . i18n . Toolkit . i18nText ( "Fine-Design_Basic_Table_Dismember" ) , false ) ;
tableDismemberRadioButton . setToolTipText ( com . fr . design . i18n . Toolkit . i18nText ( "Fine-Design_Basic_Table_Dismember" ) ) ;
spaceDismenberRadioButton = new UIRadioButton ( com . fr . design . i18n . Toolkit . i18nText ( "Fine-Design_Basic_Space" ) , true ) ;
spaceDismenberRadioButton . setToolTipText ( com . fr . design . i18n . Toolkit . i18nText ( "Fine-Design_Basic_Space" ) ) ;
commaDismenberRadioButton = new UIRadioButton ( com . fr . design . i18n . Toolkit . i18nText ( "Fine-Design_Basic_Comma_Dismenber" ) , false ) ;
commaDismenberRadioButton . setToolTipText ( com . fr . design . i18n . Toolkit . i18nText ( "Fine-Design_Basic_Comma_Dismenber" ) ) ;
otherDismenberRadioButton = new UIRadioButton ( com . fr . design . i18n . Toolkit . i18nText ( "Fine-Design_Report_Other" ) + ":" , false ) ;
otherDismenberRadioButton = new UIRadioButton ( com . fr . design . i18n . Toolkit . i18nText ( "Fine-Design_Report_Other" ) , false ) ;
otherDismenberRadioButton . setToolTipText ( com . fr . design . i18n . Toolkit . i18nText ( "Fine-Design_Report_Other" ) ) ;
otherDismenberTextField = new UITextField ( 8 ) ;
otherDismenberTextField = new UITextField ( ) ;
otherDismenberTextField . setEditable ( false ) ;
otherDismenberRadioButton . addChangeListener ( new ChangeListener ( ) {
@Override
@ -385,6 +362,7 @@ public class FileTableDataPane extends AbstractTableDataPane<FileTableData> {
}
}
} ) ;
needColumnNameCheckBox = new UICheckBox ( com . fr . design . i18n . Toolkit . i18nText ( "Fine-Design_Basic_FirstRow_IS_Column_Name" ) , true ) ;
ButtonGroup bg2 = new ButtonGroup ( ) ;
bg2 . add ( tableDismemberRadioButton ) ;
bg2 . add ( spaceDismenberRadioButton ) ;
@ -392,18 +370,38 @@ public class FileTableDataPane extends AbstractTableDataPane<FileTableData> {
bg2 . add ( otherDismenberRadioButton ) ;
ignoreOneMoreDelimiterCheckBox = new UICheckBox ( com . fr . design . i18n . Toolkit . i18nText ( "Fine-Design_Basic_Series_Dismenber_As_Single" ) , true ) ;
UIComponentUtils . setLineWrap ( ignoreOneMoreDelimiterCheckBox ) ;
encodeLabel = new UILabel ( com . fr . design . i18n . Toolkit . i18nText ( "Fine-Design_Basic_Encoding_Type" ) + ":" ) ;
charsetComboBox = new UIComboBox ( EncodeConstants . ALL_ENCODING_ARRAY ) ;
Component [ ] [ ] comps = {
{ encodeLabel , charsetComboBox , null } ,
{ needColumnNameCheckBox , null , null } ,
{ dismenberLabel , tableDismemberRadioButton , null } ,
{ null , spaceDismenberRadioButton , null } ,
{ null , commaDismenberRadioButton , null } ,
{ null , otherDismenberRadioButton , otherDismenberTextField } ,
{ ignoreOneMoreDelimiterCheckBox , null , null }
} ;
northPane . add ( TableLayoutHelper . createTableLayoutPane ( comps , rowSize , columnSize ) , BorderLayout . EAST ) ;
}
/ * *
* 获取TXT中心Pane
* @return
* /
private JPanel getTxtCenterPane ( ) {
//分隔符选项
JPanel separatorOptionsPanel = column (
LayoutConstants . VERTICAL_GAP ,
cell ( tableDismemberRadioButton ) ,
cell ( spaceDismenberRadioButton ) ,
cell ( commaDismenberRadioButton ) ,
row ( cell ( otherDismenberRadioButton ) . weight ( 0 . 2 ) , cell ( otherDismenberTextField ) . weight ( 0 . 8 ) )
) . getComponent ( ) ;
//TXT设定主要面板
return column (
LayoutConstants . VERTICAL_GAP ,
row ( 10 , cell ( encodeLabel ) . weight ( 0 . 2 ) , cell ( charsetComboBox ) . weight ( 0 . 8 ) ) ,
cell ( needColumnNameCheckBox ) ,
row ( 10 ,
cell ( getTopAlignLabelPane ( com . fr . design . i18n . Toolkit . i18nText ( "Fine-Design_Basic_Dismenber" ) ) ) . weight ( 0 . 2 ) ,
cell ( separatorOptionsPanel ) . weight ( 0 . 8 )
) ,
cell ( ignoreOneMoreDelimiterCheckBox )
) . getComponent ( ) ;
}
private JPanel getTopAlignLabelPane ( String labelText ) {
return column ( LayoutConstants . VERTICAL_GAP , cell ( new UILabel ( labelText ) ) )
. with ( it - > it . setBorder ( new ScaledEmptyBorder ( 2 , 0 , 0 , 0 ) ) ) . getComponent ( ) ;
}
private ActionListener radioActionListener = new ActionListener ( ) {
@ -480,24 +478,24 @@ public class FileTableDataPane extends AbstractTableDataPane<FileTableData> {
return suffixToString ;
}
private ActionListener getFileTypeListener ( final JPanel setPanel , final int width , final int height ) {
private ActionListener getFileTypeListener ( final JPanel rightPanel ) {
ActionListener fileTypeListener = new ActionListener ( ) {
@Override
public void actionPerformed ( ActionEvent e ) {
se tPanel. removeAll ( ) ;
righ tPanel. removeAll ( ) ;
localText . setText ( "" ) ;
urlText . setText ( "" ) ;
if ( fileTypeComboBox . getSelectedIndex ( ) = = XML ) {
se tPanel. add ( x mlSetPanel( width , height ) , BorderLayout . NORTH ) ;
righ tPanel. add ( getX mlSetPanel( ) ) ;
} else if ( fileTypeComboBox . getSelectedIndex ( ) = = EXCEL ) {
se tPanel. add ( excelSetPanel ( width , height ) , BorderLayout . NORTH ) ;
righ tPanel. add ( g etE xcelSetPanel( ) ) ;
} else {
se tPanel. add ( textSetPanel ( width , height ) , BorderLayout . NORTH ) ;
righ tPanel. add ( ge tT extSetPanel( ) ) ;
}
String tipContent = com . fr . design . i18n . Toolkit . i18nText ( "Fine-Design_Basic_Type_Parameter" ) + "reportlets/excel/FineReport${abc}." + getFileSuffixToString ( ) + "<br>"
+ "http://192.168.100.120:8080/XXServer/Report/excel${abc}.jsp<br>" + " </body> </html> " ;
tips . setText ( tipContent ) ;
se tPanel. revalidate ( ) ;
righ tPanel. revalidate ( ) ;
}
} ;
@ -507,7 +505,7 @@ public class FileTableDataPane extends AbstractTableDataPane<FileTableData> {
private class RefreshAction extends UITableEditAction {
public RefreshAction ( ) {
this . setName ( com . fr . design . i18n . Toolkit . i18nText ( "Fine-Design_Basic_Refresh" ) ) ;
this . setSmallIcon ( BaseUtils . read Icon( "/com/fr/design/images/control/ refresh.png " ) ) ;
this . setSmallIcon ( new Lazy Icon( "refresh" ) ) ;
}
@Override
@ -818,9 +816,10 @@ public class FileTableDataPane extends AbstractTableDataPane<FileTableData> {
JPanel toolbarPanel = new JPanel ( new BorderLayout ( ) ) ;
this . setLayout ( new BorderLayout ( ) ) ;
xmlNodeTree = new XMLNodeTree ( ) ;
xmlNodeTree . setBackground ( FlatUIUtils . getUIColor ( "fill.normal" , Color . WHITE ) ) ;
this . add ( new JScrollPane ( xmlNodeTree ) ) ;
keyPointLaber = new UILabel ( Toolkit . i18nText ( "Fine-Design_Basic_Key_Point" ) + ":" ) ;
keyPointLaber = new UILabel ( Toolkit . i18nText ( "Fine-Design_Basic_Key_Point" ) ) ;
refreshAction = new RefreshParameterAction ( ) ;
ToolBarDef toolbarDef = new ToolBarDef ( ) ;
toolbarDef . addShortCut ( refreshAction ) ;
@ -840,7 +839,7 @@ public class FileTableDataPane extends AbstractTableDataPane<FileTableData> {
public RefreshParameterAction ( ) {
this . setName ( Toolkit . i18nText ( "Fine-Design_Basic_Refresh" ) ) ;
this . setMnemonic ( 'r' ) ;
this . setSmallIcon ( BaseUtils . read Icon( "/com/fr/design/images/control/ refresh.png " ) ) ;
this . setSmallIcon ( new Lazy Icon( "refresh" ) ) ;
}
@Override