|
|
@ -4,11 +4,13 @@ import com.fr.base.BaseUtils; |
|
|
|
import com.fr.base.FRContext; |
|
|
|
import com.fr.base.FRContext; |
|
|
|
import com.fr.design.gui.frpane.UITabbedPane; |
|
|
|
import com.fr.design.gui.frpane.UITabbedPane; |
|
|
|
import com.fr.design.gui.ibutton.UIButton; |
|
|
|
import com.fr.design.gui.ibutton.UIButton; |
|
|
|
|
|
|
|
import com.fr.design.gui.ibutton.UIHeadGroup; |
|
|
|
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.imenu.UIMenuItem; |
|
|
|
import com.fr.design.gui.imenu.UIMenuItem; |
|
|
|
import com.fr.design.gui.imenu.UIPopupMenu; |
|
|
|
import com.fr.design.gui.imenu.UIPopupMenu; |
|
|
|
|
|
|
|
import com.fr.design.icon.IconPathConstants; |
|
|
|
import com.fr.design.layout.FRGUIPaneFactory; |
|
|
|
import com.fr.design.layout.FRGUIPaneFactory; |
|
|
|
import com.fr.design.utils.gui.GUICoreUtils; |
|
|
|
import com.fr.design.utils.gui.GUICoreUtils; |
|
|
|
import com.fr.form.share.ShareLoader; |
|
|
|
import com.fr.form.share.ShareLoader; |
|
|
@ -40,7 +42,7 @@ import java.net.URISyntaxException; |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
public class FormWidgetDetailPane extends FormDockView{ |
|
|
|
public class FormWidgetDetailPane extends FormDockView{ |
|
|
|
|
|
|
|
|
|
|
|
private UITabbedPane tabbedPane; |
|
|
|
private JPanel tabbedPane; |
|
|
|
private UIScrollPane downPane; |
|
|
|
private UIScrollPane downPane; |
|
|
|
private JPanel reuWidgetPanel; |
|
|
|
private JPanel reuWidgetPanel; |
|
|
|
private UIComboBox comboBox; |
|
|
|
private UIComboBox comboBox; |
|
|
@ -50,11 +52,16 @@ public class FormWidgetDetailPane extends FormDockView{ |
|
|
|
private JPanel editPanel; |
|
|
|
private JPanel editPanel; |
|
|
|
private JPanel resetPanel; |
|
|
|
private JPanel resetPanel; |
|
|
|
private JPanel menutPanel; |
|
|
|
private JPanel menutPanel; |
|
|
|
|
|
|
|
private JPanel menutPanelNorthPane; |
|
|
|
private static final int OFFSET_X = 140; |
|
|
|
private static final int OFFSET_X = 140; |
|
|
|
private static final int OFFSET_Y = 26; |
|
|
|
private static final int OFFSET_Y = 26; |
|
|
|
private SwingWorker sw; |
|
|
|
private SwingWorker sw; |
|
|
|
//组件面板是否可以编辑
|
|
|
|
//组件面板是否可以编辑
|
|
|
|
private boolean isEdit; |
|
|
|
private boolean isEdit; |
|
|
|
|
|
|
|
private CardLayout card; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private static final String REPORT_TAB = Inter.getLocText("FR-Engine_Report"); |
|
|
|
|
|
|
|
private static final String CHART_TAB = Inter.getLocText("FR-Designer-Form-ToolBar_Chart"); |
|
|
|
|
|
|
|
|
|
|
|
public static FormWidgetDetailPane getInstance() { |
|
|
|
public static FormWidgetDetailPane getInstance() { |
|
|
|
if (HOLDER.singleton == null) { |
|
|
|
if (HOLDER.singleton == null) { |
|
|
@ -115,12 +122,21 @@ public class FormWidgetDetailPane extends FormDockView{ |
|
|
|
} |
|
|
|
} |
|
|
|
initReuWidgetPanel(); |
|
|
|
initReuWidgetPanel(); |
|
|
|
initMenuPanel(); |
|
|
|
initMenuPanel(); |
|
|
|
tabbedPane = new UITabbedPane(); |
|
|
|
|
|
|
|
tabbedPane.setOpaque(true); |
|
|
|
card = new CardLayout(); |
|
|
|
tabbedPane.setBorder(null); |
|
|
|
tabbedPane = new JPanel(); |
|
|
|
tabbedPane.setTabPlacement(SwingConstants.BOTTOM); |
|
|
|
tabbedPane.setLayout(card); |
|
|
|
tabbedPane.addTab(Inter.getLocText("FR-Engine_Report"), reuWidgetPanel); |
|
|
|
tabbedPane.add(REPORT_TAB, reuWidgetPanel); |
|
|
|
tabbedPane.addTab(Inter.getLocText("FR-Designer-Form-ToolBar_Chart"), new JPanel()); |
|
|
|
tabbedPane.add(CHART_TAB, new JPanel()); |
|
|
|
|
|
|
|
UIHeadGroup tabsHeaderIconPane = new UIHeadGroup(new String[] {REPORT_TAB, CHART_TAB}) { |
|
|
|
|
|
|
|
@Override |
|
|
|
|
|
|
|
public void tabChanged(int index) { |
|
|
|
|
|
|
|
card.show(tabbedPane, labelButtonList.get(index).getText()); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}; |
|
|
|
|
|
|
|
tabsHeaderIconPane.setNeedLeftRightOutLine(false); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
add(tabsHeaderIconPane, BorderLayout.NORTH); |
|
|
|
add(tabbedPane, BorderLayout.CENTER); |
|
|
|
add(tabbedPane, BorderLayout.CENTER); |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
@ -140,17 +156,20 @@ public class FormWidgetDetailPane extends FormDockView{ |
|
|
|
private void initMenuPanel() { |
|
|
|
private void initMenuPanel() { |
|
|
|
menutPanel = new JPanel(); |
|
|
|
menutPanel = new JPanel(); |
|
|
|
menutPanel.setLayout(FRGUIPaneFactory.createBorderLayout()); |
|
|
|
menutPanel.setLayout(FRGUIPaneFactory.createBorderLayout()); |
|
|
|
menutPanel.setBorder(BorderFactory.createEmptyBorder(3, 8, 3, 3)); |
|
|
|
menutPanel.setBorder(BorderFactory.createEmptyBorder(3, 10, 10, 15)); |
|
|
|
menutPanel.setPreferredSize(new Dimension(240, 48)); |
|
|
|
// menutPanel.setPreferredSize(new Dimension(240, 48));
|
|
|
|
menutPanel.add(new UILabel(Inter.getLocText("FR-Designer_LocalWidget"), |
|
|
|
|
|
|
|
|
|
|
|
menutPanelNorthPane = new JPanel(new BorderLayout()); |
|
|
|
|
|
|
|
menutPanelNorthPane.add(new UILabel(Inter.getLocText("FR-Designer_LocalWidget"), |
|
|
|
SwingConstants.HORIZONTAL), BorderLayout.WEST); |
|
|
|
SwingConstants.HORIZONTAL), BorderLayout.WEST); |
|
|
|
|
|
|
|
menutPanelNorthPane.add(initEditButtonPane(), BorderLayout.EAST); |
|
|
|
|
|
|
|
menutPanelNorthPane.setBorder(BorderFactory.createEmptyBorder(0, 0, 5, 0)); |
|
|
|
|
|
|
|
|
|
|
|
menutPanel.add(initEditButtonPane(), BorderLayout.EAST); |
|
|
|
menutPanel.add(menutPanelNorthPane, BorderLayout.NORTH); |
|
|
|
menutPanel.add(new JPanel(), BorderLayout.CENTER); |
|
|
|
|
|
|
|
comboBox = new UIComboBox(getFormCategories()); |
|
|
|
comboBox = new UIComboBox(getFormCategories()); |
|
|
|
comboBox.setPreferredSize(new Dimension(240, 30)); |
|
|
|
comboBox.setPreferredSize(new Dimension(240, comboBox.getPreferredSize().height)); |
|
|
|
initComboBoxSelectedListener(); |
|
|
|
initComboBoxSelectedListener(); |
|
|
|
menutPanel.add(comboBox, BorderLayout.SOUTH); |
|
|
|
menutPanel.add(comboBox, BorderLayout.CENTER); |
|
|
|
reuWidgetPanel.add(menutPanel, BorderLayout.NORTH); |
|
|
|
reuWidgetPanel.add(menutPanel, BorderLayout.NORTH); |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
@ -159,10 +178,13 @@ public class FormWidgetDetailPane extends FormDockView{ |
|
|
|
* 创建菜单栏按钮面板 |
|
|
|
* 创建菜单栏按钮面板 |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
private JPanel initEditButtonPane() { |
|
|
|
private JPanel initEditButtonPane() { |
|
|
|
editPanel = new JPanel(); |
|
|
|
editPanel = new JPanel(new FlowLayout(FlowLayout.RIGHT, 0, 0)); |
|
|
|
editPanel.setLayout(FRGUIPaneFactory.createBorderLayout()); |
|
|
|
|
|
|
|
editPanel.add(createRefreshButton(), BorderLayout.WEST); |
|
|
|
editPanel.add(createRefreshButton()); |
|
|
|
editPanel.add(createDownloadButton(), BorderLayout.EAST); |
|
|
|
editPanel.add(createDownloadButton()); |
|
|
|
|
|
|
|
editPanel.add(createInstallButton()); |
|
|
|
|
|
|
|
editPanel.add(createDeleteButton()); |
|
|
|
|
|
|
|
|
|
|
|
return editPanel; |
|
|
|
return editPanel; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -185,8 +207,38 @@ public class FormWidgetDetailPane extends FormDockView{ |
|
|
|
reuWidgetPanel.remove(deleteButton); |
|
|
|
reuWidgetPanel.remove(deleteButton); |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
deleteButton = new UIButton(Inter.getLocText("FR-Designer_Remove_Item")); |
|
|
|
|
|
|
|
deleteButton.set4ToolbarButton(); |
|
|
|
|
|
|
|
deleteButton.setOpaque(true); |
|
|
|
|
|
|
|
deleteButton.setBackground(Color.red); |
|
|
|
|
|
|
|
deleteButton.addActionListener(new ActionListener() { |
|
|
|
|
|
|
|
@Override |
|
|
|
|
|
|
|
public void actionPerformed(ActionEvent e) { |
|
|
|
|
|
|
|
if (ShareLoader.getLoader().removeModulesFromList()) { |
|
|
|
|
|
|
|
refreshShareMoudule(); |
|
|
|
|
|
|
|
reuWidgetPanel.remove(deleteButton); |
|
|
|
|
|
|
|
elCaseBindInfoList = ShareLoader.getLoader().getAllBindInfoList(); |
|
|
|
|
|
|
|
JOptionPane.showMessageDialog(null, Inter.getLocText("FR-Share_Module_Removed_Successful")); |
|
|
|
|
|
|
|
refreshDownPanel(false); |
|
|
|
|
|
|
|
replaceButtonPanel(false); |
|
|
|
|
|
|
|
refreshComboxData(); |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
JOptionPane.showMessageDialog(null, Inter.getLocText("FR-Share_Module_Removed_Failed")); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
JPanel deletePane = new JPanel(new BorderLayout()); |
|
|
|
|
|
|
|
deletePane.add(deleteButton, BorderLayout.CENTER); |
|
|
|
|
|
|
|
deletePane.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 5)); |
|
|
|
|
|
|
|
|
|
|
|
resetPanel.setLayout(FRGUIPaneFactory.createBorderLayout()); |
|
|
|
resetPanel.setLayout(FRGUIPaneFactory.createBorderLayout()); |
|
|
|
resetPanel.add(resetButton, BorderLayout.CENTER); |
|
|
|
resetPanel.add(resetButton, BorderLayout.CENTER); |
|
|
|
|
|
|
|
resetPanel.add(deletePane, BorderLayout.WEST); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
refreshDownPanel(true); |
|
|
|
|
|
|
|
|
|
|
|
return resetPanel; |
|
|
|
return resetPanel; |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
@ -210,35 +262,46 @@ public class FormWidgetDetailPane extends FormDockView{ |
|
|
|
}); |
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
|
|
* 创建工具条按钮 |
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
private UIButton createToolButton(Icon icon, String toolTip, ActionListener actionListener) { |
|
|
|
|
|
|
|
UIButton toolButton = new UIButton(); |
|
|
|
|
|
|
|
toolButton.setIcon(icon); |
|
|
|
|
|
|
|
toolButton.setToolTipText(toolTip); |
|
|
|
|
|
|
|
toolButton.set4ToolbarButton(); |
|
|
|
|
|
|
|
toolButton.addActionListener(actionListener); |
|
|
|
|
|
|
|
return toolButton; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* 创建刷新按钮 |
|
|
|
* 创建刷新按钮 |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
private UIButton createRefreshButton() { |
|
|
|
private UIButton createRefreshButton() { |
|
|
|
UIButton refreshButton = new UIButton(); |
|
|
|
return createToolButton( |
|
|
|
refreshButton.setIcon(BaseUtils.readIcon("/com/fr/design/form/images/refresh.png")); |
|
|
|
BaseUtils.readIcon("/com/fr/design/form/images/refresh.png"), |
|
|
|
refreshButton.setToolTipText(Inter.getLocText("FR-Designer_Refresh")); |
|
|
|
Inter.getLocText("FR-Designer_Refresh"), |
|
|
|
refreshButton.set4ToolbarButton(); |
|
|
|
new ActionListener() { |
|
|
|
refreshButton.addActionListener(new ActionListener() { |
|
|
|
|
|
|
|
@Override |
|
|
|
|
|
|
|
public void actionPerformed(ActionEvent e) { |
|
|
|
|
|
|
|
if (sw != null) { |
|
|
|
|
|
|
|
sw.cancel(true); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
sw = new SwingWorker() { |
|
|
|
|
|
|
|
@Override |
|
|
|
@Override |
|
|
|
protected Object doInBackground() throws Exception { |
|
|
|
public void actionPerformed(ActionEvent e) { |
|
|
|
ShareLoader.getLoader().refreshModule(); |
|
|
|
if (sw != null) { |
|
|
|
elCaseBindInfoList = ShareLoader.getLoader().getAllBindInfoList(); |
|
|
|
sw.cancel(true); |
|
|
|
refreshComboxData(); |
|
|
|
} |
|
|
|
refreshDownPanel(false); |
|
|
|
sw = new SwingWorker() { |
|
|
|
return null; |
|
|
|
@Override |
|
|
|
|
|
|
|
protected Object doInBackground() throws Exception { |
|
|
|
|
|
|
|
ShareLoader.getLoader().refreshModule(); |
|
|
|
|
|
|
|
elCaseBindInfoList = ShareLoader.getLoader().getAllBindInfoList(); |
|
|
|
|
|
|
|
refreshComboxData(); |
|
|
|
|
|
|
|
refreshDownPanel(false); |
|
|
|
|
|
|
|
return null; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}; |
|
|
|
|
|
|
|
sw.execute(); |
|
|
|
} |
|
|
|
} |
|
|
|
}; |
|
|
|
} |
|
|
|
sw.execute(); |
|
|
|
); |
|
|
|
} |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
return refreshButton; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private void refreshComboxData() { |
|
|
|
private void refreshComboxData() { |
|
|
@ -251,30 +314,10 @@ public class FormWidgetDetailPane extends FormDockView{ |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
private UIButton createDownloadButton() { |
|
|
|
private UIButton createDownloadButton() { |
|
|
|
UIButton downloadButton = new UIButton(); |
|
|
|
UIButton downloadButton = new UIButton(); |
|
|
|
downloadButton.setIcon(BaseUtils.readIcon("/com/fr/design/form/images/showmenu.png")); |
|
|
|
downloadButton.setIcon(BaseUtils.readIcon("/com/fr/design/form/images/download icon.png")); |
|
|
|
downloadButton.set4ToolbarButton(); |
|
|
|
downloadButton.set4ToolbarButton(); |
|
|
|
downloadButton.setToolTipText(Inter.getLocText("FR-Designer_Download_Template")); |
|
|
|
downloadButton.setToolTipText(Inter.getLocText("FR-Designer_Download_Template")); |
|
|
|
downloadButton.addActionListener(new ActionListener() { |
|
|
|
downloadButton.addActionListener(new ActionListener() { |
|
|
|
@Override |
|
|
|
|
|
|
|
public void actionPerformed(ActionEvent e) { |
|
|
|
|
|
|
|
initPopMenu(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
return downloadButton; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
|
|
* 初始化下拉面板 |
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
private void initPopMenu() { |
|
|
|
|
|
|
|
UIPopupMenu menu = new UIPopupMenu(); |
|
|
|
|
|
|
|
UIMenuItem downloadItem = new UIMenuItem(Inter.getLocText("FR-Designer_Download_Template"), BaseUtils.readIcon("/com/fr/design/form/images/download icon.png")); |
|
|
|
|
|
|
|
UIMenuItem installItem = new UIMenuItem(Inter.getLocText("FR-Designer_Install_Template"), BaseUtils.readIcon("/com/fr/design/form/images/install icon.png")); |
|
|
|
|
|
|
|
UIMenuItem deleteItem = new UIMenuItem(Inter.getLocText("FR-Designer_Delete_Template"), BaseUtils.readIcon("/com/fr/design/form/images/delete icon.png")); |
|
|
|
|
|
|
|
menu.add(downloadItem); |
|
|
|
|
|
|
|
menu.add(installItem); |
|
|
|
|
|
|
|
menu.add(deleteItem); |
|
|
|
|
|
|
|
downloadItem.addActionListener(new ActionListener() { |
|
|
|
|
|
|
|
@Override |
|
|
|
@Override |
|
|
|
public void actionPerformed(ActionEvent e) { |
|
|
|
public void actionPerformed(ActionEvent e) { |
|
|
|
String url = SiteCenter.getInstance().acquireUrlByKind("reuse.url"); |
|
|
|
String url = SiteCenter.getInstance().acquireUrlByKind("reuse.url"); |
|
|
@ -295,68 +338,58 @@ public class FormWidgetDetailPane extends FormDockView{ |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
}); |
|
|
|
installItem.addActionListener(new ActionListener() { |
|
|
|
return downloadButton; |
|
|
|
@Override |
|
|
|
|
|
|
|
public void actionPerformed(ActionEvent e) { |
|
|
|
|
|
|
|
JFileChooser fileChooser = new JFileChooser(); |
|
|
|
|
|
|
|
fileChooser.setFileSelectionMode(JFileChooser.FILES_AND_DIRECTORIES); |
|
|
|
|
|
|
|
fileChooser.setFileFilter(new FileNameExtensionFilter(".reu", "reu")); |
|
|
|
|
|
|
|
int returnValue = fileChooser.showDialog(new UILabel(), Inter.getLocText("FR-Designer_Select")); |
|
|
|
|
|
|
|
if (returnValue == JFileChooser.APPROVE_OPTION) { |
|
|
|
|
|
|
|
final File chosenFile = fileChooser.getSelectedFile(); |
|
|
|
|
|
|
|
installFromDiskZipFile(chosenFile); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
deleteItem.addActionListener(new ActionListener() { |
|
|
|
|
|
|
|
@Override |
|
|
|
|
|
|
|
public void actionPerformed(ActionEvent e) { |
|
|
|
|
|
|
|
replaceButtonPanel(true); |
|
|
|
|
|
|
|
deleteFromDiskZipFile(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
GUICoreUtils.showPopupMenu(menu, tabbedPane, tabbedPane.getX() + OFFSET_X, OFFSET_Y); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private void deleteFromDiskZipFile() { |
|
|
|
/** |
|
|
|
deleteButton = new UIButton(Inter.getLocText("FR-Designer-CommitTab_Remove")); |
|
|
|
* 创建安装模板的按钮 |
|
|
|
deleteButton.setBackground(Color.red); |
|
|
|
*/ |
|
|
|
deleteButton.repaint(); |
|
|
|
private UIButton createInstallButton() { |
|
|
|
deleteButton.setPreferredSize(new Dimension(240, 40)); |
|
|
|
return createToolButton( |
|
|
|
reuWidgetPanel.add(deleteButton, BorderLayout.SOUTH); |
|
|
|
BaseUtils.readIcon("/com/fr/design/form/images/install icon.png"), |
|
|
|
deleteButton.addActionListener(new ActionListener() { |
|
|
|
Inter.getLocText("FR-Designer_Install_Template"), |
|
|
|
@Override |
|
|
|
new ActionListener() { |
|
|
|
public void actionPerformed(ActionEvent e) { |
|
|
|
@Override |
|
|
|
if (ShareLoader.getLoader().removeModulesFromList()) { |
|
|
|
public void actionPerformed(ActionEvent e) { |
|
|
|
refreshShareMoudule(); |
|
|
|
JFileChooser fileChooser = new JFileChooser(); |
|
|
|
reuWidgetPanel.remove(deleteButton); |
|
|
|
fileChooser.setFileSelectionMode(JFileChooser.FILES_AND_DIRECTORIES); |
|
|
|
elCaseBindInfoList = ShareLoader.getLoader().getAllBindInfoList(); |
|
|
|
fileChooser.setFileFilter(new FileNameExtensionFilter(".reu", "reu")); |
|
|
|
JOptionPane.showMessageDialog(null, Inter.getLocText("FR-Share_Module_Removed_Successful")); |
|
|
|
int returnValue = fileChooser.showDialog(new UILabel(), Inter.getLocText("FR-Designer_Select")); |
|
|
|
refreshDownPanel(false); |
|
|
|
if (returnValue == JFileChooser.APPROVE_OPTION) { |
|
|
|
replaceButtonPanel(false); |
|
|
|
final File chosenFile = fileChooser.getSelectedFile(); |
|
|
|
refreshComboxData(); |
|
|
|
installFromDiskZipFile(chosenFile); |
|
|
|
} else { |
|
|
|
} |
|
|
|
JOptionPane.showMessageDialog(null, Inter.getLocText("FR-Share_Module_Removed_Failed")); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
/** |
|
|
|
}); |
|
|
|
* 创建删除模板的按钮 |
|
|
|
refreshDownPanel(true); |
|
|
|
*/ |
|
|
|
|
|
|
|
private UIButton createDeleteButton() { |
|
|
|
|
|
|
|
return createToolButton( |
|
|
|
|
|
|
|
BaseUtils.readIcon("/com/fr/design/form/images/delete icon.png"), |
|
|
|
|
|
|
|
Inter.getLocText("FR-Designer_Delete_Template"), |
|
|
|
|
|
|
|
new ActionListener() { |
|
|
|
|
|
|
|
@Override |
|
|
|
|
|
|
|
public void actionPerformed(ActionEvent e) { |
|
|
|
|
|
|
|
replaceButtonPanel(true); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private void replaceButtonPanel(boolean isEdit) { |
|
|
|
private void replaceButtonPanel(boolean isEdit) { |
|
|
|
this.isEdit = isEdit; |
|
|
|
this.isEdit = isEdit; |
|
|
|
if (isEdit) { |
|
|
|
if (isEdit) { |
|
|
|
menutPanel.remove(editPanel); |
|
|
|
menutPanelNorthPane.remove(editPanel); |
|
|
|
menutPanel.add(initResetButtonPane(), BorderLayout.EAST); |
|
|
|
menutPanelNorthPane.add(initResetButtonPane(), BorderLayout.EAST); |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
menutPanel.remove(resetPanel); |
|
|
|
menutPanelNorthPane.remove(resetPanel); |
|
|
|
menutPanel.add(initEditButtonPane(), BorderLayout.EAST); |
|
|
|
menutPanelNorthPane.add(initEditButtonPane(), BorderLayout.EAST); |
|
|
|
ShareLoader.getLoader().resetRemovedModuleList(); |
|
|
|
ShareLoader.getLoader().resetRemovedModuleList(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private void installFromDiskZipFile(File chosenFile) { |
|
|
|
private void installFromDiskZipFile(File chosenFile) { |
|
|
@ -393,8 +426,6 @@ public class FormWidgetDetailPane extends FormDockView{ |
|
|
|
return ArrayUtils.addAll(new String[] {Inter.getLocText("FR-Designer_AllCategories")}, ShareLoader.getLoader().getModuleCategory()); |
|
|
|
return ArrayUtils.addAll(new String[] {Inter.getLocText("FR-Designer_AllCategories")}, ShareLoader.getLoader().getModuleCategory()); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public void refreshDownPanel(boolean isEdit) { |
|
|
|
public void refreshDownPanel(boolean isEdit) { |
|
|
|
reuWidgetPanel.remove(downPane); |
|
|
|
reuWidgetPanel.remove(downPane); |
|
|
|
downPane = new UIScrollPane(new ShareWidgetPane(elCaseBindInfoList, isEdit)); |
|
|
|
downPane = new UIScrollPane(new ShareWidgetPane(elCaseBindInfoList, isEdit)); |
|
|
@ -409,12 +440,6 @@ public class FormWidgetDetailPane extends FormDockView{ |
|
|
|
revalidate(); |
|
|
|
revalidate(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public void setSelectedIndex(int index){ |
|
|
|
|
|
|
|
tabbedPane.setSelectedIndex(index); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* 清除数据 |
|
|
|
* 清除数据 |
|
|
|
*/ |
|
|
|
*/ |
|
|
|