From 2fc18dc59f04b13f2529e06aa79685efc6402ea2 Mon Sep 17 00:00:00 2001 From: xiaoxia Date: Wed, 26 Oct 2016 23:52:03 +0800 Subject: [PATCH 01/27] rt --- .../mainframe/FormWidgetDetailPane.java | 32 +++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/designer_form/src/com/fr/design/mainframe/FormWidgetDetailPane.java b/designer_form/src/com/fr/design/mainframe/FormWidgetDetailPane.java index ef3a1e708..7fa96cb4b 100644 --- a/designer_form/src/com/fr/design/mainframe/FormWidgetDetailPane.java +++ b/designer_form/src/com/fr/design/mainframe/FormWidgetDetailPane.java @@ -5,11 +5,13 @@ import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.awt.event.ItemEvent; import java.awt.event.ItemListener; +import java.io.File; import java.util.*; import java.util.List; import javax.swing.*; import javax.swing.border.LineBorder; +import javax.swing.filechooser.FileNameExtensionFilter; import com.fr.base.BaseUtils; import com.fr.design.actions.file.WebPreviewUtils; @@ -167,7 +169,13 @@ public class FormWidgetDetailPane extends FormDockView{ public void actionPerformed(ActionEvent e) { UIPopupMenu menu = new UIPopupMenu(); UIMenuItem downloadItem = new UIMenuItem(Inter.getLocText("FR-Designer_Download_Template"), BaseUtils.readIcon("/com/fr/design/form/images/download.png")); + UIMenuItem installItem = new UIMenuItem(Inter.getLocText("FR-Designer_Download_Template"), BaseUtils.readIcon("/com/fr/design/form/images/download.png")); + UIMenuItem deleteItem = new UIMenuItem(Inter.getLocText("FR-Designer_Download_Template"), BaseUtils.readIcon("/com/fr/design/form/images/download.png")); + menu.add(downloadItem); + menu.add(installItem); + menu.add(deleteItem); + downloadItem.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { @@ -177,12 +185,36 @@ public class FormWidgetDetailPane extends FormDockView{ dlg.setVisible(true); } }); + installItem.addActionListener(new ActionListener() { + @Override + public void actionPerformed(ActionEvent e) { + JFileChooser fileChooser = new JFileChooser(); + fileChooser.setFileSelectionMode(JFileChooser.FILES_AND_DIRECTORIES); + fileChooser.setFileFilter(new FileNameExtensionFilter("zip", "zip")); + int returnValue = fileChooser.showDialog(new JLabel(), "选择"); + if (returnValue == JFileChooser.APPROVE_OPTION) { + final File chosenFile = fileChooser.getSelectedFile(); + installFromDiskZipFile(chosenFile); + + } + } + }); + + deleteItem.addActionListener(new ActionListener() { + @Override + public void actionPerformed(ActionEvent e) { + + } + }); GUICoreUtils.showPopupMenu(menu, tabbedPane, tabbedPane.getX() + OFFSET_X, tabbedPane.getY() + OFFSET_Y); } }); } + private void installFromDiskZipFile(File chosenFile) { + } + /** * 获取报表块组件分类 */ From 771a427f052b4526b35b1f6b92baeff6830275a9 Mon Sep 17 00:00:00 2001 From: xiaoxia Date: Thu, 27 Oct 2016 00:15:01 +0800 Subject: [PATCH 02/27] rt --- .../com/fr/design/mainframe/FormWidgetDetailPane.java | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/designer_form/src/com/fr/design/mainframe/FormWidgetDetailPane.java b/designer_form/src/com/fr/design/mainframe/FormWidgetDetailPane.java index 7fa96cb4b..2ed98e094 100644 --- a/designer_form/src/com/fr/design/mainframe/FormWidgetDetailPane.java +++ b/designer_form/src/com/fr/design/mainframe/FormWidgetDetailPane.java @@ -169,8 +169,8 @@ public class FormWidgetDetailPane extends FormDockView{ public void actionPerformed(ActionEvent e) { UIPopupMenu menu = new UIPopupMenu(); UIMenuItem downloadItem = new UIMenuItem(Inter.getLocText("FR-Designer_Download_Template"), BaseUtils.readIcon("/com/fr/design/form/images/download.png")); - UIMenuItem installItem = new UIMenuItem(Inter.getLocText("FR-Designer_Download_Template"), BaseUtils.readIcon("/com/fr/design/form/images/download.png")); - UIMenuItem deleteItem = new UIMenuItem(Inter.getLocText("FR-Designer_Download_Template"), BaseUtils.readIcon("/com/fr/design/form/images/download.png")); + UIMenuItem installItem = new UIMenuItem(Inter.getLocText("FR-Designer_Install_Template"), BaseUtils.readIcon("/com/fr/design/form/images/download.png")); + UIMenuItem deleteItem = new UIMenuItem(Inter.getLocText("FR-Designer_Delete_Template"), BaseUtils.readIcon("/com/fr/design/form/images/download.png")); menu.add(downloadItem); menu.add(installItem); @@ -203,7 +203,7 @@ public class FormWidgetDetailPane extends FormDockView{ deleteItem.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { - + deleteFromDiskZipFile(); } }); GUICoreUtils.showPopupMenu(menu, tabbedPane, tabbedPane.getX() + OFFSET_X, tabbedPane.getY() + OFFSET_Y); @@ -212,7 +212,12 @@ public class FormWidgetDetailPane extends FormDockView{ }); } + private void deleteFromDiskZipFile() { + + } + private void installFromDiskZipFile(File chosenFile) { + } /** From d4eda7c3feef0fa512507d2c29509bd5ccc54388 Mon Sep 17 00:00:00 2001 From: xiaoxia Date: Sat, 29 Oct 2016 20:28:17 +0800 Subject: [PATCH 03/27] rt --- .../design/mainframe/ShareWidgetButton.java | 71 ++++++++++++++++++- 1 file changed, 70 insertions(+), 1 deletion(-) diff --git a/designer_form/src/com/fr/design/mainframe/ShareWidgetButton.java b/designer_form/src/com/fr/design/mainframe/ShareWidgetButton.java index ffb688578..c35ee64d5 100644 --- a/designer_form/src/com/fr/design/mainframe/ShareWidgetButton.java +++ b/designer_form/src/com/fr/design/mainframe/ShareWidgetButton.java @@ -1,13 +1,17 @@ package com.fr.design.mainframe; import com.fr.base.BaseUtils; +import com.fr.design.constants.UIConstants; import com.fr.design.designer.creator.XCreator; import com.fr.design.designer.creator.XCreatorUtils; import com.fr.design.gui.ilable.UILabel; +import com.fr.design.icon.IconPathConstants; +import com.fr.form.share.ShareConstants; import com.fr.form.share.ShareLoader; import com.fr.form.ui.ElCaseBindInfo; import com.fr.form.ui.Widget; import com.fr.general.ComparatorUtils; +import com.fr.general.IOUtils; import com.fr.stable.StringUtils; import javax.swing.*; @@ -30,26 +34,83 @@ import java.io.Serializable; public class ShareWidgetButton extends JPanel implements MouseListener, MouseMotionListener, Serializable { private ElCaseBindInfo bindInfo; private MouseEvent lastPressEvent; + private JPanel reportPane; + private boolean isEdit; + private Icon controlMode = IOUtils.readIcon("/com/fr/design/form/images/mark.png"); + private AlphaComposite composite = AlphaComposite.getInstance(AlphaComposite.SRC_OVER, 60 / 100.0F); + private JComponent controlButton = new JComponent() { + protected void paintComponent(Graphics g) { + controlMode.paintIcon(this, g, 0, 0); + } + }; public ShareWidgetButton(ElCaseBindInfo bindInfo) { this.bindInfo = bindInfo; + this.setPreferredSize(new Dimension(108, 68)); initUI(); + this.setLayout(getCoverLayout()); this.addMouseListener(this); this.addMouseMotionListener(this); new DragAndDropDragGestureListener(this, DnDConstants.ACTION_COPY_OR_MOVE); } + public void paint(Graphics g) { + Graphics2D g2d = (Graphics2D) g; + Composite oldComposite = g2d.getComposite(); + g2d.setComposite(composite); + g2d.setColor(Color.white); + g2d.fillRect(0, 0, getWidth(), getHeight()); + g2d.setComposite(oldComposite); + super.paint(g); + } + private void initUI() { - JPanel reportPane = new JPanel(new BorderLayout()); + + reportPane = new JPanel(new BorderLayout()); reportPane.add(new UILabel(new ImageIcon(bindInfo.getCover())), BorderLayout.CENTER); JPanel labelPane = new JPanel(new BorderLayout()); UILabel label = new UILabel(bindInfo.getName(), UILabel.CENTER); labelPane.setBackground(new Color(184, 220, 242)); labelPane.add(label, BorderLayout.CENTER); reportPane.add(labelPane, BorderLayout.SOUTH); + //add(controlButton); add(reportPane); } + protected LayoutManager getCoverLayout() { + return new LayoutManager() { + + @Override + public void removeLayoutComponent(Component comp) { + } + + @Override + public Dimension preferredLayoutSize(Container parent) { + return parent.getPreferredSize(); + } + + @Override + public Dimension minimumLayoutSize(Container parent) { + return null; + } + + @Override + public void layoutContainer(Container parent) { + int width = parent.getWidth(); + int height = parent.getHeight(); + controlButton.setBounds((width - 25), 0, 25, 25); + reportPane.setBounds(0, 0, width, height); + + + + } + + @Override + public void addLayoutComponent(String name, Component comp) { + } + }; + } + public ElCaseBindInfo getBindInfo() { return bindInfo; } @@ -60,7 +121,15 @@ public class ShareWidgetButton extends JPanel implements MouseListener, MouseMot @Override public void mouseClicked(MouseEvent e) { + if (isEdit) { + remove(controlButton); + isEdit = false; + } else { + add(controlButton,0); + isEdit = true; + } + repaint(); } @Override From 1b9543d17779067c54944c4a49085f81c4f3ff2f Mon Sep 17 00:00:00 2001 From: xiaoxia Date: Mon, 31 Oct 2016 16:34:02 +0800 Subject: [PATCH 04/27] rt --- .../mainframe/FormWidgetDetailPane.java | 92 ++++++++++++++++--- 1 file changed, 78 insertions(+), 14 deletions(-) diff --git a/designer_form/src/com/fr/design/mainframe/FormWidgetDetailPane.java b/designer_form/src/com/fr/design/mainframe/FormWidgetDetailPane.java index 2ed98e094..aee06781d 100644 --- a/designer_form/src/com/fr/design/mainframe/FormWidgetDetailPane.java +++ b/designer_form/src/com/fr/design/mainframe/FormWidgetDetailPane.java @@ -6,6 +6,7 @@ import java.awt.event.ActionListener; import java.awt.event.ItemEvent; import java.awt.event.ItemListener; import java.io.File; +import java.io.IOException; import java.util.*; import java.util.List; @@ -33,10 +34,12 @@ import com.fr.design.gui.imenu.UIMenuItem; import com.fr.design.gui.imenu.UIPopupMenu; import com.fr.design.gui.itoolbar.UILargeToolbar; import com.fr.design.layout.FRGUIPaneFactory; +import com.fr.design.parameter.ParameterPropertyPane; import com.fr.design.utils.gui.GUICoreUtils; import com.fr.form.share.ShareConstants; import com.fr.form.share.ShareLoader; import com.fr.form.ui.ElCaseBindInfo; +import com.fr.general.IOUtils; import com.fr.general.Inter; /** @@ -53,6 +56,8 @@ public class FormWidgetDetailPane extends FormDockView{ private UIComboBox comboBox; private ElCaseBindInfo[] elCaseBindInfoList; private UIButton downloadButton; + private UIButton refreshButton; + private UIButton deleteButton; private static final int OFFSET_X = 140; private static final int OFFSET_Y = 26; @@ -103,6 +108,7 @@ public class FormWidgetDetailPane extends FormDockView{ elCaseBindInfoList = ShareLoader.getLoader().getAllBindInfoList(); } initReuWidgetPanel(); + createRefreshButton(); createDownloadButton(); initMenuPanel(); tabbedPane = new UITabbedPane(); @@ -119,7 +125,7 @@ public class FormWidgetDetailPane extends FormDockView{ * 初始化组件共享和复用面板 */ private void initReuWidgetPanel() { - downPanel = new UIScrollPane(new ShareWidgetPane(elCaseBindInfoList)); + downPanel = new UIScrollPane(new ShareWidgetPane(elCaseBindInfoList, false)); reuWidgetPanel.add(downPanel); } @@ -129,15 +135,22 @@ public class FormWidgetDetailPane extends FormDockView{ private void initMenuPanel() { JPanel menutPane = new JPanel(); menutPane.setLayout(FRGUIPaneFactory.createBorderLayout()); - menutPane.setBorder(BorderFactory.createEmptyBorder(5, 8, 3, 3)); + menutPane.setBorder(BorderFactory.createEmptyBorder(3, 8, 3, 3)); + menutPane.setPreferredSize(new Dimension(240, 48)); menutPane.add(new UILabel(Inter.getLocText("FR-Designer_LocalWidget"), SwingConstants.HORIZONTAL), BorderLayout.WEST); - menutPane.add(downloadButton, BorderLayout.EAST); + JPanel buttonPanel = new JPanel(); + buttonPanel.setLayout(FRGUIPaneFactory.createBorderLayout()); + buttonPanel.add(refreshButton, BorderLayout.WEST); + buttonPanel.add(downloadButton, BorderLayout.EAST); + menutPane.add(buttonPanel, BorderLayout.EAST); + menutPane.add(new JPanel(), BorderLayout.CENTER); comboBox = new UIComboBox(getFormCategories()); comboBox.setPreferredSize(new Dimension(240, 30)); initComboBoxSelectedListener(); menutPane.add(comboBox, BorderLayout.SOUTH); - reuWidgetPanel.add(menutPane,BorderLayout.NORTH); + reuWidgetPanel.add(menutPane, BorderLayout.NORTH); + } private void initComboBoxSelectedListener() { @@ -151,10 +164,25 @@ public class FormWidgetDetailPane extends FormDockView{ String filterName = comboBox.getSelectedItem().toString(); elCaseBindInfoList = ShareLoader.getLoader().getFilterBindInfoList(filterName); } - refreshDownPanel(); + refreshDownPanel(false); + + } + }); + } + private void createRefreshButton() { + refreshButton = new UIButton(); + refreshButton.setIcon(BaseUtils.readIcon("/com/fr/design/form/images/refresh.png")); + refreshButton.setToolTipText(Inter.getLocText("FR-Designer_Refresh")); + refreshButton.set4ToolbarButton(); + refreshButton.addActionListener(new ActionListener() { + @Override + public void actionPerformed(ActionEvent e) { + refreshShareMoudule(); + refreshDownPanel(false); } }); + } /** @@ -164,13 +192,14 @@ public class FormWidgetDetailPane extends FormDockView{ downloadButton = new UIButton(); downloadButton.setIcon(BaseUtils.readIcon("/com/fr/design/form/images/showmenu.png")); downloadButton.set4ToolbarButton(); + downloadButton.setToolTipText(Inter.getLocText("FR-Designer_Download_Template")); downloadButton.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { UIPopupMenu menu = new UIPopupMenu(); - UIMenuItem downloadItem = new UIMenuItem(Inter.getLocText("FR-Designer_Download_Template"), BaseUtils.readIcon("/com/fr/design/form/images/download.png")); - UIMenuItem installItem = new UIMenuItem(Inter.getLocText("FR-Designer_Install_Template"), BaseUtils.readIcon("/com/fr/design/form/images/download.png")); - UIMenuItem deleteItem = new UIMenuItem(Inter.getLocText("FR-Designer_Delete_Template"), BaseUtils.readIcon("/com/fr/design/form/images/download.png")); + 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); @@ -185,13 +214,14 @@ public class FormWidgetDetailPane extends FormDockView{ dlg.setVisible(true); } }); + installItem.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { JFileChooser fileChooser = new JFileChooser(); fileChooser.setFileSelectionMode(JFileChooser.FILES_AND_DIRECTORIES); - fileChooser.setFileFilter(new FileNameExtensionFilter("zip", "zip")); - int returnValue = fileChooser.showDialog(new JLabel(), "选择"); + fileChooser.setFileFilter(new FileNameExtensionFilter(".reu", "reu")); + int returnValue = fileChooser.showDialog(new JLabel(), Inter.getLocText("FR-Designer_Select")); if (returnValue == JFileChooser.APPROVE_OPTION) { final File chosenFile = fileChooser.getSelectedFile(); installFromDiskZipFile(chosenFile); @@ -206,18 +236,52 @@ public class FormWidgetDetailPane extends FormDockView{ deleteFromDiskZipFile(); } }); - GUICoreUtils.showPopupMenu(menu, tabbedPane, tabbedPane.getX() + OFFSET_X, tabbedPane.getY() + OFFSET_Y); + + GUICoreUtils.showPopupMenu(menu, tabbedPane, tabbedPane.getX() + OFFSET_X, OFFSET_Y); } }); } private void deleteFromDiskZipFile() { - + deleteButton = new UIButton(Inter.getLocText("FR-Designer-CommitTab_Remove")); + deleteButton.setOpaque(true); + deleteButton.setBackground(Color.red); + deleteButton.setPreferredSize(new Dimension(240, 40)); + reuWidgetPanel.add(deleteButton, BorderLayout.SOUTH); + deleteButton.addActionListener(new ActionListener() { + @Override + public void actionPerformed(ActionEvent e) { + ShareLoader.getLoader().removeElementFromMap(); + refreshShareMoudule(); + reuWidgetPanel.remove(deleteButton); + elCaseBindInfoList = ShareLoader.getLoader().getAllBindInfoList(); + refreshDownPanel(false); + } + }); + refreshDownPanel(true); } private void installFromDiskZipFile(File chosenFile) { + try { + IOUtils.copy(chosenFile, new File(ShareLoader.MODULE_PATH)); + refreshShareMoudule(); + elCaseBindInfoList = ShareLoader.getLoader().getAllBindInfoList(); + refreshDownPanel(false); + JOptionPane.showMessageDialog(null, Inter.getLocText("FR-Share_Module_OK")); + } catch (IOException e) { + JOptionPane.showMessageDialog(null, Inter.getLocText("FR-Share_Module_Error")); + e.printStackTrace(); + } + } + + private void refreshShareMoudule() { + try { + ShareLoader.getLoader().readFromEnv(); + } catch (Exception e) { + e.printStackTrace(); + } } /** @@ -229,9 +293,9 @@ public class FormWidgetDetailPane extends FormDockView{ - public void refreshDownPanel() { + public void refreshDownPanel(boolean isEdit) { reuWidgetPanel.remove(downPanel); - downPanel = new UIScrollPane(new ShareWidgetPane(elCaseBindInfoList)); + downPanel = new UIScrollPane(new ShareWidgetPane(elCaseBindInfoList, isEdit)); reuWidgetPanel.add(downPanel); repaintContainer(); From 3163cccc9808b90292bff22a86cbd2b74afd1fc4 Mon Sep 17 00:00:00 2001 From: xiaoxia Date: Mon, 31 Oct 2016 16:41:21 +0800 Subject: [PATCH 05/27] rt --- .../mainframe/FormHierarchyTreePane.java | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/designer_form/src/com/fr/design/mainframe/FormHierarchyTreePane.java b/designer_form/src/com/fr/design/mainframe/FormHierarchyTreePane.java index 2f424a7b7..381f97a70 100644 --- a/designer_form/src/com/fr/design/mainframe/FormHierarchyTreePane.java +++ b/designer_form/src/com/fr/design/mainframe/FormHierarchyTreePane.java @@ -49,7 +49,6 @@ public class FormHierarchyTreePane extends FormDockView implements HierarchyTree private ComponentTree componentTree; private UITreeComboBox treeComboBox; - private JPanel widgetPane = FRGUIPaneFactory.createBorderLayout_L_Pane(); // richer:搜寻树节点的的文本框 // private UITextField searchTextField; // private SearchResultPane searchResult; @@ -116,16 +115,15 @@ public class FormHierarchyTreePane extends FormDockView implements HierarchyTree if(childCount == NODE_LENGTH){ adjustPosition(treeModel, formDesigner); } - widgetPane.setBorder(BorderFactory.createEmptyBorder(3, 2, 3, 0)); + JPanel widgetPane = new JPanel(); + widgetPane.setBorder(BorderFactory.createEmptyBorder(3, 0, 3, 0)); + widgetPane.setLayout(FRGUIPaneFactory.createBorderLayout()); add(widgetPane, BorderLayout.NORTH); - - if(treeComboBox == null) { - widgetPane.add(new UILabel(Inter.getLocText("FR-Designer-Selected_Widget") + " ", - SwingConstants.HORIZONTAL), BorderLayout.WEST); - treeComboBox = new UITreeComboBox(componentTree); - widgetPane.add(treeComboBox, BorderLayout.CENTER); - add(widgetPane, BorderLayout.CENTER); - } + widgetPane.add(new UILabel(Inter.getLocText("FR-Designer-Selected_Widget") + " ", + SwingConstants.HORIZONTAL), BorderLayout.WEST); + treeComboBox = new UITreeComboBox(componentTree); + widgetPane.add(treeComboBox, BorderLayout.CENTER); + add(widgetPane, BorderLayout.CENTER); // UIScrollPane scrollPane = new UIScrollPane(componentTree); From 88520e8249e76e8f04e2e205d3aad169e35f30b1 Mon Sep 17 00:00:00 2001 From: xiaoxia Date: Mon, 31 Oct 2016 18:18:13 +0800 Subject: [PATCH 06/27] rt --- .../mainframe/FormWidgetDetailPane.java | 20 ++++++++----------- 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/designer_form/src/com/fr/design/mainframe/FormWidgetDetailPane.java b/designer_form/src/com/fr/design/mainframe/FormWidgetDetailPane.java index aee06781d..e967bdb2e 100644 --- a/designer_form/src/com/fr/design/mainframe/FormWidgetDetailPane.java +++ b/designer_form/src/com/fr/design/mainframe/FormWidgetDetailPane.java @@ -252,28 +252,24 @@ public class FormWidgetDetailPane extends FormDockView{ deleteButton.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { - ShareLoader.getLoader().removeElementFromMap(); + ShareLoader.getLoader().removeModulesFromMap(); refreshShareMoudule(); reuWidgetPanel.remove(deleteButton); elCaseBindInfoList = ShareLoader.getLoader().getAllBindInfoList(); refreshDownPanel(false); + JOptionPane.showMessageDialog(null, Inter.getLocText("FR-Share_Module_Removed_Successful")); } }); refreshDownPanel(true); + } private void installFromDiskZipFile(File chosenFile) { - try { - - IOUtils.copy(chosenFile, new File(ShareLoader.MODULE_PATH)); - refreshShareMoudule(); - elCaseBindInfoList = ShareLoader.getLoader().getAllBindInfoList(); - refreshDownPanel(false); - JOptionPane.showMessageDialog(null, Inter.getLocText("FR-Share_Module_OK")); - } catch (IOException e) { - JOptionPane.showMessageDialog(null, Inter.getLocText("FR-Share_Module_Error")); - e.printStackTrace(); - } + ShareLoader.getLoader().installModuleFromDiskZipFile(chosenFile); + refreshShareMoudule(); + elCaseBindInfoList = ShareLoader.getLoader().getAllBindInfoList(); + refreshDownPanel(false); + JOptionPane.showMessageDialog(null, Inter.getLocText("FR-Share_Module_OK")); } private void refreshShareMoudule() { From 0fd90c222bf909bfb55a19ebd3c9c7424ffd5df1 Mon Sep 17 00:00:00 2001 From: xiaoxia Date: Mon, 31 Oct 2016 18:19:18 +0800 Subject: [PATCH 07/27] rt --- .../design/mainframe/ShareWidgetButton.java | 48 ++++++++++++++----- 1 file changed, 37 insertions(+), 11 deletions(-) diff --git a/designer_form/src/com/fr/design/mainframe/ShareWidgetButton.java b/designer_form/src/com/fr/design/mainframe/ShareWidgetButton.java index c35ee64d5..49a77e369 100644 --- a/designer_form/src/com/fr/design/mainframe/ShareWidgetButton.java +++ b/designer_form/src/com/fr/design/mainframe/ShareWidgetButton.java @@ -1,6 +1,6 @@ package com.fr.design.mainframe; -import com.fr.base.BaseUtils; +import com.fr.base.*; import com.fr.design.constants.UIConstants; import com.fr.design.designer.creator.XCreator; import com.fr.design.designer.creator.XCreatorUtils; @@ -15,6 +15,7 @@ import com.fr.general.IOUtils; import com.fr.stable.StringUtils; import javax.swing.*; +import javax.swing.Icon; import java.awt.*; import java.awt.datatransfer.DataFlavor; import java.awt.datatransfer.Transferable; @@ -36,11 +37,18 @@ public class ShareWidgetButton extends JPanel implements MouseListener, MouseMot private MouseEvent lastPressEvent; private JPanel reportPane; private boolean isEdit; - private Icon controlMode = IOUtils.readIcon("/com/fr/design/form/images/mark.png"); + private boolean isMarked; + private Icon markedMode = IOUtils.readIcon("/com/fr/design/form/images/mark.png"); + private Icon unMarkedMode = IOUtils.readIcon("/com/fr/design/form/images/unmark.png"); private AlphaComposite composite = AlphaComposite.getInstance(AlphaComposite.SRC_OVER, 60 / 100.0F); - private JComponent controlButton = new JComponent() { + private JComponent markedButton = new JComponent() { protected void paintComponent(Graphics g) { - controlMode.paintIcon(this, g, 0, 0); + markedMode.paintIcon(this, g, 0, 0); + } + }; + private JComponent unMarkedButton = new JComponent() { + protected void paintComponent(Graphics g) { + unMarkedMode.paintIcon(this, g, 0, 0); } }; @@ -64,6 +72,16 @@ public class ShareWidgetButton extends JPanel implements MouseListener, MouseMot super.paint(g); } + public void setElementCaseEdit(boolean isEdit) { + this.isEdit = isEdit; + if (isEdit) { + this.add(unMarkedButton, 0); + repaint(); + } + + + } + private void initUI() { reportPane = new JPanel(new BorderLayout()); @@ -73,7 +91,6 @@ public class ShareWidgetButton extends JPanel implements MouseListener, MouseMot labelPane.setBackground(new Color(184, 220, 242)); labelPane.add(label, BorderLayout.CENTER); reportPane.add(labelPane, BorderLayout.SOUTH); - //add(controlButton); add(reportPane); } @@ -98,7 +115,8 @@ public class ShareWidgetButton extends JPanel implements MouseListener, MouseMot public void layoutContainer(Container parent) { int width = parent.getWidth(); int height = parent.getHeight(); - controlButton.setBounds((width - 25), 0, 25, 25); + markedButton.setBounds((width - 25), 0, 25, 25); + unMarkedButton.setBounds((width - 25), 0, 25, 25); reportPane.setBounds(0, 0, width, height); @@ -119,14 +137,22 @@ public class ShareWidgetButton extends JPanel implements MouseListener, MouseMot this.bindInfo = bindInfo; } + public String getFileName() { + return bindInfo.getName() +"." + bindInfo.getId() + ShareConstants.SUFFIX_MODULE; + } + @Override public void mouseClicked(MouseEvent e) { if (isEdit) { - remove(controlButton); - isEdit = false; - } else { - add(controlButton,0); - isEdit = true; + if (isMarked) { + remove(markedButton); + ShareLoader.getLoader().removeModuleForList(getFileName()); + isMarked = false; + } else { + add(markedButton,0); + ShareLoader.getLoader().addModuleToList(getFileName()); + isMarked = true; + } } repaint(); From c4e57b559bbaf47668e9d6bd8b9498baa190c577 Mon Sep 17 00:00:00 2001 From: xiaoxia Date: Mon, 31 Oct 2016 18:21:50 +0800 Subject: [PATCH 08/27] rt --- .../src/com/fr/design/mainframe/ShareWidgetPane.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/designer_form/src/com/fr/design/mainframe/ShareWidgetPane.java b/designer_form/src/com/fr/design/mainframe/ShareWidgetPane.java index 8d52eb4c8..cd04300bf 100644 --- a/designer_form/src/com/fr/design/mainframe/ShareWidgetPane.java +++ b/designer_form/src/com/fr/design/mainframe/ShareWidgetPane.java @@ -12,12 +12,13 @@ import java.awt.*; */ public class ShareWidgetPane extends JPanel { - public ShareWidgetPane(ElCaseBindInfo[] elCaseBindInfoList) { + public ShareWidgetPane(ElCaseBindInfo[] elCaseBindInfoList, boolean isEdit) { this.setBorder(BorderFactory.createEmptyBorder(10, 3, 0, 0));// 设置面板的边框 ,距离上、左、下、右 的距离 int rowCount = (elCaseBindInfoList.length + 1) / 2; - this.setLayout(new FlowLayout(FlowLayout.LEFT, 0, 0)); + this.setLayout(new FlowLayout(FlowLayout.LEFT, 5, 10)); for (ElCaseBindInfo rbModuleInfo : elCaseBindInfoList) { ShareWidgetButton widgetButton = new ShareWidgetButton(rbModuleInfo); + widgetButton.setElementCaseEdit(isEdit); this.add(widgetButton); } this.setPreferredSize(new Dimension(240, rowCount * 80)); From acbc7f1ae6e720cae90fa9e8b6a6dc55115112c6 Mon Sep 17 00:00:00 2001 From: xiaoxia Date: Mon, 31 Oct 2016 18:26:49 +0800 Subject: [PATCH 09/27] rt --- .../src/com/fr/design/mainframe/WidgetPropertyPane.java | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/designer_form/src/com/fr/design/mainframe/WidgetPropertyPane.java b/designer_form/src/com/fr/design/mainframe/WidgetPropertyPane.java index 67524bfbb..324ff62bb 100644 --- a/designer_form/src/com/fr/design/mainframe/WidgetPropertyPane.java +++ b/designer_form/src/com/fr/design/mainframe/WidgetPropertyPane.java @@ -40,7 +40,6 @@ public class WidgetPropertyPane extends FormDockView implements BaseWidgetProper private FormDesigner designer; private ComponentTree componentTree; private JPanel wsp; - private ParameterPropertyPane parameterPropertyPane; private MobileWidgetTable mobileWidgetTable; private MobileBodyWidgetTable mobileBodyWidgetTable; private UIScrollPane downPanel; @@ -51,6 +50,7 @@ public class WidgetPropertyPane extends FormDockView implements BaseWidgetProper public static final int NODE_LENGTH = 2; public boolean isrefresh = true; + public static WidgetPropertyPane getInstance() { if (HOLDER.singleton == null) { HOLDER.singleton = new WidgetPropertyPane(); @@ -64,7 +64,6 @@ public class WidgetPropertyPane extends FormDockView implements BaseWidgetProper return HOLDER.singleton; } - private static class HOLDER { private static WidgetPropertyPane singleton = new WidgetPropertyPane(); } @@ -190,10 +189,6 @@ public class WidgetPropertyPane extends FormDockView implements BaseWidgetProper } } - - parameterPropertyPane = ParameterPropertyPane.getInstance(designer); - parameterPropertyPane.setBorder(BorderFactory.createEmptyBorder(0, 6, 0, 4)); - add(parameterPropertyPane, BorderLayout.NORTH); add(tabbedPane, BorderLayout.CENTER); propertyTable.initPropertyGroups(null); eventTable.refresh(); From c3c2cf1280fac72b78e73a0cf0bfb5dd5bf13b3a Mon Sep 17 00:00:00 2001 From: xiaoxia Date: Mon, 31 Oct 2016 19:55:09 +0800 Subject: [PATCH 10/27] rt --- .../com/fr/design/form/images/delete icon.png | Bin 0 -> 232 bytes .../com/fr/design/form/images/download icon.png | Bin 0 -> 706 bytes .../com/fr/design/form/images/install icon.png | Bin 0 -> 705 bytes .../src/com/fr/design/form/images/marked.png | Bin 0 -> 15541 bytes .../src/com/fr/design/form/images/refresh.png | Bin 0 -> 474 bytes .../src/com/fr/design/form/images/unmarked.png | Bin 0 -> 15957 bytes 6 files changed, 0 insertions(+), 0 deletions(-) create mode 100644 designer_form/src/com/fr/design/form/images/delete icon.png create mode 100644 designer_form/src/com/fr/design/form/images/download icon.png create mode 100644 designer_form/src/com/fr/design/form/images/install icon.png create mode 100644 designer_form/src/com/fr/design/form/images/marked.png create mode 100644 designer_form/src/com/fr/design/form/images/refresh.png create mode 100644 designer_form/src/com/fr/design/form/images/unmarked.png diff --git a/designer_form/src/com/fr/design/form/images/delete icon.png b/designer_form/src/com/fr/design/form/images/delete icon.png new file mode 100644 index 0000000000000000000000000000000000000000..398c5db5c5ca1ab9896faaf3163fdd416b8ed7b1 GIT binary patch literal 232 zcmeAS@N?(olHy`uVBq!ia0vp^A|TAc1|)ksWqE-VV{wqX6T`Z5GB1IgMV>B>Ar^vf zC!ghQP~d58v@KEi%A;%{J*QN$ls`vUu_2&SUFfM(y eMSsJ$U;TPx%d`Uz>R5%f1V4yN!BxGK5bF=2ZfB)2g>WqQ-EGsMP&8n)Z8@Tl0G;rq3nOyJR zzn==!7$PAd@mE$>mhFMd;kPT%*=D^q|PoA7DARzEJBqRjIFpxYG z6B9#0K>@S2w)S_R52nNPz-SBuL16}z49U&SWriujMh682aRSAIf$CL};%h!w3x1waBhSF|e_*(Gh6i z{}(S_{6sgTa_wsd5Jm<*K0Zu=fq@{QYb`A;79a)-hyW%LR$u_H=H%qGmy?rYb9Qzn z%7q}ky1Kdy+}zwOt5&UAJ%9duRj`4tU%$Shs;a6G8XC$*DC|InpaUf(B?e((VXh}n zp13f9yvfGKCQGhiFvF#!q_}{grNjhukvhr!SdO&XG*}l%ZzTQsyI8twP(K=zW)3NHb9(@g(238pMe?bx679=Gpt*; z4&+^<%F4=@;9L(%HlUaWMGh!D1qB7+$;RH^p5fK!zYJ6Ny$2hZ?Ig$`#>>pGdGqG) z&!0d40ZeWmfQj1+R-_?{5ukEVj00V$4#eVM-9VzYwzd((u3Gyh0YtY2i!1=qO-)TX oKy~+OYHD@>X^8Vd5`!K90EipkNuYIzbpQYW07*qoM6N<$f|`0kdjJ3c literal 0 HcmV?d00001 diff --git a/designer_form/src/com/fr/design/form/images/install icon.png b/designer_form/src/com/fr/design/form/images/install icon.png new file mode 100644 index 0000000000000000000000000000000000000000..37877a62c3e90719bd70714eb6c569e06d317dd1 GIT binary patch literal 705 zcmV;y0zUnTP)Px%dr3q=R5%gklTBz7Q4q&xc9UAP2suPa8j|*4p``~armbSJ7YW*nP|}MCIa$Pu z1uvzkM3S_KqTo@~AgLe?loqU~qCKgYh~Pm)MDn4DLWKya#3Z}pyvSQN+t9P%JLJuq z|I9D*=FI~9>kG{V`lH#Kd_E6|k0<85GZ94HtdGUBt}5XTA_#Eeqx8J*vRN0lA|1zL zMIQl96TlAys;tLy$>1`nQXfxHC&M;~=o}(d>}bC&HS=x&yZc-vKzNS|CK-AL0CU-o z`G*mrW=y46ILojBk&KEh@FMKa341u2?HzwkHerip08>*~v)Sz-&|#85NdeMnAjq%B z^Y;Z5K|l021whxe5n=lm3MX~IcfVd1j!CVhhr&5}z1XkS>PbReVMvhoRaJo}T7!}- z_lp=r)OcIrUQX~I+q*hD+?!Y2TTM;;SeJyN0x1ObwNBa{zV4tkPMi^xXnNjzRcbpb zl!Aa#qwdiOZdqYm;b-piCqzi5=X^^tN9;y3%}!z4HQcHaEL&kLtqwW8Q+KDaZp{(r zwiS*ol$=$)_G||Xajk3L{?O)(qudTAe8wxwfZbrA+OBPH|NP*Oe>p7Ut$Pb_H`o!U zH<+32e#n4*BD`3(_xk<55_|;aKhsSNN2jCwQRC z=E}@T!X8~L^)wo_B_8a-F2`Qa=A{D_;WsMe*&oNkhprnl7Lf_MRR8 z$Q$QXq_)~WuO<8Ld7tQ zZqX+N%k*RW4(N4~r%c~scG0d-mDnlO^oGTz-nwR?ca>oC=*u0s_9zDg0;0<6q5*$U z;i6^wm@Ws-wP8xHi%n5imFX+Bgt}H&gRV*ri#l^DOA0h=(OGPz2D8OtvaHZCw82c# zM#@N&jFB_ZoQcs*e)Nu9aApsCyj-L6!O3*MD${qWYKWt#?(Xi=Zeyt&_E83#%|_7- z#V{n8K`K2#m5-7^r6?|v&~b{25SBu!BnNexF7K8jYMEZIB}#rK?<){WCJHK(>;Oe7 z%7-XJDNSVx@(9V8P$cY+U7AOrM86migQ^1J3>o7>ow6z`o$?GRlkOQ4gEeuvlDRWp zZy=B{wW3yc0R)psGe#=SJt2{56csrV7R2f&LS0o=tg3X&Tcn^z?p8|d6daOT@06P8X9W4pct*q1~X?eaE$o@+RD*%nn-*mq~Vf1lD8+52FsZ(=^AM>VGYnf9$w{VrIJ23 zO~)f}UO61#RfiPdeIgYK`s`F{Fl}bCs<vGN+e1Xo0h0PEP;KG_ovO# z?!^O=xmgpq6J8*VwAVyh3??sW^%#sKFL+tTXkb~l+m=X?L1tR28c6}w+LKnrpq67h zTa&nY>S)5@mts3qhz~2G)_-OCL<1(bwB(MZ#l-rU;{|PRa|l{{h#osNWi)kJ$;int zY5H=`4nbT$Eqvx2-JN0()n0L_*sPgF6xpkG^I@^l2P$MXogY`78V1YTDeb?&FMR_G zq3~T_Z5d|QRbO!#(s!u;-!i1CSm@+~KGEZ#5(S(XnBB_7*K=xTCAxKbC)%|?Ck}Km zs3<wW-@?$~Lm9N+$I%L(ckKnz&@;K`w5eXfgKqGSI!ie=9mnOFIC!O zS*!=+qu`+rJa1CT2hM5jncT&`&Xd#~eVwY17ES^IL7NyCnh)f~xF8^C6XQbjfxH+O z1O#njTxdR!7vq9}piPVm%?I*gTo4eniE*L%KwgXs0)jR%E;Jv=i*Z3f&?d%(<^y># zE(i$P#JJFWATP!R0YRG>7n%>`#ke3KXcOZ?^MSk=7X$=tVq9oGkQd{EfS^r`3(W`e zVq6dqw25({`9NNb3j%^RF)lP8$cu47K+q<}h2{f!F)j!Q+Qhifd>}8z1pz^u7#Erk zzdT3~w^Y?SE1RQdcE3W@FNuHaHb z!4F%1x%~G0_g?#8e&O(mZG(LSdp}>#jBnWcZo!!ifws2Dz*yj{Jn_`ovF}`c(thFW zFRn!Ff5_T?-_qxc2fn!R?-vc%-AhjsEAq1P=j?BL_#eAnJ##1W@4B@DobPgdn7#F3 zbD;GeGH1?&x8x+hIZWK$zWm%dw$i7palJ7(w~!bki_iF*9K=({7rotmHUEjOM|#&U z>lrUJKd?0K_q+S8zRk@1=PrHg^yAgT+{TVb;KTM&ZVAc5_~XIRlA-_9|5xbTdTQimal_d4%1swW1}awU z+wYL;GsJQ;0kFLIU!)ly+`I$=n!F&IH`;hI`AN;Cq`@(sPZfn`a zS1-KzvFWoiVXHTH^TIx&Kg;+1a_eW&z0B`)?s@C`&t2Ja-?-A%_in{sm)JfY`u1hT zUeG>F-*u{G%jw3!6YRFz7Tof$JFMQ4)qi3yesZni(&Cn(rJ=u#_pwJ#Mfgf$u;TU6 z?1GmLyqA-;aYOH>(dgD4DuQ%?m-R~t%G@joRI9AxfJy&-lO0*fX_HBFra8dt| ziT0PQ{(!ys(ebN;RlBwak6`uu3)`5l2{_jcIdtlRa()1U0z|K%#;;Ka$I=BIbB)m|*Ft*&zpeYa!H{{Y$L BH$(sc literal 0 HcmV?d00001 diff --git a/designer_form/src/com/fr/design/form/images/refresh.png b/designer_form/src/com/fr/design/form/images/refresh.png new file mode 100644 index 0000000000000000000000000000000000000000..d0efaf0482b4535a49e7b422c0d9fcf2308b0bc9 GIT binary patch literal 474 zcmV<00VV#4P)Px$lu1NER45gFQ9VloK@gp}Lp_kb0ma3a4Cg0{MQWo>qmR;|iwi078t(??S-dSIWxi7u4+3d!0bO zo(Atel}njesN=EWk!~hg@6mx2$s^;WHebI&3NvYX+_U| zbh4a832~RZVhxTB#YWnXIC)1;^!6+wecO)($-u(BCnma=Af@-zYU@bpji?}p>;_^5hnJNw7{1*;9CPv9PI Q0000007*qoM6N<$g7>b`)Bpeg literal 0 HcmV?d00001 diff --git a/designer_form/src/com/fr/design/form/images/unmarked.png b/designer_form/src/com/fr/design/form/images/unmarked.png new file mode 100644 index 0000000000000000000000000000000000000000..259d1dd7c6615a57fcaf8babfaf8b74ae36ce1d4 GIT binary patch literal 15957 zcmeI3e{2)i9l(zkD5QfwN*ZWV5!YE%5S;JMzkP8W(l{)kb(SSg6V|lJ`R>^{uzim2 zLL9FhB~#ZTZQTTmK!|l9rR_R8n$Z-(x@igltwNecC@V19b$~Pm>$G-*vI!V_XU9MC z;yj_Q)3oVXvhTj{`@Y}rz0ddizIXoPwl+6?X;D#W5k*mp8XLSV@c4lKT`(X19=-gW z2oDQm4eM2kx_62GokQ)~y^Nx&UXlGBT8Hm3UQ{9`K~e(1l!(OOY>IN%Bw~WN5om@0 z2+7fE<6qwXh0!2O)y8(4kM+gsK#$yzjDyx>lV4136kU?B##7`@@X$d7Xo4XT2}e~v zQEg25<>9$L%oq)+DcZ(rW33+0(BW$~)G2Xbu$k<%$l4tShs(s-91g2vwZY7CHioq@ z7M3TaeQ^=gZ-PsyD71P_4(5_G&6BQ~_1Zx~p2bYpq|H*L zkj{`Bu9dHg13^>benkm;(pA=+L1?I}OI4L&MY|l8lzw%kn?X%-`ObL*UO@vMSdVs^ zgT?6db2i?}@n+j9*2%MMo|E)U#D`Cj@ctp@VazqFLCKe63ncQIB%xqQhbxK%?!^;95i<>DloM)A)G`=yaYC=>5 zjb0BNFv+sSTY=r`Fb5s9=-@=!CRm-c%VM_BHgmw~as?a#Ht0-2^!f75XSnt%VxPWS zpzCyFkrWZS&s|oK4M=v$3EcxbOLH8s(@vWN=pZL?R@Np2fKAK<%5yd&(3j&f?0Z5u zZ;rke2?h(mrC3-&q%CaFN;^1fkakL(g%-r1-E86P_CUau2~oh!j8F}-3afP>uZm$U zr#f3J=$$^AQH14Ghl&Yt73lk~+L+mZ*_M{=Sh`JWAM=8!_co8HZx0~3nQ5cB%gS0# znaMNLd1naH{`1UdkI~-)qPXpqc9ohnyAxFjYW+eS)P`V%+{w;Qd!25Ex_2}By&x?A z2NIzQoBq8tu)rpUd8$2=7c8P2oPpMBCd z=2rNa4m@_7&0=#i=rC&0EGIy?!z;r(sH)!y%o!V0QP6PxY=(J?DZ_NC@*b#D-7`H3 zAJ^eO1t$AfVMb%k-hV#NliZ3vPp^nC5(EK)7YQyrA4E%VAwcjV!G-68XbCO^2wo(( z@O%(0!G!?9iv$;*527Ww5FmJw;KK7kv;-Fd1TPX?cs_`h;6i}lMS=^@2hkE-2oStT zaN+qNT7nA!f)@!cJRd|$a3MhOBEf~{gJ=mZ1PERvxbS=sEy0BV!HWbJo)4lWxDX(C zk>JAfL9_%H0t7D-TzEc+mf%8w;6;K9&j-;GTnG@nNO0l#AX4T z@FKy5=YwboE(8c(B)IT=5G}!l0Ktn`Tt&H;Z$T8kaoexITI(x$6TX&f5F1*26qT%` zsAs=HQUACNkC!Q`kEN(9-4w;|q^PCJwytAqDeA73jow;+;jqT%puC~@m_4&5sJ2wum+ap(=kxeVlw{^8&nmAnN+j;imOO3D7wGV!H zsO0)fC7*n><-F_2g6Aq;`t$W`o0La`uaEDRKkEI#=D+ohmiLVR;hUxJ?;Jhx(~0kF zU0N@-PQLu=zQ>+gHGZV?WZCue$*SkQPcKtyZh6m{YL@$cby3*x!EV_u2-(zxwp#f$!e;$7MUNcHVno@Z`D?!w&1- zdA+sU*Nsp+iue6}>3;h&KmVW%=4Dl=^wq~lw{P1Y9O_;=_Qi``50}3CU^&xyqnf&_ X Date: Mon, 31 Oct 2016 19:56:58 +0800 Subject: [PATCH 11/27] rt --- .../src/com/fr/design/mainframe/ShareWidgetButton.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/designer_form/src/com/fr/design/mainframe/ShareWidgetButton.java b/designer_form/src/com/fr/design/mainframe/ShareWidgetButton.java index 49a77e369..ec663176e 100644 --- a/designer_form/src/com/fr/design/mainframe/ShareWidgetButton.java +++ b/designer_form/src/com/fr/design/mainframe/ShareWidgetButton.java @@ -38,8 +38,8 @@ public class ShareWidgetButton extends JPanel implements MouseListener, MouseMot private JPanel reportPane; private boolean isEdit; private boolean isMarked; - private Icon markedMode = IOUtils.readIcon("/com/fr/design/form/images/mark.png"); - private Icon unMarkedMode = IOUtils.readIcon("/com/fr/design/form/images/unmark.png"); + private Icon markedMode = IOUtils.readIcon("/com/fr/design/form/images/marked.png"); + private Icon unMarkedMode = IOUtils.readIcon("/com/fr/design/form/images/unmarked.png"); private AlphaComposite composite = AlphaComposite.getInstance(AlphaComposite.SRC_OVER, 60 / 100.0F); private JComponent markedButton = new JComponent() { protected void paintComponent(Graphics g) { From af38c88c952f315598e87a00be6350a6665ba660 Mon Sep 17 00:00:00 2001 From: xiaoxia Date: Mon, 31 Oct 2016 19:57:40 +0800 Subject: [PATCH 12/27] rt --- .../mainframe/FormWidgetDetailPane.java | 33 ++++++++++++------- 1 file changed, 22 insertions(+), 11 deletions(-) diff --git a/designer_form/src/com/fr/design/mainframe/FormWidgetDetailPane.java b/designer_form/src/com/fr/design/mainframe/FormWidgetDetailPane.java index e967bdb2e..709b8aacf 100644 --- a/designer_form/src/com/fr/design/mainframe/FormWidgetDetailPane.java +++ b/designer_form/src/com/fr/design/mainframe/FormWidgetDetailPane.java @@ -252,12 +252,17 @@ public class FormWidgetDetailPane extends FormDockView{ deleteButton.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { - ShareLoader.getLoader().removeModulesFromMap(); - refreshShareMoudule(); - reuWidgetPanel.remove(deleteButton); - elCaseBindInfoList = ShareLoader.getLoader().getAllBindInfoList(); - refreshDownPanel(false); - JOptionPane.showMessageDialog(null, Inter.getLocText("FR-Share_Module_Removed_Successful")); + if(ShareLoader.getLoader().removeModulesFromMap()) { + ShareLoader.getLoader().removeModulesFromMap(); + refreshShareMoudule(); + reuWidgetPanel.remove(deleteButton); + elCaseBindInfoList = ShareLoader.getLoader().getAllBindInfoList(); + JOptionPane.showMessageDialog(null, Inter.getLocText("FR-Share_Module_Removed_Successful")); + refreshDownPanel(false); + } else { + JOptionPane.showMessageDialog(null, Inter.getLocText("FR-Share_Module_Removed_Failed")); + } + } }); refreshDownPanel(true); @@ -265,11 +270,17 @@ public class FormWidgetDetailPane extends FormDockView{ } private void installFromDiskZipFile(File chosenFile) { - ShareLoader.getLoader().installModuleFromDiskZipFile(chosenFile); - refreshShareMoudule(); - elCaseBindInfoList = ShareLoader.getLoader().getAllBindInfoList(); - refreshDownPanel(false); - JOptionPane.showMessageDialog(null, Inter.getLocText("FR-Share_Module_OK")); + try { + ShareLoader.getLoader().installModuleFromDiskZipFile(chosenFile); + refreshShareMoudule(); + elCaseBindInfoList = ShareLoader.getLoader().getAllBindInfoList(); + refreshDownPanel(false); + JOptionPane.showMessageDialog(null, Inter.getLocText("FR-Share_Module_OK")); + } catch (IOException e) { + JOptionPane.showMessageDialog(null, Inter.getLocText("FR-Share_Module_Error")); + e.printStackTrace(); + } + } private void refreshShareMoudule() { From 099e4e496bb82827a10b2d41c1b32a7a0ba15c32 Mon Sep 17 00:00:00 2001 From: xiaoxia Date: Mon, 31 Oct 2016 20:06:27 +0800 Subject: [PATCH 13/27] rt --- .../src/com/fr/design/mainframe/FormWidgetDetailPane.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/designer_form/src/com/fr/design/mainframe/FormWidgetDetailPane.java b/designer_form/src/com/fr/design/mainframe/FormWidgetDetailPane.java index 709b8aacf..78673b22d 100644 --- a/designer_form/src/com/fr/design/mainframe/FormWidgetDetailPane.java +++ b/designer_form/src/com/fr/design/mainframe/FormWidgetDetailPane.java @@ -252,15 +252,16 @@ public class FormWidgetDetailPane extends FormDockView{ deleteButton.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { - if(ShareLoader.getLoader().removeModulesFromMap()) { - ShareLoader.getLoader().removeModulesFromMap(); + if(ShareLoader.getLoader().removeModulesFromList()) { refreshShareMoudule(); reuWidgetPanel.remove(deleteButton); elCaseBindInfoList = ShareLoader.getLoader().getAllBindInfoList(); JOptionPane.showMessageDialog(null, Inter.getLocText("FR-Share_Module_Removed_Successful")); refreshDownPanel(false); } else { + reuWidgetPanel.remove(deleteButton); JOptionPane.showMessageDialog(null, Inter.getLocText("FR-Share_Module_Removed_Failed")); + refreshDownPanel(false); } } From 3b96b135af47123ce9e3559c27beb112fbe9da87 Mon Sep 17 00:00:00 2001 From: xiaoxia Date: Tue, 1 Nov 2016 13:48:32 +0800 Subject: [PATCH 14/27] rt --- .../gui/icontainer/UIResizableContainer.java | 44 ++++++++++++++++--- 1 file changed, 38 insertions(+), 6 deletions(-) diff --git a/designer_base/src/com/fr/design/gui/icontainer/UIResizableContainer.java b/designer_base/src/com/fr/design/gui/icontainer/UIResizableContainer.java index 22d1bb521..9fa791b77 100644 --- a/designer_base/src/com/fr/design/gui/icontainer/UIResizableContainer.java +++ b/designer_base/src/com/fr/design/gui/icontainer/UIResizableContainer.java @@ -3,6 +3,7 @@ package com.fr.design.gui.icontainer; import com.fr.base.BaseUtils; import com.fr.design.constants.UIConstants; import com.fr.design.mainframe.DesignerContext; +import com.fr.design.mainframe.EastRegionContainerPane; import com.fr.stable.Constants; import com.fr.design.utils.gui.GUICoreUtils; @@ -21,6 +22,7 @@ public class UIResizableContainer extends JPanel { private JComponent upPane; private JComponent downPane; + private JComponent parameterPane = new JPanel(); private HorizotalToolPane horizontToolPane; private VerticalToolPane verticalToolPane; @@ -37,6 +39,7 @@ public class UIResizableContainer extends JPanel { private boolean isLeftRightDragEnabled = true; private boolean isDownPaneVisible = true ; + private int paraHeight; public UIResizableContainer(int direction) { this(new JPanel(), new JPanel(), direction); @@ -85,7 +88,10 @@ public class UIResizableContainer extends JPanel { add(horizontToolPane); add(downPane); add(verticalToolPane); + parameterPane.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5)); + add(parameterPane); } + public UIResizableContainer(JComponent upPane, int direction) { setBackground(UIConstants.NORMAL_BACKGROUND); @@ -96,6 +102,7 @@ public class UIResizableContainer extends JPanel { setLayout(containerLayout); add(upPane); add(horizontToolPane); + add(parameterPane); } @@ -119,6 +126,20 @@ public class UIResizableContainer extends JPanel { } } + public int getParameterPaneHeight() { + if(parameterPane.getHeight() == 0) { + return 30; + } + return paraHeight; + + } + + public void setParameterHeight(int height) { + paraHeight = height; + refreshContainer(); + + } + /** * 得到上下子面板的高度 * @@ -183,20 +204,21 @@ public class UIResizableContainer extends JPanel { if(isDownPaneVisible){ upPane.setBounds(0, 0, containerWidth - toolPaneHeight, toolPaneY); horizontToolPane.setBounds(0, toolPaneY, containerWidth - toolPaneHeight, toolPaneHeight); - downPane.setBounds(0, toolPaneY + toolPaneHeight, containerWidth - toolPaneHeight, parent.getHeight() - toolPaneY - toolPaneHeight); + downPane.setBounds(0, toolPaneY + toolPaneHeight, containerWidth - toolPaneHeight, parent.getHeight() - toolPaneY - toolPaneHeight-30); verticalToolPane.setBounds(containerWidth - toolPaneHeight, 0, toolPaneHeight, getHeight()); }else{ upPane.setBounds(0, 0, containerWidth - toolPaneHeight, getHeight()); verticalToolPane.setBounds(containerWidth - toolPaneHeight, 0, toolPaneHeight, getHeight()); } - } else if (direction == Constants.LEFT) { + } else if (direction == Constants.LEFT && parent instanceof EastRegionContainerPane) { if(isDownPaneVisible){ if (toolPaneY > getHeight() - toolPaneHeight) { toolPaneY = getHeight() - toolPaneHeight; } - upPane.setBounds(toolPaneHeight, 0, containerWidth - toolPaneHeight, toolPaneY); - horizontToolPane.setBounds(toolPaneHeight, toolPaneY, containerWidth - toolPaneHeight, toolPaneHeight); - downPane.setBounds(toolPaneHeight, toolPaneY + toolPaneHeight, containerWidth - toolPaneHeight, parent.getHeight() - toolPaneY - toolPaneHeight); + parameterPane.setBounds(20,0,230,getParameterPaneHeight()); + upPane.setBounds(toolPaneHeight, getParameterPaneHeight(), containerWidth - toolPaneHeight, toolPaneY); + horizontToolPane.setBounds(toolPaneHeight, toolPaneY + getParameterPaneHeight(), containerWidth - toolPaneHeight, toolPaneHeight); + downPane.setBounds(toolPaneHeight, toolPaneY + toolPaneHeight + getParameterPaneHeight(), containerWidth - toolPaneHeight, parent.getHeight() - toolPaneY - toolPaneHeight - getParameterPaneHeight()); verticalToolPane.setBounds(0, 0, toolPaneHeight, getHeight()); }else{ upPane.setBounds(toolPaneHeight, 0, containerWidth - toolPaneHeight, getHeight()); @@ -244,6 +266,16 @@ public class UIResizableContainer extends JPanel { refreshContainer(); } + public void addParameterPane(JComponent pane) { + add(this.parameterPane = pane); + refreshContainer(); + } + + public void removeParameterPane() { + remove(this.parameterPane); + refreshContainer(); + } + /** * 得到上子面板 * @@ -483,7 +515,7 @@ public class UIResizableContainer extends JPanel { jf.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); JPanel content = (JPanel) jf.getContentPane(); content.setLayout(new BorderLayout()); - UIResizableContainer bb = new UIResizableContainer(Constants.LEFT); + UIResizableContainer bb = new UIResizableContainer(Constants.RIGHT); JPanel cc = new JPanel(); cc.setBackground(Color.blue); content.add(bb, BorderLayout.EAST); From 6c540eb1ed93ea6962067997e128753175b0a8a4 Mon Sep 17 00:00:00 2001 From: xiaoxia Date: Tue, 1 Nov 2016 14:07:22 +0800 Subject: [PATCH 15/27] rt --- .../src/com/fr/design/mainframe/ElementCasePaneDelegate.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/designer/src/com/fr/design/mainframe/ElementCasePaneDelegate.java b/designer/src/com/fr/design/mainframe/ElementCasePaneDelegate.java index d6c167a01..79c60d2dc 100644 --- a/designer/src/com/fr/design/mainframe/ElementCasePaneDelegate.java +++ b/designer/src/com/fr/design/mainframe/ElementCasePaneDelegate.java @@ -3,6 +3,7 @@ package com.fr.design.mainframe; import com.fr.base.BaseUtils; import com.fr.design.fun.MenuHandler; import com.fr.design.menu.KeySetUtils; +import com.fr.design.parameter.ParameterPropertyPane; import com.fr.general.Inter; import com.fr.page.ReportSettingsProvider; import com.fr.design.file.HistoryTemplateListPane; @@ -58,6 +59,7 @@ public class ElementCasePaneDelegate extends ElementCasePane { if (editingTemplate != null && !editingTemplate.isUpMode()) { EastRegionContainerPane.getInstance().replaceDownPane(CellElementPropertyPane.getInstance()); EastRegionContainerPane.getInstance().replaceUpPane(QuickEditorRegion.getInstance()); + EastRegionContainerPane.getInstance().removeParameterPane(); } } }); From 9f3eaac8a346409e5afd68364976d805c85e6f46 Mon Sep 17 00:00:00 2001 From: xiaoxia Date: Tue, 1 Nov 2016 14:07:44 +0800 Subject: [PATCH 16/27] rt --- designer_form/src/com/fr/design/mainframe/JForm.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/designer_form/src/com/fr/design/mainframe/JForm.java b/designer_form/src/com/fr/design/mainframe/JForm.java index 661ba0ab9..19ed6a1b1 100644 --- a/designer_form/src/com/fr/design/mainframe/JForm.java +++ b/designer_form/src/com/fr/design/mainframe/JForm.java @@ -28,6 +28,7 @@ import com.fr.design.menu.KeySetUtils; import com.fr.design.menu.MenuDef; import com.fr.design.menu.ShortCut; import com.fr.design.menu.ToolBarDef; +import com.fr.design.parameter.ParameterPropertyPane; import com.fr.design.roleAuthority.RolesAlreadyEditedPane; import com.fr.design.utils.gui.LayoutUtils; import com.fr.file.FILE; @@ -247,6 +248,7 @@ public class JForm extends JTemplate implements BaseJForm { ComparatorUtils.equals(editingComponent.getClass(), NoSupportAuthorityEdit.class) ? editingComponent : createAuthorityEditPane()); } else { EastRegionContainerPane.getInstance().replaceUpPane(editingComponent); + } } @@ -615,8 +617,10 @@ public class JForm extends JTemplate implements BaseJForm { } } - EastRegionContainerPane.getInstance().replaceUpPane(WidgetPropertyPane.getInstance(formDesign)); + EastRegionContainerPane.getInstance().replaceUpPane(WidgetPropertyPane.getInstance(formDesign)); + //sharetest + EastRegionContainerPane.getInstance().addParameterPane(ParameterPropertyPane.getInstance(formDesign)); if (EastRegionContainerPane.getInstance().getDownPane() == null) { new Thread() { public void run() { @@ -636,6 +640,7 @@ public class JForm extends JTemplate implements BaseJForm { pane.setLayout(new BorderLayout()); pane.add(FormWidgetDetailPane.getInstance(formDesign), BorderLayout.CENTER); EastRegionContainerPane.getInstance().replaceDownPane(pane); + } } From c3cb42a58ad1eb5879e4f7a76c661538f86d3dd3 Mon Sep 17 00:00:00 2001 From: xiaoxia Date: Tue, 1 Nov 2016 14:08:07 +0800 Subject: [PATCH 17/27] rt --- .../com/fr/design/gui/icontainer/UIResizableContainer.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/designer_base/src/com/fr/design/gui/icontainer/UIResizableContainer.java b/designer_base/src/com/fr/design/gui/icontainer/UIResizableContainer.java index 9fa791b77..bb9686aa8 100644 --- a/designer_base/src/com/fr/design/gui/icontainer/UIResizableContainer.java +++ b/designer_base/src/com/fr/design/gui/icontainer/UIResizableContainer.java @@ -127,9 +127,7 @@ public class UIResizableContainer extends JPanel { } public int getParameterPaneHeight() { - if(parameterPane.getHeight() == 0) { - return 30; - } + return paraHeight; } @@ -217,6 +215,7 @@ public class UIResizableContainer extends JPanel { } parameterPane.setBounds(20,0,230,getParameterPaneHeight()); upPane.setBounds(toolPaneHeight, getParameterPaneHeight(), containerWidth - toolPaneHeight, toolPaneY); + System.out.print(getParameterPaneHeight() + "fsdfsdfsd"); horizontToolPane.setBounds(toolPaneHeight, toolPaneY + getParameterPaneHeight(), containerWidth - toolPaneHeight, toolPaneHeight); downPane.setBounds(toolPaneHeight, toolPaneY + toolPaneHeight + getParameterPaneHeight(), containerWidth - toolPaneHeight, parent.getHeight() - toolPaneY - toolPaneHeight - getParameterPaneHeight()); verticalToolPane.setBounds(0, 0, toolPaneHeight, getHeight()); @@ -273,6 +272,7 @@ public class UIResizableContainer extends JPanel { public void removeParameterPane() { remove(this.parameterPane); + setParameterHeight(0); refreshContainer(); } From d8df4f920eab73a35753dd3361dde00fe311d5f8 Mon Sep 17 00:00:00 2001 From: xiaoxia Date: Tue, 1 Nov 2016 14:08:50 +0800 Subject: [PATCH 18/27] rt --- .../src/com/fr/design/mainframe/FormDesigner.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/designer_form/src/com/fr/design/mainframe/FormDesigner.java b/designer_form/src/com/fr/design/mainframe/FormDesigner.java index 544d89ec7..ec823827a 100644 --- a/designer_form/src/com/fr/design/mainframe/FormDesigner.java +++ b/designer_form/src/com/fr/design/mainframe/FormDesigner.java @@ -198,6 +198,12 @@ public class FormDesigner extends TargetComponent
implements TreeSelection ParameterPropertyPane.getInstance().getParameterToolbarPane().populateBean( getParameterArray() == null ? new Parameter[0] : getParameterArray()); ParameterPropertyPane.getInstance().repaintContainer(); + if (getParameterArray().length == 0) { + EastRegionContainerPane.getInstance().setParameterHeight(30); + } else { + EastRegionContainerPane.getInstance().setParameterHeight((getParameterArray().length + 5) / 6 * 30 + 80); + } + } private void removeSame(Parameter[] parameters, List namelist){ @@ -463,6 +469,8 @@ public class FormDesigner extends TargetComponent implements TreeSelection paraComponent = null; formLayoutContainer.setSize(rootComponent.getWidth(), rootComponent.getHeight()); EastRegionContainerPane.getInstance().replaceDownPane(this.getEastDownPane()); + //atat + //EastRegionContainerPane.getInstance().addTitlePane(ParameterPropertyPane.getInstance(FormDesigner.this)); //删除后重绘下 invalidateLayout(); } From ab3c192d76164d813863837eb7943d9a796a7c3e Mon Sep 17 00:00:00 2001 From: xiaoxia Date: Tue, 1 Nov 2016 14:14:04 +0800 Subject: [PATCH 19/27] rt --- .../src/com/fr/design/gui/icontainer/UIResizableContainer.java | 1 - 1 file changed, 1 deletion(-) diff --git a/designer_base/src/com/fr/design/gui/icontainer/UIResizableContainer.java b/designer_base/src/com/fr/design/gui/icontainer/UIResizableContainer.java index bb9686aa8..e27f10595 100644 --- a/designer_base/src/com/fr/design/gui/icontainer/UIResizableContainer.java +++ b/designer_base/src/com/fr/design/gui/icontainer/UIResizableContainer.java @@ -215,7 +215,6 @@ public class UIResizableContainer extends JPanel { } parameterPane.setBounds(20,0,230,getParameterPaneHeight()); upPane.setBounds(toolPaneHeight, getParameterPaneHeight(), containerWidth - toolPaneHeight, toolPaneY); - System.out.print(getParameterPaneHeight() + "fsdfsdfsd"); horizontToolPane.setBounds(toolPaneHeight, toolPaneY + getParameterPaneHeight(), containerWidth - toolPaneHeight, toolPaneHeight); downPane.setBounds(toolPaneHeight, toolPaneY + toolPaneHeight + getParameterPaneHeight(), containerWidth - toolPaneHeight, parent.getHeight() - toolPaneY - toolPaneHeight - getParameterPaneHeight()); verticalToolPane.setBounds(0, 0, toolPaneHeight, getHeight()); From 8fddeec6857407771b22fdcb6e0bdcbe731dfb45 Mon Sep 17 00:00:00 2001 From: xiaoxia Date: Tue, 1 Nov 2016 14:18:55 +0800 Subject: [PATCH 20/27] rt --- designer_form/src/com/fr/design/mainframe/JForm.java | 1 - 1 file changed, 1 deletion(-) diff --git a/designer_form/src/com/fr/design/mainframe/JForm.java b/designer_form/src/com/fr/design/mainframe/JForm.java index 19ed6a1b1..c88ebe012 100644 --- a/designer_form/src/com/fr/design/mainframe/JForm.java +++ b/designer_form/src/com/fr/design/mainframe/JForm.java @@ -619,7 +619,6 @@ public class JForm extends JTemplate implements BaseJForm { EastRegionContainerPane.getInstance().replaceUpPane(WidgetPropertyPane.getInstance(formDesign)); - //sharetest EastRegionContainerPane.getInstance().addParameterPane(ParameterPropertyPane.getInstance(formDesign)); if (EastRegionContainerPane.getInstance().getDownPane() == null) { new Thread() { From a15aabfb62763f53ef700c561e329779cb6b197d Mon Sep 17 00:00:00 2001 From: xiaoxia Date: Tue, 1 Nov 2016 14:36:23 +0800 Subject: [PATCH 21/27] rt --- .../fr/design/gui/icontainer/UIResizableContainer.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/designer_base/src/com/fr/design/gui/icontainer/UIResizableContainer.java b/designer_base/src/com/fr/design/gui/icontainer/UIResizableContainer.java index e27f10595..ec8380eed 100644 --- a/designer_base/src/com/fr/design/gui/icontainer/UIResizableContainer.java +++ b/designer_base/src/com/fr/design/gui/icontainer/UIResizableContainer.java @@ -208,18 +208,19 @@ public class UIResizableContainer extends JPanel { upPane.setBounds(0, 0, containerWidth - toolPaneHeight, getHeight()); verticalToolPane.setBounds(containerWidth - toolPaneHeight, 0, toolPaneHeight, getHeight()); } - } else if (direction == Constants.LEFT && parent instanceof EastRegionContainerPane) { + } else if (direction == Constants.LEFT) { if(isDownPaneVisible){ if (toolPaneY > getHeight() - toolPaneHeight) { toolPaneY = getHeight() - toolPaneHeight; } - parameterPane.setBounds(20,0,230,getParameterPaneHeight()); + parameterPane.setBounds(20, 0, 230, getParameterPaneHeight()); upPane.setBounds(toolPaneHeight, getParameterPaneHeight(), containerWidth - toolPaneHeight, toolPaneY); horizontToolPane.setBounds(toolPaneHeight, toolPaneY + getParameterPaneHeight(), containerWidth - toolPaneHeight, toolPaneHeight); downPane.setBounds(toolPaneHeight, toolPaneY + toolPaneHeight + getParameterPaneHeight(), containerWidth - toolPaneHeight, parent.getHeight() - toolPaneY - toolPaneHeight - getParameterPaneHeight()); verticalToolPane.setBounds(0, 0, toolPaneHeight, getHeight()); - }else{ - upPane.setBounds(toolPaneHeight, 0, containerWidth - toolPaneHeight, getHeight()); + }else { + parameterPane.setBounds(20, 0, 230, getParameterPaneHeight()); + upPane.setBounds(toolPaneHeight, getParameterPaneHeight(), containerWidth - toolPaneHeight, getHeight() - getParameterPaneHeight()); verticalToolPane.setBounds(0, 0, toolPaneHeight, getHeight()); } } From ac76c6839e456be595d3b4f03b07dcb11a1f1ab2 Mon Sep 17 00:00:00 2001 From: xiaoxia Date: Tue, 1 Nov 2016 14:43:18 +0800 Subject: [PATCH 22/27] rt --- .../src/com/fr/design/mainframe/FormWidgetDetailPane.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/designer_form/src/com/fr/design/mainframe/FormWidgetDetailPane.java b/designer_form/src/com/fr/design/mainframe/FormWidgetDetailPane.java index 78673b22d..6bcc9a266 100644 --- a/designer_form/src/com/fr/design/mainframe/FormWidgetDetailPane.java +++ b/designer_form/src/com/fr/design/mainframe/FormWidgetDetailPane.java @@ -286,7 +286,7 @@ public class FormWidgetDetailPane extends FormDockView{ private void refreshShareMoudule() { try { - ShareLoader.getLoader().readFromEnv(); + ShareLoader.getLoader().refreshModule(); } catch (Exception e) { e.printStackTrace(); } From d8a2f250486d8020ecf0d8bb9354d243ae4bbecb Mon Sep 17 00:00:00 2001 From: xiaoxia Date: Tue, 1 Nov 2016 14:45:09 +0800 Subject: [PATCH 23/27] rt --- .../src/com/fr/design/gui/icontainer/UIResizableContainer.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/designer_base/src/com/fr/design/gui/icontainer/UIResizableContainer.java b/designer_base/src/com/fr/design/gui/icontainer/UIResizableContainer.java index ec8380eed..a56ae64d7 100644 --- a/designer_base/src/com/fr/design/gui/icontainer/UIResizableContainer.java +++ b/designer_base/src/com/fr/design/gui/icontainer/UIResizableContainer.java @@ -88,7 +88,6 @@ public class UIResizableContainer extends JPanel { add(horizontToolPane); add(downPane); add(verticalToolPane); - parameterPane.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5)); add(parameterPane); } @@ -218,7 +217,7 @@ public class UIResizableContainer extends JPanel { horizontToolPane.setBounds(toolPaneHeight, toolPaneY + getParameterPaneHeight(), containerWidth - toolPaneHeight, toolPaneHeight); downPane.setBounds(toolPaneHeight, toolPaneY + toolPaneHeight + getParameterPaneHeight(), containerWidth - toolPaneHeight, parent.getHeight() - toolPaneY - toolPaneHeight - getParameterPaneHeight()); verticalToolPane.setBounds(0, 0, toolPaneHeight, getHeight()); - }else { + } else { parameterPane.setBounds(20, 0, 230, getParameterPaneHeight()); upPane.setBounds(toolPaneHeight, getParameterPaneHeight(), containerWidth - toolPaneHeight, getHeight() - getParameterPaneHeight()); verticalToolPane.setBounds(0, 0, toolPaneHeight, getHeight()); From 7e6603a996c82c761e5f52ee6a260942a6412841 Mon Sep 17 00:00:00 2001 From: xiaoxia Date: Tue, 1 Nov 2016 14:47:38 +0800 Subject: [PATCH 24/27] rt --- .../fr/design/gui/icontainer/UIResizableContainer.java | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/designer_base/src/com/fr/design/gui/icontainer/UIResizableContainer.java b/designer_base/src/com/fr/design/gui/icontainer/UIResizableContainer.java index a56ae64d7..201aee759 100644 --- a/designer_base/src/com/fr/design/gui/icontainer/UIResizableContainer.java +++ b/designer_base/src/com/fr/design/gui/icontainer/UIResizableContainer.java @@ -22,6 +22,7 @@ public class UIResizableContainer extends JPanel { private JComponent upPane; private JComponent downPane; + //放参数面板 private JComponent parameterPane = new JPanel(); private HorizotalToolPane horizontToolPane; @@ -125,12 +126,20 @@ public class UIResizableContainer extends JPanel { } } + /** + * 获取参数面板高度 + */ public int getParameterPaneHeight() { return paraHeight; } + /** + * 设置参数面板高度 + * + * @param height + */ public void setParameterHeight(int height) { paraHeight = height; refreshContainer(); From 083bcb003c444a981fd77a79f7c6c9f101c6a0eb Mon Sep 17 00:00:00 2001 From: xiaoxia Date: Tue, 1 Nov 2016 14:58:38 +0800 Subject: [PATCH 25/27] rt --- designer_form/src/com/fr/design/mainframe/FormDesigner.java | 1 + 1 file changed, 1 insertion(+) diff --git a/designer_form/src/com/fr/design/mainframe/FormDesigner.java b/designer_form/src/com/fr/design/mainframe/FormDesigner.java index ec823827a..fffccd3ff 100644 --- a/designer_form/src/com/fr/design/mainframe/FormDesigner.java +++ b/designer_form/src/com/fr/design/mainframe/FormDesigner.java @@ -201,6 +201,7 @@ public class FormDesigner extends TargetComponent implements TreeSelection if (getParameterArray().length == 0) { EastRegionContainerPane.getInstance().setParameterHeight(30); } else { + //参数面板独立后只能这边触发调整高度,根据参数个数调整换行,计算高度 EastRegionContainerPane.getInstance().setParameterHeight((getParameterArray().length + 5) / 6 * 30 + 80); } From 128d97ddf37786ecbc8924ecaa2fbd5693b756b1 Mon Sep 17 00:00:00 2001 From: xiaoxia Date: Tue, 1 Nov 2016 15:16:10 +0800 Subject: [PATCH 26/27] rt --- .../src/com/fr/design/form/parameter/FormParaDesigner.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/designer_form/src/com/fr/design/form/parameter/FormParaDesigner.java b/designer_form/src/com/fr/design/form/parameter/FormParaDesigner.java index f46334dd5..cfb3976ff 100644 --- a/designer_form/src/com/fr/design/form/parameter/FormParaDesigner.java +++ b/designer_form/src/com/fr/design/form/parameter/FormParaDesigner.java @@ -114,6 +114,8 @@ public class FormParaDesigner extends FormDesigner implements ParameterDesignerP if (!BaseUtils.isAuthorityEditing()) { EastRegionContainerPane.getInstance().replaceUpPane( WidgetPropertyPane.getInstance(this)); + EastRegionContainerPane.getInstance().addParameterPane(ParameterPropertyPane.getInstance(this)); + refreshParameter(); } else { showAuthorityEditPane(); } From 660e391aed9bbb13ae63e2974638d2c8e537d95e Mon Sep 17 00:00:00 2001 From: xiaoxia Date: Tue, 1 Nov 2016 16:57:23 +0800 Subject: [PATCH 27/27] rt --- .../src/com/fr/design/parameter/ParameterPropertyPane.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/designer_form/src/com/fr/design/parameter/ParameterPropertyPane.java b/designer_form/src/com/fr/design/parameter/ParameterPropertyPane.java index 3ecfd53ed..f376bd6ab 100644 --- a/designer_form/src/com/fr/design/parameter/ParameterPropertyPane.java +++ b/designer_form/src/com/fr/design/parameter/ParameterPropertyPane.java @@ -47,7 +47,7 @@ public class ParameterPropertyPane extends JPanel{ initParameterListener(); this.setLayout(new BorderLayout(0, 6)); - this.setBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10)); + this.setBorder(BorderFactory.createEmptyBorder(2, 5, 5, 5)); this.add(toolbarPane, BorderLayout.CENTER); }