|
|
@ -76,6 +76,7 @@ import java.net.MalformedURLException; |
|
|
|
import java.net.URL; |
|
|
|
import java.net.URL; |
|
|
|
import java.util.ArrayList; |
|
|
|
import java.util.ArrayList; |
|
|
|
import java.util.List; |
|
|
|
import java.util.List; |
|
|
|
|
|
|
|
import java.util.Objects; |
|
|
|
|
|
|
|
|
|
|
|
public class FileTableDataPane extends AbstractTableDataPane<FileTableData> { |
|
|
|
public class FileTableDataPane extends AbstractTableDataPane<FileTableData> { |
|
|
|
private static final int TEXT = 0; |
|
|
|
private static final int TEXT = 0; |
|
|
@ -126,12 +127,12 @@ public class FileTableDataPane extends AbstractTableDataPane<FileTableData> { |
|
|
|
private static final int GAP = 23; |
|
|
|
private static final int GAP = 23; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public FileTableDataPane(){ |
|
|
|
public FileTableDataPane() { |
|
|
|
this(SETPANELWIDTH,WIDTH,HEIGHT,GAP); |
|
|
|
this(SETPANELWIDTH, WIDTH, HEIGHT, GAP); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public FileTableDataPane(int setPanelWidth,int width,int height,int gap) { |
|
|
|
public FileTableDataPane(int setPanelWidth, int width, int height, int gap) { |
|
|
|
this.setLayout(new BorderLayout(gap,0)); |
|
|
|
this.setLayout(new BorderLayout(gap, 0)); |
|
|
|
JPanel northPanel = new JPanel(new BorderLayout()); |
|
|
|
JPanel northPanel = new JPanel(new BorderLayout()); |
|
|
|
JPanel type = new JPanel(); |
|
|
|
JPanel type = new JPanel(); |
|
|
|
type.add(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Utils_File_Type") + ":")); |
|
|
|
type.add(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Utils_File_Type") + ":")); |
|
|
@ -163,16 +164,16 @@ public class FileTableDataPane extends AbstractTableDataPane<FileTableData> { |
|
|
|
southPanel.add(setPanel, BorderLayout.CENTER); |
|
|
|
southPanel.add(setPanel, BorderLayout.CENTER); |
|
|
|
setPanel.setPreferredSize(new Dimension(setPanelWidth, 460)); |
|
|
|
setPanel.setPreferredSize(new Dimension(setPanelWidth, 460)); |
|
|
|
setPanel.setBorder(BorderFactory.createTitledBorder(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Set"))); |
|
|
|
setPanel.setBorder(BorderFactory.createTitledBorder(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Set"))); |
|
|
|
JPanel controlPane = textSetPanel(width,height); |
|
|
|
JPanel controlPane = textSetPanel(width, height); |
|
|
|
setPanel.add(controlPane, BorderLayout.NORTH); |
|
|
|
setPanel.add(controlPane, BorderLayout.NORTH); |
|
|
|
fileTypeComboBox.addActionListener(getFileTypeListener(setPanel,width,height)); |
|
|
|
fileTypeComboBox.addActionListener(getFileTypeListener(setPanel, width, height)); |
|
|
|
|
|
|
|
|
|
|
|
this.add(northPanel, BorderLayout.NORTH); |
|
|
|
this.add(northPanel, BorderLayout.NORTH); |
|
|
|
this.add(centerPanel, BorderLayout.CENTER); |
|
|
|
this.add(centerPanel, BorderLayout.CENTER); |
|
|
|
this.add(southPanel, BorderLayout.EAST); |
|
|
|
this.add(southPanel, BorderLayout.EAST); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private void addToCenterPanel(JPanel centerPanel){ |
|
|
|
private void addToCenterPanel(JPanel centerPanel) { |
|
|
|
localFileRadioButton = new UIRadioButton(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Local_File") + ":", true); |
|
|
|
localFileRadioButton = new UIRadioButton(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Local_File") + ":", true); |
|
|
|
urlFileRadioButton = new UIRadioButton("URL:", false); |
|
|
|
urlFileRadioButton = new UIRadioButton("URL:", false); |
|
|
|
ButtonGroup bg = new ButtonGroup(); |
|
|
|
ButtonGroup bg = new ButtonGroup(); |
|
|
@ -217,8 +218,9 @@ public class FileTableDataPane extends AbstractTableDataPane<FileTableData> { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private ActionListener testConnectionListener = new ActionListener() { |
|
|
|
private ActionListener testConnectionListener = new ActionListener() { |
|
|
|
|
|
|
|
@Override |
|
|
|
public void actionPerformed(ActionEvent arg0) { |
|
|
|
public void actionPerformed(ActionEvent arg0) { |
|
|
|
String uri = ParameterHelper.analyze4Templatee( urlText.getText(), params); |
|
|
|
String uri = ParameterHelper.analyze4Templatee(urlText.getText(), params); |
|
|
|
if (!checkURL(uri)) { |
|
|
|
if (!checkURL(uri)) { |
|
|
|
JOptionPane.showMessageDialog(SwingUtilities.getWindowAncestor(FileTableDataPane.this), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Add_JS_warning")); |
|
|
|
JOptionPane.showMessageDialog(SwingUtilities.getWindowAncestor(FileTableDataPane.this), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Add_JS_warning")); |
|
|
|
return; |
|
|
|
return; |
|
|
@ -245,10 +247,11 @@ public class FileTableDataPane extends AbstractTableDataPane<FileTableData> { |
|
|
|
} |
|
|
|
} |
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
private void previewPanel(JPanel jPanel){ |
|
|
|
private void previewPanel(JPanel jPanel) { |
|
|
|
JPanel previewPanel = new JPanel(new BorderLayout()); |
|
|
|
JPanel previewPanel = new JPanel(new BorderLayout()); |
|
|
|
UIButton preview = new UIButton(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Preview")); |
|
|
|
UIButton preview = new UIButton(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Preview")); |
|
|
|
preview.addActionListener(new ActionListener() { |
|
|
|
preview.addActionListener(new ActionListener() { |
|
|
|
|
|
|
|
@Override |
|
|
|
public void actionPerformed(ActionEvent e) { |
|
|
|
public void actionPerformed(ActionEvent e) { |
|
|
|
preview(); |
|
|
|
preview(); |
|
|
|
} |
|
|
|
} |
|
|
@ -257,48 +260,47 @@ public class FileTableDataPane extends AbstractTableDataPane<FileTableData> { |
|
|
|
jPanel.add(previewPanel, BorderLayout.SOUTH); |
|
|
|
jPanel.add(previewPanel, BorderLayout.SOUTH); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private JPanel xmlSetPanel(int width,int height) { |
|
|
|
private JPanel xmlSetPanel(int width, int height) { |
|
|
|
// xml设置pane
|
|
|
|
// xml设置pane
|
|
|
|
JPanel controlPane = new JPanel(); |
|
|
|
JPanel controlPane = new JPanel(); |
|
|
|
JPanel northPane = new JPanel(new BorderLayout(8,8)); |
|
|
|
JPanel northPane = new JPanel(new BorderLayout(8, 8)); |
|
|
|
JPanel northTopPane = new JPanel(new BorderLayout(8,8)); |
|
|
|
JPanel northTopPane = new JPanel(new BorderLayout(8, 8)); |
|
|
|
JPanel southPane = new JPanel(new BorderLayout(8,8)); |
|
|
|
JPanel southPane = new JPanel(new BorderLayout(8, 8)); |
|
|
|
JPanel southTopPane = new JPanel(new BorderLayout(8,8)); |
|
|
|
JPanel southTopPane = new JPanel(new BorderLayout(8, 8)); |
|
|
|
JPanel westPane = new JPanel(new BorderLayout()); |
|
|
|
controlPane.setLayout(new BorderLayout(8, 8)); |
|
|
|
controlPane.setLayout(new BorderLayout(8,8)); |
|
|
|
|
|
|
|
controlPane.setPreferredSize(new Dimension(width, height)); |
|
|
|
controlPane.setPreferredSize(new Dimension(width, height)); |
|
|
|
JPanel comboboxPanel = new JPanel(new BorderLayout(8,8)); |
|
|
|
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 = new UIComboBox(EncodeConstants.ALL_ENCODING_ARRAY); |
|
|
|
encodingComboBox.setSelectedIndex(4); |
|
|
|
encodingComboBox.setSelectedIndex(4); |
|
|
|
encodingComboBox.setPreferredSize(new Dimension(90, 20)); |
|
|
|
encodingComboBox.setPreferredSize(new Dimension(90, 20)); |
|
|
|
|
|
|
|
|
|
|
|
JPanel treeContainerPane = new JPanel(); |
|
|
|
JPanel treeContainerPane = new JPanel(); |
|
|
|
treeContainerPane.setLayout(new BorderLayout(8,8)); |
|
|
|
treeContainerPane.setLayout(new BorderLayout(8, 8)); |
|
|
|
nodeTreePane = new XMLNodeTreePane(); |
|
|
|
nodeTreePane = new XMLNodeTreePane(); |
|
|
|
treeContainerPane.add(nodeTreePane,BorderLayout.CENTER); |
|
|
|
treeContainerPane.add(nodeTreePane, BorderLayout.CENTER); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
comboboxPanel.add(encodeLabel, BorderLayout.WEST); |
|
|
|
comboboxPanel.add(encodeLabel, BorderLayout.WEST); |
|
|
|
comboboxPanel.add(encodingComboBox, BorderLayout.CENTER); |
|
|
|
comboboxPanel.add(encodingComboBox, BorderLayout.CENTER); |
|
|
|
|
|
|
|
|
|
|
|
northPane.add(comboboxPanel,BorderLayout.EAST); |
|
|
|
northPane.add(comboboxPanel, BorderLayout.EAST); |
|
|
|
northTopPane.add(northPane,BorderLayout.WEST); |
|
|
|
northTopPane.add(northPane, BorderLayout.WEST); |
|
|
|
southTopPane.add(southPane,BorderLayout.WEST); |
|
|
|
southTopPane.add(southPane, BorderLayout.WEST); |
|
|
|
southTopPane.add(treeContainerPane,BorderLayout.CENTER); |
|
|
|
southTopPane.add(treeContainerPane, BorderLayout.CENTER); |
|
|
|
controlPane.add(northTopPane, BorderLayout.NORTH); |
|
|
|
controlPane.add(northTopPane, BorderLayout.NORTH); |
|
|
|
controlPane.add(southTopPane,BorderLayout.CENTER); |
|
|
|
controlPane.add(southTopPane, BorderLayout.CENTER); |
|
|
|
previewPanel(controlPane); |
|
|
|
previewPanel(controlPane); |
|
|
|
return controlPane; |
|
|
|
return controlPane; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private JPanel excelSetPanel(int width,int height) { |
|
|
|
private JPanel excelSetPanel(int width, int height) { |
|
|
|
// excel设置pane
|
|
|
|
// excel设置pane
|
|
|
|
int checkBoxWidth = width - EIGHT; |
|
|
|
int checkBoxWidth = width - EIGHT; |
|
|
|
JPanel controlPane = new JPanel(); |
|
|
|
JPanel controlPane = new JPanel(); |
|
|
|
JPanel northPane = new JPanel(new BorderLayout(8,8)); |
|
|
|
JPanel northPane = new JPanel(new BorderLayout(8, 8)); |
|
|
|
controlPane.setLayout(new BorderLayout()); |
|
|
|
controlPane.setLayout(new BorderLayout()); |
|
|
|
controlPane.setPreferredSize(new Dimension(width,height)); |
|
|
|
controlPane.setPreferredSize(new Dimension(width, height)); |
|
|
|
needColumnNameCheckBox = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_FirstRow_IS_Column_Name"), false); |
|
|
|
needColumnNameCheckBox = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_FirstRow_IS_Column_Name"), false); |
|
|
|
needColumnNameCheckBox.setPreferredSize(new Dimension(checkBoxWidth, 20)); |
|
|
|
needColumnNameCheckBox.setPreferredSize(new Dimension(checkBoxWidth, 20)); |
|
|
|
northPane.add(needColumnNameCheckBox, BorderLayout.EAST); |
|
|
|
northPane.add(needColumnNameCheckBox, BorderLayout.EAST); |
|
|
@ -321,6 +323,7 @@ public class FileTableDataPane extends AbstractTableDataPane<FileTableData> { |
|
|
|
* |
|
|
|
* |
|
|
|
* @throws Exception |
|
|
|
* @throws Exception |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
|
|
|
|
@Override |
|
|
|
public void checkValid() throws Exception { |
|
|
|
public void checkValid() throws Exception { |
|
|
|
if (urlFileRadioButton.isSelected()) { |
|
|
|
if (urlFileRadioButton.isSelected()) { |
|
|
|
String url = urlText.getText().trim(); |
|
|
|
String url = urlText.getText().trim(); |
|
|
@ -331,33 +334,33 @@ public class FileTableDataPane extends AbstractTableDataPane<FileTableData> { |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private boolean checkURL(String uri){ |
|
|
|
private boolean checkURL(String uri) { |
|
|
|
try { |
|
|
|
try { |
|
|
|
new URL(uri); |
|
|
|
new URL(uri); |
|
|
|
return true; |
|
|
|
return true; |
|
|
|
} catch (MalformedURLException e) { |
|
|
|
} catch (MalformedURLException e) { |
|
|
|
return false; |
|
|
|
return false; |
|
|
|
} |
|
|
|
} |
|
|
|
// return (uri.matches("https*://.+|\\$\\{.+\\}.*"));
|
|
|
|
// return (uri.matches("https*://.+|\\$\\{.+\\}.*"));
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private JPanel textSetPanel(int width,int height) { |
|
|
|
private JPanel textSetPanel(int width, int height) { |
|
|
|
// text设置pane
|
|
|
|
// text设置pane
|
|
|
|
JPanel controlPane = new JPanel(); |
|
|
|
JPanel controlPane = new JPanel(); |
|
|
|
controlPane.setLayout(new BorderLayout()); |
|
|
|
controlPane.setLayout(new BorderLayout()); |
|
|
|
controlPane.setPreferredSize(new Dimension(width,height)); |
|
|
|
controlPane.setPreferredSize(new Dimension(width, height)); |
|
|
|
JPanel northPane = new JPanel(new BorderLayout(8,8)); |
|
|
|
JPanel northPane = new JPanel(new BorderLayout(8, 8)); |
|
|
|
addToNorthPane(northPane); |
|
|
|
addToNorthPane(northPane); |
|
|
|
controlPane.add(northPane,BorderLayout.WEST); |
|
|
|
controlPane.add(northPane, BorderLayout.WEST); |
|
|
|
previewPanel(controlPane); |
|
|
|
previewPanel(controlPane); |
|
|
|
return controlPane; |
|
|
|
return controlPane; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private void addToNorthPane(JPanel northPane){ |
|
|
|
private void addToNorthPane(JPanel northPane) { |
|
|
|
double f = TableLayout.FILL; |
|
|
|
double f = TableLayout.FILL; |
|
|
|
double p = TableLayout.PREFERRED; |
|
|
|
double p = TableLayout.PREFERRED; |
|
|
|
double columnSize[] = {f, p, p}; |
|
|
|
double[] columnSize = {f, p, p}; |
|
|
|
double rowSize[] = {B, B, B, B, B, B, B}; |
|
|
|
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); |
|
|
|
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") + ":"); |
|
|
|
dismenberLabel = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Dismenber") + ":"); |
|
|
|
tableDismemberRadioButton = new UIRadioButton(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Table_Dismember"), false); |
|
|
|
tableDismemberRadioButton = new UIRadioButton(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Table_Dismember"), false); |
|
|
@ -390,18 +393,19 @@ public class FileTableDataPane extends AbstractTableDataPane<FileTableData> { |
|
|
|
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") + ":"); |
|
|
|
charsetComboBox = new UIComboBox(EncodeConstants.ALL_ENCODING_ARRAY); |
|
|
|
charsetComboBox = new UIComboBox(EncodeConstants.ALL_ENCODING_ARRAY); |
|
|
|
Component[][] comps = { |
|
|
|
Component[][] comps = { |
|
|
|
{encodeLabel,charsetComboBox,null}, |
|
|
|
{encodeLabel, charsetComboBox, null}, |
|
|
|
{needColumnNameCheckBox,null,null}, |
|
|
|
{needColumnNameCheckBox, null, null}, |
|
|
|
{dismenberLabel,tableDismemberRadioButton,null}, |
|
|
|
{dismenberLabel, tableDismemberRadioButton, null}, |
|
|
|
{null,spaceDismenberRadioButton,null}, |
|
|
|
{null, spaceDismenberRadioButton, null}, |
|
|
|
{null,commaDismenberRadioButton,null}, |
|
|
|
{null, commaDismenberRadioButton, null}, |
|
|
|
{null,otherDismenberRadioButton,otherDismenberTextField}, |
|
|
|
{null, otherDismenberRadioButton, otherDismenberTextField}, |
|
|
|
{ignoreOneMoreDelimiterCheckBox,null,null} |
|
|
|
{ignoreOneMoreDelimiterCheckBox, null, null} |
|
|
|
}; |
|
|
|
}; |
|
|
|
northPane.add(TableLayoutHelper.createTableLayoutPane(comps, rowSize, columnSize),BorderLayout.EAST); |
|
|
|
northPane.add(TableLayoutHelper.createTableLayoutPane(comps, rowSize, columnSize), BorderLayout.EAST); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private ActionListener radioActionListener = new ActionListener() { |
|
|
|
private ActionListener radioActionListener = new ActionListener() { |
|
|
|
|
|
|
|
@Override |
|
|
|
public void actionPerformed(ActionEvent e) { |
|
|
|
public void actionPerformed(ActionEvent e) { |
|
|
|
if (localFileRadioButton.isSelected()) { |
|
|
|
if (localFileRadioButton.isSelected()) { |
|
|
|
localRadioSelectAction(); |
|
|
|
localRadioSelectAction(); |
|
|
@ -456,8 +460,8 @@ public class FileTableDataPane extends AbstractTableDataPane<FileTableData> { |
|
|
|
|
|
|
|
|
|
|
|
private String[] getFileSuffix() { |
|
|
|
private String[] getFileSuffix() { |
|
|
|
List<String> suffixList = new ArrayList<String>(); |
|
|
|
List<String> suffixList = new ArrayList<String>(); |
|
|
|
String suffix = fileTypeComboBox.getSelectedItem().toString().toLowerCase(); |
|
|
|
String suffix = Objects.requireNonNull(fileTypeComboBox.getSelectedItem()).toString().toLowerCase(); |
|
|
|
if (suffix.equalsIgnoreCase("excel")) { |
|
|
|
if ("excel".equalsIgnoreCase(suffix)) { |
|
|
|
suffixList.add("xls"); |
|
|
|
suffixList.add("xls"); |
|
|
|
suffixList.add("xlsx"); |
|
|
|
suffixList.add("xlsx"); |
|
|
|
} else { |
|
|
|
} else { |
|
|
@ -467,8 +471,8 @@ public class FileTableDataPane extends AbstractTableDataPane<FileTableData> { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private String getFileSuffixToString() { |
|
|
|
private String getFileSuffixToString() { |
|
|
|
String suffixToString = fileTypeComboBox.getSelectedItem().toString().toLowerCase(); |
|
|
|
String suffixToString = Objects.requireNonNull(fileTypeComboBox.getSelectedItem()).toString().toLowerCase(); |
|
|
|
if (suffixToString.equalsIgnoreCase("excel")) { |
|
|
|
if ("excel".equalsIgnoreCase(suffixToString)) { |
|
|
|
suffixToString = "xls"; |
|
|
|
suffixToString = "xls"; |
|
|
|
} |
|
|
|
} |
|
|
|
return suffixToString; |
|
|
|
return suffixToString; |
|
|
@ -476,16 +480,17 @@ public class FileTableDataPane extends AbstractTableDataPane<FileTableData> { |
|
|
|
|
|
|
|
|
|
|
|
private ActionListener getFileTypeListener(final JPanel setPanel, final int width, final int height) { |
|
|
|
private ActionListener getFileTypeListener(final JPanel setPanel, final int width, final int height) { |
|
|
|
ActionListener fileTypeListener = new ActionListener() { |
|
|
|
ActionListener fileTypeListener = new ActionListener() { |
|
|
|
|
|
|
|
@Override |
|
|
|
public void actionPerformed(ActionEvent e) { |
|
|
|
public void actionPerformed(ActionEvent e) { |
|
|
|
setPanel.removeAll(); |
|
|
|
setPanel.removeAll(); |
|
|
|
localText.setText(""); |
|
|
|
localText.setText(""); |
|
|
|
urlText.setText(""); |
|
|
|
urlText.setText(""); |
|
|
|
if (fileTypeComboBox.getSelectedIndex() == XML) { |
|
|
|
if (fileTypeComboBox.getSelectedIndex() == XML) { |
|
|
|
setPanel.add(xmlSetPanel(width,height), BorderLayout.NORTH); |
|
|
|
setPanel.add(xmlSetPanel(width, height), BorderLayout.NORTH); |
|
|
|
} else if (fileTypeComboBox.getSelectedIndex() == EXCEL) { |
|
|
|
} else if (fileTypeComboBox.getSelectedIndex() == EXCEL) { |
|
|
|
setPanel.add(excelSetPanel(width,height), BorderLayout.NORTH); |
|
|
|
setPanel.add(excelSetPanel(width, height), BorderLayout.NORTH); |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
setPanel.add(textSetPanel(width,height), BorderLayout.NORTH); |
|
|
|
setPanel.add(textSetPanel(width, height), BorderLayout.NORTH); |
|
|
|
} |
|
|
|
} |
|
|
|
String tipContent = com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Type_Parameter") + "reportlets/excel/FineReport${abc}." + getFileSuffixToString() + "<br>" |
|
|
|
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> "; |
|
|
|
+ "http://192.168.100.120:8080/XXServer/Report/excel${abc}.jsp<br>" + " </body> </html> "; |
|
|
@ -503,6 +508,7 @@ public class FileTableDataPane extends AbstractTableDataPane<FileTableData> { |
|
|
|
this.setSmallIcon(BaseUtils.readIcon("/com/fr/design/images/control/refresh.png")); |
|
|
|
this.setSmallIcon(BaseUtils.readIcon("/com/fr/design/images/control/refresh.png")); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
public void actionPerformed(ActionEvent e) { |
|
|
|
public void actionPerformed(ActionEvent e) { |
|
|
|
String[] paramTexts = new String[1]; |
|
|
|
String[] paramTexts = new String[1]; |
|
|
|
paramTexts[0] = getFilePathFromUrlOrLocal(); |
|
|
|
paramTexts[0] = getFilePathFromUrlOrLocal(); |
|
|
@ -545,25 +551,25 @@ public class FileTableDataPane extends AbstractTableDataPane<FileTableData> { |
|
|
|
setTextField(xtd); |
|
|
|
setTextField(xtd); |
|
|
|
editorPane.populate(xtd.getParams()); |
|
|
|
editorPane.populate(xtd.getParams()); |
|
|
|
encodingComboBox.setSelectedItem(xtd.getCharSet()); |
|
|
|
encodingComboBox.setSelectedItem(xtd.getCharSet()); |
|
|
|
if (!ComparatorUtils.equals(xtd,new XMLTableData())) { |
|
|
|
if (!ComparatorUtils.equals(xtd, new XMLTableData())) { |
|
|
|
xmlNodeTree.initData(); |
|
|
|
xmlNodeTree.initData(); |
|
|
|
String[] path = xtd.getXPath(); |
|
|
|
String[] path = xtd.getXPath(); |
|
|
|
String[] paths; |
|
|
|
String[] paths; |
|
|
|
if (path != null && path.length > 0) { |
|
|
|
if (path != null && path.length > 0) { |
|
|
|
DefaultTreeModel treeModel = (DefaultTreeModel)xmlNodeTree.getModel(); |
|
|
|
DefaultTreeModel treeModel = (DefaultTreeModel) xmlNodeTree.getModel(); |
|
|
|
ExpandMutableTreeNode root = (ExpandMutableTreeNode) treeModel.getRoot(); |
|
|
|
ExpandMutableTreeNode root = (ExpandMutableTreeNode) treeModel.getRoot(); |
|
|
|
if (treeModel != null) { |
|
|
|
if (treeModel != null) { |
|
|
|
if(!ComparatorUtils.equals(treeModel.getRoot().toString(),"")){ |
|
|
|
if (!ComparatorUtils.equals(treeModel.getRoot().toString(), "")) { |
|
|
|
paths = new String[path.length - 1]; |
|
|
|
paths = new String[path.length - 1]; |
|
|
|
for(int i = 1;i< path.length;i++){ |
|
|
|
for (int i = 1; i < path.length; i++) { |
|
|
|
paths[i -1] = path[i]; |
|
|
|
paths[i - 1] = path[i]; |
|
|
|
} |
|
|
|
} |
|
|
|
}else{ |
|
|
|
} else { |
|
|
|
paths = path; |
|
|
|
paths = path; |
|
|
|
root.setUserObject(ROOTTAG); |
|
|
|
root.setUserObject(ROOTTAG); |
|
|
|
} |
|
|
|
} |
|
|
|
if (treeModel.getRoot() instanceof ExpandMutableTreeNode) { |
|
|
|
if (treeModel.getRoot() instanceof ExpandMutableTreeNode) { |
|
|
|
selectNode((ExpandMutableTreeNode)treeModel.getRoot(), 0, paths); |
|
|
|
selectNode((ExpandMutableTreeNode) treeModel.getRoot(), 0, paths); |
|
|
|
if (selectedNode != null) { |
|
|
|
if (selectedNode != null) { |
|
|
|
TreePath treepath = new TreePath(treeModel.getPathToRoot(selectedNode)); |
|
|
|
TreePath treepath = new TreePath(treeModel.getPathToRoot(selectedNode)); |
|
|
|
xmlNodeTree.setSelectionPath(treepath); |
|
|
|
xmlNodeTree.setSelectionPath(treepath); |
|
|
@ -571,8 +577,8 @@ public class FileTableDataPane extends AbstractTableDataPane<FileTableData> { |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
//防止某种操作导致添加的tag作为root出现。
|
|
|
|
//防止某种操作导致添加的tag作为root出现。
|
|
|
|
if(ComparatorUtils.equals(root.toString(),ROOTTAG)){ |
|
|
|
if (ComparatorUtils.equals(root.toString(), ROOTTAG)) { |
|
|
|
root.setUserObject(StringUtils.EMPTY); |
|
|
|
root.setUserObject(StringUtils.EMPTY); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
@ -638,7 +644,7 @@ public class FileTableDataPane extends AbstractTableDataPane<FileTableData> { |
|
|
|
ttd.setDelimiter(this.showDelimiter()); |
|
|
|
ttd.setDelimiter(this.showDelimiter()); |
|
|
|
ttd.setIgnoreOneMoreDelimiter(ignoreOneMoreDelimiterCheckBox.isSelected()); |
|
|
|
ttd.setIgnoreOneMoreDelimiter(ignoreOneMoreDelimiterCheckBox.isSelected()); |
|
|
|
ttd.setNeedColumnName(needColumnNameCheckBox.isSelected()); |
|
|
|
ttd.setNeedColumnName(needColumnNameCheckBox.isSelected()); |
|
|
|
ttd.setCharset((String)charsetComboBox.getSelectedItem()); |
|
|
|
ttd.setCharset((String) charsetComboBox.getSelectedItem()); |
|
|
|
fileTableData = ttd; |
|
|
|
fileTableData = ttd; |
|
|
|
return ttd; |
|
|
|
return ttd; |
|
|
|
} |
|
|
|
} |
|
|
@ -667,12 +673,12 @@ public class FileTableDataPane extends AbstractTableDataPane<FileTableData> { |
|
|
|
xmlColumnsList.clear(); |
|
|
|
xmlColumnsList.clear(); |
|
|
|
ExpandMutableTreeNode treeNode; |
|
|
|
ExpandMutableTreeNode treeNode; |
|
|
|
boolean flag = true; |
|
|
|
boolean flag = true; |
|
|
|
for(int i = 0;i < selectedNode.getChildCount();i++){ |
|
|
|
for (int i = 0; i < selectedNode.getChildCount(); i++) { |
|
|
|
treeNode = (ExpandMutableTreeNode) selectedNode.getChildAt(i); |
|
|
|
treeNode = (ExpandMutableTreeNode) selectedNode.getChildAt(i); |
|
|
|
if(treeNode.isLeaf()){ |
|
|
|
if (treeNode.isLeaf()) { |
|
|
|
xmlColumnsList.add(treeNode.toString()); |
|
|
|
xmlColumnsList.add(treeNode.toString()); |
|
|
|
}else{ |
|
|
|
} else { |
|
|
|
if(flag){ |
|
|
|
if (flag) { |
|
|
|
flag = false; |
|
|
|
flag = false; |
|
|
|
finalSelectedNode = treeNode; |
|
|
|
finalSelectedNode = treeNode; |
|
|
|
leafNode(treeNode); |
|
|
|
leafNode(treeNode); |
|
|
@ -692,34 +698,34 @@ public class FileTableDataPane extends AbstractTableDataPane<FileTableData> { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
//wikky:构建树时为了美观把添加的根节点值赋为空显示,现在还得该回去使得预览时能够顺利取到数据。
|
|
|
|
//wikky:构建树时为了美观把添加的根节点值赋为空显示,现在还得该回去使得预览时能够顺利取到数据。
|
|
|
|
private String[] getPaths(){ |
|
|
|
private String[] getPaths() { |
|
|
|
TreePath treePath = GUICoreUtils.getTreePath(finalSelectedNode); |
|
|
|
TreePath treePath = GUICoreUtils.getTreePath(finalSelectedNode); |
|
|
|
String path = StringUtils.EMPTY; |
|
|
|
String path = StringUtils.EMPTY; |
|
|
|
if (treePath != null) { |
|
|
|
if (treePath != null) { |
|
|
|
Object[] paths = treePath.getPath(); |
|
|
|
Object[] paths = treePath.getPath(); |
|
|
|
for (int i = 0; i < paths.length; i++) { |
|
|
|
for (int i = 0; i < paths.length; i++) { |
|
|
|
path+="/" + paths[i]; |
|
|
|
path += "/" + paths[i]; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
if (path.startsWith("/")) { |
|
|
|
if (path.startsWith("/")) { |
|
|
|
path = path.substring(1); |
|
|
|
path = path.substring(1); |
|
|
|
} |
|
|
|
} |
|
|
|
String[] paths = path.split("/"); |
|
|
|
String[] paths = path.split("/"); |
|
|
|
if(ComparatorUtils.equals(paths[0],StringUtils.EMPTY)){ |
|
|
|
if (ComparatorUtils.equals(paths[0], StringUtils.EMPTY)) { |
|
|
|
paths[0] = ROOTTAG; |
|
|
|
paths[0] = ROOTTAG; |
|
|
|
} |
|
|
|
} |
|
|
|
return paths; |
|
|
|
return paths; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private void leafNode(ExpandMutableTreeNode treeNode){ |
|
|
|
private void leafNode(ExpandMutableTreeNode treeNode) { |
|
|
|
boolean flag = true; |
|
|
|
boolean flag = true; |
|
|
|
ExpandMutableTreeNode firstNode; |
|
|
|
ExpandMutableTreeNode firstNode; |
|
|
|
for(int i = 0;i < treeNode.getChildCount();i++){ |
|
|
|
for (int i = 0; i < treeNode.getChildCount(); i++) { |
|
|
|
firstNode = (ExpandMutableTreeNode) treeNode.getChildAt(i); |
|
|
|
firstNode = (ExpandMutableTreeNode) treeNode.getChildAt(i); |
|
|
|
if(firstNode.isLeaf()){ |
|
|
|
if (firstNode.isLeaf()) { |
|
|
|
xmlColumnsList.add(firstNode.toString()); |
|
|
|
xmlColumnsList.add(firstNode.toString()); |
|
|
|
}else{ |
|
|
|
} else { |
|
|
|
if(flag){ |
|
|
|
if (flag) { |
|
|
|
flag = false; |
|
|
|
flag = false; |
|
|
|
finalSelectedNode = treeNode; |
|
|
|
finalSelectedNode = treeNode; |
|
|
|
leafNode(firstNode); |
|
|
|
leafNode(firstNode); |
|
|
@ -729,16 +735,16 @@ public class FileTableDataPane extends AbstractTableDataPane<FileTableData> { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private void selectNode(ExpandMutableTreeNode node, int layer, String[] paths) { |
|
|
|
private void selectNode(ExpandMutableTreeNode node, int layer, String[] paths) { |
|
|
|
if (selectedNode != null || node == null){ |
|
|
|
if (selectedNode != null || node == null) { |
|
|
|
return; |
|
|
|
return; |
|
|
|
} |
|
|
|
} |
|
|
|
if (layer < paths.length && paths[layer] != null && ComparatorUtils.equals(paths[layer],node.getUserObject())) { |
|
|
|
if (layer < paths.length && paths[layer] != null && ComparatorUtils.equals(paths[layer], node.getUserObject())) { |
|
|
|
if (layer == paths.length -1) { |
|
|
|
if (layer == paths.length - 1) { |
|
|
|
selectedNode = node; |
|
|
|
selectedNode = node; |
|
|
|
return; |
|
|
|
return; |
|
|
|
} |
|
|
|
} |
|
|
|
for (int i = 0; i < node.getChildCount(); i++) { |
|
|
|
for (int i = 0; i < node.getChildCount(); i++) { |
|
|
|
selectNode((ExpandMutableTreeNode)node.getChildAt(i), layer + 1, paths); |
|
|
|
selectNode((ExpandMutableTreeNode) node.getChildAt(i), layer + 1, paths); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
@ -800,8 +806,8 @@ public class FileTableDataPane extends AbstractTableDataPane<FileTableData> { |
|
|
|
toolbarDef.addShortCut(refreshAction); |
|
|
|
toolbarDef.addShortCut(refreshAction); |
|
|
|
UIToolbar toolBar = ToolBarDef.createJToolBar(); |
|
|
|
UIToolbar toolBar = ToolBarDef.createJToolBar(); |
|
|
|
toolbarDef.updateToolBar(toolBar); |
|
|
|
toolbarDef.updateToolBar(toolBar); |
|
|
|
toolbarPanel.add(keyPointLaber,BorderLayout.WEST); |
|
|
|
toolbarPanel.add(keyPointLaber, BorderLayout.WEST); |
|
|
|
toolbarPanel.add(toolBar,BorderLayout.EAST); |
|
|
|
toolbarPanel.add(toolBar, BorderLayout.EAST); |
|
|
|
this.add(toolbarPanel, BorderLayout.NORTH); |
|
|
|
this.add(toolbarPanel, BorderLayout.NORTH); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -817,6 +823,7 @@ public class FileTableDataPane extends AbstractTableDataPane<FileTableData> { |
|
|
|
this.setSmallIcon(BaseUtils.readIcon("/com/fr/design/images/control/refresh.png")); |
|
|
|
this.setSmallIcon(BaseUtils.readIcon("/com/fr/design/images/control/refresh.png")); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
public void actionPerformed(ActionEvent e) { |
|
|
|
public void actionPerformed(ActionEvent e) { |
|
|
|
xmlNodeTree.waitRefresh(); |
|
|
|
xmlNodeTree.waitRefresh(); |
|
|
|
xmlNodeTree.refreshData(); |
|
|
|
xmlNodeTree.refreshData(); |
|
|
@ -845,8 +852,9 @@ public class FileTableDataPane extends AbstractTableDataPane<FileTableData> { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private MouseListener treeMouseListener = new MouseAdapter() { |
|
|
|
private MouseListener treeMouseListener = new MouseAdapter() { |
|
|
|
|
|
|
|
@Override |
|
|
|
public void mousePressed(MouseEvent e) { |
|
|
|
public void mousePressed(MouseEvent e) { |
|
|
|
if (XMLNodeTree.this.getModel() != treeModel){ |
|
|
|
if (XMLNodeTree.this.getModel() != treeModel) { |
|
|
|
return; |
|
|
|
return; |
|
|
|
} |
|
|
|
} |
|
|
|
int selRow = XMLNodeTree.this.getRowForLocation(e.getX(), e.getY()); |
|
|
|
int selRow = XMLNodeTree.this.getRowForLocation(e.getX(), e.getY()); |
|
|
@ -858,12 +866,12 @@ public class FileTableDataPane extends AbstractTableDataPane<FileTableData> { |
|
|
|
return;//没有选中某个树节点,就直接返回啦
|
|
|
|
return;//没有选中某个树节点,就直接返回啦
|
|
|
|
} |
|
|
|
} |
|
|
|
Object selObject = selPath.getLastPathComponent(); |
|
|
|
Object selObject = selPath.getLastPathComponent(); |
|
|
|
if (selObject instanceof ExpandMutableTreeNode ) { |
|
|
|
if (selObject instanceof ExpandMutableTreeNode) { |
|
|
|
ExpandMutableTreeNode expandMutableTreeNode = (ExpandMutableTreeNode) selObject; |
|
|
|
ExpandMutableTreeNode expandMutableTreeNode = (ExpandMutableTreeNode) selObject; |
|
|
|
if (!expandMutableTreeNode.isLeaf()) { |
|
|
|
if (!expandMutableTreeNode.isLeaf()) { |
|
|
|
selectedNode = expandMutableTreeNode; |
|
|
|
selectedNode = expandMutableTreeNode; |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
selectedNode = (ExpandMutableTreeNode)expandMutableTreeNode.getParent(); |
|
|
|
selectedNode = (ExpandMutableTreeNode) expandMutableTreeNode.getParent(); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
@ -906,7 +914,7 @@ public class FileTableDataPane extends AbstractTableDataPane<FileTableData> { |
|
|
|
DataSource dataSource = null; |
|
|
|
DataSource dataSource = null; |
|
|
|
if (localFileRadioButton.isSelected()) { |
|
|
|
if (localFileRadioButton.isSelected()) { |
|
|
|
String localTextString = StringUtils.trimToNull(localText.getText()); |
|
|
|
String localTextString = StringUtils.trimToNull(localText.getText()); |
|
|
|
if(StringUtils.isEmpty(localTextString)){ |
|
|
|
if (StringUtils.isEmpty(localTextString)) { |
|
|
|
FineLoggerFactory.getLogger().info("The file path is empty."); |
|
|
|
FineLoggerFactory.getLogger().info("The file path is empty."); |
|
|
|
loadedTreeModel(); |
|
|
|
loadedTreeModel(); |
|
|
|
return; |
|
|
|
return; |
|
|
@ -914,7 +922,7 @@ public class FileTableDataPane extends AbstractTableDataPane<FileTableData> { |
|
|
|
dataSource = new FileDataSource(localTextString, params); |
|
|
|
dataSource = new FileDataSource(localTextString, params); |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
String urlTextString = StringUtils.trimToNull(urlText.getText()); |
|
|
|
String urlTextString = StringUtils.trimToNull(urlText.getText()); |
|
|
|
if (StringUtils.isEmpty(urlTextString)){ |
|
|
|
if (StringUtils.isEmpty(urlTextString)) { |
|
|
|
FineLoggerFactory.getLogger().info("The url path is empty."); |
|
|
|
FineLoggerFactory.getLogger().info("The url path is empty."); |
|
|
|
loadedTreeModel(); |
|
|
|
loadedTreeModel(); |
|
|
|
return; |
|
|
|
return; |
|
|
@ -922,7 +930,7 @@ public class FileTableDataPane extends AbstractTableDataPane<FileTableData> { |
|
|
|
dataSource = new URLDataSource(urlTextString, params); |
|
|
|
dataSource = new URLDataSource(urlTextString, params); |
|
|
|
} |
|
|
|
} |
|
|
|
try { |
|
|
|
try { |
|
|
|
InputStream in,input; |
|
|
|
InputStream in, input; |
|
|
|
if ((in = dataSource.getSourceStream(params)) != null) { |
|
|
|
if ((in = dataSource.getSourceStream(params)) != null) { |
|
|
|
String xmlString = Utils.inputStream2String(in, (String) encodingComboBox.getSelectedItem()); |
|
|
|
String xmlString = Utils.inputStream2String(in, (String) encodingComboBox.getSelectedItem()); |
|
|
|
String stringXml = addTag(xmlString); |
|
|
|
String stringXml = addTag(xmlString); |
|
|
@ -941,16 +949,20 @@ public class FileTableDataPane extends AbstractTableDataPane<FileTableData> { |
|
|
|
FineLoggerFactory.getLogger().error(e.getMessage(), e); |
|
|
|
FineLoggerFactory.getLogger().error(e.getMessage(), e); |
|
|
|
loadedTreeModel(); |
|
|
|
loadedTreeModel(); |
|
|
|
} |
|
|
|
} |
|
|
|
if(treeModel.getChildCount(treeModel.getRoot()) == 1){ |
|
|
|
if (treeModel == null) { |
|
|
|
treeModel = new DefaultTreeModel((ExpandMutableTreeNode) treeModel.getChild(treeModel.getRoot(),0)); |
|
|
|
FineLoggerFactory.getLogger().info("The file is wrong or bad, can not create the XMLReader."); |
|
|
|
}else{ |
|
|
|
return; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if (treeModel.getChildCount(treeModel.getRoot()) == 1) { |
|
|
|
|
|
|
|
treeModel = new DefaultTreeModel((ExpandMutableTreeNode) treeModel.getChild(treeModel.getRoot(), 0)); |
|
|
|
|
|
|
|
} else { |
|
|
|
ExpandMutableTreeNode root = (ExpandMutableTreeNode) treeModel.getRoot(); |
|
|
|
ExpandMutableTreeNode root = (ExpandMutableTreeNode) treeModel.getRoot(); |
|
|
|
root.setUserObject(StringUtils.EMPTY); |
|
|
|
root.setUserObject(StringUtils.EMPTY); |
|
|
|
} |
|
|
|
} |
|
|
|
this.setModel(treeModel); |
|
|
|
this.setModel(treeModel); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private void loadedTreeModel(){ |
|
|
|
private void loadedTreeModel() { |
|
|
|
ExpandMutableTreeNode rootTreeNode = new ExpandMutableTreeNode(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Loaded_Tree_Model")); |
|
|
|
ExpandMutableTreeNode rootTreeNode = new ExpandMutableTreeNode(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Loaded_Tree_Model")); |
|
|
|
rootTreeNode.setExpanded(false); |
|
|
|
rootTreeNode.setExpanded(false); |
|
|
|
rootTreeNode.setAllowsChildren(false); |
|
|
|
rootTreeNode.setAllowsChildren(false); |
|
|
@ -958,14 +970,14 @@ public class FileTableDataPane extends AbstractTableDataPane<FileTableData> { |
|
|
|
XMLNodeTree.this.setModel(loadedTreeModel); |
|
|
|
XMLNodeTree.this.setModel(loadedTreeModel); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private String addTag(String string){ |
|
|
|
private String addTag(String string) { |
|
|
|
String stringWithTag; |
|
|
|
String stringWithTag; |
|
|
|
int beginIndex = 0; |
|
|
|
int beginIndex = 0; |
|
|
|
int firstIndex = string.indexOf(">"); |
|
|
|
int firstIndex = string.indexOf(">"); |
|
|
|
int endIndex = string.length(); |
|
|
|
int endIndex = string.length(); |
|
|
|
String firstPart = string.substring(beginIndex,firstIndex + 1); |
|
|
|
String firstPart = string.substring(beginIndex, firstIndex + 1); |
|
|
|
String secondPart = STARTTAG; |
|
|
|
String secondPart = STARTTAG; |
|
|
|
String thirdPart = string.substring(firstIndex + 1,endIndex); |
|
|
|
String thirdPart = string.substring(firstIndex + 1, endIndex); |
|
|
|
String lastPart = ENDTAG; |
|
|
|
String lastPart = ENDTAG; |
|
|
|
stringWithTag = firstPart + secondPart + thirdPart + lastPart; |
|
|
|
stringWithTag = firstPart + secondPart + thirdPart + lastPart; |
|
|
|
return stringWithTag; |
|
|
|
return stringWithTag; |
|
|
@ -986,6 +998,7 @@ public class FileTableDataPane extends AbstractTableDataPane<FileTableData> { |
|
|
|
this.layer = layer; |
|
|
|
this.layer = layer; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
public void readXML(XMLableReader reader) { |
|
|
|
public void readXML(XMLableReader reader) { |
|
|
|
String nodeName; |
|
|
|
String nodeName; |
|
|
|
if (this.layer < 0) { |
|
|
|
if (this.layer < 0) { |
|
|
|