From b20500ac93987efe69fedf9ec4b6557cf8dff2ab Mon Sep 17 00:00:00 2001 From: finereport Date: Fri, 1 Sep 2017 16:08:28 +0800 Subject: [PATCH 001/125] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E6=9F=A5=E8=AF=A2=E6=95=B0=E6=8D=AE=E9=9B=86=E5=8F=AF=E4=BB=A5?= =?UTF-8?q?=E9=9A=8F=E6=84=8F=E9=80=89=E5=8F=96=E5=85=B6=E4=BB=96=E7=B1=BB?= =?UTF-8?q?=E5=9E=8B=E7=9A=84=E6=95=B0=E6=8D=AE=E8=BF=9E=E6=8E=A5=E7=9A=84?= =?UTF-8?q?BUG?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../connect/ConnectionTableProcedurePane.java | 13 +++++++++++++ .../tabledata/tabledatapane/DBTableDataPane.java | 13 ++++++++++++- 2 files changed, 25 insertions(+), 1 deletion(-) diff --git a/designer_base/src/com/fr/design/data/datapane/connect/ConnectionTableProcedurePane.java b/designer_base/src/com/fr/design/data/datapane/connect/ConnectionTableProcedurePane.java index 23b62431ec..0377f0bd4a 100644 --- a/designer_base/src/com/fr/design/data/datapane/connect/ConnectionTableProcedurePane.java +++ b/designer_base/src/com/fr/design/data/datapane/connect/ConnectionTableProcedurePane.java @@ -1,6 +1,8 @@ package com.fr.design.data.datapane.connect; import com.fr.base.BaseUtils; +import com.fr.data.impl.AbstractDatabaseConnection; +import com.fr.data.impl.Connection; import com.fr.design.constants.UIConstants; import com.fr.data.core.db.TableProcedure; import com.fr.design.border.UIRoundedBorder; @@ -20,6 +22,7 @@ import javax.swing.event.DocumentEvent; import javax.swing.event.DocumentListener; import java.awt.*; import java.awt.event.*; +import java.util.List; /** * 数据集编辑面板左边的部分 @@ -39,6 +42,12 @@ public class ConnectionTableProcedurePane extends BasicPane { public ConnectionTableProcedurePane() { this.setLayout(new BorderLayout(4, 4)); connectionComboBox = new ConnectionComboBoxPanel(com.fr.data.impl.Connection.class) { + + @Override + protected void filterConnection(Connection connection, String conName, List nameList) { + filter(connection, conName, nameList); + } + protected void refreshItems() { super.refreshItems(); if (tableViewList != null) { @@ -83,6 +92,10 @@ public class ConnectionTableProcedurePane extends BasicPane { this.setPreferredSize(new Dimension(WIDTH, getPreferredSize().height)); } + protected void filter(Connection connection, String conName, List nameList) { + connection.addConnection(nameList, conName, new Class[]{AbstractDatabaseConnection.class}); + } + protected JPanel createCheckBoxgroupPane() { JPanel checkBoxgroupPane = FRGUIPaneFactory.createNColumnGridInnerContainer_S_Pane(2); JPanel first = FRGUIPaneFactory.createNormalFlowInnerContainer_S_Pane(); diff --git a/designer_base/src/com/fr/design/data/tabledata/tabledatapane/DBTableDataPane.java b/designer_base/src/com/fr/design/data/tabledata/tabledatapane/DBTableDataPane.java index 75b3219ebd..947e17106b 100644 --- a/designer_base/src/com/fr/design/data/tabledata/tabledatapane/DBTableDataPane.java +++ b/designer_base/src/com/fr/design/data/tabledata/tabledatapane/DBTableDataPane.java @@ -5,7 +5,11 @@ import com.fr.base.FRContext; import com.fr.base.Parameter; import com.fr.base.ParameterHelper; import com.fr.data.core.db.TableProcedure; +import com.fr.data.impl.AbstractDatabaseConnection; +import com.fr.data.impl.Connection; import com.fr.data.impl.DBTableData; +import com.fr.data.impl.JDBCDatabaseConnection; +import com.fr.data.impl.JNDIDatabaseConnection; import com.fr.data.impl.NameDatabaseConnection; import com.fr.design.ExtraDesignClassManager; import com.fr.design.actions.UpdateAction; @@ -37,6 +41,7 @@ import com.fr.script.Calculator; import com.fr.stable.ArrayUtils; import com.fr.stable.ParameterProvider; import com.fr.stable.StringUtils; +import org.sqlite.JDBC; import javax.swing.*; import javax.swing.text.BadLocationException; @@ -102,7 +107,12 @@ public class DBTableDataPane extends AbstractTableDataPane { sqlSplitPane.add(box, BorderLayout.CENTER); // 左边的Panel,上面是选择DatabaseConnection的ComboBox,下面DatabaseConnection对应的Table - connectionTableProcedurePane = new ConnectionTableProcedurePane(); + connectionTableProcedurePane = new ConnectionTableProcedurePane() { + @Override + protected void filter(Connection connection, String conName, List nameList) { + connection.addConnection(nameList, conName, new Class[]{JDBCDatabaseConnection.class, JNDIDatabaseConnection.class}); + } + }; connectionTableProcedurePane.addDoubleClickListener(new DoubleClickSelectedNodeOnTreeListener() { @Override @@ -138,6 +148,7 @@ public class DBTableDataPane extends AbstractTableDataPane { this.add(mainSplitPane, BorderLayout.CENTER); } + private boolean isPreviewOrRefreshButton (FocusEvent e) { if (e.getOppositeComponent() != null) { String name = e.getOppositeComponent().getName(); From aaeb8067456e30b2d272513eb4d993ab59b8e2fd Mon Sep 17 00:00:00 2001 From: zhouping Date: Mon, 4 Sep 2017 15:10:33 +0800 Subject: [PATCH 002/125] =?UTF-8?q?REPORT-2975=209.0=E6=9B=B4=E6=96=B0?= =?UTF-8?q?=E5=8D=87=E7=BA=A7=20=E5=90=8C=E6=AD=A5=E4=B8=80=E4=BB=BD?= =?UTF-8?q?=E5=88=B0master?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- designer_base/src/com/fr/design/gui/ilable/UILabel.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/designer_base/src/com/fr/design/gui/ilable/UILabel.java b/designer_base/src/com/fr/design/gui/ilable/UILabel.java index b1c90d8ff5..c0b921dee1 100644 --- a/designer_base/src/com/fr/design/gui/ilable/UILabel.java +++ b/designer_base/src/com/fr/design/gui/ilable/UILabel.java @@ -29,6 +29,11 @@ public class UILabel extends JLabel { super(text); } + public UILabel(String text, boolean enable) { + super(text); + this.setEnabled(enable); + } + public UILabel(Icon image, int horizontalAlignment) { super(image, horizontalAlignment); } From 3165d1fcfe0631add57eb6f56c9d770d0c97000f Mon Sep 17 00:00:00 2001 From: juhaoyu <2335173323@qq.com> Date: Wed, 13 Sep 2017 18:45:59 +0800 Subject: [PATCH 003/125] =?UTF-8?q?BI=E5=90=AF=E5=8A=A8=E7=94=A8=E4=BA=86U?= =?UTF-8?q?Ibutton=EF=BC=8C=E5=AF=BC=E8=87=B4FRCoreContext=E6=8F=90?= =?UTF-8?q?=E5=89=8D=E5=8A=A0=E8=BD=BD=E4=BA=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/com/fr/design/roleAuthority/ReportAndFSManagePane.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/designer_base/src/com/fr/design/roleAuthority/ReportAndFSManagePane.java b/designer_base/src/com/fr/design/roleAuthority/ReportAndFSManagePane.java index 4555c336bb..98c570786c 100644 --- a/designer_base/src/com/fr/design/roleAuthority/ReportAndFSManagePane.java +++ b/designer_base/src/com/fr/design/roleAuthority/ReportAndFSManagePane.java @@ -1 +1 @@ -package com.fr.design.roleAuthority; import com.fr.base.BaseUtils; import com.fr.base.FRCoreContext; import com.fr.design.actions.UpdateAction; import com.fr.design.constants.UIConstants; import com.fr.design.data.DesignTableDataManager; import com.fr.design.data.tabledata.Prepare4DataSourceChange; import com.fr.design.gui.ibutton.UIHeadGroup; import com.fr.design.gui.icontainer.UIScrollPane; import com.fr.design.gui.itoolbar.UIToolbar; import com.fr.design.gui.itree.refreshabletree.ExpandMutableTreeNode; import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.mainframe.DesignerContext; import com.fr.design.mainframe.DockingView; import com.fr.design.menu.ToolBarDef; import com.fr.general.Inter; import com.fr.general.VT4FR; import javax.swing.*; import javax.swing.event.ChangeEvent; import javax.swing.event.ChangeListener; import javax.swing.event.TreeSelectionEvent; import javax.swing.tree.TreeNode; import javax.swing.tree.TreePath; import java.awt.*; import java.awt.event.ActionEvent; import java.awt.event.MouseAdapter; import java.awt.event.MouseEvent; import java.util.Enumeration; /** * 设计器左下角面板,用于在权限编辑时存放角色 * Author : daisy * Date: 13-8-30 * Time: 下午2:22 */ public class ReportAndFSManagePane extends DockingView implements Prepare4DataSourceChange { private static final int REPORT_PLATEFORM_MANAGE = 0; private static final int FS_MANAGE = 1; private static final int LEFT_GAP = -125; private static boolean isSupportFS = false; private TreePath treePath = null; private static ReportAndFSManagePane singleton = new ReportAndFSManagePane(); private static RoleTree roleTree; // carl:我先屏了,现在半拉子,等客户要了再好好做 // private AddAction addAction = new AddAction(); // private RemoveAction removeAction = new RemoveAction(); private RefreshAction refreshAction = new RefreshAction(); private UIHeadGroup buttonGroup; private RoleSourceOP op; protected String[] roleNames = new String[2]; public synchronized static ReportAndFSManagePane getInstance() { singleton.op = new RoleSourceOP(); singleton.op.setDataMode(isSupportFS ? FS_MANAGE : REPORT_PLATEFORM_MANAGE); singleton.setDefaultSelectedRole(); return singleton; } public ReportAndFSManagePane() { initRoleTree(); this.setLayout(new BorderLayout(4, 0)); this.setBorder(null); this.add(iniToolBarPane(), BorderLayout.NORTH); refreshAction.setEnabled(true); UIScrollPane scrollPane = new UIScrollPane(roleTree); scrollPane.setBorder(BorderFactory.createEmptyBorder(0, 24, 0, 0)); scrollPane.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_AS_NEEDED); scrollPane.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED); initbuttonGroup(); JPanel jPanel = new JPanel(new BorderLayout(4, 4)); JPanel buttonPane = new JPanel(new GridLayout()); buttonPane.setBorder(BorderFactory.createMatteBorder(0, 0, 1, 0, UIConstants.LINE_COLOR)); buttonPane.add(buttonGroup, BorderLayout.CENTER); jPanel.add(buttonPane, BorderLayout.NORTH); jPanel.add(scrollPane, BorderLayout.CENTER); this.add(jPanel, BorderLayout.CENTER); registerDSChangeListener(); } private void initRoleTree() { roleTree = new RoleTree() { public void refreshRoleTree(String selectedRole) { super.refreshRoleTree(selectedRole); changeAlreadyEditedPaneRole(selectedRole); } protected void doWithValueChanged(TreeSelectionEvent e) { super.doWithValueChanged(e); TreeNode root = (TreeNode) roleTree.getModel().getRoot(); TreePath parent = new TreePath(root); setSelectedRole(roleTree.getSelectedRoleName(), parent); } protected void setTabRoleName(String roleName) { roleNames[getMode()] = roleTree.getSelectedRoleName(); } }; roleTree.setEnabled(true); roleTree.setEditable(false); // RoleTreeCellEditor treeCellEditor = new RoleTreeCellEditor(new UITextField()); // treeCellEditor.addCellEditorListener(treeCellEditor); // roleTree.setCellEditor(treeCellEditor); roleTree.addMouseListener(new MouseAdapter() { public void mouseClicked(MouseEvent e) { super.mouseClicked(e); roleTree.setEditable(false); // int row = roleTree.getRowForLocation(e.getX(), e.getY()); // TreePath path = roleTree.getPathForLocation(e.getX(), e.getY()); // if (e.getClickCount() == 2 && buttonGroup.getSelectedIndex() == REPORT_PLATEFORM_MANAGE) { // PrivilegeManagerProvider pm = PrivilegeManager.getProviderInstance(); // AuthenticationProvider ap = pm.getAuthenticationProvider(); // if (!(ap instanceof DaoAuthenticationProvider)) { // roleTree.setEditable(true); // roleTree.startEditingAtPath(path); // treePath = path; // } // } } }); } private void changeAlreadyEditedPaneRole(String selectedRole) { RolesAlreadyEditedPane.getInstance().refreshDockingView(); RoleTree roleTree = RolesAlreadyEditedPane.getInstance().getRoleTree(); TreeNode root = (TreeNode) roleTree.getModel().getRoot(); TreePath parent = new TreePath(root); roleTree.setSelectedRole(selectedRole, parent); } public void setDefaultSelectedRole() { //设置选中的节点 TreeNode root = (TreeNode) roleTree.getModel().getRoot(); TreePath parent = new TreePath(root); ExpandMutableTreeNode node = (ExpandMutableTreeNode) parent.getLastPathComponent(); String selectedRole = null; if (singleton != null) { selectedRole = roleNames[getMode()]; } if (selectedRole == null) { if (node.getChildCount() <= 0 || node.getFirstChild().getChildCount() <= 0) { return; } selectedRole = node.getFirstChild().getChildAt(0).toString(); } roleTree.setSelectedRole(selectedRole, parent); } public RoleTree getRoleTree() { return roleTree; } /** * 检查f) 每增删改一个角色信息(及时保存),先对比下privilege下之前的角色信息有没有发生变化(即在此期间有没有在其他途径中修改过) */ private void checkChanges() { //如若有变化,则弹出下面的对话框 int returnVal = JOptionPane.showConfirmDialog(DesignerContext.getDesignerFrame(), Inter.getLocText("FR-Designer_Role_changed_isRefresh") + "?", Inter.getLocText("FR-Designer_Refresh"), JOptionPane.OK_CANCEL_OPTION, JOptionPane.INFORMATION_MESSAGE); if (returnVal == JOptionPane.OK_OPTION) { roleTree.refreshTreeNode(); expandTree(roleTree, true); roleTree.updateUI(); } } private JPanel iniToolBarPane() { ToolBarDef toolbarDef = new ToolBarDef(); toolbarDef.addShortCut(refreshAction); UIToolbar toolBar = ToolBarDef.createJToolBar(); toolbarDef.updateToolBar(toolBar); JPanel toolbarPane = FRGUIPaneFactory.createBorderLayout_S_Pane(); toolbarPane.add(toolBar, BorderLayout.CENTER); return toolbarPane; } private void initbuttonGroup() { isSupportFS = supportFineDecision(); Icon[] iconArray = null; String[] textArray = null; if (isSupportFS) { iconArray = new Icon[]{BaseUtils.readIcon("/com/fr/web/images/platform/demo.png")}; textArray = new String[]{Inter.getLocText("FR-Designer_FS_Name")}; } else { iconArray = new Icon[]{BaseUtils.readIcon("/com/fr/web/images/platform/platform_16_16.png")}; textArray = new String[]{Inter.getLocText("M_Server-Platform_Manager")}; } buttonGroup = new UIHeadGroup(iconArray, textArray) { public void tabChanged(int index) { roleTree.setEditable(false); if (op != null) { op.setDataMode(getMode()); //判断是否可编辑 refreshDockingView(); } setDefaultSelectedRole(); if (singleton != null) { changeAlreadyEditedPaneRole(roleNames[getMode()]); } } }; buttonGroup.setBorder(BorderFactory.createMatteBorder(1, LEFT_GAP, 0, 0, UIConstants.LINE_COLOR)); buttonGroup.setNeedLeftRightOutLine(false); } private boolean supportFineDecision() { byte[] bytes = FRCoreContext.getBytes(); return VT4FR.isLicAvailable(bytes) && VT4FR.FS_BI.support(); } private int getMode(){ return isSupportFS?FS_MANAGE: REPORT_PLATEFORM_MANAGE; } // /** // * 检查看看是否可以增删刷新按钮是都可以编辑,并且检查角色树是不是可以编辑 // */ // public void checkToolButtonsEnabled() { // if (buttonGroup.getSelectedIndex() == REPORT_PLATEFORM_MANAGE) { // PrivilegeManagerProvider pm = PrivilegeManager.getProviderInstance(); // AuthenticationProvider ap = pm.getAuthenticationProvider(); // PrivilegeFilter pf = pm.getPrivilegeFilter(); // boolean isClickable = !(ap instanceof DaoAuthenticationProvider) // && pf instanceof AuthorityControlFilter; // addAction.setEnabled(isClickable); // removeAction.setEnabled(isClickable); // } else { // addAction.setEnabled(false); // removeAction.setEnabled(false); // } // // } /** * 刷新界面 */ public void refreshDockingView() { populate(new RoleSourceOP()); // this.checkToolButtonsEnabled(); } private void populate(RoleSourceOP op) { this.op = op; roleTree.populate(op); expandTree(roleTree, true); } public String getViewTitle() { return null; } public Icon getViewIcon() { return null; } /** * 最佳定位 * @return 定位 */ public Location preferredLocation() { return null; } /** * 注册数据库改变的响应的Listener */ public void registerDSChangeListener() { DesignTableDataManager.addDsChangeListener(new ChangeListener() { public void stateChanged(ChangeEvent e) { roleTree.refreshTreeNode(); expandTree(roleTree, true); roleTree.updateUI(); } }); } // private class AddAction extends UpdateAction { // public AddAction() { // this.setName(Inter.getLocText("Add")); // this.setSmallIcon(BaseUtils.readIcon("/com/fr/base/images/cell/control/add.png")); // } // // @Override // public void actionPerformed(ActionEvent e) { // refreshDockingView(); // // DefaultTreeModel treeModel = (DefaultTreeModel) roleTree.getModel(); // ExpandMutableTreeNode root = (ExpandMutableTreeNode) treeModel.getRoot(); // ExpandMutableTreeNode parentNode = (ExpandMutableTreeNode) root.getChildAt(0); // String newName = Inter.getLocText("newNode") + (++newIndex); // parentNode.add(new ExpandMutableTreeNode(newName)); // op.addAction(newName); // roleTree.updateUI(); // // try { // synchronized (AuthorityRoleDAOManager.class) { // AuthorityControlFilter pf = AuthorityRoleDAOManager.getAuthControlFilter(true); // // if (AuthorityRoleDAOManager.getAuthorityAllocation(pf, newName) != null) { // newName = Inter.getLocText("newNode") + (++newIndex); // roleTree.refreshTreeNode(); // expandTree(roleTree, true); // } // // AuthorityRoleDAOManager.addAuthorityRole(pf, new Authority(newName), new Allocation(), false, true); // // AuthorityRoleDAOManager.doEnd(pf); // } // } catch (Exception e1) { // FRContext.getLogger().error(e1.getMessage(), e1); // } // } // } // private class RemoveAction extends UpdateAction { // // public RemoveAction() { // this.setName(Inter.getLocText("Remove")); // this.setSmallIcon(UIConstants.CLEAR_ICON); // } // // @Override // public void actionPerformed(ActionEvent e) { // // // NameObject selectedNO = roleTree.getSelectedNameObject(); // // if (selectedNO == null) { // return; // } // // int returnVal = JOptionPane.showConfirmDialog(DesignerContext.getDesignerFrame(), Inter.getLocText("Utils-Are_you_sure_to_remove_the_selected_item") + ":" + selectedNO.getName() + "?", // Inter.getLocText("Remove"), JOptionPane.OK_CANCEL_OPTION, JOptionPane.QUESTION_MESSAGE); // if (returnVal == JOptionPane.OK_OPTION) { // op.removeAction(selectedNO.getName()); // // try { // AuthorityControlFilter pf = AuthorityRoleDAOManager.getAuthControlFilter(true); // // AuthorityRoleDAOManager.removeAuthorityRole(pf, new Authority(selectedNO.getName()), true); // AuthorityRoleDAOManager.doEnd(pf); // } catch (Exception e1) { // FRContext.getLogger().error(e1.getMessage(), e1); // } // // roleTree.refreshTreeNode(); // expandTree(roleTree, true); // roleTree.updateUI(); // roleTree.requestFocus(); // roleTree.setSelectionRow(roleTree.getRowCount() - 1); // } // } // } /* * 刷新ReportletsTree */ private class RefreshAction extends UpdateAction { public RefreshAction() { this.setName(Inter.getLocText("FR-Designer_Refresh")); this.setSmallIcon(UIConstants.REFRESH_ICON); } @Override public void actionPerformed(ActionEvent evt) { roleTree.refreshTreeNode(); expandTree(roleTree, true); roleTree.updateUI(); } } // private class RoleTreeCellEditor extends DefaultCellEditor implements TreeCellEditor, CellEditorListener { // // private NameObject editingNO; // private String oldName; // private String newName; // private UITextField jTextField; // // public RoleTreeCellEditor(final UITextField textField) { // super(textField); // this.jTextField = textField; // this.jTextField.setPreferredSize(new Dimension(DesignerEnvManager.getEnvManager().getLastWestRegionContainerWidth() - 5, this.jTextField.getHeight())); // } // // @Override // public Component getTreeCellEditorComponent(JTree tree, Object value, boolean isSelected, boolean expanded, boolean leaf, int row) { // editingNO = ReportAndFSManagePane.this.roleTree.getSelectedNameObject(); // oldName = editingNO.getName(); // // delegate.setValue(oldName); // // editorComponent.setPreferredSize(new java.awt.Dimension(ReportAndFSManagePane.this.getPreferredSize().width, editorComponent.getPreferredSize().height)); // // return editorComponent; // } // // @Override // // public boolean isCellEditable(EventObject anEvent) { // NameObject no = ReportAndFSManagePane.this.roleTree.getSelectedNameObject(); // return !(no.getName() == Inter.getLocText("Role")); // } // // @Override // public Object getCellEditorValue() { // newName = super.getCellEditorValue().toString(); // editingNO.setName(newName); // return editingNO; // } // // // private boolean checkRoleNameNotEmpty() { // refreshDockingView(); // // String currentText = delegate.getCellEditorValue().toString(); // boolean isContained = false; // AuthorityControlFilter pf = AuthorityRoleDAOManager.getAuthControlFilter(false); // if (pf != null && // !ComparatorUtils.equals(oldName, currentText)) { // try { // Iterator iterator = AuthorityRoleDAOManager.authorityAllocationIterator(pf); // // while (iterator.hasNext()) { // AuthorityAllocation authorityAllocation = (AuthorityAllocation) ((Map.Entry) iterator.next()) // .getValue(); // Authority _authority = authorityAllocation.getAuthority(); // if(ComparatorUtils.equals(_authority.getName(), currentText)){ // isContained = true; // break; // } // } // } catch (Exception e) { // } // } // // if (currentText.isEmpty() || isContained) { // JOptionPane.showMessageDialog(DesignerContext.getDesignerFrame(), Inter.getLocText("RoleName_Can_Not_Be_Null") + "!"); // roleTree.refreshTreeNode(); // expandTree(roleTree, true); // delegate.setValue(oldName); // return false; // } // return true; // } // // /* // * 下面两个方法是CellEditorListener的 // */ // @Override // public void editingCanceled(ChangeEvent e) { // if (!checkRoleNameNotEmpty()) { // treePath = null; // return; // } // roleTree.stopEditing(); // if (treePath == null) { // return; // } // changeValue(); // roleTree.refreshTreeNode(); // expandTree(roleTree, true); // } // // @Override // public void editingStopped(ChangeEvent e) { // if (!checkRoleNameNotEmpty()) { // treePath = null; // return; // } // changeValue(); // roleTree.refreshTreeNode(); // expandTree(roleTree, true); // roleTree.updateUI(); // } // // private void changeValue() { // newName = delegate.getCellEditorValue().toString(); // if (!newName.isEmpty() && newName != oldName) { // roleTree.setSelectedRoleName(newName); // op.rename(oldName, newName); // // AuthorityControlFilter pf = AuthorityRoleDAOManager.getAuthControlFilter(false); // if (pf != null) { // try { // Iterator iterator = AuthorityRoleDAOManager.authorityAllocationIterator(pf); // // while (iterator.hasNext()) { // AuthorityAllocation authorityAllocation = (AuthorityAllocation) ((Map.Entry) iterator.next()) // .getValue(); // Authority _authority = authorityAllocation.getAuthority(); // if (ComparatorUtils.equals(_authority.getName(), oldName)) { // _authority.setName(newName); // } // } // } catch (Exception e) { // } // } // // try { // AuthorityRoleDAOManager.doEnd(pf); // } catch (Exception e) { // FRContext.getLogger().error(e.getMessage(), e); // } // } // } // } /** * 展开树 * @param tree 树 * @param isExpand 是否展开 */ public void expandTree(JTree tree, boolean isExpand) { TreeNode root = (TreeNode) tree.getModel().getRoot(); expandAll(tree, new TreePath(root), isExpand); } private void expandAll(JTree tree, TreePath parent, boolean expand) { TreeNode node = (TreeNode) parent.getLastPathComponent(); if (node.getChildCount() >= 0) { for (Enumeration e = node.children(); e.hasMoreElements(); ) { TreeNode n = (TreeNode) e.nextElement(); TreePath path = parent.pathByAddingChild(n); expandAll(tree, path, expand); } } if (expand) { tree.expandPath(parent); } else { tree.collapsePath(parent); } } } \ No newline at end of file +package com.fr.design.roleAuthority; import com.fr.base.BaseUtils; import com.fr.base.FRCoreContext; import com.fr.design.actions.UpdateAction; import com.fr.design.constants.UIConstants; import com.fr.design.data.DesignTableDataManager; import com.fr.design.data.tabledata.Prepare4DataSourceChange; import com.fr.design.gui.ibutton.UIHeadGroup; import com.fr.design.gui.icontainer.UIScrollPane; import com.fr.design.gui.itoolbar.UIToolbar; import com.fr.design.gui.itree.refreshabletree.ExpandMutableTreeNode; import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.mainframe.DesignerContext; import com.fr.design.mainframe.DockingView; import com.fr.design.menu.ToolBarDef; import com.fr.general.Inter; import com.fr.general.VT4FR; import javax.swing.*; import javax.swing.event.ChangeEvent; import javax.swing.event.ChangeListener; import javax.swing.event.TreeSelectionEvent; import javax.swing.tree.TreeNode; import javax.swing.tree.TreePath; import java.awt.*; import java.awt.event.ActionEvent; import java.awt.event.MouseAdapter; import java.awt.event.MouseEvent; import java.util.Enumeration; /** * 设计器左下角面板,用于在权限编辑时存放角色 * Author : daisy * Date: 13-8-30 * Time: 下午2:22 */ public class ReportAndFSManagePane extends DockingView implements Prepare4DataSourceChange { private static final int REPORT_PLATEFORM_MANAGE = 0; private static final int FS_MANAGE = 1; private static final int LEFT_GAP = -125; private static boolean isSupportFS = false; private TreePath treePath = null; private static ReportAndFSManagePane singleton = new ReportAndFSManagePane(); private static RoleTree roleTree; // carl:我先屏了,现在半拉子,等客户要了再好好做 // private AddAction addAction = new AddAction(); // private RemoveAction removeAction = new RemoveAction(); private RefreshAction refreshAction = new RefreshAction(); private UIHeadGroup buttonGroup; private RoleSourceOP op; protected String[] roleNames = new String[2]; public synchronized static ReportAndFSManagePane getInstance() { singleton.op = new RoleSourceOP(); singleton.op.setDataMode(isSupportFS ? FS_MANAGE : REPORT_PLATEFORM_MANAGE); singleton.setDefaultSelectedRole(); return singleton; } public ReportAndFSManagePane() { initRoleTree(); this.setLayout(new BorderLayout(4, 0)); this.setBorder(null); this.add(iniToolBarPane(), BorderLayout.NORTH); refreshAction.setEnabled(true); UIScrollPane scrollPane = new UIScrollPane(roleTree); scrollPane.setBorder(BorderFactory.createEmptyBorder(0, 24, 0, 0)); scrollPane.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_AS_NEEDED); scrollPane.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED); initbuttonGroup(); JPanel jPanel = new JPanel(new BorderLayout(4, 4)); JPanel buttonPane = new JPanel(new GridLayout()); buttonPane.setBorder(BorderFactory.createMatteBorder(0, 0, 1, 0, UIConstants.LINE_COLOR)); buttonPane.add(buttonGroup, BorderLayout.CENTER); jPanel.add(buttonPane, BorderLayout.NORTH); jPanel.add(scrollPane, BorderLayout.CENTER); this.add(jPanel, BorderLayout.CENTER); registerDSChangeListener(); } private void initRoleTree() { roleTree = new RoleTree() { public void refreshRoleTree(String selectedRole) { super.refreshRoleTree(selectedRole); changeAlreadyEditedPaneRole(selectedRole); } protected void doWithValueChanged(TreeSelectionEvent e) { super.doWithValueChanged(e); TreeNode root = (TreeNode) roleTree.getModel().getRoot(); TreePath parent = new TreePath(root); setSelectedRole(roleTree.getSelectedRoleName(), parent); } protected void setTabRoleName(String roleName) { roleNames[getMode()] = roleTree.getSelectedRoleName(); } }; roleTree.setEnabled(true); roleTree.setEditable(false); // RoleTreeCellEditor treeCellEditor = new RoleTreeCellEditor(new UITextField()); // treeCellEditor.addCellEditorListener(treeCellEditor); // roleTree.setCellEditor(treeCellEditor); roleTree.addMouseListener(new MouseAdapter() { public void mouseClicked(MouseEvent e) { super.mouseClicked(e); roleTree.setEditable(false); // int row = roleTree.getRowForLocation(e.getX(), e.getY()); // TreePath path = roleTree.getPathForLocation(e.getX(), e.getY()); // if (e.getClickCount() == 2 && buttonGroup.getSelectedIndex() == REPORT_PLATEFORM_MANAGE) { // PrivilegeManagerProvider pm = PrivilegeManager.getProviderInstance(); // AuthenticationProvider ap = pm.getAuthenticationProvider(); // if (!(ap instanceof DaoAuthenticationProvider)) { // roleTree.setEditable(true); // roleTree.startEditingAtPath(path); // treePath = path; // } // } } }); } private void changeAlreadyEditedPaneRole(String selectedRole) { RolesAlreadyEditedPane.getInstance().refreshDockingView(); RoleTree roleTree = RolesAlreadyEditedPane.getInstance().getRoleTree(); TreeNode root = (TreeNode) roleTree.getModel().getRoot(); TreePath parent = new TreePath(root); roleTree.setSelectedRole(selectedRole, parent); } public void setDefaultSelectedRole() { //设置选中的节点 TreeNode root = (TreeNode) roleTree.getModel().getRoot(); TreePath parent = new TreePath(root); ExpandMutableTreeNode node = (ExpandMutableTreeNode) parent.getLastPathComponent(); String selectedRole = null; if (singleton != null) { selectedRole = roleNames[getMode()]; } if (selectedRole == null) { if (node.getChildCount() <= 0 || node.getFirstChild().getChildCount() <= 0) { return; } selectedRole = node.getFirstChild().getChildAt(0).toString(); } roleTree.setSelectedRole(selectedRole, parent); } public RoleTree getRoleTree() { return roleTree; } /** * 检查f) 每增删改一个角色信息(及时保存),先对比下privilege下之前的角色信息有没有发生变化(即在此期间有没有在其他途径中修改过) */ private void checkChanges() { //如若有变化,则弹出下面的对话框 int returnVal = JOptionPane.showConfirmDialog(DesignerContext.getDesignerFrame(), Inter.getLocText("FR-Designer_Role_changed_isRefresh") + "?", Inter.getLocText("FR-Designer_Refresh"), JOptionPane.OK_CANCEL_OPTION, JOptionPane.INFORMATION_MESSAGE); if (returnVal == JOptionPane.OK_OPTION) { roleTree.refreshTreeNode(); expandTree(roleTree, true); roleTree.updateUI(); } } private JPanel iniToolBarPane() { ToolBarDef toolbarDef = new ToolBarDef(); toolbarDef.addShortCut(refreshAction); UIToolbar toolBar = ToolBarDef.createJToolBar(); toolbarDef.updateToolBar(toolBar); JPanel toolbarPane = FRGUIPaneFactory.createBorderLayout_S_Pane(); toolbarPane.add(toolBar, BorderLayout.CENTER); return toolbarPane; } private void initbuttonGroup() { Icon[] iconArray = new Icon[]{BaseUtils.readIcon("/com/fr/web/images/platform/demo.png")}; String[] textArray = new String[]{Inter.getLocText("FR-Designer_FS_Name")}; buttonGroup = new UIHeadGroup(iconArray, textArray) { public void tabChanged(int index) { roleTree.setEditable(false); if (op != null) { op.setDataMode(getMode()); //判断是否可编辑 refreshDockingView(); } setDefaultSelectedRole(); if (singleton != null) { changeAlreadyEditedPaneRole(roleNames[getMode()]); } } }; buttonGroup.setBorder(BorderFactory.createMatteBorder(1, LEFT_GAP, 0, 0, UIConstants.LINE_COLOR)); buttonGroup.setNeedLeftRightOutLine(false); } private int getMode(){ return isSupportFS?FS_MANAGE: REPORT_PLATEFORM_MANAGE; } // /** // * 检查看看是否可以增删刷新按钮是都可以编辑,并且检查角色树是不是可以编辑 // */ // public void checkToolButtonsEnabled() { // if (buttonGroup.getSelectedIndex() == REPORT_PLATEFORM_MANAGE) { // PrivilegeManagerProvider pm = PrivilegeManager.getProviderInstance(); // AuthenticationProvider ap = pm.getAuthenticationProvider(); // PrivilegeFilter pf = pm.getPrivilegeFilter(); // boolean isClickable = !(ap instanceof DaoAuthenticationProvider) // && pf instanceof AuthorityControlFilter; // addAction.setEnabled(isClickable); // removeAction.setEnabled(isClickable); // } else { // addAction.setEnabled(false); // removeAction.setEnabled(false); // } // // } /** * 刷新界面 */ public void refreshDockingView() { populate(new RoleSourceOP()); // this.checkToolButtonsEnabled(); } private void populate(RoleSourceOP op) { this.op = op; roleTree.populate(op); expandTree(roleTree, true); } public String getViewTitle() { return null; } public Icon getViewIcon() { return null; } /** * 最佳定位 * @return 定位 */ public Location preferredLocation() { return null; } /** * 注册数据库改变的响应的Listener */ public void registerDSChangeListener() { DesignTableDataManager.addDsChangeListener(new ChangeListener() { public void stateChanged(ChangeEvent e) { roleTree.refreshTreeNode(); expandTree(roleTree, true); roleTree.updateUI(); } }); } // private class AddAction extends UpdateAction { // public AddAction() { // this.setName(Inter.getLocText("Add")); // this.setSmallIcon(BaseUtils.readIcon("/com/fr/base/images/cell/control/add.png")); // } // // @Override // public void actionPerformed(ActionEvent e) { // refreshDockingView(); // // DefaultTreeModel treeModel = (DefaultTreeModel) roleTree.getModel(); // ExpandMutableTreeNode root = (ExpandMutableTreeNode) treeModel.getRoot(); // ExpandMutableTreeNode parentNode = (ExpandMutableTreeNode) root.getChildAt(0); // String newName = Inter.getLocText("newNode") + (++newIndex); // parentNode.add(new ExpandMutableTreeNode(newName)); // op.addAction(newName); // roleTree.updateUI(); // // try { // synchronized (AuthorityRoleDAOManager.class) { // AuthorityControlFilter pf = AuthorityRoleDAOManager.getAuthControlFilter(true); // // if (AuthorityRoleDAOManager.getAuthorityAllocation(pf, newName) != null) { // newName = Inter.getLocText("newNode") + (++newIndex); // roleTree.refreshTreeNode(); // expandTree(roleTree, true); // } // // AuthorityRoleDAOManager.addAuthorityRole(pf, new Authority(newName), new Allocation(), false, true); // // AuthorityRoleDAOManager.doEnd(pf); // } // } catch (Exception e1) { // FRContext.getLogger().error(e1.getMessage(), e1); // } // } // } // private class RemoveAction extends UpdateAction { // // public RemoveAction() { // this.setName(Inter.getLocText("Remove")); // this.setSmallIcon(UIConstants.CLEAR_ICON); // } // // @Override // public void actionPerformed(ActionEvent e) { // // // NameObject selectedNO = roleTree.getSelectedNameObject(); // // if (selectedNO == null) { // return; // } // // int returnVal = JOptionPane.showConfirmDialog(DesignerContext.getDesignerFrame(), Inter.getLocText("Utils-Are_you_sure_to_remove_the_selected_item") + ":" + selectedNO.getName() + "?", // Inter.getLocText("Remove"), JOptionPane.OK_CANCEL_OPTION, JOptionPane.QUESTION_MESSAGE); // if (returnVal == JOptionPane.OK_OPTION) { // op.removeAction(selectedNO.getName()); // // try { // AuthorityControlFilter pf = AuthorityRoleDAOManager.getAuthControlFilter(true); // // AuthorityRoleDAOManager.removeAuthorityRole(pf, new Authority(selectedNO.getName()), true); // AuthorityRoleDAOManager.doEnd(pf); // } catch (Exception e1) { // FRContext.getLogger().error(e1.getMessage(), e1); // } // // roleTree.refreshTreeNode(); // expandTree(roleTree, true); // roleTree.updateUI(); // roleTree.requestFocus(); // roleTree.setSelectionRow(roleTree.getRowCount() - 1); // } // } // } /* * 刷新ReportletsTree */ private class RefreshAction extends UpdateAction { public RefreshAction() { this.setName(Inter.getLocText("FR-Designer_Refresh")); this.setSmallIcon(UIConstants.REFRESH_ICON); } @Override public void actionPerformed(ActionEvent evt) { roleTree.refreshTreeNode(); expandTree(roleTree, true); roleTree.updateUI(); } } // private class RoleTreeCellEditor extends DefaultCellEditor implements TreeCellEditor, CellEditorListener { // // private NameObject editingNO; // private String oldName; // private String newName; // private UITextField jTextField; // // public RoleTreeCellEditor(final UITextField textField) { // super(textField); // this.jTextField = textField; // this.jTextField.setPreferredSize(new Dimension(DesignerEnvManager.getEnvManager().getLastWestRegionContainerWidth() - 5, this.jTextField.getHeight())); // } // // @Override // public Component getTreeCellEditorComponent(JTree tree, Object value, boolean isSelected, boolean expanded, boolean leaf, int row) { // editingNO = ReportAndFSManagePane.this.roleTree.getSelectedNameObject(); // oldName = editingNO.getName(); // // delegate.setValue(oldName); // // editorComponent.setPreferredSize(new java.awt.Dimension(ReportAndFSManagePane.this.getPreferredSize().width, editorComponent.getPreferredSize().height)); // // return editorComponent; // } // // @Override // // public boolean isCellEditable(EventObject anEvent) { // NameObject no = ReportAndFSManagePane.this.roleTree.getSelectedNameObject(); // return !(no.getName() == Inter.getLocText("Role")); // } // // @Override // public Object getCellEditorValue() { // newName = super.getCellEditorValue().toString(); // editingNO.setName(newName); // return editingNO; // } // // // private boolean checkRoleNameNotEmpty() { // refreshDockingView(); // // String currentText = delegate.getCellEditorValue().toString(); // boolean isContained = false; // AuthorityControlFilter pf = AuthorityRoleDAOManager.getAuthControlFilter(false); // if (pf != null && // !ComparatorUtils.equals(oldName, currentText)) { // try { // Iterator iterator = AuthorityRoleDAOManager.authorityAllocationIterator(pf); // // while (iterator.hasNext()) { // AuthorityAllocation authorityAllocation = (AuthorityAllocation) ((Map.Entry) iterator.next()) // .getValue(); // Authority _authority = authorityAllocation.getAuthority(); // if(ComparatorUtils.equals(_authority.getName(), currentText)){ // isContained = true; // break; // } // } // } catch (Exception e) { // } // } // // if (currentText.isEmpty() || isContained) { // JOptionPane.showMessageDialog(DesignerContext.getDesignerFrame(), Inter.getLocText("RoleName_Can_Not_Be_Null") + "!"); // roleTree.refreshTreeNode(); // expandTree(roleTree, true); // delegate.setValue(oldName); // return false; // } // return true; // } // // /* // * 下面两个方法是CellEditorListener的 // */ // @Override // public void editingCanceled(ChangeEvent e) { // if (!checkRoleNameNotEmpty()) { // treePath = null; // return; // } // roleTree.stopEditing(); // if (treePath == null) { // return; // } // changeValue(); // roleTree.refreshTreeNode(); // expandTree(roleTree, true); // } // // @Override // public void editingStopped(ChangeEvent e) { // if (!checkRoleNameNotEmpty()) { // treePath = null; // return; // } // changeValue(); // roleTree.refreshTreeNode(); // expandTree(roleTree, true); // roleTree.updateUI(); // } // // private void changeValue() { // newName = delegate.getCellEditorValue().toString(); // if (!newName.isEmpty() && newName != oldName) { // roleTree.setSelectedRoleName(newName); // op.rename(oldName, newName); // // AuthorityControlFilter pf = AuthorityRoleDAOManager.getAuthControlFilter(false); // if (pf != null) { // try { // Iterator iterator = AuthorityRoleDAOManager.authorityAllocationIterator(pf); // // while (iterator.hasNext()) { // AuthorityAllocation authorityAllocation = (AuthorityAllocation) ((Map.Entry) iterator.next()) // .getValue(); // Authority _authority = authorityAllocation.getAuthority(); // if (ComparatorUtils.equals(_authority.getName(), oldName)) { // _authority.setName(newName); // } // } // } catch (Exception e) { // } // } // // try { // AuthorityRoleDAOManager.doEnd(pf); // } catch (Exception e) { // FRContext.getLogger().error(e.getMessage(), e); // } // } // } // } /** * 展开树 * @param tree 树 * @param isExpand 是否展开 */ public void expandTree(JTree tree, boolean isExpand) { TreeNode root = (TreeNode) tree.getModel().getRoot(); expandAll(tree, new TreePath(root), isExpand); } private void expandAll(JTree tree, TreePath parent, boolean expand) { TreeNode node = (TreeNode) parent.getLastPathComponent(); if (node.getChildCount() >= 0) { for (Enumeration e = node.children(); e.hasMoreElements(); ) { TreeNode n = (TreeNode) e.nextElement(); TreePath path = parent.pathByAddingChild(n); expandAll(tree, path, expand); } } if (expand) { tree.expandPath(parent); } else { tree.collapsePath(parent); } } } \ No newline at end of file From a67e88d662297a5f2846a49244f0c075bcf0779e Mon Sep 17 00:00:00 2001 From: juhaoyu <2335173323@qq.com> Date: Wed, 13 Sep 2017 18:48:13 +0800 Subject: [PATCH 004/125] fix --- .../roleAuthority/ReportAndFSManagePane.java | 541 +++++++++++++++++- 1 file changed, 540 insertions(+), 1 deletion(-) diff --git a/designer_base/src/com/fr/design/roleAuthority/ReportAndFSManagePane.java b/designer_base/src/com/fr/design/roleAuthority/ReportAndFSManagePane.java index 98c570786c..2c332c3129 100644 --- a/designer_base/src/com/fr/design/roleAuthority/ReportAndFSManagePane.java +++ b/designer_base/src/com/fr/design/roleAuthority/ReportAndFSManagePane.java @@ -1 +1,540 @@ -package com.fr.design.roleAuthority; import com.fr.base.BaseUtils; import com.fr.base.FRCoreContext; import com.fr.design.actions.UpdateAction; import com.fr.design.constants.UIConstants; import com.fr.design.data.DesignTableDataManager; import com.fr.design.data.tabledata.Prepare4DataSourceChange; import com.fr.design.gui.ibutton.UIHeadGroup; import com.fr.design.gui.icontainer.UIScrollPane; import com.fr.design.gui.itoolbar.UIToolbar; import com.fr.design.gui.itree.refreshabletree.ExpandMutableTreeNode; import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.mainframe.DesignerContext; import com.fr.design.mainframe.DockingView; import com.fr.design.menu.ToolBarDef; import com.fr.general.Inter; import com.fr.general.VT4FR; import javax.swing.*; import javax.swing.event.ChangeEvent; import javax.swing.event.ChangeListener; import javax.swing.event.TreeSelectionEvent; import javax.swing.tree.TreeNode; import javax.swing.tree.TreePath; import java.awt.*; import java.awt.event.ActionEvent; import java.awt.event.MouseAdapter; import java.awt.event.MouseEvent; import java.util.Enumeration; /** * 设计器左下角面板,用于在权限编辑时存放角色 * Author : daisy * Date: 13-8-30 * Time: 下午2:22 */ public class ReportAndFSManagePane extends DockingView implements Prepare4DataSourceChange { private static final int REPORT_PLATEFORM_MANAGE = 0; private static final int FS_MANAGE = 1; private static final int LEFT_GAP = -125; private static boolean isSupportFS = false; private TreePath treePath = null; private static ReportAndFSManagePane singleton = new ReportAndFSManagePane(); private static RoleTree roleTree; // carl:我先屏了,现在半拉子,等客户要了再好好做 // private AddAction addAction = new AddAction(); // private RemoveAction removeAction = new RemoveAction(); private RefreshAction refreshAction = new RefreshAction(); private UIHeadGroup buttonGroup; private RoleSourceOP op; protected String[] roleNames = new String[2]; public synchronized static ReportAndFSManagePane getInstance() { singleton.op = new RoleSourceOP(); singleton.op.setDataMode(isSupportFS ? FS_MANAGE : REPORT_PLATEFORM_MANAGE); singleton.setDefaultSelectedRole(); return singleton; } public ReportAndFSManagePane() { initRoleTree(); this.setLayout(new BorderLayout(4, 0)); this.setBorder(null); this.add(iniToolBarPane(), BorderLayout.NORTH); refreshAction.setEnabled(true); UIScrollPane scrollPane = new UIScrollPane(roleTree); scrollPane.setBorder(BorderFactory.createEmptyBorder(0, 24, 0, 0)); scrollPane.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_AS_NEEDED); scrollPane.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED); initbuttonGroup(); JPanel jPanel = new JPanel(new BorderLayout(4, 4)); JPanel buttonPane = new JPanel(new GridLayout()); buttonPane.setBorder(BorderFactory.createMatteBorder(0, 0, 1, 0, UIConstants.LINE_COLOR)); buttonPane.add(buttonGroup, BorderLayout.CENTER); jPanel.add(buttonPane, BorderLayout.NORTH); jPanel.add(scrollPane, BorderLayout.CENTER); this.add(jPanel, BorderLayout.CENTER); registerDSChangeListener(); } private void initRoleTree() { roleTree = new RoleTree() { public void refreshRoleTree(String selectedRole) { super.refreshRoleTree(selectedRole); changeAlreadyEditedPaneRole(selectedRole); } protected void doWithValueChanged(TreeSelectionEvent e) { super.doWithValueChanged(e); TreeNode root = (TreeNode) roleTree.getModel().getRoot(); TreePath parent = new TreePath(root); setSelectedRole(roleTree.getSelectedRoleName(), parent); } protected void setTabRoleName(String roleName) { roleNames[getMode()] = roleTree.getSelectedRoleName(); } }; roleTree.setEnabled(true); roleTree.setEditable(false); // RoleTreeCellEditor treeCellEditor = new RoleTreeCellEditor(new UITextField()); // treeCellEditor.addCellEditorListener(treeCellEditor); // roleTree.setCellEditor(treeCellEditor); roleTree.addMouseListener(new MouseAdapter() { public void mouseClicked(MouseEvent e) { super.mouseClicked(e); roleTree.setEditable(false); // int row = roleTree.getRowForLocation(e.getX(), e.getY()); // TreePath path = roleTree.getPathForLocation(e.getX(), e.getY()); // if (e.getClickCount() == 2 && buttonGroup.getSelectedIndex() == REPORT_PLATEFORM_MANAGE) { // PrivilegeManagerProvider pm = PrivilegeManager.getProviderInstance(); // AuthenticationProvider ap = pm.getAuthenticationProvider(); // if (!(ap instanceof DaoAuthenticationProvider)) { // roleTree.setEditable(true); // roleTree.startEditingAtPath(path); // treePath = path; // } // } } }); } private void changeAlreadyEditedPaneRole(String selectedRole) { RolesAlreadyEditedPane.getInstance().refreshDockingView(); RoleTree roleTree = RolesAlreadyEditedPane.getInstance().getRoleTree(); TreeNode root = (TreeNode) roleTree.getModel().getRoot(); TreePath parent = new TreePath(root); roleTree.setSelectedRole(selectedRole, parent); } public void setDefaultSelectedRole() { //设置选中的节点 TreeNode root = (TreeNode) roleTree.getModel().getRoot(); TreePath parent = new TreePath(root); ExpandMutableTreeNode node = (ExpandMutableTreeNode) parent.getLastPathComponent(); String selectedRole = null; if (singleton != null) { selectedRole = roleNames[getMode()]; } if (selectedRole == null) { if (node.getChildCount() <= 0 || node.getFirstChild().getChildCount() <= 0) { return; } selectedRole = node.getFirstChild().getChildAt(0).toString(); } roleTree.setSelectedRole(selectedRole, parent); } public RoleTree getRoleTree() { return roleTree; } /** * 检查f) 每增删改一个角色信息(及时保存),先对比下privilege下之前的角色信息有没有发生变化(即在此期间有没有在其他途径中修改过) */ private void checkChanges() { //如若有变化,则弹出下面的对话框 int returnVal = JOptionPane.showConfirmDialog(DesignerContext.getDesignerFrame(), Inter.getLocText("FR-Designer_Role_changed_isRefresh") + "?", Inter.getLocText("FR-Designer_Refresh"), JOptionPane.OK_CANCEL_OPTION, JOptionPane.INFORMATION_MESSAGE); if (returnVal == JOptionPane.OK_OPTION) { roleTree.refreshTreeNode(); expandTree(roleTree, true); roleTree.updateUI(); } } private JPanel iniToolBarPane() { ToolBarDef toolbarDef = new ToolBarDef(); toolbarDef.addShortCut(refreshAction); UIToolbar toolBar = ToolBarDef.createJToolBar(); toolbarDef.updateToolBar(toolBar); JPanel toolbarPane = FRGUIPaneFactory.createBorderLayout_S_Pane(); toolbarPane.add(toolBar, BorderLayout.CENTER); return toolbarPane; } private void initbuttonGroup() { Icon[] iconArray = new Icon[]{BaseUtils.readIcon("/com/fr/web/images/platform/demo.png")}; String[] textArray = new String[]{Inter.getLocText("FR-Designer_FS_Name")}; buttonGroup = new UIHeadGroup(iconArray, textArray) { public void tabChanged(int index) { roleTree.setEditable(false); if (op != null) { op.setDataMode(getMode()); //判断是否可编辑 refreshDockingView(); } setDefaultSelectedRole(); if (singleton != null) { changeAlreadyEditedPaneRole(roleNames[getMode()]); } } }; buttonGroup.setBorder(BorderFactory.createMatteBorder(1, LEFT_GAP, 0, 0, UIConstants.LINE_COLOR)); buttonGroup.setNeedLeftRightOutLine(false); } private int getMode(){ return isSupportFS?FS_MANAGE: REPORT_PLATEFORM_MANAGE; } // /** // * 检查看看是否可以增删刷新按钮是都可以编辑,并且检查角色树是不是可以编辑 // */ // public void checkToolButtonsEnabled() { // if (buttonGroup.getSelectedIndex() == REPORT_PLATEFORM_MANAGE) { // PrivilegeManagerProvider pm = PrivilegeManager.getProviderInstance(); // AuthenticationProvider ap = pm.getAuthenticationProvider(); // PrivilegeFilter pf = pm.getPrivilegeFilter(); // boolean isClickable = !(ap instanceof DaoAuthenticationProvider) // && pf instanceof AuthorityControlFilter; // addAction.setEnabled(isClickable); // removeAction.setEnabled(isClickable); // } else { // addAction.setEnabled(false); // removeAction.setEnabled(false); // } // // } /** * 刷新界面 */ public void refreshDockingView() { populate(new RoleSourceOP()); // this.checkToolButtonsEnabled(); } private void populate(RoleSourceOP op) { this.op = op; roleTree.populate(op); expandTree(roleTree, true); } public String getViewTitle() { return null; } public Icon getViewIcon() { return null; } /** * 最佳定位 * @return 定位 */ public Location preferredLocation() { return null; } /** * 注册数据库改变的响应的Listener */ public void registerDSChangeListener() { DesignTableDataManager.addDsChangeListener(new ChangeListener() { public void stateChanged(ChangeEvent e) { roleTree.refreshTreeNode(); expandTree(roleTree, true); roleTree.updateUI(); } }); } // private class AddAction extends UpdateAction { // public AddAction() { // this.setName(Inter.getLocText("Add")); // this.setSmallIcon(BaseUtils.readIcon("/com/fr/base/images/cell/control/add.png")); // } // // @Override // public void actionPerformed(ActionEvent e) { // refreshDockingView(); // // DefaultTreeModel treeModel = (DefaultTreeModel) roleTree.getModel(); // ExpandMutableTreeNode root = (ExpandMutableTreeNode) treeModel.getRoot(); // ExpandMutableTreeNode parentNode = (ExpandMutableTreeNode) root.getChildAt(0); // String newName = Inter.getLocText("newNode") + (++newIndex); // parentNode.add(new ExpandMutableTreeNode(newName)); // op.addAction(newName); // roleTree.updateUI(); // // try { // synchronized (AuthorityRoleDAOManager.class) { // AuthorityControlFilter pf = AuthorityRoleDAOManager.getAuthControlFilter(true); // // if (AuthorityRoleDAOManager.getAuthorityAllocation(pf, newName) != null) { // newName = Inter.getLocText("newNode") + (++newIndex); // roleTree.refreshTreeNode(); // expandTree(roleTree, true); // } // // AuthorityRoleDAOManager.addAuthorityRole(pf, new Authority(newName), new Allocation(), false, true); // // AuthorityRoleDAOManager.doEnd(pf); // } // } catch (Exception e1) { // FRContext.getLogger().error(e1.getMessage(), e1); // } // } // } // private class RemoveAction extends UpdateAction { // // public RemoveAction() { // this.setName(Inter.getLocText("Remove")); // this.setSmallIcon(UIConstants.CLEAR_ICON); // } // // @Override // public void actionPerformed(ActionEvent e) { // // // NameObject selectedNO = roleTree.getSelectedNameObject(); // // if (selectedNO == null) { // return; // } // // int returnVal = JOptionPane.showConfirmDialog(DesignerContext.getDesignerFrame(), Inter.getLocText("Utils-Are_you_sure_to_remove_the_selected_item") + ":" + selectedNO.getName() + "?", // Inter.getLocText("Remove"), JOptionPane.OK_CANCEL_OPTION, JOptionPane.QUESTION_MESSAGE); // if (returnVal == JOptionPane.OK_OPTION) { // op.removeAction(selectedNO.getName()); // // try { // AuthorityControlFilter pf = AuthorityRoleDAOManager.getAuthControlFilter(true); // // AuthorityRoleDAOManager.removeAuthorityRole(pf, new Authority(selectedNO.getName()), true); // AuthorityRoleDAOManager.doEnd(pf); // } catch (Exception e1) { // FRContext.getLogger().error(e1.getMessage(), e1); // } // // roleTree.refreshTreeNode(); // expandTree(roleTree, true); // roleTree.updateUI(); // roleTree.requestFocus(); // roleTree.setSelectionRow(roleTree.getRowCount() - 1); // } // } // } /* * 刷新ReportletsTree */ private class RefreshAction extends UpdateAction { public RefreshAction() { this.setName(Inter.getLocText("FR-Designer_Refresh")); this.setSmallIcon(UIConstants.REFRESH_ICON); } @Override public void actionPerformed(ActionEvent evt) { roleTree.refreshTreeNode(); expandTree(roleTree, true); roleTree.updateUI(); } } // private class RoleTreeCellEditor extends DefaultCellEditor implements TreeCellEditor, CellEditorListener { // // private NameObject editingNO; // private String oldName; // private String newName; // private UITextField jTextField; // // public RoleTreeCellEditor(final UITextField textField) { // super(textField); // this.jTextField = textField; // this.jTextField.setPreferredSize(new Dimension(DesignerEnvManager.getEnvManager().getLastWestRegionContainerWidth() - 5, this.jTextField.getHeight())); // } // // @Override // public Component getTreeCellEditorComponent(JTree tree, Object value, boolean isSelected, boolean expanded, boolean leaf, int row) { // editingNO = ReportAndFSManagePane.this.roleTree.getSelectedNameObject(); // oldName = editingNO.getName(); // // delegate.setValue(oldName); // // editorComponent.setPreferredSize(new java.awt.Dimension(ReportAndFSManagePane.this.getPreferredSize().width, editorComponent.getPreferredSize().height)); // // return editorComponent; // } // // @Override // // public boolean isCellEditable(EventObject anEvent) { // NameObject no = ReportAndFSManagePane.this.roleTree.getSelectedNameObject(); // return !(no.getName() == Inter.getLocText("Role")); // } // // @Override // public Object getCellEditorValue() { // newName = super.getCellEditorValue().toString(); // editingNO.setName(newName); // return editingNO; // } // // // private boolean checkRoleNameNotEmpty() { // refreshDockingView(); // // String currentText = delegate.getCellEditorValue().toString(); // boolean isContained = false; // AuthorityControlFilter pf = AuthorityRoleDAOManager.getAuthControlFilter(false); // if (pf != null && // !ComparatorUtils.equals(oldName, currentText)) { // try { // Iterator iterator = AuthorityRoleDAOManager.authorityAllocationIterator(pf); // // while (iterator.hasNext()) { // AuthorityAllocation authorityAllocation = (AuthorityAllocation) ((Map.Entry) iterator.next()) // .getValue(); // Authority _authority = authorityAllocation.getAuthority(); // if(ComparatorUtils.equals(_authority.getName(), currentText)){ // isContained = true; // break; // } // } // } catch (Exception e) { // } // } // // if (currentText.isEmpty() || isContained) { // JOptionPane.showMessageDialog(DesignerContext.getDesignerFrame(), Inter.getLocText("RoleName_Can_Not_Be_Null") + "!"); // roleTree.refreshTreeNode(); // expandTree(roleTree, true); // delegate.setValue(oldName); // return false; // } // return true; // } // // /* // * 下面两个方法是CellEditorListener的 // */ // @Override // public void editingCanceled(ChangeEvent e) { // if (!checkRoleNameNotEmpty()) { // treePath = null; // return; // } // roleTree.stopEditing(); // if (treePath == null) { // return; // } // changeValue(); // roleTree.refreshTreeNode(); // expandTree(roleTree, true); // } // // @Override // public void editingStopped(ChangeEvent e) { // if (!checkRoleNameNotEmpty()) { // treePath = null; // return; // } // changeValue(); // roleTree.refreshTreeNode(); // expandTree(roleTree, true); // roleTree.updateUI(); // } // // private void changeValue() { // newName = delegate.getCellEditorValue().toString(); // if (!newName.isEmpty() && newName != oldName) { // roleTree.setSelectedRoleName(newName); // op.rename(oldName, newName); // // AuthorityControlFilter pf = AuthorityRoleDAOManager.getAuthControlFilter(false); // if (pf != null) { // try { // Iterator iterator = AuthorityRoleDAOManager.authorityAllocationIterator(pf); // // while (iterator.hasNext()) { // AuthorityAllocation authorityAllocation = (AuthorityAllocation) ((Map.Entry) iterator.next()) // .getValue(); // Authority _authority = authorityAllocation.getAuthority(); // if (ComparatorUtils.equals(_authority.getName(), oldName)) { // _authority.setName(newName); // } // } // } catch (Exception e) { // } // } // // try { // AuthorityRoleDAOManager.doEnd(pf); // } catch (Exception e) { // FRContext.getLogger().error(e.getMessage(), e); // } // } // } // } /** * 展开树 * @param tree 树 * @param isExpand 是否展开 */ public void expandTree(JTree tree, boolean isExpand) { TreeNode root = (TreeNode) tree.getModel().getRoot(); expandAll(tree, new TreePath(root), isExpand); } private void expandAll(JTree tree, TreePath parent, boolean expand) { TreeNode node = (TreeNode) parent.getLastPathComponent(); if (node.getChildCount() >= 0) { for (Enumeration e = node.children(); e.hasMoreElements(); ) { TreeNode n = (TreeNode) e.nextElement(); TreePath path = parent.pathByAddingChild(n); expandAll(tree, path, expand); } } if (expand) { tree.expandPath(parent); } else { tree.collapsePath(parent); } } } \ No newline at end of file +package com.fr.design.roleAuthority; + +import com.fr.base.BaseUtils; +import com.fr.base.FRCoreContext; +import com.fr.design.actions.UpdateAction; +import com.fr.design.constants.UIConstants; +import com.fr.design.data.DesignTableDataManager; +import com.fr.design.data.tabledata.Prepare4DataSourceChange; +import com.fr.design.gui.ibutton.UIHeadGroup; +import com.fr.design.gui.icontainer.UIScrollPane; +import com.fr.design.gui.itoolbar.UIToolbar; +import com.fr.design.gui.itree.refreshabletree.ExpandMutableTreeNode; +import com.fr.design.layout.FRGUIPaneFactory; +import com.fr.design.mainframe.DesignerContext; +import com.fr.design.mainframe.DockingView; +import com.fr.design.menu.ToolBarDef; +import com.fr.general.Inter; +import com.fr.general.VT4FR; + +import javax.swing.*; +import javax.swing.event.ChangeEvent; +import javax.swing.event.ChangeListener; +import javax.swing.event.TreeSelectionEvent; +import javax.swing.tree.TreeNode; +import javax.swing.tree.TreePath; +import java.awt.*; +import java.awt.event.ActionEvent; +import java.awt.event.MouseAdapter; +import java.awt.event.MouseEvent; +import java.util.Enumeration; + +/** + * 设计器左下角面板,用于在权限编辑时存放角色 + * Author : daisy + * Date: 13-8-30 + * Time: 下午2:22 + */ +public class ReportAndFSManagePane extends DockingView implements Prepare4DataSourceChange { + + private static final int REPORT_PLATEFORM_MANAGE = 0; + private static final int FS_MANAGE = 1; + private static final int LEFT_GAP = -125; + private static boolean isSupportFS = false; + private TreePath treePath = null; + + private static ReportAndFSManagePane singleton = new ReportAndFSManagePane(); + + private static RoleTree roleTree; + // carl:我先屏了,现在半拉子,等客户要了再好好做 +// private AddAction addAction = new AddAction(); +// private RemoveAction removeAction = new RemoveAction(); + private RefreshAction refreshAction = new RefreshAction(); + private UIHeadGroup buttonGroup; + private RoleSourceOP op; + protected String[] roleNames = new String[2]; + + public synchronized static ReportAndFSManagePane getInstance() { + singleton.op = new RoleSourceOP(); + singleton.op.setDataMode(isSupportFS ? FS_MANAGE : REPORT_PLATEFORM_MANAGE); + singleton.setDefaultSelectedRole(); + return singleton; + + } + + public ReportAndFSManagePane() { + initRoleTree(); + this.setLayout(new BorderLayout(4, 0)); + this.setBorder(null); + this.add(iniToolBarPane(), BorderLayout.NORTH); + refreshAction.setEnabled(true); + UIScrollPane scrollPane = new UIScrollPane(roleTree); + scrollPane.setBorder(BorderFactory.createEmptyBorder(0, 24, 0, 0)); + scrollPane.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_AS_NEEDED); + scrollPane.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED); + initbuttonGroup(); + JPanel jPanel = new JPanel(new BorderLayout(4, 4)); + JPanel buttonPane = new JPanel(new GridLayout()); + buttonPane.setBorder(BorderFactory.createMatteBorder(0, 0, 1, 0, UIConstants.LINE_COLOR)); + buttonPane.add(buttonGroup, BorderLayout.CENTER); + jPanel.add(buttonPane, BorderLayout.NORTH); + jPanel.add(scrollPane, BorderLayout.CENTER); + this.add(jPanel, BorderLayout.CENTER); + registerDSChangeListener(); + } + + private void initRoleTree() { + roleTree = new RoleTree() { + public void refreshRoleTree(String selectedRole) { + super.refreshRoleTree(selectedRole); + changeAlreadyEditedPaneRole(selectedRole); + } + + + protected void doWithValueChanged(TreeSelectionEvent e) { + super.doWithValueChanged(e); + TreeNode root = (TreeNode) roleTree.getModel().getRoot(); + TreePath parent = new TreePath(root); + setSelectedRole(roleTree.getSelectedRoleName(), parent); + + } + + protected void setTabRoleName(String roleName) { + roleNames[getMode()] = roleTree.getSelectedRoleName(); + } + }; + roleTree.setEnabled(true); + roleTree.setEditable(false); +// RoleTreeCellEditor treeCellEditor = new RoleTreeCellEditor(new UITextField()); +// treeCellEditor.addCellEditorListener(treeCellEditor); +// roleTree.setCellEditor(treeCellEditor); + roleTree.addMouseListener(new MouseAdapter() { + public void mouseClicked(MouseEvent e) { + super.mouseClicked(e); + roleTree.setEditable(false); +// int row = roleTree.getRowForLocation(e.getX(), e.getY()); +// TreePath path = roleTree.getPathForLocation(e.getX(), e.getY()); +// if (e.getClickCount() == 2 && buttonGroup.getSelectedIndex() == REPORT_PLATEFORM_MANAGE) { +// PrivilegeManagerProvider pm = PrivilegeManager.getProviderInstance(); +// AuthenticationProvider ap = pm.getAuthenticationProvider(); +// if (!(ap instanceof DaoAuthenticationProvider)) { +// roleTree.setEditable(true); +// roleTree.startEditingAtPath(path); +// treePath = path; +// } +// } + } + }); + } + + private void changeAlreadyEditedPaneRole(String selectedRole) { + RolesAlreadyEditedPane.getInstance().refreshDockingView(); + RoleTree roleTree = RolesAlreadyEditedPane.getInstance().getRoleTree(); + TreeNode root = (TreeNode) roleTree.getModel().getRoot(); + TreePath parent = new TreePath(root); + roleTree.setSelectedRole(selectedRole, parent); + } + + public void setDefaultSelectedRole() { + //设置选中的节点 + TreeNode root = (TreeNode) roleTree.getModel().getRoot(); + TreePath parent = new TreePath(root); + ExpandMutableTreeNode node = (ExpandMutableTreeNode) parent.getLastPathComponent(); + String selectedRole = null; + if (singleton != null) { + selectedRole = roleNames[getMode()]; + } + if (selectedRole == null) { + if (node.getChildCount() <= 0 || node.getFirstChild().getChildCount() <= 0) { + return; + } + selectedRole = node.getFirstChild().getChildAt(0).toString(); + } + roleTree.setSelectedRole(selectedRole, parent); + } + + + public RoleTree getRoleTree() { + return roleTree; + } + + /** + * 检查f) 每增删改一个角色信息(及时保存),先对比下privilege下之前的角色信息有没有发生变化(即在此期间有没有在其他途径中修改过) + */ + private void checkChanges() { + //如若有变化,则弹出下面的对话框 + int returnVal = JOptionPane.showConfirmDialog(DesignerContext.getDesignerFrame(), Inter.getLocText("FR-Designer_Role_changed_isRefresh") + "?", + Inter.getLocText("FR-Designer_Refresh"), JOptionPane.OK_CANCEL_OPTION, JOptionPane.INFORMATION_MESSAGE); + if (returnVal == JOptionPane.OK_OPTION) { + roleTree.refreshTreeNode(); + expandTree(roleTree, true); + roleTree.updateUI(); + } + + } + + private JPanel iniToolBarPane() { + ToolBarDef toolbarDef = new ToolBarDef(); + toolbarDef.addShortCut(refreshAction); + UIToolbar toolBar = ToolBarDef.createJToolBar(); + toolbarDef.updateToolBar(toolBar); + JPanel toolbarPane = FRGUIPaneFactory.createBorderLayout_S_Pane(); + toolbarPane.add(toolBar, BorderLayout.CENTER); + return toolbarPane; + } + + private void initbuttonGroup() { + Icon[] iconArray = new Icon[]{BaseUtils.readIcon("/com/fr/web/images/platform/demo.png")}; + String[] textArray = new String[]{Inter.getLocText("FR-Designer_FS_Name")}; + buttonGroup = new UIHeadGroup(iconArray, textArray) { + public void tabChanged(int index) { + roleTree.setEditable(false); + if (op != null) { + op.setDataMode(getMode()); + //判断是否可编辑 + refreshDockingView(); + } + setDefaultSelectedRole(); + if (singleton != null) { + changeAlreadyEditedPaneRole(roleNames[getMode()]); + } + } + }; + buttonGroup.setBorder(BorderFactory.createMatteBorder(1, LEFT_GAP, 0, 0, UIConstants.LINE_COLOR)); + buttonGroup.setNeedLeftRightOutLine(false); + } + + + private int getMode(){ + return isSupportFS?FS_MANAGE: REPORT_PLATEFORM_MANAGE; + } + + +// /** +// * 检查看看是否可以增删刷新按钮是都可以编辑,并且检查角色树是不是可以编辑 +// */ +// public void checkToolButtonsEnabled() { +// if (buttonGroup.getSelectedIndex() == REPORT_PLATEFORM_MANAGE) { +// PrivilegeManagerProvider pm = PrivilegeManager.getProviderInstance(); +// AuthenticationProvider ap = pm.getAuthenticationProvider(); +// PrivilegeFilter pf = pm.getPrivilegeFilter(); +// boolean isClickable = !(ap instanceof DaoAuthenticationProvider) +// && pf instanceof AuthorityControlFilter; +// addAction.setEnabled(isClickable); +// removeAction.setEnabled(isClickable); +// } else { +// addAction.setEnabled(false); +// removeAction.setEnabled(false); +// } +// +// } + + + /** + * 刷新界面 + */ + public void refreshDockingView() { + populate(new RoleSourceOP()); +// this.checkToolButtonsEnabled(); + } + + private void populate(RoleSourceOP op) { + this.op = op; + roleTree.populate(op); + expandTree(roleTree, true); + } + + public String getViewTitle() { + return null; + } + + public Icon getViewIcon() { + return null; + } + + /** + * 最佳定位 + * @return 定位 + */ + public Location preferredLocation() { + return null; + } + + /** + * 注册数据库改变的响应的Listener + */ + public void registerDSChangeListener() { + DesignTableDataManager.addDsChangeListener(new ChangeListener() { + + public void stateChanged(ChangeEvent e) { + roleTree.refreshTreeNode(); + expandTree(roleTree, true); + roleTree.updateUI(); + } + }); + + } + +// private class AddAction extends UpdateAction { +// public AddAction() { +// this.setName(Inter.getLocText("Add")); +// this.setSmallIcon(BaseUtils.readIcon("/com/fr/base/images/cell/control/add.png")); +// } +// +// @Override +// public void actionPerformed(ActionEvent e) { +// refreshDockingView(); +// +// DefaultTreeModel treeModel = (DefaultTreeModel) roleTree.getModel(); +// ExpandMutableTreeNode root = (ExpandMutableTreeNode) treeModel.getRoot(); +// ExpandMutableTreeNode parentNode = (ExpandMutableTreeNode) root.getChildAt(0); +// String newName = Inter.getLocText("newNode") + (++newIndex); +// parentNode.add(new ExpandMutableTreeNode(newName)); +// op.addAction(newName); +// roleTree.updateUI(); +// +// try { +// synchronized (AuthorityRoleDAOManager.class) { +// AuthorityControlFilter pf = AuthorityRoleDAOManager.getAuthControlFilter(true); +// +// if (AuthorityRoleDAOManager.getAuthorityAllocation(pf, newName) != null) { +// newName = Inter.getLocText("newNode") + (++newIndex); +// roleTree.refreshTreeNode(); +// expandTree(roleTree, true); +// } +// +// AuthorityRoleDAOManager.addAuthorityRole(pf, new Authority(newName), new Allocation(), false, true); +// +// AuthorityRoleDAOManager.doEnd(pf); +// } +// } catch (Exception e1) { +// FRContext.getLogger().error(e1.getMessage(), e1); +// } +// } +// } + +// private class RemoveAction extends UpdateAction { +// +// public RemoveAction() { +// this.setName(Inter.getLocText("Remove")); +// this.setSmallIcon(UIConstants.CLEAR_ICON); +// } +// +// @Override +// public void actionPerformed(ActionEvent e) { +// +// +// NameObject selectedNO = roleTree.getSelectedNameObject(); +// +// if (selectedNO == null) { +// return; +// } +// +// int returnVal = JOptionPane.showConfirmDialog(DesignerContext.getDesignerFrame(), Inter.getLocText("Utils-Are_you_sure_to_remove_the_selected_item") + ":" + selectedNO.getName() + "?", +// Inter.getLocText("Remove"), JOptionPane.OK_CANCEL_OPTION, JOptionPane.QUESTION_MESSAGE); +// if (returnVal == JOptionPane.OK_OPTION) { +// op.removeAction(selectedNO.getName()); +// +// try { +// AuthorityControlFilter pf = AuthorityRoleDAOManager.getAuthControlFilter(true); +// +// AuthorityRoleDAOManager.removeAuthorityRole(pf, new Authority(selectedNO.getName()), true); +// AuthorityRoleDAOManager.doEnd(pf); +// } catch (Exception e1) { +// FRContext.getLogger().error(e1.getMessage(), e1); +// } +// +// roleTree.refreshTreeNode(); +// expandTree(roleTree, true); +// roleTree.updateUI(); +// roleTree.requestFocus(); +// roleTree.setSelectionRow(roleTree.getRowCount() - 1); +// } +// } +// } + + + /* + * 刷新ReportletsTree + */ + private class RefreshAction extends UpdateAction { + + public RefreshAction() { + this.setName(Inter.getLocText("FR-Designer_Refresh")); + this.setSmallIcon(UIConstants.REFRESH_ICON); + } + + @Override + public void actionPerformed(ActionEvent evt) { + roleTree.refreshTreeNode(); + expandTree(roleTree, true); + roleTree.updateUI(); + } + } + + +// private class RoleTreeCellEditor extends DefaultCellEditor implements TreeCellEditor, CellEditorListener { +// +// private NameObject editingNO; +// private String oldName; +// private String newName; +// private UITextField jTextField; +// +// public RoleTreeCellEditor(final UITextField textField) { +// super(textField); +// this.jTextField = textField; +// this.jTextField.setPreferredSize(new Dimension(DesignerEnvManager.getEnvManager().getLastWestRegionContainerWidth() - 5, this.jTextField.getHeight())); +// } +// +// @Override +// public Component getTreeCellEditorComponent(JTree tree, Object value, boolean isSelected, boolean expanded, boolean leaf, int row) { +// editingNO = ReportAndFSManagePane.this.roleTree.getSelectedNameObject(); +// oldName = editingNO.getName(); +// +// delegate.setValue(oldName); +// +// editorComponent.setPreferredSize(new java.awt.Dimension(ReportAndFSManagePane.this.getPreferredSize().width, editorComponent.getPreferredSize().height)); +// +// return editorComponent; +// } +// +// @Override +// +// public boolean isCellEditable(EventObject anEvent) { +// NameObject no = ReportAndFSManagePane.this.roleTree.getSelectedNameObject(); +// return !(no.getName() == Inter.getLocText("Role")); +// } +// +// @Override +// public Object getCellEditorValue() { +// newName = super.getCellEditorValue().toString(); +// editingNO.setName(newName); +// return editingNO; +// } +// +// +// private boolean checkRoleNameNotEmpty() { +// refreshDockingView(); +// +// String currentText = delegate.getCellEditorValue().toString(); +// boolean isContained = false; +// AuthorityControlFilter pf = AuthorityRoleDAOManager.getAuthControlFilter(false); +// if (pf != null && +// !ComparatorUtils.equals(oldName, currentText)) { +// try { +// Iterator iterator = AuthorityRoleDAOManager.authorityAllocationIterator(pf); +// +// while (iterator.hasNext()) { +// AuthorityAllocation authorityAllocation = (AuthorityAllocation) ((Map.Entry) iterator.next()) +// .getValue(); +// Authority _authority = authorityAllocation.getAuthority(); +// if(ComparatorUtils.equals(_authority.getName(), currentText)){ +// isContained = true; +// break; +// } +// } +// } catch (Exception e) { +// } +// } +// +// if (currentText.isEmpty() || isContained) { +// JOptionPane.showMessageDialog(DesignerContext.getDesignerFrame(), Inter.getLocText("RoleName_Can_Not_Be_Null") + "!"); +// roleTree.refreshTreeNode(); +// expandTree(roleTree, true); +// delegate.setValue(oldName); +// return false; +// } +// return true; +// } +// +// /* +// * 下面两个方法是CellEditorListener的 +// */ +// @Override +// public void editingCanceled(ChangeEvent e) { +// if (!checkRoleNameNotEmpty()) { +// treePath = null; +// return; +// } +// roleTree.stopEditing(); +// if (treePath == null) { +// return; +// } +// changeValue(); +// roleTree.refreshTreeNode(); +// expandTree(roleTree, true); +// } +// +// @Override +// public void editingStopped(ChangeEvent e) { +// if (!checkRoleNameNotEmpty()) { +// treePath = null; +// return; +// } +// changeValue(); +// roleTree.refreshTreeNode(); +// expandTree(roleTree, true); +// roleTree.updateUI(); +// } +// +// private void changeValue() { +// newName = delegate.getCellEditorValue().toString(); +// if (!newName.isEmpty() && newName != oldName) { +// roleTree.setSelectedRoleName(newName); +// op.rename(oldName, newName); +// +// AuthorityControlFilter pf = AuthorityRoleDAOManager.getAuthControlFilter(false); +// if (pf != null) { +// try { +// Iterator iterator = AuthorityRoleDAOManager.authorityAllocationIterator(pf); +// +// while (iterator.hasNext()) { +// AuthorityAllocation authorityAllocation = (AuthorityAllocation) ((Map.Entry) iterator.next()) +// .getValue(); +// Authority _authority = authorityAllocation.getAuthority(); +// if (ComparatorUtils.equals(_authority.getName(), oldName)) { +// _authority.setName(newName); +// } +// } +// } catch (Exception e) { +// } +// } +// +// try { +// AuthorityRoleDAOManager.doEnd(pf); +// } catch (Exception e) { +// FRContext.getLogger().error(e.getMessage(), e); +// } +// } +// } +// } + + + /** + * 展开树 + * @param tree 树 + * @param isExpand 是否展开 + */ + public void expandTree(JTree tree, boolean isExpand) { + TreeNode root = (TreeNode) tree.getModel().getRoot(); + expandAll(tree, new TreePath(root), isExpand); + } + + + private void expandAll(JTree tree, TreePath parent, boolean expand) { + TreeNode node = (TreeNode) parent.getLastPathComponent(); + if (node.getChildCount() >= 0) { + for (Enumeration e = node.children(); e.hasMoreElements(); ) { + TreeNode n = (TreeNode) e.nextElement(); + TreePath path = parent.pathByAddingChild(n); + expandAll(tree, path, expand); + } + } + if (expand) { + tree.expandPath(parent); + } else { + tree.collapsePath(parent); + } + } + +} \ No newline at end of file From 81543e850b5ced448895f2d2cea94b3ee502da35 Mon Sep 17 00:00:00 2001 From: plough Date: Mon, 18 Sep 2017 12:04:01 +0800 Subject: [PATCH 005/125] =?UTF-8?q?REPORT-4580=20=E9=83=A8=E5=88=86?= =?UTF-8?q?=E8=A7=86=E8=A7=89=E9=AA=8C=E6=94=B6bug=3D>15=20=E8=BE=B9?= =?UTF-8?q?=E6=A1=86=E9=A2=9C=E8=89=B2=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- designer_base/src/com/fr/design/constants/UIConstants.java | 2 +- designer_base/src/com/fr/design/utils/gui/GUICoreUtils.java | 4 ++-- designer_base/src/com/fr/design/web/CustomIconPane.java | 4 +++- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/designer_base/src/com/fr/design/constants/UIConstants.java b/designer_base/src/com/fr/design/constants/UIConstants.java index 4d5a5cea5b..498bc3632a 100644 --- a/designer_base/src/com/fr/design/constants/UIConstants.java +++ b/designer_base/src/com/fr/design/constants/UIConstants.java @@ -106,7 +106,7 @@ public interface UIConstants { public static final Color RULER_SCALE_COLOR = new Color(0x4e504f); public static final Color PROPERTY_PANE_BACKGROUND = new Color(0xdadadd); public static final Color SPLIT_LINE = new Color(201, 198, 184); - public static final Color TITLED_BORDER_COLOR = new Color(0xededee); + public static final Color TITLED_BORDER_COLOR = new Color(0xe8e8e9); public static final Color POP_DIALOG_BORDER = new Color(218, 218, 221); public static final Color PROPERTY_DIALOG_BORDER = new Color(0xc9c9cd); public static final Color TAB_BUTTON_HOVER = new Color(231, 230, 235); diff --git a/designer_base/src/com/fr/design/utils/gui/GUICoreUtils.java b/designer_base/src/com/fr/design/utils/gui/GUICoreUtils.java index 8c6252b633..b68418cc35 100644 --- a/designer_base/src/com/fr/design/utils/gui/GUICoreUtils.java +++ b/designer_base/src/com/fr/design/utils/gui/GUICoreUtils.java @@ -172,7 +172,7 @@ public abstract class GUICoreUtils{ public static TitledBorder createTitledBorder(String s, Color c) { UITitledBorder tb = UITitledBorder.createBorderWithTitle(s); if (c == null) { - c = new Color(102, 153, 255); + c = Color.black; } tb.setTitleColor(c); return tb; @@ -185,7 +185,7 @@ public abstract class GUICoreUtils{ * @return 同上 */ public static TitledBorder createTitledBorder(String s) { - return createTitledBorder(s, new Color(102, 153, 255)); + return createTitledBorder(s, Color.black); } /** diff --git a/designer_base/src/com/fr/design/web/CustomIconPane.java b/designer_base/src/com/fr/design/web/CustomIconPane.java index b075aad43d..925fb3e34f 100644 --- a/designer_base/src/com/fr/design/web/CustomIconPane.java +++ b/designer_base/src/com/fr/design/web/CustomIconPane.java @@ -4,6 +4,7 @@ import com.fr.base.BaseUtils; import com.fr.base.GraphHelper; import com.fr.base.Icon; import com.fr.base.IconManager; +import com.fr.design.constants.UIConstants; import com.fr.design.dialog.BasicPane; import com.fr.design.dialog.DialogActionAdapter; import com.fr.design.gui.ibutton.UIButton; @@ -16,6 +17,7 @@ import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.layout.TableLayout; import com.fr.design.layout.TableLayoutHelper; import com.fr.design.mainframe.DesignerContext; +import com.fr.design.utils.gui.GUICoreUtils; import com.fr.form.ui.WidgetManager; import com.fr.general.ComparatorUtils; import com.fr.general.Inter; @@ -63,7 +65,7 @@ public class CustomIconPane extends BasicPane { private void initComponents() { this.setLayout(FRGUIPaneFactory.createBorderLayout()); JPanel centerPane = FRGUIPaneFactory.createBorderLayout_S_Pane(); - centerPane.setBorder(BorderFactory.createTitledBorder(Inter.getLocText("FR-Designer_Icon"))); + centerPane.setBorder(GUICoreUtils.createTitledBorder(Inter.getLocText("FR-Designer_Icon"))); JPanel noNamePane = FRGUIPaneFactory.createCenterFlowInnerContainer_S_Pane(); centerPane.add(noNamePane, BorderLayout.CENTER); From b6c607122cbe498f4e638239e1a1f611ad5ac898 Mon Sep 17 00:00:00 2001 From: momeak Date: Mon, 18 Sep 2017 15:21:15 +0800 Subject: [PATCH 006/125] =?UTF-8?q?REPORT-4604=20=E8=AE=BE=E8=AE=A1?= =?UTF-8?q?=E5=99=A8=E8=A7=86=E8=A7=89=E4=BF=AE=E6=94=B9=201.=E6=96=87?= =?UTF-8?q?=E4=BB=B6=E6=A0=91=E3=80=81=E6=95=B0=E6=8D=AE=E9=9B=86=E7=9A=84?= =?UTF-8?q?=E5=BA=95=E8=89=B2=E4=BF=AE=E6=94=B9=202.UIHEADGROUP=E7=9A=84?= =?UTF-8?q?=E9=85=8D=E8=89=B2=E4=BF=AE=E6=94=B9=EF=BC=8C=E6=8E=A7=E4=BB=B6?= =?UTF-8?q?=E8=AE=BE=E7=BD=AE=E9=82=A3=E8=BE=B9=E5=A2=9E=E5=8A=A0=E4=B8=80?= =?UTF-8?q?=E4=B8=AA=E4=B8=8A=E8=BE=B9=E6=A1=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- designer/src/com/fr/design/widget/CellWidgetCardPane.java | 4 +++- designer_base/src/com/fr/design/constants/UIConstants.java | 2 +- .../src/com/fr/design/mainframe/WidgetPropertyPane.java | 4 +++- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/designer/src/com/fr/design/widget/CellWidgetCardPane.java b/designer/src/com/fr/design/widget/CellWidgetCardPane.java index b3f5fef11b..043e3a7798 100644 --- a/designer/src/com/fr/design/widget/CellWidgetCardPane.java +++ b/designer/src/com/fr/design/widget/CellWidgetCardPane.java @@ -1,5 +1,6 @@ package com.fr.design.widget; +import com.fr.design.constants.UIConstants; import com.fr.design.data.DataCreatorUI; import com.fr.design.designer.IntervalConstants; import com.fr.design.dialog.BasicPane; @@ -91,7 +92,8 @@ public class CellWidgetCardPane extends BasicPane { tabbedPane.show(center, tabTitles[index]); } }; - tabsHeaderIconPane.setNeedLeftRightOutLine(false); + tabsHeaderIconPane.setNeedLeftRightOutLine(true); + tabsHeaderIconPane.setBorder(BorderFactory.createMatteBorder(1, 0, 0, 0, UIConstants.SHADOW_GREY)); this.add(tabsHeaderIconPane, BorderLayout.NORTH); widgetPropertyPane = new BasicWidgetPropertySettingPane(); diff --git a/designer_base/src/com/fr/design/constants/UIConstants.java b/designer_base/src/com/fr/design/constants/UIConstants.java index 4d5a5cea5b..1074fd1f1e 100644 --- a/designer_base/src/com/fr/design/constants/UIConstants.java +++ b/designer_base/src/com/fr/design/constants/UIConstants.java @@ -74,7 +74,7 @@ public interface UIConstants { public static final Color OCEAN_BLUE = new Color(141, 179, 217); public static final Color DARK_BLUE = new Color(0, 88, 144); public static final Color NORMAL_BACKGROUND = new Color(212, 212, 216); - public static final Color TREE_BACKGROUND = new Color(240, 240, 243); + public static final Color TREE_BACKGROUND = new Color(245, 245, 247); public static final Color TOOL_PANE_BACKGROUND = new Color(232, 232, 223); public static final Color SELECT_TAB = new Color(245, 245, 247); public static final Color TOOLBARUI_BACKGROUND = new Color(255, 255, 255); diff --git a/designer_form/src/com/fr/design/mainframe/WidgetPropertyPane.java b/designer_form/src/com/fr/design/mainframe/WidgetPropertyPane.java index a01d4347a7..dab9b51481 100644 --- a/designer_form/src/com/fr/design/mainframe/WidgetPropertyPane.java +++ b/designer_form/src/com/fr/design/mainframe/WidgetPropertyPane.java @@ -2,6 +2,7 @@ package com.fr.design.mainframe; import com.fr.base.BaseUtils; import com.fr.design.ExtraDesignClassManager; +import com.fr.design.constants.UIConstants; import com.fr.design.designer.beans.events.DesignerEditListener; import com.fr.design.designer.beans.events.DesignerEvent; import com.fr.design.designer.creator.*; @@ -275,7 +276,8 @@ public class WidgetPropertyPane extends FormDockView implements BaseWidgetPrope tabbedPane.show(center, tabTitles[index]); } }; - tabsHeaderIconPane.setNeedLeftRightOutLine(false); + tabsHeaderIconPane.setNeedLeftRightOutLine(true); + tabsHeaderIconPane.setBorder(BorderFactory.createMatteBorder(1, 0, 0, 0, UIConstants.SHADOW_GREY)); this.add(tabsHeaderIconPane, BorderLayout.NORTH); } From d06e1b0219f719090bf8029b0c872d2767f1c355 Mon Sep 17 00:00:00 2001 From: MoMeak Date: Mon, 18 Sep 2017 16:29:51 +0800 Subject: [PATCH 007/125] =?UTF-8?q?REPORT-4604=20=E8=AE=BE=E8=AE=A1?= =?UTF-8?q?=E5=99=A8=E8=A7=86=E8=A7=89=E4=BF=AE=E6=94=B9=20UIButtonGroup?= =?UTF-8?q?=E9=80=89=E4=B8=AD=E5=AD=97=E4=BD=93=E9=A2=9C=E8=89=B2=E5=8F=98?= =?UTF-8?q?=E7=99=BD=20=EF=BC=8819=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fr/design/gui/ibutton/UIButtonGroup.java | 21 +++++++++++++++++++ .../com/fr/design/gui/ibutton/UIButtonUI.java | 4 ++++ 2 files changed, 25 insertions(+) diff --git a/designer_base/src/com/fr/design/gui/ibutton/UIButtonGroup.java b/designer_base/src/com/fr/design/gui/ibutton/UIButtonGroup.java index 62fe66af08..0683fc7c2b 100644 --- a/designer_base/src/com/fr/design/gui/ibutton/UIButtonGroup.java +++ b/designer_base/src/com/fr/design/gui/ibutton/UIButtonGroup.java @@ -8,11 +8,14 @@ import com.fr.design.utils.gui.GUICoreUtils; import com.fr.stable.ArrayUtils; import com.fr.stable.Constants; import com.fr.stable.StringUtils; +import sun.swing.SwingUtilities2; import javax.swing.*; import javax.swing.border.Border; import javax.swing.event.ChangeEvent; import javax.swing.event.ChangeListener; +import javax.swing.plaf.basic.BasicHTML; +import javax.swing.text.View; import java.awt.*; import java.awt.event.ActionListener; import java.awt.event.MouseAdapter; @@ -145,6 +148,24 @@ public class UIButtonGroup extends JPanel implements GlobalNameObserver { } }; + labelButton.setUI(new UIButtonUI() { + protected void paintText(Graphics g, AbstractButton b, String text, Rectangle textRec) { + View v = (View) b.getClientProperty(BasicHTML.propertyKey); + if (v != null) { + v.paint(g, textRec); + return; + } + FontMetrics fm = SwingUtilities2.getFontMetrics(b, g); + int mnemonicIndex = b.getDisplayedMnemonicIndex(); + if (isPressed(b)) { + g.setColor(Color.white); + } else { + g.setColor(Color.black); + } + + SwingUtilities2.drawStringUnderlineCharAt(b, g, text, mnemonicIndex, textRec.x + getTextShiftOffset(), textRec.y + fm.getAscent() + getTextShiftOffset()); + } + }); initButton(labelButton); } } diff --git a/designer_base/src/com/fr/design/gui/ibutton/UIButtonUI.java b/designer_base/src/com/fr/design/gui/ibutton/UIButtonUI.java index fb7605612c..74168e7d2c 100644 --- a/designer_base/src/com/fr/design/gui/ibutton/UIButtonUI.java +++ b/designer_base/src/com/fr/design/gui/ibutton/UIButtonUI.java @@ -68,6 +68,10 @@ public class UIButtonUI extends BasicButtonUI { } private void paintText(Graphics g, AbstractButton b, String text) { + paintText(g, b, text ,textRec); + } + + protected void paintText(Graphics g, AbstractButton b, String text, Rectangle textRec) { View v = (View) b.getClientProperty(BasicHTML.propertyKey); if (v != null) { v.paint(g, textRec); From 973b2017f430b1b3bd3a90cd9a2556a4224dd49a Mon Sep 17 00:00:00 2001 From: plough Date: Mon, 18 Sep 2017 16:55:20 +0800 Subject: [PATCH 008/125] =?UTF-8?q?REPORT-4580=20=E9=83=A8=E5=88=86?= =?UTF-8?q?=E8=A7=86=E8=A7=89=E9=AA=8C=E6=94=B6bug=3D>16=EF=BC=88=E6=8C=89?= =?UTF-8?q?=E9=92=AE=E5=8F=B3=E5=AF=B9=E9=BD=90=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/fr/design/condition/LiteConditionPane.java | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/designer_base/src/com/fr/design/condition/LiteConditionPane.java b/designer_base/src/com/fr/design/condition/LiteConditionPane.java index 815699a76e..ab1757153b 100644 --- a/designer_base/src/com/fr/design/condition/LiteConditionPane.java +++ b/designer_base/src/com/fr/design/condition/LiteConditionPane.java @@ -69,6 +69,7 @@ public abstract class LiteConditionPane extends BasicBeanPa private static final int DOWN_PADDING = 4; private static final int STRUT_ONE = 35; private static final int STRUT_TWO = 4; + private static final int ADD_CONTROL_PANE_PADDING_RIGHT = -5; private ActionListener actionListener1 = new ActionListener() { @@ -537,8 +538,14 @@ public abstract class LiteConditionPane extends BasicBeanPa private void initControlPane(JPanel controlPane) { JPanel addControlPane = FRGUIPaneFactory.createRightFlowInnerContainer_S_Pane(); - controlPane.add(addControlPane, BorderLayout.SOUTH); - addControlPane.setBorder(new ModLineBorder(ModLineBorder.TOP)); + addControlPane.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, ADD_CONTROL_PANE_PADDING_RIGHT)); + JPanel splitPane = new JPanel(); + splitPane.setBorder(new ModLineBorder(ModLineBorder.TOP)); + + JPanel addControlPaneWrapper = new JPanel(new BorderLayout()); + addControlPaneWrapper.add(addControlPane, BorderLayout.CENTER); + addControlPaneWrapper.add(splitPane, BorderLayout.NORTH); + controlPane.add(addControlPaneWrapper, BorderLayout.SOUTH); ButtonGroup bg = new ButtonGroup(); bg.add(andRadioButton); From 6c5cee26c16680ded9cbfb37f710f6eade6efae8 Mon Sep 17 00:00:00 2001 From: mengao <283296419@qq.com> Date: Mon, 18 Sep 2017 19:48:53 +0800 Subject: [PATCH 009/125] =?UTF-8?q?=E4=BF=AE=E6=94=B99.0bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/com/fr/design/mainframe/chart/ChartEditPane.java | 4 +++- .../chart/designer/component/VanChartFillStylePane.java | 3 +-- .../plugin/chart/designer/other/HyperlinkMapFactory.java | 3 --- .../style/axis/VanChartAxisScrollPaneWithTypeSelect.java | 2 +- .../style/axis/component/VanChartAxisButtonPane.java | 8 ++++++-- .../style/series/VanChartAbstractPlotSeriesPane.java | 3 ++- .../chart/designer/type/AbstractVanChartTypePane.java | 3 ++- 7 files changed, 15 insertions(+), 11 deletions(-) diff --git a/designer_chart/src/com/fr/design/mainframe/chart/ChartEditPane.java b/designer_chart/src/com/fr/design/mainframe/chart/ChartEditPane.java index 22b9db8e37..3bebe95eb8 100644 --- a/designer_chart/src/com/fr/design/mainframe/chart/ChartEditPane.java +++ b/designer_chart/src/com/fr/design/mainframe/chart/ChartEditPane.java @@ -341,7 +341,9 @@ public class ChartEditPane extends BasicPane implements AttributeChange,Prepare4 DesignTableDataManager.addDsChangeListener(new ChangeListener() { public void stateChanged(ChangeEvent e) { AbstractChartAttrPane attrPane = paneList.get(tabsHeaderIconPane.getSelectedIndex()); - attrPane.refreshChartDataPane(collection); + if (attrPane.isShowing()) { + attrPane.refreshChartDataPane(collection); + } } }); } diff --git a/designer_chart/src/com/fr/plugin/chart/designer/component/VanChartFillStylePane.java b/designer_chart/src/com/fr/plugin/chart/designer/component/VanChartFillStylePane.java index bae3cd5c35..1cfc178311 100644 --- a/designer_chart/src/com/fr/plugin/chart/designer/component/VanChartFillStylePane.java +++ b/designer_chart/src/com/fr/plugin/chart/designer/component/VanChartFillStylePane.java @@ -27,12 +27,11 @@ public class VanChartFillStylePane extends ChartFillStylePane { }; return TableLayout4VanChartHelper.createGapTableLayoutPane(components,rowSize,columnSize); - } @Override public Dimension getPreferredSize() { if(styleSelectBox.getSelectedIndex() != styleSelectBox.getItemCount() - 1) { - return new Dimension(styleSelectBox.getPreferredSize().width, 30); + return new Dimension(styleSelectBox.getPreferredSize().width, 26); } return super.getPreferredSize(); } diff --git a/designer_chart/src/com/fr/plugin/chart/designer/other/HyperlinkMapFactory.java b/designer_chart/src/com/fr/plugin/chart/designer/other/HyperlinkMapFactory.java index d8fd27b1e3..2ca0e2504f 100644 --- a/designer_chart/src/com/fr/plugin/chart/designer/other/HyperlinkMapFactory.java +++ b/designer_chart/src/com/fr/plugin/chart/designer/other/HyperlinkMapFactory.java @@ -236,8 +236,6 @@ public class HyperlinkMapFactory { startTime.setEnabled(false); ConstantsEditor endTime = new ConstantsEditor(Inter.getLocText("Plugin-ChartF_End_Time"), new Formula("END_TIME")); endTime.setEnabled(false); - ConstantsEditor duration = new ConstantsEditor(Inter.getLocText("Plugin-ChartF_Duration_Time"), new Formula("DURATION")); - duration.setEnabled(false); ConstantsEditor progress = new ConstantsEditor(Inter.getLocText("Plugin-ChartF_Process"), new Formula("PROGRESS")); progress.setEnabled(false); @@ -246,7 +244,6 @@ public class HyperlinkMapFactory { lists.add(series); lists.add(startTime); lists.add(endTime); - lists.add(duration); lists.add(progress); return lists; diff --git a/designer_chart/src/com/fr/plugin/chart/designer/style/axis/VanChartAxisScrollPaneWithTypeSelect.java b/designer_chart/src/com/fr/plugin/chart/designer/style/axis/VanChartAxisScrollPaneWithTypeSelect.java index fcde1ac9db..ea3831b39a 100644 --- a/designer_chart/src/com/fr/plugin/chart/designer/style/axis/VanChartAxisScrollPaneWithTypeSelect.java +++ b/designer_chart/src/com/fr/plugin/chart/designer/style/axis/VanChartAxisScrollPaneWithTypeSelect.java @@ -57,7 +57,7 @@ public class VanChartAxisScrollPaneWithTypeSelect extends AbstractVanChartScroll protected void initLayout() { this.setLayout(new BorderLayout(0,6)); JPanel northPane = TableLayout4VanChartHelper.createGapTableLayoutPane(Inter.getLocText("Plugin-ChartF_type"),jcb); - northPane.setBorder(BorderFactory.createEmptyBorder(0,10,10,10)); + northPane.setBorder(BorderFactory.createEmptyBorder(0,5,0,0)); this.add(northPane, BorderLayout.NORTH); this.add(cardPane, BorderLayout.CENTER); diff --git a/designer_chart/src/com/fr/plugin/chart/designer/style/axis/component/VanChartAxisButtonPane.java b/designer_chart/src/com/fr/plugin/chart/designer/style/axis/component/VanChartAxisButtonPane.java index 8cb5793b17..13f4dc46ae 100644 --- a/designer_chart/src/com/fr/plugin/chart/designer/style/axis/component/VanChartAxisButtonPane.java +++ b/designer_chart/src/com/fr/plugin/chart/designer/style/axis/component/VanChartAxisButtonPane.java @@ -16,7 +16,11 @@ import com.fr.plugin.chart.designer.style.axis.VanChartAxisPane; import javax.swing.*; import java.awt.*; -import java.awt.event.*; +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; +import java.awt.event.MouseAdapter; +import java.awt.event.MouseEvent; +import java.awt.event.MouseListener; import java.awt.geom.Rectangle2D; import java.awt.image.BufferedImage; import java.util.ArrayList; @@ -53,7 +57,7 @@ public class VanChartAxisButtonPane extends BasicBeanPane { this.add(eastPane, BorderLayout.EAST); buttonPane = new JPanel(); - buttonPane.setBorder(BorderFactory.createEmptyBorder(0, 10, 10, 0)); + buttonPane.setBorder(BorderFactory.createEmptyBorder(0, 5, 10, 0)); this.add(buttonPane, BorderLayout.CENTER); addButton.addActionListener(addListener); diff --git a/designer_chart/src/com/fr/plugin/chart/designer/style/series/VanChartAbstractPlotSeriesPane.java b/designer_chart/src/com/fr/plugin/chart/designer/style/series/VanChartAbstractPlotSeriesPane.java index 88ee117639..6e6683ccce 100644 --- a/designer_chart/src/com/fr/plugin/chart/designer/style/series/VanChartAbstractPlotSeriesPane.java +++ b/designer_chart/src/com/fr/plugin/chart/designer/style/series/VanChartAbstractPlotSeriesPane.java @@ -29,6 +29,7 @@ import com.fr.plugin.chart.custom.style.VanChartCustomStylePane; import com.fr.plugin.chart.designer.TableLayout4VanChartHelper; import com.fr.plugin.chart.designer.component.VanChartAreaSeriesFillColorPane; import com.fr.plugin.chart.designer.component.VanChartBeautyPane; +import com.fr.plugin.chart.designer.component.VanChartFillStylePane; import com.fr.plugin.chart.designer.component.VanChartLineTypePane; import com.fr.plugin.chart.designer.component.VanChartMarkerPane; import com.fr.plugin.chart.designer.component.VanChartTrendLinePane; @@ -98,7 +99,7 @@ public abstract class VanChartAbstractPlotSeriesPane extends AbstractPlotSeriesP */ protected ChartFillStylePane getFillStylePane() { //如果是自定義組合圖,則不創建填充界面 - return parentPane instanceof VanChartCustomStylePane ? null : new ChartFillStylePane(); + return parentPane instanceof VanChartCustomStylePane ? null : new VanChartFillStylePane(); } //风格 diff --git a/designer_chart/src/com/fr/plugin/chart/designer/type/AbstractVanChartTypePane.java b/designer_chart/src/com/fr/plugin/chart/designer/type/AbstractVanChartTypePane.java index db36ee4daf..c9d6fa15da 100644 --- a/designer_chart/src/com/fr/plugin/chart/designer/type/AbstractVanChartTypePane.java +++ b/designer_chart/src/com/fr/plugin/chart/designer/type/AbstractVanChartTypePane.java @@ -14,9 +14,9 @@ import com.fr.general.Background; import com.fr.general.FRLogger; import com.fr.general.Inter; import com.fr.js.NameJavaScriptGroup; +import com.fr.plugin.chart.attr.plot.VanChartPlot; import com.fr.plugin.chart.base.VanChartTools; import com.fr.plugin.chart.base.VanChartZoom; -import com.fr.plugin.chart.attr.plot.VanChartPlot; import com.fr.plugin.chart.vanchart.VanChart; import javax.swing.*; @@ -56,6 +56,7 @@ public abstract class AbstractVanChartTypePane extends AbstractChartTypePane{ //适用一种图表只有一种类型的 public void populateBean(Chart chart) { typeDemo.get(0).isPressing = true; + lastTypeIndex = 0; checkDemosBackground(); } From cb9cfc27efff79baf05303ac539ae12665bd7331 Mon Sep 17 00:00:00 2001 From: finereport Date: Mon, 18 Sep 2017 22:11:41 +0800 Subject: [PATCH 010/125] =?UTF-8?q?RES-2=20=E5=85=B3=E8=81=94=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E9=9B=86=E9=A2=84=E8=A7=88=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../design/data/DesignTableDataManager.java | 62 +++++++++++++++---- .../datapane/preview/PreviewTablePane.java | 5 +- .../wrapper/AbstractTableDataWrapper.java | 2 +- designer_base/src/com/fr/env/RemoteEnv.java | 13 +++- 4 files changed, 67 insertions(+), 15 deletions(-) diff --git a/designer_base/src/com/fr/design/data/DesignTableDataManager.java b/designer_base/src/com/fr/design/data/DesignTableDataManager.java index 5248c9626a..17afec4717 100644 --- a/designer_base/src/com/fr/design/data/DesignTableDataManager.java +++ b/designer_base/src/com/fr/design/data/DesignTableDataManager.java @@ -6,19 +6,24 @@ import com.fr.base.StoreProcedureParameter; import com.fr.base.TableData; import com.fr.data.TableDataSource; import com.fr.data.core.DataCoreXmlUtils; -import com.fr.design.data.datapane.preview.PreviewTablePane; import com.fr.data.impl.EmbeddedTableData; import com.fr.data.impl.storeproc.ProcedureDataModel; import com.fr.data.impl.storeproc.StoreProcedure; import com.fr.data.impl.storeproc.StoreProcedureConstants; -import com.fr.design.data.tabledata.wrapper.*; import com.fr.design.DesignModelAdapter; +import com.fr.design.data.datapane.preview.PreviewTablePane; +import com.fr.design.data.tabledata.wrapper.ServerTableDataWrapper; +import com.fr.design.data.tabledata.wrapper.StoreProcedureDataWrapper; +import com.fr.design.data.tabledata.wrapper.StoreProcedureNameWrapper; +import com.fr.design.data.tabledata.wrapper.TableDataFactory; +import com.fr.design.data.tabledata.wrapper.TableDataWrapper; +import com.fr.design.data.tabledata.wrapper.TemplateTableDataWrapper; +import com.fr.design.dialog.DialogActionAdapter; import com.fr.design.file.HistoryTemplateListPane; import com.fr.design.gui.iprogressbar.AutoProgressBar; import com.fr.design.mainframe.DesignerContext; import com.fr.design.mainframe.JTemplate; import com.fr.design.parameter.ParameterInputPane; -import com.fr.design.dialog.DialogActionAdapter; import com.fr.file.DatasourceManager; import com.fr.file.DatasourceManagerProvider; import com.fr.general.ComparatorUtils; @@ -34,9 +39,16 @@ import javax.swing.event.ChangeEvent; import javax.swing.event.ChangeListener; import java.io.ByteArrayOutputStream; import java.text.Collator; -import java.util.*; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Iterator; +import java.util.LinkedHashMap; +import java.util.List; +import java.util.Map; import java.util.Map.Entry; -import java.util.concurrent.ConcurrentHashMap; +import java.util.Timer; +import java.util.TimerTask; /** * 设计器管理操作数据集的类: @@ -55,11 +67,11 @@ public abstract class DesignTableDataManager { * 其实globalDsCache没有绝对的必要,只是为了操作方便。如果没有它,那么每次清空服务器数据集或者存储过程的时候,还要去遍历找一下, * 这个操作可能比较复杂 。 从减少代码复杂度的角度看,还是很有必要的 */ - private static java.util.Map globalDsCache = new ConcurrentHashMap(); - private static java.util.Map dsNameChangedMap = new ConcurrentHashMap(); + private static java.util.Map globalDsCache = new java.util.HashMap(); + private static java.util.Map dsNameChangedMap = new HashMap(); // private static List dsListeners = new ArrayList(); - private static Map> dsListenersMap = new ConcurrentHashMap>();; + private static Map> dsListenersMap = new HashMap>(); public static String NO_PARAMETER = "no_paramater_pane"; @@ -352,7 +364,20 @@ public abstract class DesignTableDataManager { * @throws Exception 异常 */ public static EmbeddedTableData previewTableDataNeedInputParameters(TableData tabledata, int rowCount, boolean needLoadingBar) throws Exception { - return previewTableData(tabledata, rowCount, true, needLoadingBar); + return previewTableData(null, tabledata, rowCount, true, needLoadingBar); + } + + /** + * 预览需要参数的数据集 + * + * @param tabledata 数据集 + * @param rowCount 需要预览的行数 + * @param needLoadingBar 是否需要加载进度条 + * @return 数据集 + * @throws Exception 异常 + */ + public static EmbeddedTableData previewTableDataNeedInputParameters(TableDataSource tableDataSource, TableData tabledata, int rowCount, boolean needLoadingBar) throws Exception { + return previewTableData(tableDataSource, tabledata, rowCount, true, needLoadingBar); } /** @@ -365,7 +390,20 @@ public abstract class DesignTableDataManager { * @throws Exception 异常 */ public static EmbeddedTableData previewTableDataNotNeedInputParameters(TableData tabledata, int rowCount, boolean needLoadingBar) throws Exception { - return previewTableData(tabledata, rowCount, false, needLoadingBar); + return previewTableData(null, tabledata, rowCount, false, needLoadingBar); + } + + /** + * 预览不需要参数的数据集 + * + * @param tabledata 数据集 + * @param rowCount 需要预览的行数 + * @param needLoadingBar 是否需要加载进度条 + * @return 数据集 + * @throws Exception 异常 + */ + public static EmbeddedTableData previewTableDataNotNeedInputParameters(TableDataSource tableDataSource, TableData tabledata, int rowCount, boolean needLoadingBar) throws Exception { + return previewTableData(tableDataSource, tabledata, rowCount, false, needLoadingBar); } /** @@ -377,7 +415,7 @@ public abstract class DesignTableDataManager { * 而获取数据集的字段名字时,则没必要 * @return */ - private static EmbeddedTableData previewTableData(TableData tabledata, int rowCount, boolean isMustInputParameters, boolean needLoadingBar) throws Exception { + private static EmbeddedTableData previewTableData(TableDataSource tableDataSource, TableData tabledata, int rowCount, boolean isMustInputParameters, boolean needLoadingBar) throws Exception { final AutoProgressBar loadingBar = PreviewTablePane.getInstance().getProgressBar(); Env currentEnv = FRContext.getCurrentEnv(); ParameterProvider[] parameters = currentEnv.getTableDataParameters(tabledata); @@ -407,7 +445,7 @@ public abstract class DesignTableDataManager { parameter.setValue(parameterMap.get(parameter.getName())); } } - return currentEnv.previewTableData(tabledata, parameterMap, rowCount); + return currentEnv.previewTableData(tableDataSource, tabledata, parameterMap, rowCount); } catch (TableDataException e) { throw new TableDataException(e.getMessage(), e); } finally { diff --git a/designer_base/src/com/fr/design/data/datapane/preview/PreviewTablePane.java b/designer_base/src/com/fr/design/data/datapane/preview/PreviewTablePane.java index 28e421b542..71e10728bd 100644 --- a/designer_base/src/com/fr/design/data/datapane/preview/PreviewTablePane.java +++ b/designer_base/src/com/fr/design/data/datapane/preview/PreviewTablePane.java @@ -6,6 +6,7 @@ package com.fr.design.data.datapane.preview; import com.fr.base.BaseUtils; import com.fr.base.FRContext; import com.fr.base.TableData; +import com.fr.data.TableDataSource; import com.fr.data.impl.DBTableData; import com.fr.data.impl.EmbeddedTableData; import com.fr.data.impl.storeproc.ProcedureDataModel; @@ -13,6 +14,7 @@ import com.fr.design.DesignerEnvManager; import com.fr.design.data.DesignTableDataManager; import com.fr.design.dialog.BasicDialog; import com.fr.design.dialog.BasicPane; +import com.fr.design.file.HistoryTemplateListPane; import com.fr.design.gui.frpane.UITabbedPane; import com.fr.design.gui.ilable.UILabel; import com.fr.design.gui.iprogressbar.AutoProgressBar; @@ -362,7 +364,8 @@ public class PreviewTablePane extends BasicPane { } } connectionBar.close(); - previewTableData = DesignTableDataManager.previewTableDataNeedInputParameters(tableData, (int) maxPreviewNumberField.getValue(), true); + TableDataSource dataSource = HistoryTemplateListPane.getInstance().getCurrentEditingTemplate().getTarget(); + previewTableData = DesignTableDataManager.previewTableDataNeedInputParameters(dataSource, tableData, (int) maxPreviewNumberField.getValue(), true); // parameterInputDialog // update之后的parameters,转成一个parameterMap,用于预览TableData PreviewTableModel previewModel = new PreviewTableModel(previewTableData.createDataModel(null), (int) maxPreviewNumberField.getValue()); diff --git a/designer_base/src/com/fr/design/data/tabledata/wrapper/AbstractTableDataWrapper.java b/designer_base/src/com/fr/design/data/tabledata/wrapper/AbstractTableDataWrapper.java index 90e2adfab7..17d42b0e15 100644 --- a/designer_base/src/com/fr/design/data/tabledata/wrapper/AbstractTableDataWrapper.java +++ b/designer_base/src/com/fr/design/data/tabledata/wrapper/AbstractTableDataWrapper.java @@ -58,7 +58,7 @@ public abstract class AbstractTableDataWrapper implements TableDataWrapper { EmbeddedTableData embeddedTableData = null; try { - embeddedTableData = DesignTableDataManager.previewTableDataNotNeedInputParameters(tabledata, TableData.RESULT_NOT_NEED, false); + embeddedTableData = DesignTableDataManager.previewTableDataNotNeedInputParameters(tds, tabledata, TableData.RESULT_NOT_NEED, false); } catch (Exception e) { if (e.getMessage()!=null) { DesignUtils.errorMessage(e.getMessage()); diff --git a/designer_base/src/com/fr/env/RemoteEnv.java b/designer_base/src/com/fr/env/RemoteEnv.java index 3c25fc7ff0..61ccb3ebaa 100644 --- a/designer_base/src/com/fr/env/RemoteEnv.java +++ b/designer_base/src/com/fr/env/RemoteEnv.java @@ -10,6 +10,7 @@ import com.fr.base.StoreProcedureParameter; import com.fr.base.TableData; import com.fr.base.Utils; import com.fr.base.remote.RemoteDeziConstants; +import com.fr.data.TableDataSource; import com.fr.data.core.DataCoreUtils; import com.fr.data.core.db.TableProcedure; import com.fr.data.impl.Connection; @@ -1253,6 +1254,11 @@ public class RemoteEnv extends AbstractEnv { return DavXMLUtils.readXMLParameters(input); } + @Override + public EmbeddedTableData previewTableData(Object tableData, Map parameterMap, int rowCount) throws Exception { + return previewTableData(null, tableData, parameterMap, rowCount); + } + /** * 根据指定的参数生成一个实际可预览的数据集 * @@ -1262,7 +1268,7 @@ public class RemoteEnv extends AbstractEnv { * @return 实际的二维数据集 * @throws Exception 如果生成数据失败则抛出此异常 */ - public EmbeddedTableData previewTableData(Object tableData, java.util.Map parameterMap, int rowCount) throws Exception { + public EmbeddedTableData previewTableData(TableDataSource dataSource, Object tableData, java.util.Map parameterMap, int rowCount) throws Exception { ByteArrayOutputStream out = new ByteArrayOutputStream(); // 把tableData写成xml文件到out @@ -1301,6 +1307,11 @@ public class RemoteEnv extends AbstractEnv { return previewTableData(tableData, parameterMap, -1); } + @Override + public Object previewTableData(TableDataSource dataSource, Object tableData, Map parameterMap, int start, int end, String[] cols, int[] colIdx) throws Exception { + return previewTableData(dataSource, tableData, parameterMap, -1); + } + /** * nameValuePairs,这个参数要接着this.path,拼成一个URL,否则服务器端req.getParameter是无法得到的 * From 39bdb7e62851a594c522a1b2d3231d97324d5e17 Mon Sep 17 00:00:00 2001 From: "yaoh.wu" Date: Tue, 19 Sep 2017 10:33:24 +0800 Subject: [PATCH 011/125] =?UTF-8?q?REPORT-4605=20=E8=AE=BE=E8=AE=A1?= =?UTF-8?q?=E5=99=A8=E6=A8=A1=E6=9D=BF=E5=88=A0=E9=99=A4=E5=85=88=E5=B0=9D?= =?UTF-8?q?=E8=AF=95=E6=94=BE=E5=9B=9E=E6=94=B6=E7=AB=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/fr/design/file/TemplateTreePane.java | 29 ++++++++++++++++--- 1 file changed, 25 insertions(+), 4 deletions(-) diff --git a/designer_base/src/com/fr/design/file/TemplateTreePane.java b/designer_base/src/com/fr/design/file/TemplateTreePane.java index e9009ff9fa..3c690a5c6b 100644 --- a/designer_base/src/com/fr/design/file/TemplateTreePane.java +++ b/designer_base/src/com/fr/design/file/TemplateTreePane.java @@ -5,8 +5,8 @@ package com.fr.design.file; import com.fr.base.FRContext; import com.fr.dav.LocalEnv; -import com.fr.design.gui.itree.filetree.TemplateFileTree; import com.fr.design.gui.icontainer.UIScrollPane; +import com.fr.design.gui.itree.filetree.TemplateFileTree; import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.mainframe.DesignerContext; import com.fr.design.mainframe.JTemplate; @@ -17,16 +17,18 @@ import com.fr.file.filetree.IOFileNodeFilter; import com.fr.general.ComparatorUtils; import com.fr.general.FRLogger; import com.fr.general.Inter; -import com.fr.stable.ProductConstants; import com.fr.stable.CoreConstants; +import com.fr.stable.ProductConstants; import com.fr.stable.StableUtils; import com.fr.stable.project.ProjectConstants; +import com.sun.jna.platform.FileUtils; import javax.swing.*; import javax.swing.tree.DefaultMutableTreeNode; import java.awt.*; import java.awt.event.*; import java.io.File; +import java.io.IOException; import java.util.ArrayList; import java.util.logging.Level; @@ -177,7 +179,7 @@ public class TemplateTreePane extends JPanel implements FileOperations { } if (nodeFile.exists()) { String path = StableUtils.pathJoin(new String[]{nodeFile.getEnvPath(), nodeFile.getPath()}); - FRContext.getCurrentEnv().deleteFile(nodeFile.getPath()); + moveToTrash(nodeFile); deleteHistory(path.replaceAll("/", "\\\\")); } else { JOptionPane.showMessageDialog(this, Inter.getLocText("Warning-Template_Do_Not_Exsit"), ProductConstants.PRODUCT_NAME, @@ -187,7 +189,6 @@ public class TemplateTreePane extends JPanel implements FileOperations { reportletsTree.refresh(); } - private void deleteHistory(String fileName) { int index = HistoryTemplateListPane.getInstance().contains(fileName); int size = HistoryTemplateListPane.getInstance().getHistoryCount(); @@ -304,4 +305,24 @@ public class TemplateTreePane extends JPanel implements FileOperations { } } + /** + * 文件回收 + * + * @param nodeFile 节点文件 + */ + private void moveToTrash(FileNodeFILE nodeFile) { + FileUtils fileUtils = FileUtils.getInstance(); + if (fileUtils.hasTrash()) { + try { + fileUtils.moveToTrash(new File[]{new File(StableUtils.pathJoin(nodeFile.getEnvPath(), nodeFile.getPath()))}); + } catch (IOException e) { + FRLogger.getLogger().info(e.getMessage()); + FRContext.getCurrentEnv().deleteFile(nodeFile.getPath()); + } + } else { + FRLogger.getLogger().info("No Trash Available"); + FRContext.getCurrentEnv().deleteFile(nodeFile.getPath()); + } + } + } \ No newline at end of file From 6a0367454452b8104186f0b022a79a98165426f6 Mon Sep 17 00:00:00 2001 From: mengao <283296419@qq.com> Date: Tue, 19 Sep 2017 11:52:57 +0800 Subject: [PATCH 012/125] =?UTF-8?q?=E5=8E=BB=E6=8E=89lastTypeIndex?= =?UTF-8?q?=EF=BC=8C=E6=95=B4=E7=90=86=E7=9B=B8=E5=85=B3=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../chart/gui/type/AbstractBarPane.java | 7 ----- .../chart/gui/type/AbstractChartTypePane.java | 11 ++++---- .../chart/gui/type/AreaPlotPane.java | 4 --- .../chart/gui/type/DonutPlotPane.java | 2 -- .../mainframe/chart/gui/type/MapPlotPane.java | 3 +-- .../mainframe/chart/gui/type/PiePlotPane.java | 2 -- .../chart/area/VanChartAreaPlotPane.java | 26 +++++-------------- .../plugin/chart/bar/VanChartBarPlotPane.java | 15 ----------- .../chart/bubble/VanChartBubblePlotPane.java | 21 --------------- .../chart/column/VanChartColumnPlotPane.java | 15 ----------- .../chart/custom/VanChartCustomPlotPane.java | 7 +++-- .../type/AbstractVanChartTypePane.java | 23 +++++++++------- .../chart/gauge/VanChartGaugePlotPane.java | 16 ------------ .../type/VanChartHeatMapTypePane.java | 1 - .../chart/line/VanChartLinePlotPane.java | 25 ------------------ .../designer/type/VanChartMapPlotPane.java | 3 +-- .../plugin/chart/pie/VanChartPiePlotPane.java | 17 ------------ .../chart/radar/VanChartRadarPlotPane.java | 17 ------------ .../type/VanChartStructureTypePane.java | 19 +------------- 19 files changed, 31 insertions(+), 203 deletions(-) diff --git a/designer_chart/src/com/fr/design/mainframe/chart/gui/type/AbstractBarPane.java b/designer_chart/src/com/fr/design/mainframe/chart/gui/type/AbstractBarPane.java index 7312dd11fa..c402b97038 100644 --- a/designer_chart/src/com/fr/design/mainframe/chart/gui/type/AbstractBarPane.java +++ b/designer_chart/src/com/fr/design/mainframe/chart/gui/type/AbstractBarPane.java @@ -27,32 +27,25 @@ public abstract class AbstractBarPane extends AbstractChartTypePane { if(barPlot.getyAxis().isPercentage()) { if(barPlot instanceof Bar3DPlot){ typeDemo.get(THREE_D_PERCENT_STACK_COLOMN_CHART).isPressing = true; - lastTypeIndex = THREE_D_PERCENT_STACK_COLOMN_CHART; } else { typeDemo.get(PERCENT_STACK_COLOMN_CHART).isPressing = true; - lastTypeIndex = PERCENT_STACK_COLOMN_CHART; } } else { if(barPlot instanceof Bar3DPlot){ typeDemo.get(THREE_D_STACK_COLOMN_CHART).isPressing = true; - lastTypeIndex = THREE_D_STACK_COLOMN_CHART; } else { typeDemo.get(STACK_COLOMN_CHART).isPressing = true; - lastTypeIndex = STACK_COLOMN_CHART; } } } else { if(barPlot instanceof Bar3DPlot) { if(((Bar3DPlot) barPlot).isHorizontalDrawBar()) { typeDemo.get(THREE_D_COLOMN_HORIZON_DRAW_CHART).isPressing = true; - lastTypeIndex = THREE_D_COLOMN_HORIZON_DRAW_CHART; } else { typeDemo.get(THREE_D_COLOMN_CHART).isPressing = true; - lastTypeIndex = THREE_D_COLOMN_CHART; } } else { typeDemo.get(COLOMN_CHART).isPressing = true; - lastTypeIndex = COLOMN_CHART; } } diff --git a/designer_chart/src/com/fr/design/mainframe/chart/gui/type/AbstractChartTypePane.java b/designer_chart/src/com/fr/design/mainframe/chart/gui/type/AbstractChartTypePane.java index 9aef3032f8..a8d359085a 100644 --- a/designer_chart/src/com/fr/design/mainframe/chart/gui/type/AbstractChartTypePane.java +++ b/designer_chart/src/com/fr/design/mainframe/chart/gui/type/AbstractChartTypePane.java @@ -59,7 +59,6 @@ public abstract class AbstractChartTypePane extends FurtherBasicBeanPane{ protected abstract String[] getTypeLayoutPath(); protected abstract String[] getTypeLayoutTipName(); protected int lastStyleIndex = -1; - protected int lastTypeIndex = -1; protected boolean typeChanged = false;//图表类型是否发生变化 protected String[] getNormalLayoutTipName() { @@ -148,12 +147,11 @@ public abstract class AbstractChartTypePane extends FurtherBasicBeanPane{ return null; } - protected void checkTypeChange(){ + protected void checkTypeChange(Plot oldPlot){ if(styleList != null && !styleList.isEmpty()){ for(int i = 0; i < typeDemo.size(); i++){ - if(typeDemo.get(i).isPressing && i != lastTypeIndex){ + if(typeDemo.get(i).isPressing && i != oldPlot.getDetailType()){ typeChanged = true; - lastTypeIndex = i; break; } typeChanged = false; @@ -250,8 +248,9 @@ public abstract class AbstractChartTypePane extends FurtherBasicBeanPane{ * 保存风格,对选中的风格做设置 */ public void updateBean(Chart chart) { - checkTypeChange();//判断图表的类型是否发生变化 - Plot newPlot = this.setSelectedClonedPlotWithCondition(chart.getPlot()); + Plot oldPlot = chart.getPlot(); + Plot newPlot = this.setSelectedClonedPlotWithCondition(oldPlot); + checkTypeChange(oldPlot);//判断图表的类型是否发生变化 if(styleList != null && !styleList.isEmpty()){ if(styleList.get(STYLE_SHADE).isPressing && lastStyleIndex != STYLE_SHADE){ lastStyleIndex = STYLE_SHADE; diff --git a/designer_chart/src/com/fr/design/mainframe/chart/gui/type/AreaPlotPane.java b/designer_chart/src/com/fr/design/mainframe/chart/gui/type/AreaPlotPane.java index 91f031fb74..350fb6e212 100644 --- a/designer_chart/src/com/fr/design/mainframe/chart/gui/type/AreaPlotPane.java +++ b/designer_chart/src/com/fr/design/mainframe/chart/gui/type/AreaPlotPane.java @@ -74,10 +74,8 @@ public class AreaPlotPane extends AbstractChartTypePane{ if(area.isStacked()) { if(area.getyAxis().isPercentage()) { typeDemo.get(PERCENT_AREA_LINE_CHART).isPressing = true; - lastTypeIndex = PERCENT_AREA_LINE_CHART; } else { typeDemo.get(STACK_AREA_CHART).isPressing = true; - lastTypeIndex = STACK_AREA_CHART; } } } else if(plot instanceof Area3DPlot) { @@ -85,10 +83,8 @@ public class AreaPlotPane extends AbstractChartTypePane{ if(threeDPlot.isStacked()) { if(threeDPlot.getyAxis().isPercentage()) { typeDemo.get(PERCENT_3D_AREA_LINE_CHART).isPressing = true; - lastTypeIndex = PERCENT_3D_AREA_LINE_CHART; } else { typeDemo.get(STACK_3D_AREA_CHART).isPressing = true; - lastTypeIndex = STACK_3D_AREA_CHART; } } } diff --git a/designer_chart/src/com/fr/design/mainframe/chart/gui/type/DonutPlotPane.java b/designer_chart/src/com/fr/design/mainframe/chart/gui/type/DonutPlotPane.java index cba82aff70..4434ae85d9 100644 --- a/designer_chart/src/com/fr/design/mainframe/chart/gui/type/DonutPlotPane.java +++ b/designer_chart/src/com/fr/design/mainframe/chart/gui/type/DonutPlotPane.java @@ -67,10 +67,8 @@ public class DonutPlotPane extends AbstractChartTypePane{ Plot plot = chart.getPlot(); if(plot instanceof Donut3DPlot) { typeDemo.get(THREE_D_DONUT_CHART).isPressing = true; - lastTypeIndex = THREE_D_DONUT_CHART; } else { typeDemo.get(DONUT_CHART).isPressing = true; - lastTypeIndex = DONUT_CHART; } checkDemosBackground(); diff --git a/designer_chart/src/com/fr/design/mainframe/chart/gui/type/MapPlotPane.java b/designer_chart/src/com/fr/design/mainframe/chart/gui/type/MapPlotPane.java index 69d3dd4e4c..467b4184f8 100644 --- a/designer_chart/src/com/fr/design/mainframe/chart/gui/type/MapPlotPane.java +++ b/designer_chart/src/com/fr/design/mainframe/chart/gui/type/MapPlotPane.java @@ -137,8 +137,7 @@ public class MapPlotPane extends AbstractChartTypePane { for(ChartImagePane imagePane : typeDemo) { imagePane.isPressing = false; } - typeDemo.get(mapPlot.getMapType().ordinal()).isPressing = true; - lastTypeIndex = mapPlot.getMapType().ordinal();//todo 这个属性是不是可以删了,eason + typeDemo.get(mapPlot.getDetailType()).isPressing = true; } checkDemosBackground(); diff --git a/designer_chart/src/com/fr/design/mainframe/chart/gui/type/PiePlotPane.java b/designer_chart/src/com/fr/design/mainframe/chart/gui/type/PiePlotPane.java index 94876f7532..f63c11d97e 100644 --- a/designer_chart/src/com/fr/design/mainframe/chart/gui/type/PiePlotPane.java +++ b/designer_chart/src/com/fr/design/mainframe/chart/gui/type/PiePlotPane.java @@ -93,10 +93,8 @@ public class PiePlotPane extends AbstractChartTypePane{ Plot plot = chart.getPlot(); if(plot instanceof Pie3DPlot) { typeDemo.get(THREE_D_PIE_CHART).isPressing = true; - lastTypeIndex = THREE_D_PIE_CHART; } else { typeDemo.get(PIE_CHART).isPressing = true; - lastTypeIndex = PIE_CHART; } checkDemosBackground(); diff --git a/designer_chart/src/com/fr/plugin/chart/area/VanChartAreaPlotPane.java b/designer_chart/src/com/fr/plugin/chart/area/VanChartAreaPlotPane.java index 2e31b4c93f..26f20ffb07 100644 --- a/designer_chart/src/com/fr/plugin/chart/area/VanChartAreaPlotPane.java +++ b/designer_chart/src/com/fr/plugin/chart/area/VanChartAreaPlotPane.java @@ -2,7 +2,6 @@ package com.fr.plugin.chart.area; import com.fr.chart.chartattr.Chart; import com.fr.chart.chartattr.Plot; -import com.fr.design.mainframe.chart.gui.type.ChartImagePane; import com.fr.general.FRLogger; import com.fr.general.Inter; import com.fr.plugin.chart.designer.type.AbstractVanChartTypePane; @@ -39,26 +38,13 @@ public class VanChartAreaPlotPane extends AbstractVanChartTypePane { /** * 返回界面标题 + * * @return 界面标题 */ public String title4PopupWindow() { return Inter.getLocText("Plugin-ChartF_NewArea"); } - /** - * 更新界面内容 - */ - public void populateBean(Chart chart) { - for(ChartImagePane imagePane : typeDemo) { - imagePane.isPressing = false; - } - Plot plot = chart.getPlot(); - if(plot instanceof VanChartAreaPlot) { - lastTypeIndex = ((VanChartAreaPlot) plot).getVanChartPlotType().ordinal(); - typeDemo.get(lastTypeIndex).isPressing = true; - } - checkDemosBackground(); - } /** @@ -71,17 +57,17 @@ public class VanChartAreaPlotPane extends AbstractVanChartTypePane { return VanChartAreaPlot.VAN_CHART_AREA_PLOT_ID; } - protected Plot getSelectedClonedPlot(){ + protected Plot getSelectedClonedPlot() { VanChartAreaPlot newPlot = null; Chart[] areaChart = AreaIndependentVanChart.AreaVanChartTypes; - for(int i = 0, len = areaChart.length; i < len; i++){ - if(typeDemo.get(i).isPressing){ - newPlot = (VanChartAreaPlot)areaChart[i].getPlot(); + for (int i = 0, len = areaChart.length; i < len; i++) { + if (typeDemo.get(i).isPressing) { + newPlot = (VanChartAreaPlot) areaChart[i].getPlot(); } } Plot cloned = null; try { - cloned = (Plot)newPlot.clone(); + cloned = (Plot) newPlot.clone(); } catch (CloneNotSupportedException e) { FRLogger.getLogger().error("Error In AreaChart"); } diff --git a/designer_chart/src/com/fr/plugin/chart/bar/VanChartBarPlotPane.java b/designer_chart/src/com/fr/plugin/chart/bar/VanChartBarPlotPane.java index 3156380fa6..7d27a2736d 100644 --- a/designer_chart/src/com/fr/plugin/chart/bar/VanChartBarPlotPane.java +++ b/designer_chart/src/com/fr/plugin/chart/bar/VanChartBarPlotPane.java @@ -2,7 +2,6 @@ package com.fr.plugin.chart.bar; import com.fr.chart.chartattr.Chart; import com.fr.chart.chartattr.Plot; -import com.fr.design.mainframe.chart.gui.type.ChartImagePane; import com.fr.general.FRLogger; import com.fr.general.Inter; import com.fr.plugin.chart.column.VanChartColumnPlot; @@ -46,20 +45,6 @@ public class VanChartBarPlotPane extends AbstractVanChartTypePane { return Inter.getLocText("Plugin-ChartF_NewBar"); } - /** - * 更新界面内容 - */ - public void populateBean(Chart chart) { - for(ChartImagePane imagePane : typeDemo) { - imagePane.isPressing = false; - } - Plot plot = chart.getPlot(); - if(plot instanceof VanChartColumnPlot) { - lastTypeIndex = ((VanChartColumnPlot)plot).getVanChartPlotType().ordinal(); - typeDemo.get(lastTypeIndex).isPressing = true; - } - checkDemosBackground(); - } /** * 获取各图表类型界面ID, 本质是plotID diff --git a/designer_chart/src/com/fr/plugin/chart/bubble/VanChartBubblePlotPane.java b/designer_chart/src/com/fr/plugin/chart/bubble/VanChartBubblePlotPane.java index 8987a6f9ac..4b28af6606 100644 --- a/designer_chart/src/com/fr/plugin/chart/bubble/VanChartBubblePlotPane.java +++ b/designer_chart/src/com/fr/plugin/chart/bubble/VanChartBubblePlotPane.java @@ -6,7 +6,6 @@ import com.fr.chart.chartattr.Chart; import com.fr.chart.chartattr.Plot; import com.fr.chart.chartglyph.ConditionAttr; import com.fr.chart.chartglyph.ConditionCollection; -import com.fr.design.mainframe.chart.gui.type.ChartImagePane; import com.fr.general.FRLogger; import com.fr.general.Inter; import com.fr.plugin.chart.base.VanChartTools; @@ -50,26 +49,6 @@ public class VanChartBubblePlotPane extends AbstractVanChartTypePane { return Inter.getLocText("Plugin-ChartF_NewBubble"); } - /** - * 更新界面内容 - */ - public void populateBean(Chart chart) { - for(ChartImagePane imagePane : typeDemo) { - imagePane.isPressing = false; - } - - - Plot plot = chart.getPlot(); - if(plot instanceof VanChartBubblePlot && ((VanChartBubblePlot)plot).isForceBubble()){ - lastTypeIndex = BubblePlotType.FORCE.ordinal(); - } else { - lastTypeIndex = BubblePlotType.NORMAL.ordinal(); - } - - typeDemo.get(lastTypeIndex).isPressing = true; - - checkDemosBackground(); - } private void removeDefaultAttr(ConditionAttr conditionAttr, Class targetClass) { DataSeriesCondition attr = conditionAttr.getExisted(targetClass); diff --git a/designer_chart/src/com/fr/plugin/chart/column/VanChartColumnPlotPane.java b/designer_chart/src/com/fr/plugin/chart/column/VanChartColumnPlotPane.java index 978823b573..8568d67a55 100644 --- a/designer_chart/src/com/fr/plugin/chart/column/VanChartColumnPlotPane.java +++ b/designer_chart/src/com/fr/plugin/chart/column/VanChartColumnPlotPane.java @@ -2,7 +2,6 @@ package com.fr.plugin.chart.column; import com.fr.chart.chartattr.Chart; import com.fr.chart.chartattr.Plot; -import com.fr.design.mainframe.chart.gui.type.ChartImagePane; import com.fr.general.FRLogger; import com.fr.general.Inter; import com.fr.plugin.chart.designer.type.AbstractVanChartTypePane; @@ -46,20 +45,6 @@ public class VanChartColumnPlotPane extends AbstractVanChartTypePane { return Inter.getLocText("Plugin-ChartF_NewColumn"); } - /** - * 更新界面内容 - */ - public void populateBean(Chart chart) { - for(ChartImagePane imagePane : typeDemo) { - imagePane.isPressing = false; - } - Plot plot = chart.getPlot(); - if(plot instanceof VanChartColumnPlot) { - lastTypeIndex = ((VanChartColumnPlot)plot).getVanChartPlotType().ordinal(); - typeDemo.get(lastTypeIndex).isPressing = true; - } - checkDemosBackground(); - } /** * 获取各图表类型界面ID, 本质是plotID diff --git a/designer_chart/src/com/fr/plugin/chart/custom/VanChartCustomPlotPane.java b/designer_chart/src/com/fr/plugin/chart/custom/VanChartCustomPlotPane.java index 843bbfc166..7b3ede54e5 100644 --- a/designer_chart/src/com/fr/plugin/chart/custom/VanChartCustomPlotPane.java +++ b/designer_chart/src/com/fr/plugin/chart/custom/VanChartCustomPlotPane.java @@ -131,12 +131,12 @@ public class VanChartCustomPlotPane extends AbstractVanChartTypePane { public void updateBean(Chart chart) { //保存上次选中的值,其会在super中更新 - int lastState = lastTypeIndex; + int lastState = chart.getPlot().getDetailType(); super.updateBean(chart); //如果上次的状态和这次的装填不在同一个页面,说明同一个图表內切换了,需要情況数据配置 - if (lastState != lastTypeIndex) { + if (lastState != chart.getPlot().getDetailType()) { chart.setFilterDefinition(null); } @@ -219,8 +219,7 @@ public class VanChartCustomPlotPane extends AbstractVanChartTypePane { //获取上次选中的图标 VanChartCustomPlot customPlot = (VanChartCustomPlot) chart.getPlot(); - lastTypeIndex = customPlot.getCustomStyle().ordinal(); - typeDemo.get(lastTypeIndex).isPressing = true; + typeDemo.get(customPlot.getDetailType()).isPressing = true; isCustom = customPlot.getCustomStyle() == CustomStyle.CUSTOM; diff --git a/designer_chart/src/com/fr/plugin/chart/designer/type/AbstractVanChartTypePane.java b/designer_chart/src/com/fr/plugin/chart/designer/type/AbstractVanChartTypePane.java index c9d6fa15da..dab6ae28d8 100644 --- a/designer_chart/src/com/fr/plugin/chart/designer/type/AbstractVanChartTypePane.java +++ b/designer_chart/src/com/fr/plugin/chart/designer/type/AbstractVanChartTypePane.java @@ -10,6 +10,7 @@ import com.fr.chart.chartglyph.DataSheet; import com.fr.design.gui.icheckbox.UICheckBox; import com.fr.design.gui.ilable.MultilineLabel; import com.fr.design.mainframe.chart.gui.type.AbstractChartTypePane; +import com.fr.design.mainframe.chart.gui.type.ChartImagePane; import com.fr.general.Background; import com.fr.general.FRLogger; import com.fr.general.Inter; @@ -53,10 +54,15 @@ public abstract class AbstractVanChartTypePane extends AbstractChartTypePane{ }; } - //适用一种图表只有一种类型的 + /** + * 更新界面内容 + */ public void populateBean(Chart chart) { - typeDemo.get(0).isPressing = true; - lastTypeIndex = 0; + for(ChartImagePane imagePane : typeDemo) { + imagePane.isPressing = false; + } + Plot plot = chart.getPlot(); + typeDemo.get(plot.getDetailType()).isPressing = true; checkDemosBackground(); } @@ -64,9 +70,9 @@ public abstract class AbstractVanChartTypePane extends AbstractChartTypePane{ * 保存界面属性 */ public void updateBean(Chart chart) { - checkTypeChange(); - VanChartPlot oldPlot = (VanChartPlot)chart.getPlot(); - VanChartPlot newPlot = (VanChartPlot)getSelectedClonedPlot(); + VanChartPlot oldPlot = chart.getPlot(); + VanChartPlot newPlot = getSelectedClonedPlot(); + checkTypeChange(oldPlot); samePlot = accept(chart); if(typeChanged && samePlot){ //同一中图表切换不同类型 @@ -116,11 +122,10 @@ public abstract class AbstractVanChartTypePane extends AbstractChartTypePane{ return new VanChartTools(); } - protected void checkTypeChange(){ + protected void checkTypeChange(Plot oldPlot){ for(int i = 0; i < typeDemo.size(); i++){ - if(typeDemo.get(i).isPressing && i != lastTypeIndex){ + if(typeDemo.get(i).isPressing && i != oldPlot.getDetailType()){ typeChanged = true; - lastTypeIndex = i; break; } typeChanged = false; diff --git a/designer_chart/src/com/fr/plugin/chart/gauge/VanChartGaugePlotPane.java b/designer_chart/src/com/fr/plugin/chart/gauge/VanChartGaugePlotPane.java index f7f138c65b..ae59c0dbc1 100644 --- a/designer_chart/src/com/fr/plugin/chart/gauge/VanChartGaugePlotPane.java +++ b/designer_chart/src/com/fr/plugin/chart/gauge/VanChartGaugePlotPane.java @@ -2,7 +2,6 @@ package com.fr.plugin.chart.gauge; import com.fr.chart.chartattr.Chart; import com.fr.chart.chartattr.Plot; -import com.fr.design.mainframe.chart.gui.type.ChartImagePane; import com.fr.general.FRLogger; import com.fr.general.Inter; import com.fr.plugin.chart.designer.type.AbstractVanChartTypePane; @@ -43,21 +42,6 @@ public class VanChartGaugePlotPane extends AbstractVanChartTypePane { return Inter.getLocText("Plugin-ChartF_NewGauge"); } - /** - * 更新界面内容 - */ - public void populateBean(Chart chart) { - for(ChartImagePane imagePane : typeDemo) { - imagePane.isPressing = false; - } - Plot plot = chart.getPlot(); - if(plot instanceof VanChartGaugePlot) { - lastTypeIndex = ((VanChartGaugePlot)plot).getGaugeStyle().ordinal(); - typeDemo.get(lastTypeIndex).isPressing = true; - } - checkDemosBackground(); - } - protected Plot getSelectedClonedPlot(){ VanChartGaugePlot newPlot = null; Chart[] GaugeChart = GaugeIndependentVanChart.GaugeVanChartTypes; diff --git a/designer_chart/src/com/fr/plugin/chart/heatmap/designer/type/VanChartHeatMapTypePane.java b/designer_chart/src/com/fr/plugin/chart/heatmap/designer/type/VanChartHeatMapTypePane.java index c28fb143c5..b373f2828a 100644 --- a/designer_chart/src/com/fr/plugin/chart/heatmap/designer/type/VanChartHeatMapTypePane.java +++ b/designer_chart/src/com/fr/plugin/chart/heatmap/designer/type/VanChartHeatMapTypePane.java @@ -59,7 +59,6 @@ public class VanChartHeatMapTypePane extends VanChartMapPlotPane { //适用一种图表只有一种类型的 public void populateBean(Chart chart) { typeDemo.get(0).isPressing = true; - lastTypeIndex = 0; VanChartHeatMapPlot plot = (VanChartHeatMapPlot)chart.getPlot(); populateSourcePane(plot); diff --git a/designer_chart/src/com/fr/plugin/chart/line/VanChartLinePlotPane.java b/designer_chart/src/com/fr/plugin/chart/line/VanChartLinePlotPane.java index a0d1a326cf..c7a04abe90 100644 --- a/designer_chart/src/com/fr/plugin/chart/line/VanChartLinePlotPane.java +++ b/designer_chart/src/com/fr/plugin/chart/line/VanChartLinePlotPane.java @@ -2,10 +2,8 @@ package com.fr.plugin.chart.line; import com.fr.chart.chartattr.Chart; import com.fr.chart.chartattr.Plot; -import com.fr.design.mainframe.chart.gui.type.ChartImagePane; import com.fr.general.FRLogger; import com.fr.general.Inter; -import com.fr.plugin.chart.type.VanChartPlotType; import com.fr.plugin.chart.designer.type.AbstractVanChartTypePane; /** @@ -39,29 +37,6 @@ public class VanChartLinePlotPane extends AbstractVanChartTypePane { public String title4PopupWindow() { return Inter.getLocText("Plugin-ChartF_NewLine"); } - /** - * 更新界面内容 - */ - public void populateBean(Chart chart) { - for(ChartImagePane imagePane : typeDemo) { - imagePane.isPressing = false; - } - Plot plot = chart.getPlot(); - if(plot instanceof VanChartLinePlot) { - VanChartPlotType plotType = ((VanChartLinePlot)plot).getVanChartPlotType(); - switch (plotType){ - case CUSTOM: - lastTypeIndex = 2; - break; - default: - lastTypeIndex = plotType.ordinal(); - break; - } - typeDemo.get(lastTypeIndex).isPressing = true; - } - checkDemosBackground(); - - } /** * 获取各图表类型界面ID, 本质是plotID diff --git a/designer_chart/src/com/fr/plugin/chart/map/designer/type/VanChartMapPlotPane.java b/designer_chart/src/com/fr/plugin/chart/map/designer/type/VanChartMapPlotPane.java index 79abfb0066..ab70a847a8 100644 --- a/designer_chart/src/com/fr/plugin/chart/map/designer/type/VanChartMapPlotPane.java +++ b/designer_chart/src/com/fr/plugin/chart/map/designer/type/VanChartMapPlotPane.java @@ -88,8 +88,7 @@ public class VanChartMapPlotPane extends AbstractVanChartTypePane { } VanChartMapPlot plot = (VanChartMapPlot)chart.getPlot(); - lastTypeIndex = plot.getMapTypeIndex(); - typeDemo.get(lastTypeIndex).isPressing = true; + typeDemo.get(plot.getDetailType()).isPressing = true; populateSourcePane(plot); boolean enabled = !CompatibleGEOJSONHelper.isDeprecated(plot.getGeoUrl()); diff --git a/designer_chart/src/com/fr/plugin/chart/pie/VanChartPiePlotPane.java b/designer_chart/src/com/fr/plugin/chart/pie/VanChartPiePlotPane.java index 61a403766e..81726c7e52 100644 --- a/designer_chart/src/com/fr/plugin/chart/pie/VanChartPiePlotPane.java +++ b/designer_chart/src/com/fr/plugin/chart/pie/VanChartPiePlotPane.java @@ -3,7 +3,6 @@ package com.fr.plugin.chart.pie; import com.fr.chart.chartattr.Chart; import com.fr.chart.chartattr.Plot; -import com.fr.design.mainframe.chart.gui.type.ChartImagePane; import com.fr.general.FRLogger; import com.fr.general.Inter; import com.fr.plugin.chart.PiePlot4VanChart; @@ -42,22 +41,6 @@ public class VanChartPiePlotPane extends AbstractVanChartTypePane { return Inter.getLocText("Plugin-ChartF_NewPie"); } - - /** - * 更新界面内容 - */ - public void populateBean(Chart chart) { - for(ChartImagePane imagePane : typeDemo) { - imagePane.isPressing = false; - } - Plot plot = chart.getPlot(); - if(plot instanceof PiePlot4VanChart) { - lastTypeIndex = ((PiePlot4VanChart)plot).getRoseType().ordinal(); - typeDemo.get(lastTypeIndex).isPressing = true; - } - checkDemosBackground(); - } - /** * 获取各图表类型界面ID, 本质是plotID * diff --git a/designer_chart/src/com/fr/plugin/chart/radar/VanChartRadarPlotPane.java b/designer_chart/src/com/fr/plugin/chart/radar/VanChartRadarPlotPane.java index 5dc2da2ced..11662e6216 100644 --- a/designer_chart/src/com/fr/plugin/chart/radar/VanChartRadarPlotPane.java +++ b/designer_chart/src/com/fr/plugin/chart/radar/VanChartRadarPlotPane.java @@ -2,7 +2,6 @@ package com.fr.plugin.chart.radar; import com.fr.chart.chartattr.Chart; import com.fr.chart.chartattr.Plot; -import com.fr.design.mainframe.chart.gui.type.ChartImagePane; import com.fr.general.FRLogger; import com.fr.general.Inter; import com.fr.plugin.chart.designer.type.AbstractVanChartTypePane; @@ -38,22 +37,6 @@ public class VanChartRadarPlotPane extends AbstractVanChartTypePane { return Inter.getLocText("Plugin-ChartF_NewRadar"); } - - /** - * 更新界面内容 - */ - public void populateBean(Chart chart) { - for(ChartImagePane imagePane : typeDemo) { - imagePane.isPressing = false; - } - Plot plot = chart.getPlot(); - if(plot instanceof VanChartRadarPlot) { - lastTypeIndex = ((VanChartRadarPlot)plot).getVanChartPlotType().ordinal(); - typeDemo.get(lastTypeIndex).isPressing = true; - } - checkDemosBackground(); - } - /** * 获取各图表类型界面ID, 本质是plotID * diff --git a/designer_chart/src/com/fr/plugin/chart/structure/desinger/type/VanChartStructureTypePane.java b/designer_chart/src/com/fr/plugin/chart/structure/desinger/type/VanChartStructureTypePane.java index 31ee519053..694762474a 100644 --- a/designer_chart/src/com/fr/plugin/chart/structure/desinger/type/VanChartStructureTypePane.java +++ b/designer_chart/src/com/fr/plugin/chart/structure/desinger/type/VanChartStructureTypePane.java @@ -2,7 +2,6 @@ package com.fr.plugin.chart.structure.desinger.type; import com.fr.chart.chartattr.Chart; import com.fr.chart.chartattr.Plot; -import com.fr.design.mainframe.chart.gui.type.ChartImagePane; import com.fr.general.FRLogger; import com.fr.general.Inter; import com.fr.plugin.chart.base.VanChartTools; @@ -47,23 +46,7 @@ public class VanChartStructureTypePane extends AbstractVanChartTypePane{ public String title4PopupWindow() { return Inter.getLocText("Plugin-ChartF_NewStructure"); } - - /** - * 更新界面内容 - */ - public void populateBean(Chart chart) { - for(ChartImagePane imagePane : typeDemo) { - imagePane.isPressing = false; - } - Plot plot = chart.getPlot(); - if(plot instanceof VanChartStructurePlot) { - lastTypeIndex = ((VanChartStructurePlot)plot).getStructureType().ordinal(); - typeDemo.get(lastTypeIndex).isPressing = true; - } - checkDemosBackground(); - } - - + protected Plot getSelectedClonedPlot(){ VanChartStructurePlot newPlot = null; Chart[] charts = StructureIndependentVanChart.StructureVanCharts; From 5769e260e6011f24d72901b23b3bedd4868d3b8c Mon Sep 17 00:00:00 2001 From: MoMeak Date: Tue, 19 Sep 2017 14:43:20 +0800 Subject: [PATCH 013/125] =?UTF-8?q?REPORT-4604=20=E8=AE=BE=E8=AE=A1?= =?UTF-8?q?=E5=99=A8=E8=A7=86=E8=A7=89=E4=BF=AE=E6=94=B9=201.=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=E4=BA=86=E4=B8=80=E4=B8=AAUIToggleButton(Icon[]=20ico?= =?UTF-8?q?ns)=20=E6=8E=A5=E5=8F=A3=EF=BC=9B=E4=BE=9B=E9=9C=80=E8=A6=81?= =?UTF-8?q?=E5=8F=8D=E7=99=BD=E7=9A=84=E6=8C=89=E9=92=AE=E8=B0=83=E7=94=A8?= =?UTF-8?q?=202.=E4=BF=AE=E6=94=B9=E5=8D=95=E5=85=83=E6=A0=BC=E5=B1=9E?= =?UTF-8?q?=E6=80=A7=E9=9D=A2=E6=9D=BF=E7=9A=84=E5=8F=8D=E7=99=BD=E6=8C=89?= =?UTF-8?q?=E9=92=AE=EF=BC=8810=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fr/design/expand/SortExpandAttrPane.java | 12 +++--- .../cell/settingpane/CellExpandAttrPane.java | 8 ++-- .../fr/design/gui/ibutton/UIButtonGroup.java | 36 ++++++++++++++++++ .../fr/design/gui/ibutton/UIToggleButton.java | 24 +++++++++++- .../fr/design/images/expand/asc_selected.png | Bin 0 -> 306 bytes .../fr/design/images/expand/des_selected.png | Bin 0 -> 305 bytes .../images/expand/landspace_selected@1x.png | Bin 0 -> 139 bytes .../images/expand/none16x16_selected@1x.png | Bin 0 -> 383 bytes .../images/expand/vertical_selected@1x.png | Bin 0 -> 128 bytes 9 files changed, 69 insertions(+), 11 deletions(-) create mode 100644 designer_base/src/com/fr/design/images/expand/asc_selected.png create mode 100644 designer_base/src/com/fr/design/images/expand/des_selected.png create mode 100644 designer_base/src/com/fr/design/images/expand/landspace_selected@1x.png create mode 100644 designer_base/src/com/fr/design/images/expand/none16x16_selected@1x.png create mode 100644 designer_base/src/com/fr/design/images/expand/vertical_selected@1x.png diff --git a/designer/src/com/fr/design/expand/SortExpandAttrPane.java b/designer/src/com/fr/design/expand/SortExpandAttrPane.java index d346dd890c..284135bddd 100644 --- a/designer/src/com/fr/design/expand/SortExpandAttrPane.java +++ b/designer/src/com/fr/design/expand/SortExpandAttrPane.java @@ -24,13 +24,13 @@ public class SortExpandAttrPane extends JPanel { public SortExpandAttrPane() { this.setLayout(new BorderLayout(0, 4)); - Icon[] iconArray = { - BaseUtils.readIcon("/com/fr/design/images/expand/none16x16.png"), - BaseUtils.readIcon("/com/fr/design/images/expand/asc.png"), - BaseUtils.readIcon("/com/fr/design/images/expand/des.png") - }; + Icon[][] iconArray = { + {BaseUtils.readIcon("/com/fr/design/images/expand/none16x16.png"), BaseUtils.readIcon("/com/fr/design/images/expand/none16x16_selected@1x.png")}, + {BaseUtils.readIcon("/com/fr/design/images/expand/asc.png"), BaseUtils.readIcon("/com/fr/design/images/expand/asc_selected.png")}, + {BaseUtils.readIcon("/com/fr/design/images/expand/des.png"), BaseUtils.readIcon("/com/fr/design/images/expand/des_selected.png")} + }; String[] nameArray = { Inter.getLocText("Sort-Original"), Inter.getLocText("Sort-Ascending"), Inter.getLocText("Sort-Descending") }; - sort_type_pane = new UIButtonGroup(iconArray); + sort_type_pane = new UIButtonGroup(iconArray, null); sort_type_pane.setAllToolTips(nameArray); sort_type_pane.setGlobalName(Inter.getLocText("ExpandD-Sort_After_Expand")); this.add(sort_type_pane, BorderLayout.NORTH); diff --git a/designer/src/com/fr/design/mainframe/cell/settingpane/CellExpandAttrPane.java b/designer/src/com/fr/design/mainframe/cell/settingpane/CellExpandAttrPane.java index 4eedd4f7c5..b903e68048 100644 --- a/designer/src/com/fr/design/mainframe/cell/settingpane/CellExpandAttrPane.java +++ b/designer/src/com/fr/design/mainframe/cell/settingpane/CellExpandAttrPane.java @@ -45,10 +45,10 @@ public class CellExpandAttrPane extends AbstractCellAttrPane { */ public JPanel createContentPane() { String[] nameArray = {Inter.getLocText("ExpandD-Not_Expand"), Inter.getLocText("Utils-Top_to_Bottom"), Inter.getLocText("Utils-Left_to_Right")}; - Icon[] iconArray = { - BaseUtils.readIcon("/com/fr/design/images/expand/none16x16.png"), - BaseUtils.readIcon("/com/fr/design/images/expand/vertical.png"), - BaseUtils.readIcon("/com/fr/design/images/expand/landspace.png") + Icon[][] iconArray = { + {BaseUtils.readIcon("/com/fr/design/images/expand/none16x16.png"), BaseUtils.readIcon("/com/fr/design/images/expand/none16x16_selected@1x.png")}, + {BaseUtils.readIcon("/com/fr/design/images/expand/vertical.png"), BaseUtils.readIcon("/com/fr/design/images/expand/vertical_selected@1x.png")}, + {BaseUtils.readIcon("/com/fr/design/images/expand/landspace.png"), BaseUtils.readIcon("/com/fr/design/images/expand/landspace_selected@1x.png")} }; Byte[] valueArray = {Constants.NONE, Constants.TOP_TO_BOTTOM, Constants.LEFT_TO_RIGHT}; expandDirectionButton = new UIButtonGroup(iconArray, valueArray); diff --git a/designer_base/src/com/fr/design/gui/ibutton/UIButtonGroup.java b/designer_base/src/com/fr/design/gui/ibutton/UIButtonGroup.java index 0683fc7c2b..4133e109cd 100644 --- a/designer_base/src/com/fr/design/gui/ibutton/UIButtonGroup.java +++ b/designer_base/src/com/fr/design/gui/ibutton/UIButtonGroup.java @@ -80,6 +80,42 @@ public class UIButtonGroup extends JPanel implements GlobalNameObserver { } } + public UIButtonGroup(Icon[][] iconArray, T[] objects) { + if (!ArrayUtils.isEmpty(objects) && iconArray.length == objects.length) { + this.objectList = Arrays.asList(objects); + } + labelButtonList = new ArrayList(iconArray.length); + this.setLayout(getGridLayout(iconArray.length)); + this.setBorder(getGroupBorder()); + for (int i = 0; i < iconArray.length; i++) { + final int index = i; + Icon[] icon = iconArray[i]; + final UIToggleButton labelButton = new UIToggleButton(icon) { + @Override + protected MouseListener getMouseListener() { + return new MouseAdapter() { + @Override + public void mousePressed(MouseEvent e) { + isClick = true; + if (!isEnabled()) { + return; + } + if (globalNameListener != null) { + globalNameListener.setGlobalName(buttonGroupName); + } + setSelectedWithFireChanged(index); + } + }; + } + + public boolean shouldResponseNameListener() { + return false; + } + }; + initButton(labelButton); + } + } + public boolean hasClick() { return isClick; } diff --git a/designer_base/src/com/fr/design/gui/ibutton/UIToggleButton.java b/designer_base/src/com/fr/design/gui/ibutton/UIToggleButton.java index 0a766e2e91..21c8bb419a 100644 --- a/designer_base/src/com/fr/design/gui/ibutton/UIToggleButton.java +++ b/designer_base/src/com/fr/design/gui/ibutton/UIToggleButton.java @@ -3,12 +3,13 @@ package com.fr.design.gui.ibutton; import java.awt.Graphics; import java.awt.Graphics2D; import java.awt.Shape; +import java.awt.event.ActionEvent; import java.awt.event.MouseAdapter; import java.awt.event.MouseEvent; import java.awt.event.MouseListener; import java.awt.geom.RoundRectangle2D; -import javax.swing.Icon; +import javax.swing.*; import javax.swing.event.ChangeEvent; import javax.swing.event.ChangeListener; @@ -46,6 +47,26 @@ public class UIToggleButton extends UIButton implements GlobalNameObserver{ addMouseListener(getMouseListener()); } + /** + * 需要反白的按钮接口 + * support icons[normalIcon, selectedIcon] + * @param icons + */ + public UIToggleButton(Icon[] icons) { + super(icons[0], null, icons[1]); + setSelectedIcon(icons[1]); + setExtraPainted(true); + addActionListener(new AbstractAction() { + @Override + public void actionPerformed(ActionEvent e) { + if (!UIToggleButton.super.isSelected()) { + UIToggleButton.super.setSelected(!UIToggleButton.super.isSelected()); + } + } + }); + addMouseListener(getMouseListener()); + } + public void setGlobalName(String name){ toggleButtonName = name ; } @@ -66,6 +87,7 @@ public class UIToggleButton extends UIButton implements GlobalNameObserver{ @Override public void setSelected(boolean isSelected) { + super.setSelected(isSelected); if (this.isSelected != isSelected) { this.isSelected = isSelected; repaint(); diff --git a/designer_base/src/com/fr/design/images/expand/asc_selected.png b/designer_base/src/com/fr/design/images/expand/asc_selected.png new file mode 100644 index 0000000000000000000000000000000000000000..021bd2a495f4e992888853a60b5d991bd3b199a7 GIT binary patch literal 306 zcmV-20nPr2P)Px#>`6pHR5%f>k}(c~KoCXISQ{Iot%-U7J1aPaXE5;uUc+n9TiX*$VuCk-(#lHT zY?yUf)`-SQ9y|MI=CfppqJPBWO}O5)9AU1j)&`pN2+d^`Pj^o~fuXaSvNZ?{n1)Xe zYtZ2YL9c#L{X$fOYhWg%wc3mU$6xxDkmmQuUQZCJb<&IhH&Dnec#(H;u%95eAi+=q z73@I%hlQ+uppRkH_ymNQ#uPSqo$8?!eP8Fg%t$g=s~~TRp@hVWBPx#>q$gGR5%f>k-ZMVU=)U1F^i>Pm0+>iOk9O)khlW3VQ>@Ot?Z3aBy|ZLO{RLz zm!8jQsfIYou@XN6nJA+@3y#d7zA~;~Ck&2)x+9KflPMU;ud;c5M37Y2a1@h*1 zLiu0c&F##;K*Tmwg!f2mo0&(@^#(MhFyffS#`IDSAc2`Qfn2)6eCUkahYQ?c3MaV1 z%FAhL4MfCRO}5k-JdX>()w>l1qSCA|NnVbthu`)Ol^C-vwr2s500000NkvXXu0mjf D29tVJLo5W7 z|M0W$Okv1jo1k>erSqx6UgmrTWwZa29_flrNLn8JKj6z7<7B0%oCk*+lEedKI(Tj* jHHsK^?KSwo2IMiQwpzUAyk9p7Xdr{9tDnm{r-UW|8sjTh literal 0 HcmV?d00001 diff --git a/designer_base/src/com/fr/design/images/expand/none16x16_selected@1x.png b/designer_base/src/com/fr/design/images/expand/none16x16_selected@1x.png new file mode 100644 index 0000000000000000000000000000000000000000..24daf102b07ce54a8a26d00e07bfe041b4627493 GIT binary patch literal 383 zcmV-_0f7FAP)Px$IY~r8R5%fplQC|?FbqZG4gtDn$r*ewujxGkI72!$C&-#PLk^LX1TDH0?t8Kr z%W8|Z1U^KGpA<<^i$x{FFtnftS8&Tv_pGhx(-z|r?7;_k11GQr&)@=Hfi^kI$rH^3 za0bc|tY(Cfv*!FD0g*ceVPjOKs~yWdcFPFaCmTC!Hnn3(u669;?D~>@TGQVFYyOgU z1i^N9_Kdyd*puFk9XIX literal 0 HcmV?d00001 diff --git a/designer_base/src/com/fr/design/images/expand/vertical_selected@1x.png b/designer_base/src/com/fr/design/images/expand/vertical_selected@1x.png new file mode 100644 index 0000000000000000000000000000000000000000..0c78083bc6aebbcf5fec9333c9306b80ca50f05b GIT binary patch literal 128 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|tUO&DLo5W7 z|M0W$h%ksvh;vhLFk?<&(L_L!%~64g Z!8_7W_zT0@-#}9sJYD@<);T3K0RWjAA}{~| literal 0 HcmV?d00001 From 8c22eab84b5efcc665af586833113d809773fde5 Mon Sep 17 00:00:00 2001 From: plough Date: Tue, 19 Sep 2017 14:45:08 +0800 Subject: [PATCH 014/125] =?UTF-8?q?REPORT-4652=20=E8=BF=9C=E7=A8=8B?= =?UTF-8?q?=E8=AE=BE=E8=AE=A1=E5=AF=86=E7=A0=81=E6=9C=89=E7=89=B9=E6=AE=8A?= =?UTF-8?q?=E5=AD=97=E7=AC=A6=EF=BC=8C=E6=B2=A1=E6=B3=95=E7=99=BB=E9=99=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- designer_base/src/com/fr/env/RemoteEnv.java | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/designer_base/src/com/fr/env/RemoteEnv.java b/designer_base/src/com/fr/env/RemoteEnv.java index 3c25fc7ff0..11c48ec8f4 100644 --- a/designer_base/src/com/fr/env/RemoteEnv.java +++ b/designer_base/src/com/fr/env/RemoteEnv.java @@ -85,6 +85,7 @@ import java.io.UnsupportedEncodingException; import java.net.HttpURLConnection; import java.net.NoRouteToHostException; import java.net.Socket; +import java.net.URLEncoder; import java.util.ArrayList; import java.util.HashMap; import java.util.Iterator; @@ -157,6 +158,15 @@ public class RemoteEnv extends AbstractEnv { return password; } + // 修复密码中包含特殊字符,无法登录的问题 + private String getEncodedPassword() { + try { + return URLEncoder.encode(password, "UTF-8"); + } catch (UnsupportedEncodingException e) { + return password; + } + } + public void setPassword(String password) { this.password = password; clearUserID(); @@ -382,7 +392,7 @@ public class RemoteEnv extends AbstractEnv { para.put("op", "fr_remote_design"); para.put("cmd", "test_server_connection"); para.put("user", user); - para.put("password", password); + para.put("password", getEncodedPassword()); if (path.startsWith("https") && (!DesignerEnvManager.getEnvManager().isHttps())) { return false; @@ -505,7 +515,7 @@ public class RemoteEnv extends AbstractEnv { para.put("op", "fr_remote_design"); para.put("cmd", "r_sign_in"); para.put("user", user); - para.put("password", password); + para.put("password", getEncodedPassword()); simulaRPC(para, true); @@ -1990,7 +2000,7 @@ public class RemoteEnv extends AbstractEnv { para.put("op", "fr_remote_design"); para.put("cmd", "design_get_designer_version"); para.put("user", user); - para.put("password", password); + para.put("password", getEncodedPassword()); HttpClient client = createHttpMethod(para, true); try { From 8fcd901660310a2f9c12c1c66281f81fb8affc93 Mon Sep 17 00:00:00 2001 From: MoMeak Date: Tue, 19 Sep 2017 15:12:55 +0800 Subject: [PATCH 015/125] PMD --- designer/src/com/fr/design/expand/SortExpandAttrPane.java | 2 +- .../src/com/fr/design/gui/ibutton/UIButtonGroup.java | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/designer/src/com/fr/design/expand/SortExpandAttrPane.java b/designer/src/com/fr/design/expand/SortExpandAttrPane.java index 284135bddd..11260c74b4 100644 --- a/designer/src/com/fr/design/expand/SortExpandAttrPane.java +++ b/designer/src/com/fr/design/expand/SortExpandAttrPane.java @@ -30,7 +30,7 @@ public class SortExpandAttrPane extends JPanel { {BaseUtils.readIcon("/com/fr/design/images/expand/des.png"), BaseUtils.readIcon("/com/fr/design/images/expand/des_selected.png")} }; String[] nameArray = { Inter.getLocText("Sort-Original"), Inter.getLocText("Sort-Ascending"), Inter.getLocText("Sort-Descending") }; - sort_type_pane = new UIButtonGroup(iconArray, null); + sort_type_pane = new UIButtonGroup(iconArray); sort_type_pane.setAllToolTips(nameArray); sort_type_pane.setGlobalName(Inter.getLocText("ExpandD-Sort_After_Expand")); this.add(sort_type_pane, BorderLayout.NORTH); diff --git a/designer_base/src/com/fr/design/gui/ibutton/UIButtonGroup.java b/designer_base/src/com/fr/design/gui/ibutton/UIButtonGroup.java index 4133e109cd..a8ad8f0956 100644 --- a/designer_base/src/com/fr/design/gui/ibutton/UIButtonGroup.java +++ b/designer_base/src/com/fr/design/gui/ibutton/UIButtonGroup.java @@ -44,6 +44,10 @@ public class UIButtonGroup extends JPanel implements GlobalNameObserver { this(iconArray, null); } + public UIButtonGroup(Icon[][] iconArray) { + this(iconArray, null); + } + public UIButtonGroup(Icon[] iconArray, T[] objects) { if (!ArrayUtils.isEmpty(objects) && iconArray.length == objects.length) { this.objectList = Arrays.asList(objects); From 1e2fdb3455db8c0287b7a118c09c58a93ecdc067 Mon Sep 17 00:00:00 2001 From: plough Date: Tue, 19 Sep 2017 16:12:56 +0800 Subject: [PATCH 016/125] =?UTF-8?q?REPORT-4672=20=E5=8D=95=E5=85=83?= =?UTF-8?q?=E6=A0=BC=E6=B7=BB=E5=8A=A0=E6=8E=A7=E4=BB=B6=E5=90=8E=E5=88=A0?= =?UTF-8?q?=E9=99=A4=E5=8D=95=E5=85=83=E6=A0=BC=E6=89=80=E5=9C=A8=E8=A1=8C?= =?UTF-8?q?=EF=BC=8C=E5=8F=B3=E4=BE=A7=E5=B1=9E=E6=80=A7=E9=9D=A2=E6=9D=BF?= =?UTF-8?q?=E4=BF=9D=E6=8C=81=E4=B8=8D=E5=8F=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mainframe/ElementCasePaneDelegate.java | 8 ++--- .../form/FormElementCasePaneDelegate.java | 32 +++++++++---------- .../com/fr/poly/creator/ECBlockEditor.java | 1 + 3 files changed, 20 insertions(+), 21 deletions(-) diff --git a/designer/src/com/fr/design/mainframe/ElementCasePaneDelegate.java b/designer/src/com/fr/design/mainframe/ElementCasePaneDelegate.java index 556b5d59e1..3529ebcd03 100644 --- a/designer/src/com/fr/design/mainframe/ElementCasePaneDelegate.java +++ b/designer/src/com/fr/design/mainframe/ElementCasePaneDelegate.java @@ -50,18 +50,18 @@ public class ElementCasePaneDelegate extends ElementCasePane { if (!isEditable() && !BaseUtils.isAuthorityEditing()) { return; } - doOnSelectionChanged(e); + refreshPropertyPanes(); } }); this.addTargetModifiedListener(new TargetModifiedListener() { @Override public void targetModified(TargetModifiedEvent e) { - CellElementPropertyPane.getInstance().populate(ElementCasePaneDelegate.this); + refreshPropertyPanes(); } }); } - private void doOnSelectionChanged(SelectionEvent e) { + private void refreshPropertyPanes() { //在编辑权限,所以要更新权限编辑面板 if (BaseUtils.isAuthorityEditing()) { AuthorityPropertyPane authorityPropertyPane = new AuthorityPropertyPane(ElementCasePaneDelegate.this); @@ -76,7 +76,7 @@ public class ElementCasePaneDelegate extends ElementCasePane { QuickEditorRegion.getInstance().populate(getCurrentEditor()); JTemplate editingTemplate = HistoryTemplateListPane.getInstance().getCurrentEditingTemplate(); if (editingTemplate != null && !editingTemplate.isUpMode()) { - Selection editingSelection = ((ElementCasePaneDelegate)e.getSource()).getSelection(); + Selection editingSelection = getSelection(); // 模板初始化完成后,才能初始化超级链接面板 HyperlinkGroupPane hyperlinkGroupPane = editingTemplate.getHyperLinkPane(HyperlinkGroupPaneActionImpl.getInstance()); hyperlinkGroupPane.populate(ElementCasePaneDelegate.this); diff --git a/designer/src/com/fr/design/mainframe/form/FormElementCasePaneDelegate.java b/designer/src/com/fr/design/mainframe/form/FormElementCasePaneDelegate.java index 68ee0d79bd..5ddd8efb51 100644 --- a/designer/src/com/fr/design/mainframe/form/FormElementCasePaneDelegate.java +++ b/designer/src/com/fr/design/mainframe/form/FormElementCasePaneDelegate.java @@ -36,32 +36,30 @@ public class FormElementCasePaneDelegate extends ElementCasePane { @Override public void targetModified(TargetModifiedEvent e) { designer.fireTargetModified(); + resetSelectionAndChooseState(); } }); } From feada98bff1df92bee8a44d3b67214c7140625b0 Mon Sep 17 00:00:00 2001 From: MoMeak Date: Tue, 19 Sep 2017 17:00:43 +0800 Subject: [PATCH 017/125] =?UTF-8?q?REPORT-4665=20[9.0=E4=BA=8C=E8=BD=AE?= =?UTF-8?q?=E5=9B=9E=E5=BD=92]=20=E5=8D=95=E5=85=83=E6=A0=BC=E6=A0=B7?= =?UTF-8?q?=E5=BC=8F=E6=97=A5=E6=9C=9F=E5=9E=8B=E6=98=BE=E7=A4=BA=E4=B8=8D?= =?UTF-8?q?=E4=B8=80=E8=87=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- designer_base/src/com/fr/design/gui/style/FormatPane.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/designer_base/src/com/fr/design/gui/style/FormatPane.java b/designer_base/src/com/fr/design/gui/style/FormatPane.java index 43fcd247fa..5ab39647f4 100644 --- a/designer_base/src/com/fr/design/gui/style/FormatPane.java +++ b/designer_base/src/com/fr/design/gui/style/FormatPane.java @@ -323,7 +323,7 @@ public class FormatPane extends AbstractBasicStylePane implements GlobalNameObs public void itemStateChanged(ItemEvent e) { if (e.getStateChange() == ItemEvent.SELECTED) { int contents = getFormatContents(); - String[] items = FormatField.getInstance().getFormatArray(contents); + String[] items = FormatField.getInstance().getFormatArray(contents, false); CardLayout cardLayout = (CardLayout) centerPane.getLayout(); if (isTextOrNull()) { From 4ce94fac8b88ff73dde035e59f6dbc670facdf55 Mon Sep 17 00:00:00 2001 From: plough Date: Tue, 19 Sep 2017 17:30:07 +0800 Subject: [PATCH 018/125] =?UTF-8?q?REPORT-4695=20=E6=89=93=E5=BC=80?= =?UTF-8?q?=E8=A1=A8=E5=8D=95=E5=92=8C=E6=8A=A5=E8=A1=A8=EF=BC=8C=E5=88=87?= =?UTF-8?q?=E6=8D=A2tab=E6=97=B6=E6=A8=A1=E6=9D=BF=E5=86=85=E5=AE=B9?= =?UTF-8?q?=E6=B2=A1=E6=9C=89=E5=88=87=E6=8D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fr/design/roleAuthority/ReportAndFSManagePane.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/designer_base/src/com/fr/design/roleAuthority/ReportAndFSManagePane.java b/designer_base/src/com/fr/design/roleAuthority/ReportAndFSManagePane.java index 75dfa99bdf..8b406de1d2 100644 --- a/designer_base/src/com/fr/design/roleAuthority/ReportAndFSManagePane.java +++ b/designer_base/src/com/fr/design/roleAuthority/ReportAndFSManagePane.java @@ -265,9 +265,11 @@ public class ReportAndFSManagePane extends DockingView implements Prepare4DataSo DesignTableDataManager.addDsChangeListener(new ChangeListener() { public void stateChanged(ChangeEvent e) { - roleTree.refreshTreeNode(); - expandTree(roleTree, true); - roleTree.updateUI(); + if (BaseUtils.isAuthorityEditing()) { + roleTree.refreshTreeNode(); + expandTree(roleTree, true); + roleTree.updateUI(); + } } }); From fd9da4deefcc7c896e53dce1fd73f8d28e54af62 Mon Sep 17 00:00:00 2001 From: mengao <283296419@qq.com> Date: Tue, 19 Sep 2017 23:32:32 +0800 Subject: [PATCH 019/125] =?UTF-8?q?=E6=95=B4=E7=90=86=E9=9D=A2=E6=9D=BF?= =?UTF-8?q?=E4=B8=AD=E5=AD=98=E5=9C=A8=E7=9A=84=E5=A4=A7=E5=B0=8F=EF=BC=8C?= =?UTF-8?q?=E9=97=B4=E9=9A=99=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../design/gui/controlpane/UIControlPane.java | 16 ++-- .../chart/gui/data/ChartDataFilterPane.java | 19 ++--- .../chart/gui/data/NormalChartDataPane.java | 2 +- .../chart/gui/style/ChartTextAttrPane.java | 9 ++- .../chart/gui/style/ThirdTabPane.java | 32 ++++---- .../gui/style/series/UIColorPickerPane.java | 7 +- .../bubble/VanChartBubbleInteractivePane.java | 12 +++ .../bubble/component/VanChartBubblePane.java | 17 +++-- ...anChartBubblePlotTableDataContentPane.java | 4 +- .../designer/AbstractVanChartScrollPane.java | 2 +- .../designer/TableLayout4VanChartHelper.java | 2 + .../component/VanChartMarkerPane.java | 8 +- .../component/VanChartUIListControlPane.java | 20 +++++ .../format/FormatPaneWithOutFont.java | 3 +- .../marker/VanChartCommonMarkerPane.java | 9 ++- .../VanChartConditionListControlPane.java | 1 + .../other/VanChartInteractivePane.java | 7 +- .../VanChartInteractivePaneWithOutSort.java | 9 +++ .../style/axis/VanChartBaseAxisPane.java | 26 ++++++- .../style/axis/VanChartTimeAxisPane.java | 4 +- .../style/axis/VanChartValueAxisPane.java | 4 +- .../gauge/VanChartGaugeDetailAxisPane.java | 3 +- .../axis/radar/VanChartRadarXAxisPane.java | 4 +- .../axis/radar/VanChartRadarYAxisPane.java | 4 +- .../background/BackgroundListControlPane.java | 2 +- .../style/background/VanChartAreaPane.java | 1 + .../background/VanChartAxisAreaPane.java | 4 +- ...hartGaugeCateOrPercentLabelDetailPane.java | 76 ++++++++++++++++--- .../label/VanChartGaugeLabelDetailPane.java | 9 ++- .../VanChartGaugeValueLabelDetailPane.java | 2 +- .../label/VanChartPlotLabelDetailPane.java | 24 ++++-- .../style/VanChartFunnelSeriesPane.java | 3 +- .../component/ComboBoxWithButtonPane.java | 4 +- .../chart/map/VanChartMapSeriesPane.java | 15 +++- .../data/component/report/AreaPane.java | 2 +- .../component/report/LongLatAreaPane.java | 4 +- .../data/component/table/AreaPane.java | 4 +- .../data/component/table/LongLatAreaPane.java | 4 +- .../series/VanChartMapScatterMarkerPane.java | 9 ++- .../type/VanChartMapSourceChoosePane.java | 9 ++- 40 files changed, 299 insertions(+), 97 deletions(-) diff --git a/designer_base/src/com/fr/design/gui/controlpane/UIControlPane.java b/designer_base/src/com/fr/design/gui/controlpane/UIControlPane.java index 9a5bd6071a..e855cf54f1 100644 --- a/designer_base/src/com/fr/design/gui/controlpane/UIControlPane.java +++ b/designer_base/src/com/fr/design/gui/controlpane/UIControlPane.java @@ -193,6 +193,16 @@ public abstract class UIControlPane extends BasicPane implements UnrepeatedNameH topToolBar.setLayout(new BorderLayout()); ShortCut addItem = addItemShortCut().getShortCut(); addItem.intoJToolBar(topToolBar); + + JPanel leftTopPane = getLeftTopPane(topToolBar); + + leftTopPane.setBorder(BorderFactory.createEmptyBorder(0, 0, 6, 0)); + leftPane.add(leftTopPane, BorderLayout.NORTH); + + return leftPane; + } + + protected JPanel getLeftTopPane (UIToolbar topToolBar) { double p = TableLayout.PREFERRED; double f = TableLayout.FILL; double[] columnSize = { p, f}; @@ -200,11 +210,7 @@ public abstract class UIControlPane extends BasicPane implements UnrepeatedNameH Component[][] components = new Component[][]{ new Component[]{new UILabel(getAddItemText()), topToolBar}, }; - JPanel leftTopPane = TableLayoutHelper.createTableLayoutPane(components,rowSize,columnSize); - leftTopPane.setBorder(BorderFactory.createEmptyBorder(0, 0, 6, 0)); - leftPane.add(leftTopPane, BorderLayout.NORTH); - - return leftPane; + return TableLayoutHelper.createTableLayoutPane(components,rowSize,columnSize); } /** diff --git a/designer_chart/src/com/fr/design/mainframe/chart/gui/data/ChartDataFilterPane.java b/designer_chart/src/com/fr/design/mainframe/chart/gui/data/ChartDataFilterPane.java index 37caea1684..9a4a67b16e 100644 --- a/designer_chart/src/com/fr/design/mainframe/chart/gui/data/ChartDataFilterPane.java +++ b/designer_chart/src/com/fr/design/mainframe/chart/gui/data/ChartDataFilterPane.java @@ -6,7 +6,6 @@ import com.fr.chart.chartattr.ChartCollection; import com.fr.chart.chartattr.Plot; import com.fr.chart.chartdata.TopDefinition; import com.fr.design.gui.frpane.AbstractAttrNoScrollPane; -import com.fr.design.gui.ibutton.UIHeadGroup; import com.fr.design.gui.icheckbox.UICheckBox; import com.fr.design.gui.ilable.UILabel; import com.fr.design.gui.itextfield.UITextField; @@ -48,15 +47,9 @@ public class ChartDataFilterPane extends ThirdTabPane { } protected void initTabPane() { - if (!paneList.isEmpty()) { - tabPane = new UIHeadGroup(nameArray) { - @Override - public void tabChanged(int index) { - cardLayout.show(centerPane, nameArray[index]); - } - }; - tabPane.setPreferredSize(new Dimension(221, 20)); - } + super.initTabPane(); + tabPane.setPreferredSize(new Dimension(221, 25)); + } protected void initLayout() { @@ -126,7 +119,7 @@ public class ChartDataFilterPane extends ThirdTabPane { this.removeAll(); paneList = initPaneList4NoPresent(plot4Pane, parentPane); initAllPane(); - tabPane.setPreferredSize(new Dimension(221, 20)); + tabPane.setPreferredSize(new Dimension(221, 25)); centerPane.setPreferredSize(new Dimension(getContentPaneWidth(), 200)); this.validate(); } @@ -242,7 +235,7 @@ public class ChartDataFilterPane extends ThirdTabPane { }; preDataNumPane = TableLayout4VanChartHelper.createGapTableLayoutPane(components, rowSize, columnSize); - preDataNumPane.setBorder(BorderFactory.createEmptyBorder(0,15,0,0)); + preDataNumPane.setBorder(BorderFactory.createEmptyBorder(10,15,0,0)); //默认不显示 preDataNumPane.setVisible(false); panel1.add(preDataNumPane, BorderLayout.CENTER); @@ -417,7 +410,7 @@ public class ChartDataFilterPane extends ThirdTabPane { }; preDataNumPane = TableLayout4VanChartHelper.createGapTableLayoutPane(components, rowSize, columnSize); - preDataNumPane.setBorder(BorderFactory.createEmptyBorder(0,15,0,0)); + preDataNumPane.setBorder(BorderFactory.createEmptyBorder(10,15,0,0)); //默认不显示 preDataNumPane.setVisible(false); panel1.add(preDataNumPane, BorderLayout.CENTER); diff --git a/designer_chart/src/com/fr/design/mainframe/chart/gui/data/NormalChartDataPane.java b/designer_chart/src/com/fr/design/mainframe/chart/gui/data/NormalChartDataPane.java index 8c464454a0..829bf13b3e 100644 --- a/designer_chart/src/com/fr/design/mainframe/chart/gui/data/NormalChartDataPane.java +++ b/designer_chart/src/com/fr/design/mainframe/chart/gui/data/NormalChartDataPane.java @@ -64,7 +64,7 @@ public class NormalChartDataPane extends DataContentsPane { UILabel label1 = new UILabel(Inter.getLocText("Chart-Data_Resource")); label1.setPreferredSize(new Dimension(ChartDataPane.LABEL_WIDTH,ChartDataPane.LABEL_HEIGHT)); northPane.add(GUICoreUtils.createBorderLayoutPane(new Component[]{jcb, null, null, label1, null})); - northPane.setBorder(BorderFactory.createEmptyBorder(0,10,0,15)); + northPane.setBorder(BorderFactory.createEmptyBorder(0,5,0,8)); this.add(northPane, BorderLayout.NORTH); this.add(cardPane, BorderLayout.CENTER); diff --git a/designer_chart/src/com/fr/design/mainframe/chart/gui/style/ChartTextAttrPane.java b/designer_chart/src/com/fr/design/mainframe/chart/gui/style/ChartTextAttrPane.java index 44c3cf0d5a..e3068e347b 100644 --- a/designer_chart/src/com/fr/design/mainframe/chart/gui/style/ChartTextAttrPane.java +++ b/designer_chart/src/com/fr/design/mainframe/chart/gui/style/ChartTextAttrPane.java @@ -148,13 +148,16 @@ public class ChartTextAttrPane extends BasicPane { } protected JPanel getContentPane (JPanel buttonPane) { - double p = TableLayout.PREFERRED; double f = TableLayout.FILL; double e = TableLayout4VanChartHelper.EDIT_AREA_WIDTH; double[] columnSize = {f,e}; - double[] rowSize = {p, p, p}; - return TableLayout4VanChartHelper.createGapTableLayoutPane(getComponents(buttonPane), rowSize, columnSize); + return TableLayout4VanChartHelper.createGapTableLayoutPane(getComponents(buttonPane), getRowSize(), columnSize); + } + + protected double[] getRowSize () { + double p = TableLayout.PREFERRED; + return new double[]{p, p, p}; } protected Component[][] getComponents(JPanel buttonPane) { diff --git a/designer_chart/src/com/fr/design/mainframe/chart/gui/style/ThirdTabPane.java b/designer_chart/src/com/fr/design/mainframe/chart/gui/style/ThirdTabPane.java index ad03f3c521..c73e97da4c 100644 --- a/designer_chart/src/com/fr/design/mainframe/chart/gui/style/ThirdTabPane.java +++ b/designer_chart/src/com/fr/design/mainframe/chart/gui/style/ThirdTabPane.java @@ -6,24 +6,26 @@ import com.fr.design.beans.BasicBeanPane; import com.fr.design.constants.UIConstants; import com.fr.design.dialog.BasicScrollPane; import com.fr.design.gui.frpane.AbstractAttrNoScrollPane; -import com.fr.design.gui.ibutton.UIHeadGroup; +import com.fr.design.gui.ibutton.UIButtonGroup; import javax.swing.*; import javax.swing.border.Border; import java.awt.*; +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; import java.util.List; public abstract class ThirdTabPane extends BasicBeanPane{ private static final long serialVersionUID = 2298609199400393886L; - protected UIHeadGroup tabPane; + protected UIButtonGroup tabPane; protected String[] nameArray; public JPanel centerPane; public CardLayout cardLayout; public List paneList; protected abstract List initPaneList(Plot plot, AbstractAttrNoScrollPane parent); - + public ThirdTabPane(Plot plot, AbstractAttrNoScrollPane parent) { paneList = initPaneList(plot, parent); initAllPane(); @@ -45,16 +47,20 @@ public abstract class ThirdTabPane extends BasicBeanPane{ protected void initTabPane() { if (!paneList.isEmpty()) { - tabPane = new UIHeadGroup(nameArray) { + tabPane = new UIButtonGroup(nameArray); + tabPane.setSelectedIndex(0); + tabPane.setPreferredSize(new Dimension(60 * nameArray.length, 25)); + tabPane.addActionListener(new ActionListener() { @Override - public void tabChanged(int index) { - cardLayout.show(centerPane, nameArray[index]); + public void actionPerformed(ActionEvent e) { + cardLayout.show(centerPane, nameArray[tabPane.getSelectedIndex()]); } - }; + }); + centerPane.setBorder(myBorder); } } - + @Override public void paint(Graphics g) { super.paint(g); @@ -64,7 +70,7 @@ public abstract class ThirdTabPane extends BasicBeanPane{ g2d.drawLine(getWidth() - 2, tabPane.getPreferredSize().height, getWidth() - 2, getHeight() - 1); } } - + protected void initLayout() { this.setLayout(new BorderLayout()); if (!paneList.isEmpty()) { @@ -97,19 +103,19 @@ public abstract class ThirdTabPane extends BasicBeanPane{ }; /** - * + * * @return 中间的内容面板的指定宽度 */ protected int getContentPaneWidth() { return centerPane.getPreferredSize().width; } - + @Override public T updateBean() { return null; } - + protected static class NamePane { private String name; private BasicScrollPane pane; @@ -129,6 +135,6 @@ public abstract class ThirdTabPane extends BasicBeanPane{ public void setPane(BasicScrollPane pane) { this.pane = pane; } - + } } \ No newline at end of file diff --git a/designer_chart/src/com/fr/design/mainframe/chart/gui/style/series/UIColorPickerPane.java b/designer_chart/src/com/fr/design/mainframe/chart/gui/style/series/UIColorPickerPane.java index 75de4a9b43..945fd4d5e5 100644 --- a/designer_chart/src/com/fr/design/mainframe/chart/gui/style/series/UIColorPickerPane.java +++ b/designer_chart/src/com/fr/design/mainframe/chart/gui/style/series/UIColorPickerPane.java @@ -34,12 +34,12 @@ import java.util.List; public class UIColorPickerPane extends BasicPane implements UIObserver { private static final int MARGIN_TOP = 10; private static final int MARGIN_LEFT = 5; - private static final int COLORGROUP_MARGIN_LEFT = 40; + private static final int COLORGROUP_MARGIN_LEFT = 20; private static final int OFF_HEIGHT = 6; private static final int COLOR_REC_HEIGHT = 40; private static final int COLOR_REC_WIDTH = 30; protected static final int TEXTFIELD_HEIGHT = 20; - protected static final int TEXTFIELD_WIDTH = 120; + protected static final int TEXTFIELD_WIDTH = 140; protected static final int UPCONTROLPANE_WIDTH = 230; private static final int LAYOUR_DET = 6; private static final double VALUE = 100; @@ -115,7 +115,8 @@ public class UIColorPickerPane extends BasicPane implements UIObserver { protected JPanel getUpControlPane (Component[][] components) { double p = TableLayout.PREFERRED; double f = TableLayout.FILL; - double[] columnSize = {p, f}; + double e = TableLayout4VanChartHelper.EDIT_AREA_WIDTH; + double[] columnSize = {f, e}; return TableLayoutHelper.createTableLayoutPane(components, getRowSIze (), columnSize); } diff --git a/designer_chart/src/com/fr/plugin/chart/bubble/VanChartBubbleInteractivePane.java b/designer_chart/src/com/fr/plugin/chart/bubble/VanChartBubbleInteractivePane.java index 62bcb60601..4e4c9edab8 100644 --- a/designer_chart/src/com/fr/plugin/chart/bubble/VanChartBubbleInteractivePane.java +++ b/designer_chart/src/com/fr/plugin/chart/bubble/VanChartBubbleInteractivePane.java @@ -1,10 +1,14 @@ package com.fr.plugin.chart.bubble; import com.fr.chart.chartattr.Plot; +import com.fr.design.gui.ibutton.UIButtonGroup; import com.fr.general.Inter; import com.fr.plugin.chart.base.VanChartConstants; +import com.fr.plugin.chart.designer.TableLayout4VanChartHelper; import com.fr.plugin.chart.designer.other.VanChartInteractivePaneWithOutSort; +import javax.swing.*; + /** * Created by Mitisky on 16/3/31. */ @@ -24,4 +28,12 @@ public class VanChartBubbleInteractivePane extends VanChartInteractivePaneWithOu } return super.getValueArray(); } + + @Override + protected JPanel getzoomTypePane(UIButtonGroup zoomType) { + if (((VanChartBubblePlot)chart.getPlot()).isForceBubble()) { + return TableLayout4VanChartHelper.createGapTableLayoutPane(Inter.getLocText("Plugin-ChartF_ZoomType"), zoomType); + } + return super.getzoomTypePane(zoomType); + } } diff --git a/designer_chart/src/com/fr/plugin/chart/bubble/component/VanChartBubblePane.java b/designer_chart/src/com/fr/plugin/chart/bubble/component/VanChartBubblePane.java index c4e8deba50..8d6d50d29b 100644 --- a/designer_chart/src/com/fr/plugin/chart/bubble/component/VanChartBubblePane.java +++ b/designer_chart/src/com/fr/plugin/chart/bubble/component/VanChartBubblePane.java @@ -30,12 +30,23 @@ public class VanChartBubblePane extends BasicBeanPane { displayNegative = new UIButtonGroup(new String[]{Inter.getLocText("Plugin-ChartF_Open"), Inter.getLocText("Plugin-ChartF_Close")}); + + + this.setLayout(new BorderLayout()); + this.add(getContentPane(), BorderLayout.CENTER); + } + + protected JPanel getContentPane () { double p = TableLayout.PREFERRED; double f = TableLayout.FILL; double[] row = {p, p, p, p, p}; double[] col = {p, f}; - Component[][] components = new Component[][]{ + return TableLayoutHelper.createTableLayoutPane(getComponent(), row, col); + } + + protected Component[][] getComponent () { + return new Component[][]{ new Component[]{null, null}, new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_MinDiameter")), minDiameter}, new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_MaxDiameter")), maxDiameter}, @@ -43,10 +54,6 @@ public class VanChartBubblePane extends BasicBeanPane { new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_DisplayNegative")), displayNegative}, }; - JPanel content = TableLayoutHelper.createTableLayoutPane(components, row, col); - - this.setLayout(new BorderLayout()); - this.add(content, BorderLayout.CENTER); } public void populateBean(VanChartAttrBubble bubble) { diff --git a/designer_chart/src/com/fr/plugin/chart/bubble/data/VanChartBubblePlotTableDataContentPane.java b/designer_chart/src/com/fr/plugin/chart/bubble/data/VanChartBubblePlotTableDataContentPane.java index aa1a771d2f..3c055caae3 100644 --- a/designer_chart/src/com/fr/plugin/chart/bubble/data/VanChartBubblePlotTableDataContentPane.java +++ b/designer_chart/src/com/fr/plugin/chart/bubble/data/VanChartBubblePlotTableDataContentPane.java @@ -60,9 +60,9 @@ public class VanChartBubblePlotTableDataContentPane extends AbstractTableDataCon }; JPanel north = TableLayout4VanChartHelper.createGapTableLayoutPane(components_north,rowSize_north,columnSize_north); - north.setBorder(BorderFactory.createEmptyBorder(10, 24, 10, 15)); + north.setBorder(BorderFactory.createEmptyBorder(6, 24, 10, 15)); JPanel filterPane = TableLayout4VanChartHelper.createExpandablePaneWithTitle(Inter.getLocText("FR-Chart-Data_Filter"),dataScreeningPane); - dataScreeningPane.setBorder(BorderFactory.createEmptyBorder(10,5,0,5)); + dataScreeningPane.setBorder(BorderFactory.createEmptyBorder(0,5,0,5)); filterPane.setBorder(BorderFactory.createEmptyBorder(0,5,0,5)); diff --git a/designer_chart/src/com/fr/plugin/chart/designer/AbstractVanChartScrollPane.java b/designer_chart/src/com/fr/plugin/chart/designer/AbstractVanChartScrollPane.java index e3358a84aa..6ddb55372f 100644 --- a/designer_chart/src/com/fr/plugin/chart/designer/AbstractVanChartScrollPane.java +++ b/designer_chart/src/com/fr/plugin/chart/designer/AbstractVanChartScrollPane.java @@ -27,7 +27,7 @@ public abstract class AbstractVanChartScrollPane extends BasicScrollPane { } else { leftcontentPane.setBounds(0, 0, width, height); - leftcontentPane.setBorder(BorderFactory.createMatteBorder(0, 5, 0, 10, original)); + leftcontentPane.setBorder(BorderFactory.createMatteBorder(0, 4, 0, 10, original)); } } public void reloaPane(JPanel pane){ diff --git a/designer_chart/src/com/fr/plugin/chart/designer/TableLayout4VanChartHelper.java b/designer_chart/src/com/fr/plugin/chart/designer/TableLayout4VanChartHelper.java index 18a1c94893..d78af94e88 100644 --- a/designer_chart/src/com/fr/plugin/chart/designer/TableLayout4VanChartHelper.java +++ b/designer_chart/src/com/fr/plugin/chart/designer/TableLayout4VanChartHelper.java @@ -7,6 +7,7 @@ import com.fr.design.layout.TableLayout; import com.fr.design.layout.TableLayoutHelper; import javax.swing.*; +import javax.swing.border.Border; import java.awt.*; /** @@ -21,6 +22,7 @@ public class TableLayout4VanChartHelper { public static final double EDIT_AREA_WIDTH =155; public static final double SECOND_EDIT_AREA_WIDTH =143; public static final int COMPONENT_INTERVAL =12; + public static final Border SECOND_EDIT_AREA_Border = BorderFactory.createEmptyBorder(0,12,0,0); diff --git a/designer_chart/src/com/fr/plugin/chart/designer/component/VanChartMarkerPane.java b/designer_chart/src/com/fr/plugin/chart/designer/component/VanChartMarkerPane.java index 278e76f7af..a6d0abf1a1 100644 --- a/designer_chart/src/com/fr/plugin/chart/designer/component/VanChartMarkerPane.java +++ b/designer_chart/src/com/fr/plugin/chart/designer/component/VanChartMarkerPane.java @@ -74,7 +74,13 @@ public class VanChartMarkerPane extends BasicPane { } protected BasicBeanPane createCommonMarkerPane() { - return new VanChartCommonMarkerPane(); + return new VanChartCommonMarkerPane(){ + protected double[] getcolumnSize () { + double s = TableLayout4VanChartHelper.SECOND_EDIT_AREA_WIDTH; + double d = TableLayout4VanChartHelper.DESCRIPTION_AREA_WIDTH; + return new double[] {d, s}; + } + }; } protected void layoutComponents() { diff --git a/designer_chart/src/com/fr/plugin/chart/designer/component/VanChartUIListControlPane.java b/designer_chart/src/com/fr/plugin/chart/designer/component/VanChartUIListControlPane.java index 5da2a04611..af9e13b35c 100644 --- a/designer_chart/src/com/fr/plugin/chart/designer/component/VanChartUIListControlPane.java +++ b/designer_chart/src/com/fr/plugin/chart/designer/component/VanChartUIListControlPane.java @@ -4,10 +4,15 @@ import com.fr.base.chart.BasePlot; import com.fr.chart.chartattr.Plot; import com.fr.design.gui.controlpane.UIListControlPane; import com.fr.design.gui.ibutton.UIButton; +import com.fr.design.gui.ilable.UILabel; +import com.fr.design.gui.itoolbar.UIToolbar; import com.fr.design.layout.FRGUIPaneFactory; +import com.fr.design.layout.TableLayout; +import com.fr.design.layout.TableLayoutHelper; import com.fr.design.mainframe.DesignerContext; import com.fr.design.utils.gui.GUICoreUtils; import com.fr.general.Inter; +import com.fr.plugin.chart.designer.TableLayout4VanChartHelper; import com.fr.stable.Nameable; import javax.swing.*; @@ -23,10 +28,25 @@ public abstract class VanChartUIListControlPane extends UIListControlPane { public VanChartUIListControlPane() { super(); + this.setBorder(null); } public VanChartUIListControlPane(BasePlot plot) { super(plot); + this.setBorder(null); + } + + @Override + protected JPanel getLeftTopPane (UIToolbar topToolBar) { + double p = TableLayout.PREFERRED; + double f = TableLayout.FILL; + double e = TableLayout4VanChartHelper.EDIT_AREA_WIDTH; + double[] columnSize = {f, e}; + double[] rowSize = {p}; + Component[][] components = new Component[][]{ + new Component[]{new UILabel(getAddItemText()), topToolBar}, + }; + return TableLayoutHelper.createTableLayoutPane(components,rowSize,columnSize); } @Override diff --git a/designer_chart/src/com/fr/plugin/chart/designer/component/format/FormatPaneWithOutFont.java b/designer_chart/src/com/fr/plugin/chart/designer/component/format/FormatPaneWithOutFont.java index 228c22ae8f..0980a38075 100644 --- a/designer_chart/src/com/fr/plugin/chart/designer/component/format/FormatPaneWithOutFont.java +++ b/designer_chart/src/com/fr/plugin/chart/designer/component/format/FormatPaneWithOutFont.java @@ -15,6 +15,7 @@ import java.awt.*; */ public class FormatPaneWithOutFont extends FormatPane { private static final int HEIGHT = 30; + private static final int FONT_HEIGHT = 20; protected JPanel createContentPane(Component[][] components) { double f = TableLayout.FILL; @@ -39,6 +40,6 @@ public class FormatPaneWithOutFont extends FormatPane { if (getTypeComboBox().getSelectedIndex() == 0) { return new Dimension((int)getTypeComboBox().getPreferredSize().getWidth(), HEIGHT); } - return super.getPreferredSize(); + return new Dimension((int)super.getPreferredSize().getWidth(), (int)super.getPreferredSize().getHeight()-FONT_HEIGHT); } } diff --git a/designer_chart/src/com/fr/plugin/chart/designer/component/marker/VanChartCommonMarkerPane.java b/designer_chart/src/com/fr/plugin/chart/designer/component/marker/VanChartCommonMarkerPane.java index a8f3567117..226a6fb8e3 100644 --- a/designer_chart/src/com/fr/plugin/chart/designer/component/marker/VanChartCommonMarkerPane.java +++ b/designer_chart/src/com/fr/plugin/chart/designer/component/marker/VanChartCommonMarkerPane.java @@ -110,15 +110,20 @@ public class VanChartCommonMarkerPane extends BasicBeanPane double e = TableLayout4VanChartHelper.EDIT_AREA_WIDTH; double d = TableLayout4VanChartHelper.DESCRIPTION_AREA_WIDTH; double[] row = {p, p, p}; - double[] col = {d, e}; Component[][] components = getUseComponent(); - JPanel jPanel = TableLayout4VanChartHelper.createGapTableLayoutPane(components, row, col); + JPanel jPanel = TableLayout4VanChartHelper.createGapTableLayoutPane(components, row, getcolumnSize()); this.add(jPanel); } + protected double[] getcolumnSize () { + double e = TableLayout4VanChartHelper.EDIT_AREA_WIDTH; + double d = TableLayout4VanChartHelper.DESCRIPTION_AREA_WIDTH; + return new double[] {d, e}; + } + protected Marker[] getMarkers() { return getNormalMarkers(); } diff --git a/designer_chart/src/com/fr/plugin/chart/designer/other/VanChartConditionListControlPane.java b/designer_chart/src/com/fr/plugin/chart/designer/other/VanChartConditionListControlPane.java index b2945c4111..d61198552c 100644 --- a/designer_chart/src/com/fr/plugin/chart/designer/other/VanChartConditionListControlPane.java +++ b/designer_chart/src/com/fr/plugin/chart/designer/other/VanChartConditionListControlPane.java @@ -29,6 +29,7 @@ public class VanChartConditionListControlPane extends VanChartUIListControlPane public void populate(Nameable[] nameableArray, Class showPane) { initComponentPane(); + this.setBorder(null); NameObjectCreator[] creators = new NameObjectCreator[]{new NameObjectCreator(Inter.getLocText("Condition_Attributes"), ConditionAttr.class, showPane)}; refreshNameableCreator(creators); super.populate(nameableArray); diff --git a/designer_chart/src/com/fr/plugin/chart/designer/other/VanChartInteractivePane.java b/designer_chart/src/com/fr/plugin/chart/designer/other/VanChartInteractivePane.java index 41cd7aa025..9c5b07d511 100644 --- a/designer_chart/src/com/fr/plugin/chart/designer/other/VanChartInteractivePane.java +++ b/designer_chart/src/com/fr/plugin/chart/designer/other/VanChartInteractivePane.java @@ -95,7 +95,7 @@ public class VanChartInteractivePane extends AbstractVanChartScrollPane { Component[][] components = new Component[][]{ - new Component[]{createToolBarPane(new double[]{p,p,p,p,p}, columnSize),null}, + new Component[]{createToolBarPane(getToolBarRowSize(), columnSize),null}, new Component[]{createAnimationPane(),null}, new Component[]{createAxisRotationPane(new double[]{p,p}, columnSize, plot),null}, new Component[]{createZoomPane(new double[]{p,p,p}, columnSize, plot),null}, @@ -195,6 +195,11 @@ public class VanChartInteractivePane extends AbstractVanChartScrollPane { return TableLayout4VanChartHelper.createExpandablePaneWithTitle(Inter.getLocText("Plugin-ChartF_ToolBar"), panel); } + protected double[] getToolBarRowSize () { + double p = TableLayout.PREFERRED; + return new double[]{p,p,p,p,p}; + } + protected Component[][] createToolBarComponents() { return new Component[][]{ new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Content")),isSort}, diff --git a/designer_chart/src/com/fr/plugin/chart/designer/other/VanChartInteractivePaneWithOutSort.java b/designer_chart/src/com/fr/plugin/chart/designer/other/VanChartInteractivePaneWithOutSort.java index 777a4477f3..6b4c57a863 100644 --- a/designer_chart/src/com/fr/plugin/chart/designer/other/VanChartInteractivePaneWithOutSort.java +++ b/designer_chart/src/com/fr/plugin/chart/designer/other/VanChartInteractivePaneWithOutSort.java @@ -1,5 +1,7 @@ package com.fr.plugin.chart.designer.other; +import com.fr.design.layout.TableLayout; + import java.awt.*; /** @@ -7,8 +9,15 @@ import java.awt.*; * 没有排序选择 */ public class VanChartInteractivePaneWithOutSort extends VanChartInteractivePane { + @Override protected Component[][] createToolBarComponents() { return super.createToolBarComponentsWithOutSort(); } + + @Override + protected double[] getToolBarRowSize() { + double p = TableLayout.PREFERRED; + return new double[]{p, p, p}; + } } diff --git a/designer_chart/src/com/fr/plugin/chart/designer/style/axis/VanChartBaseAxisPane.java b/designer_chart/src/com/fr/plugin/chart/designer/style/axis/VanChartBaseAxisPane.java index dedeafd87c..2123588c72 100644 --- a/designer_chart/src/com/fr/plugin/chart/designer/style/axis/VanChartBaseAxisPane.java +++ b/designer_chart/src/com/fr/plugin/chart/designer/style/axis/VanChartBaseAxisPane.java @@ -97,11 +97,13 @@ public class VanChartBaseAxisPane extends FurtherBasicBeanPane { double p = TableLayout.PREFERRED; double f = TableLayout.FILL; double e = TableLayout4VanChartHelper.EDIT_AREA_WIDTH; + double s = TableLayout4VanChartHelper.SECOND_EDIT_AREA_WIDTH; double[] columnSize = {f, e}; + double[] column = {f, s}; double[] rowSize = {p, p, p, p, p, p, p,p}; Component[][] components = new Component[][]{ new Component[]{createTitlePane(new double[]{p, p, p, p, p, p}, columnSize, isXAxis), null}, - new Component[]{createLabelPane(new double[]{p, p}, columnSize), null}, + new Component[]{createLabelPane(new double[]{p, p}, column), null}, new Component[]{createLineStylePane(new double[]{p, p, p, p, p}, columnSize), null}, new Component[]{createAxisPositionPane(new double[]{p, p, p}, columnSize, isXAxis), null}, new Component[]{createDisplayStrategy(new double[]{p, p, p}, columnSize), null}, @@ -155,7 +157,7 @@ public class VanChartBaseAxisPane extends FurtherBasicBeanPane { protected JPanel createLabelPane(double[] row, double[] col){ showLabel = new UIButtonGroup(new String[]{Inter.getLocText("Chart-Use_Show"), Inter.getLocText("Plugin-ChartF_Hidden")}); - labelTextAttrPane = new ChartTextAttrPane(); + labelTextAttrPane = getChartTextAttrPane(); labelTextRotation = new UINumberDragPane(-ROTATION_MAX,ROTATION_MAX); labelGapStyle = new UIButtonGroup(new String[]{Inter.getLocText("Plugin-ChartF_Automatic"),Inter.getLocText("Plugin-ChartF_Fixed")}); @@ -164,8 +166,8 @@ public class VanChartBaseAxisPane extends FurtherBasicBeanPane { new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_TextRotation")), labelTextRotation}, new Component[]{new UILabel(Inter.getLocText("ChartF-Label_Interval")), labelGapStyle}, }; - JPanel panel = TableLayoutHelper.createTableLayoutPane(gapComponents, row, col); - labelGapValuePane= TableLayout4VanChartHelper.createGapTableLayoutPane(Inter.getLocText(" "),labelGapValue); + JPanel panel = TableLayout4VanChartHelper.createGapTableLayoutPane(gapComponents, row, col); + labelGapValuePane= TableLayout4VanChartHelper.createGapTableLayoutPane(Inter.getLocText(""),labelGapValue, TableLayout4VanChartHelper.SECOND_EDIT_AREA_WIDTH); JPanel gapPanel = new JPanel(new BorderLayout()); gapPanel.add(panel, BorderLayout.CENTER); gapPanel.add(labelGapValuePane, BorderLayout.SOUTH); @@ -196,6 +198,22 @@ public class VanChartBaseAxisPane extends FurtherBasicBeanPane { return TableLayout4VanChartHelper.createExpandablePaneWithTitle(PaneTitleConstants.CHART_STYLE_LABEL_TITLE, jPanel); } + protected ChartTextAttrPane getChartTextAttrPane(){ + return new ChartTextAttrPane(){ + + @Override + protected JPanel getContentPane (JPanel buttonPane) { + double p = TableLayout.PREFERRED; + double f = TableLayout.FILL; + double e = TableLayout4VanChartHelper.SECOND_EDIT_AREA_WIDTH; + double[] columnSize = {f, e}; + double[] rowSize = {p, p, p}; + + return TableLayout4VanChartHelper.createGapTableLayoutPane(getComponents(buttonPane), rowSize, columnSize); + } + }; + } + protected JPanel createLineStylePane(double[] row, double[] col){ axisLineStyle = createLineComboBox(); axisLineColor = new ColorSelectBox(100); diff --git a/designer_chart/src/com/fr/plugin/chart/designer/style/axis/VanChartTimeAxisPane.java b/designer_chart/src/com/fr/plugin/chart/designer/style/axis/VanChartTimeAxisPane.java index ed85071a6d..65b71bedcc 100644 --- a/designer_chart/src/com/fr/plugin/chart/designer/style/axis/VanChartTimeAxisPane.java +++ b/designer_chart/src/com/fr/plugin/chart/designer/style/axis/VanChartTimeAxisPane.java @@ -59,11 +59,13 @@ public class VanChartTimeAxisPane extends VanChartBaseAxisPane { double p = TableLayout.PREFERRED; double f = TableLayout.FILL; double e = TableLayout4VanChartHelper.EDIT_AREA_WIDTH; + double s = TableLayout4VanChartHelper.SECOND_EDIT_AREA_WIDTH; double[] columnSize = {f, e}; + double[] column = {f, s}; double[] rowSize = {p,p,p,p,p,p,p,p,p,p,p,p,p,p}; Component[][] components = new Component[][]{ new Component[]{createTitlePane(new double[]{p, p, p, p, p,p}, columnSize, isXAxis),null}, - new Component[]{createLabelPane(new double[]{p, p}, columnSize),null}, + new Component[]{createLabelPane(new double[]{p, p}, column),null}, new Component[]{createValueDefinition(),null}, new Component[]{createLineStylePane(new double[]{p, p,p,p,p}, columnSize),null}, new Component[]{createAxisPositionPane(new double[]{p, p}, columnSize, isXAxis),null}, diff --git a/designer_chart/src/com/fr/plugin/chart/designer/style/axis/VanChartValueAxisPane.java b/designer_chart/src/com/fr/plugin/chart/designer/style/axis/VanChartValueAxisPane.java index 6eb199983d..3749f77ac2 100644 --- a/designer_chart/src/com/fr/plugin/chart/designer/style/axis/VanChartValueAxisPane.java +++ b/designer_chart/src/com/fr/plugin/chart/designer/style/axis/VanChartValueAxisPane.java @@ -42,11 +42,13 @@ public class VanChartValueAxisPane extends VanChartBaseAxisPane { double p = TableLayout.PREFERRED; double f = TableLayout.FILL; double e = TableLayout4VanChartHelper.EDIT_AREA_WIDTH; + double s = TableLayout4VanChartHelper.SECOND_EDIT_AREA_WIDTH; double[] columnSize = {f, e}; + double[] column = {f, s}; double[] rowSize = {p,p,p,p,p,p,p,p,p,p,p,p,p,p}; Component[][] components = new Component[][]{ new Component[]{createTitlePane(new double[]{p, p, p, p, p, p}, columnSize, isXAxis), null}, - new Component[]{createLabelPane(new double[]{p, p}, columnSize), null}, + new Component[]{createLabelPane(new double[]{p, p}, column), null}, new Component[]{createMinMaxValuePane(new double[]{p, p}, columnSize), null}, new Component[]{createLineStylePane(new double[]{p, p, p, p, p}, columnSize), null}, new Component[]{createAxisPositionPane(new double[]{p, p, p}, columnSize, isXAxis), null}, diff --git a/designer_chart/src/com/fr/plugin/chart/designer/style/axis/gauge/VanChartGaugeDetailAxisPane.java b/designer_chart/src/com/fr/plugin/chart/designer/style/axis/gauge/VanChartGaugeDetailAxisPane.java index d4ef127d41..48eb4c73d3 100644 --- a/designer_chart/src/com/fr/plugin/chart/designer/style/axis/gauge/VanChartGaugeDetailAxisPane.java +++ b/designer_chart/src/com/fr/plugin/chart/designer/style/axis/gauge/VanChartGaugeDetailAxisPane.java @@ -5,7 +5,6 @@ import com.fr.design.gui.ilable.UILabel; import com.fr.design.layout.TableLayout; import com.fr.design.layout.TableLayoutHelper; import com.fr.design.mainframe.chart.PaneTitleConstants; -import com.fr.design.mainframe.chart.gui.style.ChartTextAttrPane; import com.fr.design.style.color.ColorSelectBox; import com.fr.general.Inter; import com.fr.plugin.chart.attr.axis.VanChartAxis; @@ -77,7 +76,7 @@ public class VanChartGaugeDetailAxisPane extends VanChartValueAxisPane{ protected JPanel createLabelPane(double[] row, double[] col){ showLabel = new UIButtonGroup(new String[]{Inter.getLocText("Chart-Use_Show"), Inter.getLocText("Plugin-ChartF_Hidden")}); - labelTextAttrPane = new ChartTextAttrPane(); + labelTextAttrPane = getChartTextAttrPane(); labelPanel = new JPanel(new BorderLayout()); labelPanel.add(labelTextAttrPane); labelPanel.setBorder(BorderFactory.createEmptyBorder(0,15,0,0)); diff --git a/designer_chart/src/com/fr/plugin/chart/designer/style/axis/radar/VanChartRadarXAxisPane.java b/designer_chart/src/com/fr/plugin/chart/designer/style/axis/radar/VanChartRadarXAxisPane.java index eae979c829..cb7c47d770 100644 --- a/designer_chart/src/com/fr/plugin/chart/designer/style/axis/radar/VanChartRadarXAxisPane.java +++ b/designer_chart/src/com/fr/plugin/chart/designer/style/axis/radar/VanChartRadarXAxisPane.java @@ -24,10 +24,12 @@ public class VanChartRadarXAxisPane extends VanChartBaseAxisPane { double p = TableLayout.PREFERRED; double f = TableLayout.FILL; double e = TableLayout4VanChartHelper.EDIT_AREA_WIDTH; + double s = TableLayout4VanChartHelper.SECOND_EDIT_AREA_WIDTH; double[] columnSize = {f, e}; + double[] column = {f, s}; double[] rowSize = {p,p,p,p,p,p}; Component[][] components = new Component[][]{ - new Component[]{createLabelPane(new double[]{p, p}, columnSize),null}, + new Component[]{createLabelPane(new double[]{p, p}, column),null}, new Component[]{createLineStylePane(new double[]{p, p, p, p}, columnSize),null}, new Component[]{createValueStylePane(),null}, }; diff --git a/designer_chart/src/com/fr/plugin/chart/designer/style/axis/radar/VanChartRadarYAxisPane.java b/designer_chart/src/com/fr/plugin/chart/designer/style/axis/radar/VanChartRadarYAxisPane.java index 054b05f7b1..3da22d6c36 100644 --- a/designer_chart/src/com/fr/plugin/chart/designer/style/axis/radar/VanChartRadarYAxisPane.java +++ b/designer_chart/src/com/fr/plugin/chart/designer/style/axis/radar/VanChartRadarYAxisPane.java @@ -33,10 +33,12 @@ public class VanChartRadarYAxisPane extends VanChartValueAxisPane { double p = TableLayout.PREFERRED; double f = TableLayout.FILL; double e = TableLayout4VanChartHelper.EDIT_AREA_WIDTH; + double s = TableLayout4VanChartHelper.SECOND_EDIT_AREA_WIDTH; double[] columnSize = {f, e}; + double[] column = {f, s}; double[] rowSize = {p, p, p, p, p, p, p, p}; Component[][] components = new Component[][]{ - new Component[]{createLabelPane(new double[]{p, p}, columnSize), null}, + new Component[]{createLabelPane(new double[]{p, p}, column), null}, new Component[]{createMinMaxValuePane(new double[]{p, p, p}, columnSize), null}, new Component[]{createLineStylePane(new double[]{p, p, p, p}, columnSize), null}, new Component[]{createValueStylePane(), null}, diff --git a/designer_chart/src/com/fr/plugin/chart/designer/style/background/BackgroundListControlPane.java b/designer_chart/src/com/fr/plugin/chart/designer/style/background/BackgroundListControlPane.java index de8a35d53f..e514812499 100644 --- a/designer_chart/src/com/fr/plugin/chart/designer/style/background/BackgroundListControlPane.java +++ b/designer_chart/src/com/fr/plugin/chart/designer/style/background/BackgroundListControlPane.java @@ -36,7 +36,7 @@ public class BackgroundListControlPane extends VanChartUIListControlPane { @Override public String getAddItemText() { - return Inter.getLocText("Plugin-ChartF_CustomIntervalBackground"); + return Inter.getLocText("Plugin-ChartF_Add_Interval"); } protected ShortCut4JControlPane[] createShortcuts() { diff --git a/designer_chart/src/com/fr/plugin/chart/designer/style/background/VanChartAreaPane.java b/designer_chart/src/com/fr/plugin/chart/designer/style/background/VanChartAreaPane.java index 3388596ff1..b30d1eb646 100644 --- a/designer_chart/src/com/fr/plugin/chart/designer/style/background/VanChartAreaPane.java +++ b/designer_chart/src/com/fr/plugin/chart/designer/style/background/VanChartAreaPane.java @@ -36,6 +36,7 @@ public class VanChartAreaPane extends ThirdTabPane implements AutoSele JPanel pane = new JPanel(new FlowLayout(FlowLayout.LEADING, 0, 0)); if (nameArray.length > 1) { pane.add(tabPane); + tabPane.setBorder(BorderFactory.createEmptyBorder(0,5,0,0)); this.add(pane, BorderLayout.NORTH); } } diff --git a/designer_chart/src/com/fr/plugin/chart/designer/style/background/VanChartAxisAreaPane.java b/designer_chart/src/com/fr/plugin/chart/designer/style/background/VanChartAxisAreaPane.java index 87e6062e97..1ac56791b9 100644 --- a/designer_chart/src/com/fr/plugin/chart/designer/style/background/VanChartAxisAreaPane.java +++ b/designer_chart/src/com/fr/plugin/chart/designer/style/background/VanChartAxisAreaPane.java @@ -44,13 +44,14 @@ public class VanChartAxisAreaPane extends BasicBeanPane { double p = TableLayout.PREFERRED; double f = TableLayout.FILL; double e = TableLayout4VanChartHelper.EDIT_AREA_WIDTH; + double s = TableLayout4VanChartHelper.SECOND_EDIT_AREA_WIDTH; double[] columnSize = {f}; double[] rowSize = {p, p, p}; Component[][] components = new Component[][]{ new Component[]{createGridLinePane(new double[]{p, p, p}, new double[]{f, e})}, new Component[]{createAlertLinePane()}, - new Component[]{createIntervalPane(new double[]{p, p, p, p}, new double[]{f, e})}, + new Component[]{createIntervalPane(new double[]{p, p, p, p}, new double[]{f, s})}, }; JPanel panel = TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize); this.setLayout(new BorderLayout()); @@ -86,6 +87,7 @@ public class VanChartAxisAreaPane extends BasicBeanPane { verticalColorBackground = new ColorSelectBox(100); Component[][] components = getIntervalPaneComponents(); JPanel defaultPane = TableLayoutHelper.createTableLayoutPane(components, row, col); + defaultPane.setBorder(BorderFactory.createEmptyBorder(0,12,0,0)); customIntervalBackground = new BackgroundListControlPane(); cardLayout = new CardLayout(); diff --git a/designer_chart/src/com/fr/plugin/chart/designer/style/label/VanChartGaugeCateOrPercentLabelDetailPane.java b/designer_chart/src/com/fr/plugin/chart/designer/style/label/VanChartGaugeCateOrPercentLabelDetailPane.java index ee586c91f0..21d6521b9f 100644 --- a/designer_chart/src/com/fr/plugin/chart/designer/style/label/VanChartGaugeCateOrPercentLabelDetailPane.java +++ b/designer_chart/src/com/fr/plugin/chart/designer/style/label/VanChartGaugeCateOrPercentLabelDetailPane.java @@ -1,6 +1,10 @@ package com.fr.plugin.chart.designer.style.label; import com.fr.chart.chartattr.Plot; +import com.fr.design.gui.ilable.UILabel; +import com.fr.design.layout.TableLayout; +import com.fr.design.mainframe.chart.gui.style.ChartTextAttrPane; +import com.fr.general.Inter; import com.fr.plugin.chart.designer.TableLayout4VanChartHelper; import com.fr.plugin.chart.designer.component.label.LabelContentPaneWithCate; import com.fr.plugin.chart.designer.component.label.LabelContentPaneWithPercent; @@ -15,6 +19,7 @@ import java.awt.*; * 仪表盘的分类(多指针时)或者百分比标签 */ public class VanChartGaugeCateOrPercentLabelDetailPane extends VanChartGaugeLabelDetailPane { + //todo 重新整理这个面板 private static final long serialVersionUID = 5176535960949074945L; @@ -24,6 +29,10 @@ public class VanChartGaugeCateOrPercentLabelDetailPane extends VanChartGaugeLabe super(plot, parent); } + protected double[] getLabelPaneRowSize(Plot plot, double p) { + return hasLabelPosition(plot) ? new double[]{p,p,p} : new double[]{p,p}; + } + private void initGaugeStyle(Plot plot) { if(gaugeStyle == null){ gaugeStyle = ((VanChartGaugePlot)plot).getGaugeStyle(); @@ -45,6 +54,8 @@ public class VanChartGaugeCateOrPercentLabelDetailPane extends VanChartGaugeLabe } } + + protected boolean hasLabelPosition(Plot plot) { initGaugeStyle(plot); switch (gaugeStyle){ @@ -57,21 +68,68 @@ public class VanChartGaugeCateOrPercentLabelDetailPane extends VanChartGaugeLabe } } + protected double[] getLabelStyleRowSize(double p) { + switch (gaugeStyle){ + case RING: + return new double[] {p, p}; + case SLOT: + return new double[] {p, p}; + default: + return new double[] {p}; + } + } + protected JPanel createTableLayoutPaneWithTitle(String title, Component component) { return TableLayout4VanChartHelper.createTableLayoutPaneWithSmallTitle(title, component); } + protected Component[][] getLabelStyleComponents(Plot plot) { initGaugeStyle(plot); - switch (gaugeStyle){ - case RING: - return super.getLabelStyleComponents(plot); - case SLOT: - return super.getLabelStyleComponents(plot); - default: - return new Component[][]{ - new Component[]{textFontPane,null}, - }; + if (gaugeStyle == GaugeStyle.RING || gaugeStyle == GaugeStyle.SLOT) { + UILabel text = new UILabel(Inter.getLocText("Plugin-Chart_Character"), SwingConstants.LEFT); + return new Component[][]{ + new Component[]{text,style}, + new Component[]{textFontPane,null}, + }; + } else { + return new Component[][]{ + new Component[]{textFontPane, null}, + }; + } + } + + protected ChartTextAttrPane initTextFontPane () { + //todo 需要再整理下 + if (gaugeStyle == GaugeStyle.RING || gaugeStyle == GaugeStyle.SLOT){ + return new ChartTextAttrPane(){ + protected double[] getRowSize () { + double p = TableLayout.PREFERRED; + return new double[]{p, p}; + } + + protected Component[][] getComponents(JPanel buttonPane) { + return new Component[][]{ + new Component[]{null, fontNameComboBox}, + new Component[]{null, buttonPane} + }; + } + }; + } else { + return new ChartTextAttrPane(){ + protected double[] getRowSize () { + double p = TableLayout.PREFERRED; + return new double[]{p, p}; + } + + protected Component[][] getComponents(JPanel buttonPane) { + UILabel text = new UILabel(Inter.getLocText("Plugin-Chart_Character"), SwingConstants.LEFT); + return new Component[][]{ + new Component[]{text, fontNameComboBox}, + new Component[]{null, buttonPane} + }; + } + }; } } } \ No newline at end of file diff --git a/designer_chart/src/com/fr/plugin/chart/designer/style/label/VanChartGaugeLabelDetailPane.java b/designer_chart/src/com/fr/plugin/chart/designer/style/label/VanChartGaugeLabelDetailPane.java index c83ad98e5a..2c45558d50 100644 --- a/designer_chart/src/com/fr/plugin/chart/designer/style/label/VanChartGaugeLabelDetailPane.java +++ b/designer_chart/src/com/fr/plugin/chart/designer/style/label/VanChartGaugeLabelDetailPane.java @@ -23,11 +23,16 @@ public class VanChartGaugeLabelDetailPane extends VanChartPlotLabelDetailPane { protected JPanel createLabelStylePane(double[] row, double[] col, Plot plot) { style = new UIButtonGroup(new String[]{Inter.getLocText("Plugin-ChartF_Automatic"), Inter.getLocText("Plugin-ChartF_Custom")}); - textFontPane = new ChartTextAttrPane(); + textFontPane = initTextFontPane(); initStyleListener(); - return TableLayoutHelper.createTableLayoutPane(getLabelStyleComponents(plot),row,col); + return TableLayoutHelper.createTableLayoutPane(getLabelStyleComponents(plot), row, col); + } + + + protected ChartTextAttrPane initTextFontPane () { + return new ChartTextAttrPane(); } protected JPanel getLabelPositionPane (Component[][] comps, double[] row, double[] col){ diff --git a/designer_chart/src/com/fr/plugin/chart/designer/style/label/VanChartGaugeValueLabelDetailPane.java b/designer_chart/src/com/fr/plugin/chart/designer/style/label/VanChartGaugeValueLabelDetailPane.java index 2dcb96dab2..72e3effa9f 100644 --- a/designer_chart/src/com/fr/plugin/chart/designer/style/label/VanChartGaugeValueLabelDetailPane.java +++ b/designer_chart/src/com/fr/plugin/chart/designer/style/label/VanChartGaugeValueLabelDetailPane.java @@ -59,7 +59,7 @@ public class VanChartGaugeValueLabelDetailPane extends VanChartGaugeLabelDetailP private Component[][] getLabelPaneComponentsWithBackground(Plot plot, double p, double[] columnSize) { return new Component[][]{ new Component[]{dataLabelContentPane,null}, - new Component[]{createLabelStylePane(new double[]{p,p,p}, columnSize, plot),null}, + new Component[]{createLabelStylePane(new double[]{p}, columnSize, plot),null}, new Component[]{createBackgroundColorPane(),null}, }; } diff --git a/designer_chart/src/com/fr/plugin/chart/designer/style/label/VanChartPlotLabelDetailPane.java b/designer_chart/src/com/fr/plugin/chart/designer/style/label/VanChartPlotLabelDetailPane.java index ba2f84dbb9..25e1f8c37e 100644 --- a/designer_chart/src/com/fr/plugin/chart/designer/style/label/VanChartPlotLabelDetailPane.java +++ b/designer_chart/src/com/fr/plugin/chart/designer/style/label/VanChartPlotLabelDetailPane.java @@ -76,16 +76,20 @@ public class VanChartPlotLabelDetailPane extends BasicPane { return new Component[][]{ new Component[]{dataLabelContentPane,null}, new Component[]{createLabelPositionPane(new double[]{p,p,p}, columnSize, plot),null}, - new Component[]{createLabelStylePane(new double[]{p,p,p}, columnSize, plot),null}, + new Component[]{createLabelStylePane(getLabelStyleRowSize(p), columnSize, plot),null}, }; } else { return new Component[][]{ new Component[]{dataLabelContentPane,null}, - new Component[]{createLabelStylePane(new double[]{p,p,p}, columnSize, plot),null}, + new Component[]{createLabelStylePane(getLabelStyleRowSize(p), columnSize, plot),null}, }; } } + protected double[] getLabelStyleRowSize(double p) { + return new double[]{p, p, p}; + } + protected double[] getLabelPaneRowSize(Plot plot, double p) { return hasLabelPosition(plot) ? new double[]{p,p,p,p,p} : new double[]{p,p,p}; } @@ -152,7 +156,16 @@ public class VanChartPlotLabelDetailPane extends BasicPane { protected JPanel createLabelStylePane(double[] row, double[] col, Plot plot) { style = new UIButtonGroup(new String[]{Inter.getLocText("Plugin-ChartF_Automatic"), Inter.getLocText("Plugin-ChartF_Custom")}); - textFontPane = new ChartTextAttrPane(){ + textFontPane =initTextFontPane(); + + initStyleListener(); + + JPanel panel = TableLayout4VanChartHelper.createGapTableLayoutPane(getLabelStyleComponents(plot),row,col); + return createTableLayoutPaneWithTitle(Inter.getLocText("FR-Designer-Widget_Style"), panel); + } + + protected ChartTextAttrPane initTextFontPane () { + return new ChartTextAttrPane(){ protected Component[][] getComponents(JPanel buttonPane) { return new Component[][]{ new Component[]{null, null}, @@ -161,11 +174,6 @@ public class VanChartPlotLabelDetailPane extends BasicPane { }; } }; - - initStyleListener(); - - JPanel panel = TableLayoutHelper.createTableLayoutPane(getLabelStyleComponents(plot),row,col); - return createTableLayoutPaneWithTitle(Inter.getLocText("FR-Designer-Widget_Style"), panel); } protected Component[][] getLabelStyleComponents(Plot plot) { diff --git a/designer_chart/src/com/fr/plugin/chart/funnel/designer/style/VanChartFunnelSeriesPane.java b/designer_chart/src/com/fr/plugin/chart/funnel/designer/style/VanChartFunnelSeriesPane.java index 13b93daba1..9c7ba2ec99 100644 --- a/designer_chart/src/com/fr/plugin/chart/funnel/designer/style/VanChartFunnelSeriesPane.java +++ b/designer_chart/src/com/fr/plugin/chart/funnel/designer/style/VanChartFunnelSeriesPane.java @@ -54,7 +54,8 @@ public class VanChartFunnelSeriesPane extends VanChartAbstractPlotSeriesPane { double p = TableLayout.PREFERRED; double f = TableLayout.FILL; - double[] columnSize = {p, f}; + double e = TableLayout4VanChartHelper.EDIT_AREA_WIDTH; + double[] columnSize = {f, e}; double[] rowSize = {p,p,p}; Component[][] components = new Component[][]{ new Component[]{null, null}, diff --git a/designer_chart/src/com/fr/plugin/chart/gantt/designer/data/data/component/ComboBoxWithButtonPane.java b/designer_chart/src/com/fr/plugin/chart/gantt/designer/data/data/component/ComboBoxWithButtonPane.java index 54bb8cb826..fb13a94527 100644 --- a/designer_chart/src/com/fr/plugin/chart/gantt/designer/data/data/component/ComboBoxWithButtonPane.java +++ b/designer_chart/src/com/fr/plugin/chart/gantt/designer/data/data/component/ComboBoxWithButtonPane.java @@ -27,14 +27,14 @@ public abstract class ComboBoxWithButtonPane extends JPanel { public ComboBoxWithButtonPane(int index) { this.index = index; comboBoxName = new UIComboBox(); - comboBoxName.setPreferredSize(new Dimension(100,20)); + comboBoxName.setPreferredSize(new Dimension(80,20)); button = new UIButton(getButtonIcon()); button.setPreferredSize(new Dimension(20, 20)); button.addActionListener(getButtonListener()); UILabel title = new UILabel(getTitleText()); - title.setPreferredSize(new Dimension(60, 20)); + title.setPreferredSize(new Dimension(80, 20)); this.setLayout(new BorderLayout(H_GAP, 0)); this.add(comboBoxName, BorderLayout.CENTER); diff --git a/designer_chart/src/com/fr/plugin/chart/map/VanChartMapSeriesPane.java b/designer_chart/src/com/fr/plugin/chart/map/VanChartMapSeriesPane.java index cb0be77135..f8e95b66de 100644 --- a/designer_chart/src/com/fr/plugin/chart/map/VanChartMapSeriesPane.java +++ b/designer_chart/src/com/fr/plugin/chart/map/VanChartMapSeriesPane.java @@ -252,7 +252,20 @@ public class VanChartMapSeriesPane extends VanChartAbstractPlotSeriesPane { markerTypeCom = new UIComboBox(MARKER_TYPES); commonMarkerPane = new VanChartMapScatterMarkerPane(); - bubblePane = new VanChartBubblePane(); + commonMarkerPane.setBorder(TableLayout4VanChartHelper.SECOND_EDIT_AREA_Border); + bubblePane = new VanChartBubblePane(){ + protected JPanel getContentPane () { + double p = TableLayout.PREFERRED; + double f = TableLayout.FILL; + double e = TableLayout4VanChartHelper.SECOND_EDIT_AREA_WIDTH; + double[] row = {p, p, p, p, p}; + double[] col = {f, e}; + + JPanel panel = TableLayoutHelper.createTableLayoutPane(getComponent(), row, col); + panel.setBorder(TableLayout4VanChartHelper.SECOND_EDIT_AREA_Border); + return panel; + } + }; imageMarkerPane = new VanChartImageMarkerPane(); final JPanel[] panes = new JPanel[]{new JPanel(), commonMarkerPane, bubblePane, imageMarkerPane}; diff --git a/designer_chart/src/com/fr/plugin/chart/map/designer/data/component/report/AreaPane.java b/designer_chart/src/com/fr/plugin/chart/map/designer/data/component/report/AreaPane.java index bb9f68398c..cb3efc9a32 100644 --- a/designer_chart/src/com/fr/plugin/chart/map/designer/data/component/report/AreaPane.java +++ b/designer_chart/src/com/fr/plugin/chart/map/designer/data/component/report/AreaPane.java @@ -28,7 +28,7 @@ public class AreaPane extends AbstractReportDataContentPane { areaName = new TinyFormulaPane(); double p = TableLayout.PREFERRED; double f = TableLayout.FILL; - double[] columnSize = {p, f}; + double[] columnSize = {f, COMPONENT_WIDTH}; double[] rowSize = {p}; Component[][] components = getComponent (); return TableLayoutHelper.createTableLayoutPane(components,rowSize,columnSize); diff --git a/designer_chart/src/com/fr/plugin/chart/map/designer/data/component/report/LongLatAreaPane.java b/designer_chart/src/com/fr/plugin/chart/map/designer/data/component/report/LongLatAreaPane.java index dac5fc3014..40084fec4d 100644 --- a/designer_chart/src/com/fr/plugin/chart/map/designer/data/component/report/LongLatAreaPane.java +++ b/designer_chart/src/com/fr/plugin/chart/map/designer/data/component/report/LongLatAreaPane.java @@ -31,10 +31,10 @@ public class LongLatAreaPane extends AreaPane { latitude = new TinyFormulaPane(); double p = TableLayout.PREFERRED; double f = TableLayout.FILL; - double[] columnSize = {p, f}; + double[] columnSize = {f, COMPONENT_WIDTH}; double[] rowSize = {p, p, p}; Component[][] components = getComponent(); - return TableLayoutHelper.createGapTableLayoutPane(components,rowSize,columnSize,50,6); + return TableLayoutHelper.createGapTableLayoutPane(components,rowSize,columnSize,12,6); } protected Component[][] getComponent () { diff --git a/designer_chart/src/com/fr/plugin/chart/map/designer/data/component/table/AreaPane.java b/designer_chart/src/com/fr/plugin/chart/map/designer/data/component/table/AreaPane.java index 0ef1b35536..eb51aae81f 100644 --- a/designer_chart/src/com/fr/plugin/chart/map/designer/data/component/table/AreaPane.java +++ b/designer_chart/src/com/fr/plugin/chart/map/designer/data/component/table/AreaPane.java @@ -43,10 +43,10 @@ public class AreaPane extends AbstractTableDataContentPane { initAreaNameCom(); double p = TableLayout.PREFERRED; double f = TableLayout.FILL; - double[] columnSize = {p, f}; + double[] columnSize = {f, COMPONENT_WIDTH}; double[] rowSize = {p}; Component[][] components = getComponent(); - return TableLayoutHelper.createGapTableLayoutPane(components,rowSize,columnSize,50,6); + return TableLayoutHelper.createGapTableLayoutPane(components,rowSize,columnSize,12,6); } protected Component[][] getComponent () { diff --git a/designer_chart/src/com/fr/plugin/chart/map/designer/data/component/table/LongLatAreaPane.java b/designer_chart/src/com/fr/plugin/chart/map/designer/data/component/table/LongLatAreaPane.java index 4f07c52874..83a0006488 100644 --- a/designer_chart/src/com/fr/plugin/chart/map/designer/data/component/table/LongLatAreaPane.java +++ b/designer_chart/src/com/fr/plugin/chart/map/designer/data/component/table/LongLatAreaPane.java @@ -33,11 +33,11 @@ public class LongLatAreaPane extends AreaPane { double p = TableLayout.PREFERRED; double f = TableLayout.FILL; - double[] columnSize = {p, f}; + double[] columnSize = {f, COMPONENT_WIDTH}; double[] rowSize = {p, p, p}; Component[][] components = getComponent(); - return TableLayoutHelper.createGapTableLayoutPane(components,rowSize,columnSize,50,6); + return TableLayoutHelper.createGapTableLayoutPane(components,rowSize,columnSize,12,6); } protected Component[][] getComponent () { diff --git a/designer_chart/src/com/fr/plugin/chart/map/designer/style/series/VanChartMapScatterMarkerPane.java b/designer_chart/src/com/fr/plugin/chart/map/designer/style/series/VanChartMapScatterMarkerPane.java index e0a55f2942..334139bbd0 100644 --- a/designer_chart/src/com/fr/plugin/chart/map/designer/style/series/VanChartMapScatterMarkerPane.java +++ b/designer_chart/src/com/fr/plugin/chart/map/designer/style/series/VanChartMapScatterMarkerPane.java @@ -1,7 +1,7 @@ package com.fr.plugin.chart.map.designer.style.series; import com.fr.chart.chartglyph.Marker; -import com.fr.plugin.chart.marker.type.MarkerType; +import com.fr.plugin.chart.designer.TableLayout4VanChartHelper; import com.fr.plugin.chart.designer.component.marker.VanChartCommonMarkerPane; import java.awt.*; @@ -20,4 +20,11 @@ public class VanChartMapScatterMarkerPane extends VanChartCommonMarkerPane { protected Marker[] getMarkers() { return getMapScatterMarkers(); } + + @Override + protected double[] getcolumnSize () { + double s = TableLayout4VanChartHelper.SECOND_EDIT_AREA_WIDTH; + double d = TableLayout4VanChartHelper.DESCRIPTION_AREA_WIDTH; + return new double[] {d, s}; + } } diff --git a/designer_chart/src/com/fr/plugin/chart/map/designer/type/VanChartMapSourceChoosePane.java b/designer_chart/src/com/fr/plugin/chart/map/designer/type/VanChartMapSourceChoosePane.java index 3314b180ad..77bc8020e9 100644 --- a/designer_chart/src/com/fr/plugin/chart/map/designer/type/VanChartMapSourceChoosePane.java +++ b/designer_chart/src/com/fr/plugin/chart/map/designer/type/VanChartMapSourceChoosePane.java @@ -428,20 +428,25 @@ public class VanChartMapSourceChoosePane extends JPanel implements UIObserver { latitude = new UISpinner(-Double.MAX_VALUE,Double.MAX_VALUE,1,0.0); double p = TableLayout.PREFERRED; + double f = TableLayout.FILL; + double e = TableLayout4VanChartHelper.EDIT_AREA_WIDTH; + double s = TableLayout4VanChartHelper.SECOND_EDIT_AREA_WIDTH; double[] rowSize = {p,p,p}; + double[] columnSize = {f, e}; + double[] column = {f, s}; Component[][] comps = new Component[][]{ new Component[]{null, null}, new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Zoom_Layer")), zoomLevel}, new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_View_Center")), viewCenterCom}, }; - final JPanel northPane = TableLayout4VanChartHelper.createGapTableLayoutPane(comps,rowSize,COLUMN_SIZE); + final JPanel northPane = TableLayout4VanChartHelper.createGapTableLayoutPane(comps,rowSize,columnSize); Component[][] longAndLatComps = new Component[][]{ new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Longitude")), longitude}, new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Latitude")), latitude} }; - longAndLatPane =TableLayout4VanChartHelper.createGapTableLayoutPane(longAndLatComps,rowSize,COLUMN_SIZE); + longAndLatPane =TableLayout4VanChartHelper.createGapTableLayoutPane(longAndLatComps,rowSize,column); longAndLatPane.setBorder(BorderFactory.createEmptyBorder(0,12,0,0)); longAndLatPane.setVisible(false); From e4d72a09aa91d5c64142bd9a57a0a194190b83e1 Mon Sep 17 00:00:00 2001 From: mengao <283296419@qq.com> Date: Wed, 20 Sep 2017 08:53:33 +0800 Subject: [PATCH 020/125] =?UTF-8?q?=E8=B0=83=E6=95=B4=E9=97=B4=E8=B7=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fr/plugin/chart/designer/TableLayout4VanChartHelper.java | 2 +- .../src/com/fr/plugin/chart/map/VanChartMapSeriesPane.java | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/designer_chart/src/com/fr/plugin/chart/designer/TableLayout4VanChartHelper.java b/designer_chart/src/com/fr/plugin/chart/designer/TableLayout4VanChartHelper.java index d78af94e88..1120d92de3 100644 --- a/designer_chart/src/com/fr/plugin/chart/designer/TableLayout4VanChartHelper.java +++ b/designer_chart/src/com/fr/plugin/chart/designer/TableLayout4VanChartHelper.java @@ -22,7 +22,7 @@ public class TableLayout4VanChartHelper { public static final double EDIT_AREA_WIDTH =155; public static final double SECOND_EDIT_AREA_WIDTH =143; public static final int COMPONENT_INTERVAL =12; - public static final Border SECOND_EDIT_AREA_Border = BorderFactory.createEmptyBorder(0,12,0,0); + public static final Border SECOND_EDIT_AREA_BORDER = BorderFactory.createEmptyBorder(0,12,0,0); diff --git a/designer_chart/src/com/fr/plugin/chart/map/VanChartMapSeriesPane.java b/designer_chart/src/com/fr/plugin/chart/map/VanChartMapSeriesPane.java index f8e95b66de..4b5189f6a4 100644 --- a/designer_chart/src/com/fr/plugin/chart/map/VanChartMapSeriesPane.java +++ b/designer_chart/src/com/fr/plugin/chart/map/VanChartMapSeriesPane.java @@ -252,7 +252,7 @@ public class VanChartMapSeriesPane extends VanChartAbstractPlotSeriesPane { markerTypeCom = new UIComboBox(MARKER_TYPES); commonMarkerPane = new VanChartMapScatterMarkerPane(); - commonMarkerPane.setBorder(TableLayout4VanChartHelper.SECOND_EDIT_AREA_Border); + commonMarkerPane.setBorder(TableLayout4VanChartHelper.SECOND_EDIT_AREA_BORDER); bubblePane = new VanChartBubblePane(){ protected JPanel getContentPane () { double p = TableLayout.PREFERRED; @@ -262,7 +262,7 @@ public class VanChartMapSeriesPane extends VanChartAbstractPlotSeriesPane { double[] col = {f, e}; JPanel panel = TableLayoutHelper.createTableLayoutPane(getComponent(), row, col); - panel.setBorder(TableLayout4VanChartHelper.SECOND_EDIT_AREA_Border); + panel.setBorder(TableLayout4VanChartHelper.SECOND_EDIT_AREA_BORDER); return panel; } }; From d96ba516e14a8b3c7e2b561efa9040ced31e468a Mon Sep 17 00:00:00 2001 From: plough Date: Wed, 20 Sep 2017 10:57:34 +0800 Subject: [PATCH 021/125] =?UTF-8?q?REPORT-4672=20=E5=8D=95=E5=85=83?= =?UTF-8?q?=E6=A0=BC=E6=B7=BB=E5=8A=A0=E6=8E=A7=E4=BB=B6=E5=90=8E=E5=88=A0?= =?UTF-8?q?=E9=99=A4=E5=8D=95=E5=85=83=E6=A0=BC=E6=89=80=E5=9C=A8=E8=A1=8C?= =?UTF-8?q?=EF=BC=8C=E5=8F=B3=E4=BE=A7=E5=B1=9E=E6=80=A7=E9=9D=A2=E6=9D=BF?= =?UTF-8?q?=E4=BF=9D=E6=8C=81=E4=B8=8D=E5=8F=98=3D>=E8=8B=A5=E7=9B=B4?= =?UTF-8?q?=E6=8E=A5=E5=88=B7=E6=96=B0=EF=BC=8C=E5=9C=A8=E7=BC=96=E8=BE=91?= =?UTF-8?q?=E5=9B=BE=E8=A1=A8=E5=B1=9E=E6=80=A7=E6=97=B6=EF=BC=8C=E6=AF=8F?= =?UTF-8?q?=E6=AC=A1=E9=83=BD=E4=BC=9A=E8=B7=B3=E5=88=B0=E7=AC=AC=E4=B8=80?= =?UTF-8?q?=E9=A1=B5=E3=80=82=E5=8A=A0=E4=B8=80=E4=B8=AA=E6=A0=87=E8=AE=B0?= =?UTF-8?q?=E5=8C=BA=E5=88=86=E4=B8=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mainframe/ElementCasePaneDelegate.java | 6 +++++- .../form/FormElementCasePaneDelegate.java | 6 +++++- .../com/fr/poly/creator/ECBlockEditor.java | 4 +++- .../actions/TemplateComponentAction.java | 2 ++ .../fr/design/mainframe/DesignerContext.java | 19 ++++++++++++++++++- 5 files changed, 33 insertions(+), 4 deletions(-) diff --git a/designer/src/com/fr/design/mainframe/ElementCasePaneDelegate.java b/designer/src/com/fr/design/mainframe/ElementCasePaneDelegate.java index 3529ebcd03..b358b53024 100644 --- a/designer/src/com/fr/design/mainframe/ElementCasePaneDelegate.java +++ b/designer/src/com/fr/design/mainframe/ElementCasePaneDelegate.java @@ -56,7 +56,11 @@ public class ElementCasePaneDelegate extends ElementCasePane { this.addTargetModifiedListener(new TargetModifiedListener() { @Override public void targetModified(TargetModifiedEvent e) { - refreshPropertyPanes(); + if (DesignerContext.isRefreshOnTargetModifiedEnabled()) { + refreshPropertyPanes(); + } else { + CellElementPropertyPane.getInstance().populate(ElementCasePaneDelegate.this); + } } }); } diff --git a/designer/src/com/fr/design/mainframe/form/FormElementCasePaneDelegate.java b/designer/src/com/fr/design/mainframe/form/FormElementCasePaneDelegate.java index 5ddd8efb51..8da52f9a58 100644 --- a/designer/src/com/fr/design/mainframe/form/FormElementCasePaneDelegate.java +++ b/designer/src/com/fr/design/mainframe/form/FormElementCasePaneDelegate.java @@ -42,7 +42,11 @@ public class FormElementCasePaneDelegate extends ElementCasePane { @Override public void targetModified(TargetModifiedEvent e) { designer.fireTargetModified(); - resetSelectionAndChooseState(); + if (DesignerContext.isRefreshOnTargetModifiedEnabled()) { + resetSelectionAndChooseState(); + } } }); } diff --git a/designer_base/src/com/fr/design/actions/TemplateComponentAction.java b/designer_base/src/com/fr/design/actions/TemplateComponentAction.java index 2194c7a791..9637bad2ed 100644 --- a/designer_base/src/com/fr/design/actions/TemplateComponentAction.java +++ b/designer_base/src/com/fr/design/actions/TemplateComponentAction.java @@ -2,6 +2,7 @@ package com.fr.design.actions; import com.fr.design.designer.TargetComponent; +import com.fr.design.mainframe.DesignerContext; public abstract class TemplateComponentAction extends UndoableAction implements TemplateComponentActionInterface { private T t; @@ -24,6 +25,7 @@ public abstract class TemplateComponentAction extends @Override public void prepare4Undo() { + DesignerContext.enableRefreshOnTargetModified(); this.getEditingComponent().fireTargetModified(); T component = getEditingComponent(); if (component == null) { diff --git a/designer_base/src/com/fr/design/mainframe/DesignerContext.java b/designer_base/src/com/fr/design/mainframe/DesignerContext.java index dddb560272..1bf541f3ae 100644 --- a/designer_base/src/com/fr/design/mainframe/DesignerContext.java +++ b/designer_base/src/com/fr/design/mainframe/DesignerContext.java @@ -36,7 +36,8 @@ public class DesignerContext { private static Hashtable prop = new Hashtable(); private static Hashtable beans = new Hashtable(); - ; + + private static boolean refreshOnTargetModified = false; /** * Return the main design frame from context @@ -136,4 +137,20 @@ public class DesignerContext { public static void setReportWritePane(BasicDialog dlg){ reportWriteThread.set(dlg); } + + /** + * 在修改 Target 时,刷新右侧属性面板 + */ + public static void enableRefreshOnTargetModified() { + refreshOnTargetModified = true; + } + + /** + * 在修改 Target 时,是否刷新右侧属性面板。仅可刷新一次,取值后重置为 false + */ + public static boolean isRefreshOnTargetModifiedEnabled() { + boolean isRefresh = refreshOnTargetModified; + refreshOnTargetModified = false; + return isRefresh; + } } \ No newline at end of file From 358cef7cdae3e7d7c2f90a6c2007e24d814a4d03 Mon Sep 17 00:00:00 2001 From: plough Date: Wed, 20 Sep 2017 15:23:40 +0800 Subject: [PATCH 022/125] =?UTF-8?q?REPORT-4684=20=E8=BF=9B=E5=85=A5?= =?UTF-8?q?=E6=9D=83=E9=99=90=E7=BC=96=E8=BE=91=E5=90=8E=EF=BC=8C=E5=AF=B9?= =?UTF-8?q?=E5=8F=82=E6=95=B0=E9=9D=A2=E6=9D=BF=E6=8E=A7=E4=BB=B6=E8=BF=9B?= =?UTF-8?q?=E8=A1=8C=E7=BC=96=E8=BE=91=EF=BC=8C=E9=80=80=E5=87=BA=E6=9D=83?= =?UTF-8?q?=E9=99=90=E7=BC=96=E8=BE=91=E5=90=8E=EF=BC=8C=E6=8E=A7=E4=BB=B6?= =?UTF-8?q?=E5=B1=9E=E6=80=A7=E9=9D=A2=E6=9D=BF=E7=A9=BA=E7=99=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- designer/src/com/fr/design/mainframe/JWorkBook.java | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/designer/src/com/fr/design/mainframe/JWorkBook.java b/designer/src/com/fr/design/mainframe/JWorkBook.java index ea2177c2ac..82d796a30d 100644 --- a/designer/src/com/fr/design/mainframe/JWorkBook.java +++ b/designer/src/com/fr/design/mainframe/JWorkBook.java @@ -114,10 +114,13 @@ public class JWorkBook extends JTemplate { if (isEditingPolySheet()) { EastRegionContainerPane.getInstance().switchMode(EastRegionContainerPane.PropertyMode.POLY); } else { - EastRegionContainerPane.getInstance().switchMode(EastRegionContainerPane.PropertyMode.REPORT); - EastRegionContainerPane.getInstance().replaceCellElementPane(getEastUpPane()); - EastRegionContainerPane.getInstance().replaceCellAttrPane(getEastDownPane()); + if (isUpMode()) { + EastRegionContainerPane.getInstance().switchMode(EastRegionContainerPane.PropertyMode.REPORT_PARA); + } else { + EastRegionContainerPane.getInstance().switchMode(EastRegionContainerPane.PropertyMode.REPORT); + } } + refreshToolArea(); } private boolean isEditingPolySheet() { From 01d57c1331dba33c8bd76023e38ee16f297dd9eb Mon Sep 17 00:00:00 2001 From: hzzz Date: Wed, 20 Sep 2017 15:44:44 +0800 Subject: [PATCH 023/125] =?UTF-8?q?=E4=B8=8B=E6=8B=89=E6=A0=91=E5=8C=97?= =?UTF-8?q?=E4=BA=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- designer_base/src/com/fr/design/roleAuthority/RoleTree.java | 2 +- .../com/fr/design/roleAuthority/RolesAlreadyEditedPane.java | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/designer_base/src/com/fr/design/roleAuthority/RoleTree.java b/designer_base/src/com/fr/design/roleAuthority/RoleTree.java index ce6102fe31..68dc5f16fa 100644 --- a/designer_base/src/com/fr/design/roleAuthority/RoleTree.java +++ b/designer_base/src/com/fr/design/roleAuthority/RoleTree.java @@ -1 +1 @@ -package com.fr.design.roleAuthority; import com.fr.design.gui.icheckbox.UICheckBox; import com.fr.design.gui.itree.checkboxtree.CheckBoxTree; import com.fr.design.gui.itree.checkboxtree.CheckBoxTreeSelectionModel; import com.fr.general.NameObject; import com.fr.design.constants.UIConstants; import com.fr.design.beans.BasicBeanPane; import com.fr.design.file.HistoryTemplateListPane; import com.fr.design.gui.itree.refreshabletree.ExpandMutableTreeNode; import com.fr.design.gui.itree.refreshabletree.UserObjectRefreshJTree; import com.fr.design.mainframe.AuthorityPropertyPane; import com.fr.design.mainframe.DesignerContext; import com.fr.design.mainframe.EastRegionContainerPane; import com.fr.general.ComparatorUtils; import com.fr.general.Inter; import javax.swing.SwingUtilities; import javax.swing.JTree; import javax.swing.JComponent; import javax.swing.event.TreeSelectionEvent; import javax.swing.event.TreeSelectionListener; import javax.swing.tree.DefaultMutableTreeNode; import javax.swing.tree.DefaultTreeCellRenderer; import javax.swing.tree.DefaultTreeModel; import javax.swing.tree.TreePath; import java.awt.Component; import java.awt.event.KeyEvent; import java.awt.event.KeyListener; import java.awt.event.MouseEvent; import java.awt.event.MouseListener; import java.util.ArrayList; import java.util.Enumeration; import java.util.List; /** * Author : daisy * Time: 下午3:32 * Date: 13-8-30 */ public class RoleTree extends UserObjectRefreshJTree { private static final long serialVersionUID = 2L; private String roleName = null; public RoleTree() { super(); this.setCellRenderer(roleTreeRenderer); this.setEnabled(true); this.setEditable(true); this.setRowHeight(20); this.setDigIn(true); Handler handler = createHandlerForRoleTree(); this.replaceMouseListener(this, handler, 0); this.replaceKeyListener(this, handler, 0); this.addTreeSelectionListener(handler); // this.removeMouseListener(treeMouseListener); // this.addTreeSelectionListener(new TreeSelectionListener() { // public void valueChanged(TreeSelectionEvent e) { // doWithValueChanged(e); // } // }); } public boolean isCheckBoxVisible(TreePath path) { return true; } /** * Creates the mouse listener and key listener used by RoleTree. * * @return the Handler. */ protected Handler createHandlerForRoleTree() { return new Handler(this); } protected static class Handler implements MouseListener, KeyListener, TreeSelectionListener { protected RoleTree _tree; int _hotspot = new UICheckBox().getPreferredSize().width; private int _toggleCount = -1; public Handler(RoleTree tree) { _tree = tree; } protected TreePath getTreePathForMouseEvent(MouseEvent e) { if (!SwingUtilities.isLeftMouseButton(e)) { return null; } if (!_tree.isCheckBoxEnabled()) { return null; } TreePath path = _tree.getPathForLocation(e.getX(), e.getY()); if (path == null) { return null; } // if (clicksInCheckBox(e, path)) { return path; // } else { // return null; // } } // protected boolean clicksInCheckBox(MouseEvent e, TreePath path) { // if (!_tree.isCheckBoxVisible(path)) { // return false; // } else { // Rectangle bounds = _tree.getPathBounds(path); // if (_tree.getComponentOrientation().isLeftToRight()) { // return e.getX() < bounds.x + _hotspot; // } else { // return e.getX() > bounds.x + bounds.width - _hotspot; // } // } // } private TreePath preventToggleEvent(MouseEvent e) { TreePath pathForMouseEvent = getTreePathForMouseEvent(e); if (pathForMouseEvent != null) { int toggleCount = _tree.getToggleClickCount(); if (toggleCount != -1) { _toggleCount = toggleCount; _tree.setToggleClickCount(-1); } } return pathForMouseEvent; } public void mouseClicked(MouseEvent e) { preventToggleEvent(e); } public void mousePressed(MouseEvent e) { TreePath path = preventToggleEvent(e); if (path != null) { toggleSelection(path); e.consume(); } } public void mouseReleased(MouseEvent e) { TreePath path = preventToggleEvent(e); if (path != null) { e.consume(); } if (_toggleCount != -1) { _tree.setToggleClickCount(_toggleCount); } } public void mouseEntered(MouseEvent e) { } public void mouseExited(MouseEvent e) { } public void keyPressed(KeyEvent e) { if (e.isConsumed()) { return; } if (!_tree.isCheckBoxEnabled()) { return; } if (e.getModifiers() == 0 && e.getKeyChar() == KeyEvent.VK_SPACE) { toggleSelections(); } } public void keyTyped(KeyEvent e) { } public void keyReleased(KeyEvent e) { } public void valueChanged(TreeSelectionEvent e) { _tree.treeDidChange(); _tree.doWithValueChanged(e); } private void toggleSelection(TreePath path) { if (!_tree.isEnabled() || !_tree.isCheckBoxEnabled(path)) { return; } CheckBoxTreeSelectionModel selectionModel = _tree.getCheckBoxTreeSelectionModel(); boolean selected = selectionModel.isPathSelected(path, selectionModel.isDigIn()); selectionModel.removeTreeSelectionListener(this); try { if (!selectionModel.isSingleEventMode()) { selectionModel.setBatchMode(true); } if (selected) selectionModel.removeSelectionPath(path); else selectionModel.addSelectionPath(path); } finally { if (!selectionModel.isSingleEventMode()) { selectionModel.setBatchMode(false); } selectionModel.addTreeSelectionListener(this); _tree.treeDidChange(); _tree.doWithValueChanged(path); } } protected void toggleSelections() { TreePath[] treePaths = _tree.getSelectionPaths(); if (treePaths == null) { return; } for (int i = 0, length = treePaths.length; i < length; i++) { TreePath tmpTreePath = treePaths[i]; toggleSelection(tmpTreePath); } // for (TreePath treePath : treePaths) { // toggleSelection(treePath); // } } } /** * 更新UI */ public void updateUI() { super.updateUI(); setUI(new UIRoleTreeUI()); } /** * @param e 选中事件 */ protected void doWithValueChanged(TreeSelectionEvent e) { if (e.getNewLeadSelectionPath() != null) { if (!e.getNewLeadSelectionPath().getLastPathComponent().toString().equals(Inter.getLocText("FR-Designer_Role"))) { roleName = e.getNewLeadSelectionPath().getLastPathComponent().toString(); setTabRoleName(roleName); refreshRoleTree(roleName); refreshElementAndAuthorityPane(); HistoryTemplateListPane.getInstance().getCurrentEditingTemplate().judgeSheetAuthority(roleName); } } } /** * @param treepath 所选的节点路径 */ protected void doWithValueChanged(TreePath treepath) { if (treepath != null && !treepath.getLastPathComponent().toString().equals(Inter.getLocText("FR-Designer_Role"))) { roleName = treepath.getLastPathComponent().toString(); setTabRoleName(roleName); refreshRoleTree(roleName); refreshElementAndAuthorityPane(); HistoryTemplateListPane.getInstance().getCurrentEditingTemplate().judgeSheetAuthority(roleName); } } protected void setTabRoleName(String roleName) { } /** * 刷新角色树 * * @param selectedRole 角色 */ public void refreshRoleTree(String selectedRole) { if (EastRegionContainerPane.getInstance().getAuthorityEditionPane() instanceof AuthorityPropertyPane) { AuthorityPropertyPane authorityPropertyPane = (AuthorityPropertyPane) EastRegionContainerPane.getInstance().getAuthorityEditionPane(); authorityPropertyPane.populate(); EastRegionContainerPane.getInstance().replaceAuthorityEditionPane(authorityPropertyPane); } } public void setSelectedRole(String selectedRole, TreePath parent) { ExpandMutableTreeNode node = (ExpandMutableTreeNode) parent.getLastPathComponent(); if (node.children() != null && node.getChildCount() >= 0) { for (Enumeration e = node.children(); e.hasMoreElements(); ) { ExpandMutableTreeNode n = (ExpandMutableTreeNode) e.nextElement(); Object userObj = n.getUserObject(); String chilld = null; if (userObj instanceof String) { chilld = (String) userObj; } else if (userObj instanceof NameObject) { NameObject nameObject = (NameObject) userObj; chilld = nameObject.getName(); } if (ComparatorUtils.equals(chilld, selectedRole)) { this.setSelectionPath(parent.pathByAddingChild(n)); return; } else { setSelectedRole(selectedRole, parent.pathByAddingChild(n)); } } } } private void refreshElementAndAuthorityPane() { JComponent authorityToolBar = DesignerContext.getDesignerFrame().getToolbarComponent(); if (authorityToolBar instanceof BasicBeanPane) { //说明是工具栏的 ((BasicBeanPane) authorityToolBar).populateAuthority(); } HistoryTemplateListPane.getInstance().getCurrentEditingTemplate().repaint(); } public String getSelectedRoleName() { return roleName; } public void setSelectedRoleName(String name) { roleName = name; } private DefaultTreeCellRenderer roleTreeRenderer = new DefaultTreeCellRenderer() { private static final long serialVersionUID = 2L; public Component getTreeCellRendererComponent(JTree tree, Object value, boolean selected, boolean expanded, boolean leaf, int row, boolean hasFocus) { super.getTreeCellRendererComponent(tree, value, selected, expanded, leaf, row, hasFocus); ExpandMutableTreeNode treeNode = (ExpandMutableTreeNode) value; Object userObj = treeNode.getUserObject(); if (userObj instanceof String) { // p:这个是column field. this.setIcon(null); this.setText((String) userObj); } else if (userObj instanceof NameObject) { NameObject nameObject = (NameObject) userObj; this.setText(nameObject.getName()); this.setIcon(null); } // 这里新建一个Label作为render是因为JTree在动态刷新的时候,节点上render画布的的宽度不会变,会使得一部分比较长的数据显示为"..." this.setBackgroundNonSelectionColor(UIConstants.NORMAL_BACKGROUND); this.setForeground(UIConstants.FONT_COLOR); this.setBackgroundSelectionColor(UIConstants.FLESH_BLUE); return this; } }; /** * 去除不需要的鼠标监听器 * * @param component 组件 * @param l 所需的鼠标监听器 * @param index 插入的索引 */ private void replaceMouseListener(Component component, MouseListener l, int index) { component.removeMouseListener(treeMouseListener); MouseListener[] listeners = component.getMouseListeners(); for (int i = 0, length = listeners.length; i < length; i++) { component.removeMouseListener(listeners[i]); } // for (MouseListener listener : listeners) { // component.removeMouseListener(listener); // } for (int i = 0; i < listeners.length; i++) { MouseListener listener = listeners[i]; if (index == i) { component.addMouseListener(l); } if (listener instanceof CheckBoxTree.Handler) { continue; } component.addMouseListener(listener); } // index is too large, add to the end. if (index > listeners.length - 1) { component.addMouseListener(l); } } /** * 去除一些不需要的键盘监听器 * * @param component 组件 * @param l 所需的键盘监听器 * @param index 插入的索引 */ private void replaceKeyListener(Component component, KeyListener l, int index) { KeyListener[] listeners = component.getKeyListeners(); for (int i = 0, length = listeners.length; i < length; i++) { component.removeKeyListener(listeners[i]); } // for (MouseListener listener : listeners) { // component.removeMouseListener(listener); // } for (int i = 0; i < listeners.length; i++) { KeyListener listener = listeners[i]; if (index == i) { component.addKeyListener(l); } if (listener instanceof CheckBoxTree.Handler) { continue; } component.addKeyListener(listener); } // index is too large, add to the end. if (index > listeners.length - 1) { component.addKeyListener(l); } } /* * p:获得选中的NameObject = name + role. */ public NameObject getSelectedNameObject() { TreePath selectedTreePath = this.getSelectionPath(); if (selectedTreePath == null) { return null; } ExpandMutableTreeNode selectedTreeNode = (ExpandMutableTreeNode) selectedTreePath.getLastPathComponent(); Object selectedUserObject = selectedTreeNode.getUserObject(); return new NameObject(selectedUserObject.toString(), ""); } /** * p:添加一个NameObject节点 * * @param no 需要添加的节点 */ public void addNameObject(NameObject no) { if (no == null) { return; } DefaultTreeModel treeModel = (DefaultTreeModel) this.getModel(); // 新建一个放着NameObject的newChildTreeNode,加到Root下面 ExpandMutableTreeNode root = (ExpandMutableTreeNode) treeModel.getRoot(); ExpandMutableTreeNode newChildTreeNode = new ExpandMutableTreeNode(no); root.add(newChildTreeNode); newChildTreeNode.add(new ExpandMutableTreeNode()); treeModel.reload(root); } /** * 刷新树节点 */ public void refreshTreeNode() { DefaultTreeModel treeModel = (DefaultTreeModel) this.getModel(); ExpandMutableTreeNode root = (ExpandMutableTreeNode) treeModel.getRoot(); if (interceptRefresh(root)) { return; } ExpandMutableTreeNode[] new_nodes = loadChildTreeNodes(root); List childTreeNodeList = new ArrayList(); for (int i = 0, len = root.getChildCount(); i < len; i++) { if (root.getChildAt(i) instanceof ExpandMutableTreeNode) { childTreeNodeList.add((ExpandMutableTreeNode) root.getChildAt(i)); } else { childTreeNodeList.add((DefaultMutableTreeNode) root.getChildAt(i)); } } root.removeAllChildren(); for (int ci = 0; ci < new_nodes.length; ci++) { Object cUserObject = new_nodes[ci].getUserObject(); for (int ni = 0, nlen = childTreeNodeList.size(); ni < nlen; ni++) { ExpandMutableTreeNode cTreeNode = (ExpandMutableTreeNode) childTreeNodeList.get(ni); if (ComparatorUtils.equals(cTreeNode.getUserObject(), cUserObject)) { new_nodes[ci].setExpanded(cTreeNode.isExpanded()); if (cTreeNode.getFirstChild() instanceof ExpandMutableTreeNode && cTreeNode.isExpanded()) { checkChildNodes(cTreeNode, new_nodes[ci]); } break; } } root.add(new_nodes[ci]); } } protected void checkChildNodes(ExpandMutableTreeNode oldNode, ExpandMutableTreeNode newNode) { for (int i = 0; i < oldNode.getChildCount(); i++) { ExpandMutableTreeNode oldChild = (ExpandMutableTreeNode) oldNode.getChildAt(i); for (int j = 0; j < newNode.getChildCount(); j++) { ExpandMutableTreeNode newChild = (ExpandMutableTreeNode) newNode.getChildAt(j); ExpandMutableTreeNode[] nodes = RoleTree.this.loadChildTreeNodes(newChild); for (int k = 0; k < nodes.length; k++) { newChild.add(nodes[k]); } if (newChild.getChildCount() > 1 && ((ExpandMutableTreeNode) newChild.getFirstChild()).getUserObject() == PENDING) { newChild.remove(0); } if (ComparatorUtils.equals(oldChild.getUserObject(), newChild.getUserObject())) { newChild.setExpanded(oldChild.isExpanded()); } } } } public NameObject getRealSelectedNameObject() { TreePath selectedTreePath = this.getSelectionPath(); if (selectedTreePath == null) { return null; } ExpandMutableTreeNode selectedTreeNode = (ExpandMutableTreeNode) selectedTreePath.getLastPathComponent(); Object selectedUserObject = selectedTreeNode.getUserObject(); if (selectedUserObject instanceof NameObject) { return (NameObject) selectedUserObject; } selectedTreeNode = (ExpandMutableTreeNode) selectedTreeNode.getParent(); selectedUserObject = selectedTreeNode.getUserObject(); if (selectedUserObject instanceof NameObject) { return (NameObject) selectedUserObject; } return null; } } \ No newline at end of file +package com.fr.design.roleAuthority; import com.fr.design.gui.icheckbox.UICheckBox; import com.fr.design.gui.itree.checkboxtree.CheckBoxTree; import com.fr.design.gui.itree.checkboxtree.CheckBoxTreeSelectionModel; import com.fr.general.NameObject; import com.fr.design.constants.UIConstants; import com.fr.design.beans.BasicBeanPane; import com.fr.design.file.HistoryTemplateListPane; import com.fr.design.gui.itree.refreshabletree.ExpandMutableTreeNode; import com.fr.design.gui.itree.refreshabletree.UserObjectRefreshJTree; import com.fr.design.mainframe.AuthorityPropertyPane; import com.fr.design.mainframe.DesignerContext; import com.fr.design.mainframe.EastRegionContainerPane; import com.fr.general.ComparatorUtils; import com.fr.general.Inter; import javax.swing.SwingUtilities; import javax.swing.JTree; import javax.swing.JComponent; import javax.swing.event.TreeSelectionEvent; import javax.swing.event.TreeSelectionListener; import javax.swing.tree.DefaultMutableTreeNode; import javax.swing.tree.DefaultTreeCellRenderer; import javax.swing.tree.DefaultTreeModel; import javax.swing.tree.TreePath; import java.awt.Component; import java.awt.event.KeyEvent; import java.awt.event.KeyListener; import java.awt.event.MouseEvent; import java.awt.event.MouseListener; import java.util.ArrayList; import java.util.Enumeration; import java.util.List; /** * Author : daisy * Time: 下午3:32 * Date: 13-8-30 */ public class RoleTree extends UserObjectRefreshJTree { private static final long serialVersionUID = 2L; private String roleName = null; public RoleTree() { super(); this.setCellRenderer(roleTreeRenderer); this.setEnabled(true); this.setEditable(true); this.setRowHeight(20); this.setDigIn(true); Handler handler = createHandlerForRoleTree(); this.replaceMouseListener(this, handler, 0); this.replaceKeyListener(this, handler, 0); this.addTreeSelectionListener(handler); // this.removeMouseListener(treeMouseListener); // this.addTreeSelectionListener(new TreeSelectionListener() { // public void valueChanged(TreeSelectionEvent e) { // doWithValueChanged(e); // } // }); } public boolean isCheckBoxVisible(TreePath path) { return true; } /** * Creates the mouse listener and key listener used by RoleTree. * * @return the Handler. */ protected Handler createHandlerForRoleTree() { return new Handler(this); } protected static class Handler implements MouseListener, KeyListener, TreeSelectionListener { protected RoleTree _tree; int _hotspot = new UICheckBox().getPreferredSize().width; private int _toggleCount = -1; public Handler(RoleTree tree) { _tree = tree; } protected TreePath getTreePathForMouseEvent(MouseEvent e) { if (!SwingUtilities.isLeftMouseButton(e)) { return null; } if (!_tree.isCheckBoxEnabled()) { return null; } TreePath path = _tree.getPathForLocation(e.getX(), e.getY()); if (path == null) { return null; } // if (clicksInCheckBox(e, path)) { return path; // } else { // return null; // } } // protected boolean clicksInCheckBox(MouseEvent e, TreePath path) { // if (!_tree.isCheckBoxVisible(path)) { // return false; // } else { // Rectangle bounds = _tree.getPathBounds(path); // if (_tree.getComponentOrientation().isLeftToRight()) { // return e.getX() < bounds.x + _hotspot; // } else { // return e.getX() > bounds.x + bounds.width - _hotspot; // } // } // } private TreePath preventToggleEvent(MouseEvent e) { TreePath pathForMouseEvent = getTreePathForMouseEvent(e); if (pathForMouseEvent != null) { int toggleCount = _tree.getToggleClickCount(); if (toggleCount != -1) { _toggleCount = toggleCount; _tree.setToggleClickCount(-1); } } return pathForMouseEvent; } public void mouseClicked(MouseEvent e) { preventToggleEvent(e); } public void mousePressed(MouseEvent e) { TreePath path = preventToggleEvent(e); if (path != null) { toggleSelection(path); e.consume(); } } public void mouseReleased(MouseEvent e) { TreePath path = preventToggleEvent(e); if (path != null) { e.consume(); } if (_toggleCount != -1) { _tree.setToggleClickCount(_toggleCount); } } public void mouseEntered(MouseEvent e) { } public void mouseExited(MouseEvent e) { } public void keyPressed(KeyEvent e) { if (e.isConsumed()) { return; } if (!_tree.isCheckBoxEnabled()) { return; } if (e.getModifiers() == 0 && e.getKeyChar() == KeyEvent.VK_SPACE) { toggleSelections(); } } public void keyTyped(KeyEvent e) { } public void keyReleased(KeyEvent e) { } public void valueChanged(TreeSelectionEvent e) { _tree.treeDidChange(); _tree.doWithValueChanged(e); } private void toggleSelection(TreePath path) { if (!_tree.isEnabled() || !_tree.isCheckBoxEnabled(path)) { return; } CheckBoxTreeSelectionModel selectionModel = _tree.getCheckBoxTreeSelectionModel(); boolean selected = selectionModel.isPathSelected(path, selectionModel.isDigIn()); selectionModel.removeTreeSelectionListener(this); try { if (!selectionModel.isSingleEventMode()) { selectionModel.setBatchMode(true); } if (selected) selectionModel.removeSelectionPath(path); else selectionModel.addSelectionPath(path); } finally { if (!selectionModel.isSingleEventMode()) { selectionModel.setBatchMode(false); } selectionModel.addTreeSelectionListener(this); _tree.treeDidChange(); _tree.doWithValueChanged(path); } } protected void toggleSelections() { TreePath[] treePaths = _tree.getSelectionPaths(); if (treePaths == null) { return; } for (int i = 0, length = treePaths.length; i < length; i++) { TreePath tmpTreePath = treePaths[i]; toggleSelection(tmpTreePath); } // for (TreePath treePath : treePaths) { // toggleSelection(treePath); // } } } /** * 更新UI */ public void updateUI() { super.updateUI(); setUI(new UIRoleTreeUI()); } /** * @param e 选中事件 */ protected void doWithValueChanged(TreeSelectionEvent e) { if (e.getNewLeadSelectionPath() != null) { if (!e.getNewLeadSelectionPath().getLastPathComponent().toString().equals(Inter.getLocText("FR-Designer_Role"))) { roleName = e.getNewLeadSelectionPath().getLastPathComponent().toString(); setTabRoleName(roleName); refreshRoleTree(roleName); refreshElementAndAuthorityPane(); HistoryTemplateListPane.getInstance().getCurrentEditingTemplate().judgeSheetAuthority(roleName); } } } /** * @param treepath 所选的节点路径 */ protected void doWithValueChanged(TreePath treepath) { if (treepath != null && !treepath.getLastPathComponent().toString().equals(Inter.getLocText("FR-Designer_Role"))) { roleName = treepath.getLastPathComponent().toString(); setTabRoleName(roleName); refreshRoleTree(roleName); refreshElementAndAuthorityPane(); HistoryTemplateListPane.getInstance().getCurrentEditingTemplate().judgeSheetAuthority(roleName); } } protected void setTabRoleName(String roleName) { } /** * 刷新角色树 * * @param selectedRole 角色 */ public void refreshRoleTree(String selectedRole) { if (EastRegionContainerPane.getInstance().getAuthorityEditionPane() instanceof AuthorityPropertyPane) { AuthorityPropertyPane authorityPropertyPane = (AuthorityPropertyPane) EastRegionContainerPane.getInstance().getAuthorityEditionPane(); authorityPropertyPane.populate(); EastRegionContainerPane.getInstance().replaceAuthorityEditionPane(authorityPropertyPane); } } public void setSelectedRole(String selectedRole, TreePath parent) { ExpandMutableTreeNode node = (ExpandMutableTreeNode) parent.getLastPathComponent(); if (node.children() != null && node.getChildCount() >= 0) { for (Enumeration e = node.children(); e.hasMoreElements(); ) { ExpandMutableTreeNode n = (ExpandMutableTreeNode) e.nextElement(); Object userObj = n.getUserObject(); String chilld = null; if (userObj instanceof String) { chilld = (String) userObj; } else if (userObj instanceof NameObject) { NameObject nameObject = (NameObject) userObj; chilld = nameObject.getName(); } if (ComparatorUtils.equals(chilld, selectedRole)) { this.setSelectionPath(parent.pathByAddingChild(n)); return; } else { setSelectedRole(selectedRole, parent.pathByAddingChild(n)); } } } } private void refreshElementAndAuthorityPane() { JComponent authorityToolBar = DesignerContext.getDesignerFrame().getToolbarComponent(); if (authorityToolBar instanceof BasicBeanPane) { //说明是工具栏的 ((BasicBeanPane) authorityToolBar).populateAuthority(); } HistoryTemplateListPane.getInstance().getCurrentEditingTemplate().repaint(); } public String getSelectedRoleName() { return roleName; } public void setSelectedRoleName(String name) { roleName = name; } private DefaultTreeCellRenderer roleTreeRenderer = new DefaultTreeCellRenderer() { private static final long serialVersionUID = 2L; public Component getTreeCellRendererComponent(JTree tree, Object value, boolean selected, boolean expanded, boolean leaf, int row, boolean hasFocus) { super.getTreeCellRendererComponent(tree, value, selected, expanded, leaf, row, hasFocus); ExpandMutableTreeNode treeNode = (ExpandMutableTreeNode) value; Object userObj = treeNode.getUserObject(); if (userObj instanceof String) { // p:这个是column field. this.setIcon(null); this.setText((String) userObj); } else if (userObj instanceof NameObject) { NameObject nameObject = (NameObject) userObj; this.setText(nameObject.getName()); this.setIcon(null); } // 这里新建一个Label作为render是因为JTree在动态刷新的时候,节点上render画布的的宽度不会变,会使得一部分比较长的数据显示为"..." this.setBackgroundNonSelectionColor(UIConstants.TREE_BACKGROUND); this.setForeground(UIConstants.FONT_COLOR); this.setBackgroundSelectionColor(UIConstants.FLESH_BLUE); return this; } }; /** * 去除不需要的鼠标监听器 * * @param component 组件 * @param l 所需的鼠标监听器 * @param index 插入的索引 */ private void replaceMouseListener(Component component, MouseListener l, int index) { component.removeMouseListener(treeMouseListener); MouseListener[] listeners = component.getMouseListeners(); for (int i = 0, length = listeners.length; i < length; i++) { component.removeMouseListener(listeners[i]); } // for (MouseListener listener : listeners) { // component.removeMouseListener(listener); // } for (int i = 0; i < listeners.length; i++) { MouseListener listener = listeners[i]; if (index == i) { component.addMouseListener(l); } if (listener instanceof CheckBoxTree.Handler) { continue; } component.addMouseListener(listener); } // index is too large, add to the end. if (index > listeners.length - 1) { component.addMouseListener(l); } } /** * 去除一些不需要的键盘监听器 * * @param component 组件 * @param l 所需的键盘监听器 * @param index 插入的索引 */ private void replaceKeyListener(Component component, KeyListener l, int index) { KeyListener[] listeners = component.getKeyListeners(); for (int i = 0, length = listeners.length; i < length; i++) { component.removeKeyListener(listeners[i]); } // for (MouseListener listener : listeners) { // component.removeMouseListener(listener); // } for (int i = 0; i < listeners.length; i++) { KeyListener listener = listeners[i]; if (index == i) { component.addKeyListener(l); } if (listener instanceof CheckBoxTree.Handler) { continue; } component.addKeyListener(listener); } // index is too large, add to the end. if (index > listeners.length - 1) { component.addKeyListener(l); } } /* * p:获得选中的NameObject = name + role. */ public NameObject getSelectedNameObject() { TreePath selectedTreePath = this.getSelectionPath(); if (selectedTreePath == null) { return null; } ExpandMutableTreeNode selectedTreeNode = (ExpandMutableTreeNode) selectedTreePath.getLastPathComponent(); Object selectedUserObject = selectedTreeNode.getUserObject(); return new NameObject(selectedUserObject.toString(), ""); } /** * p:添加一个NameObject节点 * * @param no 需要添加的节点 */ public void addNameObject(NameObject no) { if (no == null) { return; } DefaultTreeModel treeModel = (DefaultTreeModel) this.getModel(); // 新建一个放着NameObject的newChildTreeNode,加到Root下面 ExpandMutableTreeNode root = (ExpandMutableTreeNode) treeModel.getRoot(); ExpandMutableTreeNode newChildTreeNode = new ExpandMutableTreeNode(no); root.add(newChildTreeNode); newChildTreeNode.add(new ExpandMutableTreeNode()); treeModel.reload(root); } /** * 刷新树节点 */ public void refreshTreeNode() { DefaultTreeModel treeModel = (DefaultTreeModel) this.getModel(); ExpandMutableTreeNode root = (ExpandMutableTreeNode) treeModel.getRoot(); if (interceptRefresh(root)) { return; } ExpandMutableTreeNode[] new_nodes = loadChildTreeNodes(root); List childTreeNodeList = new ArrayList(); for (int i = 0, len = root.getChildCount(); i < len; i++) { if (root.getChildAt(i) instanceof ExpandMutableTreeNode) { childTreeNodeList.add((ExpandMutableTreeNode) root.getChildAt(i)); } else { childTreeNodeList.add((DefaultMutableTreeNode) root.getChildAt(i)); } } root.removeAllChildren(); for (int ci = 0; ci < new_nodes.length; ci++) { Object cUserObject = new_nodes[ci].getUserObject(); for (int ni = 0, nlen = childTreeNodeList.size(); ni < nlen; ni++) { ExpandMutableTreeNode cTreeNode = (ExpandMutableTreeNode) childTreeNodeList.get(ni); if (ComparatorUtils.equals(cTreeNode.getUserObject(), cUserObject)) { new_nodes[ci].setExpanded(cTreeNode.isExpanded()); if (cTreeNode.getFirstChild() instanceof ExpandMutableTreeNode && cTreeNode.isExpanded()) { checkChildNodes(cTreeNode, new_nodes[ci]); } break; } } root.add(new_nodes[ci]); } } protected void checkChildNodes(ExpandMutableTreeNode oldNode, ExpandMutableTreeNode newNode) { for (int i = 0; i < oldNode.getChildCount(); i++) { ExpandMutableTreeNode oldChild = (ExpandMutableTreeNode) oldNode.getChildAt(i); for (int j = 0; j < newNode.getChildCount(); j++) { ExpandMutableTreeNode newChild = (ExpandMutableTreeNode) newNode.getChildAt(j); ExpandMutableTreeNode[] nodes = RoleTree.this.loadChildTreeNodes(newChild); for (int k = 0; k < nodes.length; k++) { newChild.add(nodes[k]); } if (newChild.getChildCount() > 1 && ((ExpandMutableTreeNode) newChild.getFirstChild()).getUserObject() == PENDING) { newChild.remove(0); } if (ComparatorUtils.equals(oldChild.getUserObject(), newChild.getUserObject())) { newChild.setExpanded(oldChild.isExpanded()); } } } } public NameObject getRealSelectedNameObject() { TreePath selectedTreePath = this.getSelectionPath(); if (selectedTreePath == null) { return null; } ExpandMutableTreeNode selectedTreeNode = (ExpandMutableTreeNode) selectedTreePath.getLastPathComponent(); Object selectedUserObject = selectedTreeNode.getUserObject(); if (selectedUserObject instanceof NameObject) { return (NameObject) selectedUserObject; } selectedTreeNode = (ExpandMutableTreeNode) selectedTreeNode.getParent(); selectedUserObject = selectedTreeNode.getUserObject(); if (selectedUserObject instanceof NameObject) { return (NameObject) selectedUserObject; } return null; } } \ No newline at end of file diff --git a/designer_base/src/com/fr/design/roleAuthority/RolesAlreadyEditedPane.java b/designer_base/src/com/fr/design/roleAuthority/RolesAlreadyEditedPane.java index b9bc53c707..5c6cc9d441 100644 --- a/designer_base/src/com/fr/design/roleAuthority/RolesAlreadyEditedPane.java +++ b/designer_base/src/com/fr/design/roleAuthority/RolesAlreadyEditedPane.java @@ -39,6 +39,7 @@ public class RolesAlreadyEditedPane extends JPanel { THIS = new RolesAlreadyEditedPane(); } return THIS; + } @@ -59,7 +60,6 @@ public class RolesAlreadyEditedPane extends JPanel { // this.add(northPane, BorderLayout.NORTH); rolesEditedPane = new RolesEditedPane(); this.add(rolesEditedPane, BorderLayout.CENTER); - } public RoleTree getRoleTree() { @@ -102,7 +102,7 @@ public class RolesAlreadyEditedPane extends JPanel { // 这里新建一个Label作为render是因为JTree在动态刷新的时候,节点上render画布的的宽度不会变,会使得一部分比较长的数据显示为"..." - this.setBackgroundNonSelectionColor(UIConstants.NORMAL_BACKGROUND); + this.setBackgroundNonSelectionColor(UIConstants.TREE_BACKGROUND); this.setForeground(UIConstants.FONT_COLOR); this.setBackgroundSelectionColor(UIConstants.FLESH_BLUE); return this; From c9fab1fbcfc3f926d35b7e33fc55b4e4cafb2b25 Mon Sep 17 00:00:00 2001 From: hzzz Date: Wed, 20 Sep 2017 15:47:00 +0800 Subject: [PATCH 024/125] =?UTF-8?q?=E4=B8=8B=E6=8B=89=E6=A0=91=E8=83=8C?= =?UTF-8?q?=E6=99=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/fr/design/roleAuthority/RoleTree.java | 540 +++++++++++++++++- 1 file changed, 539 insertions(+), 1 deletion(-) diff --git a/designer_base/src/com/fr/design/roleAuthority/RoleTree.java b/designer_base/src/com/fr/design/roleAuthority/RoleTree.java index 68dc5f16fa..671d1dd818 100644 --- a/designer_base/src/com/fr/design/roleAuthority/RoleTree.java +++ b/designer_base/src/com/fr/design/roleAuthority/RoleTree.java @@ -1 +1,539 @@ -package com.fr.design.roleAuthority; import com.fr.design.gui.icheckbox.UICheckBox; import com.fr.design.gui.itree.checkboxtree.CheckBoxTree; import com.fr.design.gui.itree.checkboxtree.CheckBoxTreeSelectionModel; import com.fr.general.NameObject; import com.fr.design.constants.UIConstants; import com.fr.design.beans.BasicBeanPane; import com.fr.design.file.HistoryTemplateListPane; import com.fr.design.gui.itree.refreshabletree.ExpandMutableTreeNode; import com.fr.design.gui.itree.refreshabletree.UserObjectRefreshJTree; import com.fr.design.mainframe.AuthorityPropertyPane; import com.fr.design.mainframe.DesignerContext; import com.fr.design.mainframe.EastRegionContainerPane; import com.fr.general.ComparatorUtils; import com.fr.general.Inter; import javax.swing.SwingUtilities; import javax.swing.JTree; import javax.swing.JComponent; import javax.swing.event.TreeSelectionEvent; import javax.swing.event.TreeSelectionListener; import javax.swing.tree.DefaultMutableTreeNode; import javax.swing.tree.DefaultTreeCellRenderer; import javax.swing.tree.DefaultTreeModel; import javax.swing.tree.TreePath; import java.awt.Component; import java.awt.event.KeyEvent; import java.awt.event.KeyListener; import java.awt.event.MouseEvent; import java.awt.event.MouseListener; import java.util.ArrayList; import java.util.Enumeration; import java.util.List; /** * Author : daisy * Time: 下午3:32 * Date: 13-8-30 */ public class RoleTree extends UserObjectRefreshJTree { private static final long serialVersionUID = 2L; private String roleName = null; public RoleTree() { super(); this.setCellRenderer(roleTreeRenderer); this.setEnabled(true); this.setEditable(true); this.setRowHeight(20); this.setDigIn(true); Handler handler = createHandlerForRoleTree(); this.replaceMouseListener(this, handler, 0); this.replaceKeyListener(this, handler, 0); this.addTreeSelectionListener(handler); // this.removeMouseListener(treeMouseListener); // this.addTreeSelectionListener(new TreeSelectionListener() { // public void valueChanged(TreeSelectionEvent e) { // doWithValueChanged(e); // } // }); } public boolean isCheckBoxVisible(TreePath path) { return true; } /** * Creates the mouse listener and key listener used by RoleTree. * * @return the Handler. */ protected Handler createHandlerForRoleTree() { return new Handler(this); } protected static class Handler implements MouseListener, KeyListener, TreeSelectionListener { protected RoleTree _tree; int _hotspot = new UICheckBox().getPreferredSize().width; private int _toggleCount = -1; public Handler(RoleTree tree) { _tree = tree; } protected TreePath getTreePathForMouseEvent(MouseEvent e) { if (!SwingUtilities.isLeftMouseButton(e)) { return null; } if (!_tree.isCheckBoxEnabled()) { return null; } TreePath path = _tree.getPathForLocation(e.getX(), e.getY()); if (path == null) { return null; } // if (clicksInCheckBox(e, path)) { return path; // } else { // return null; // } } // protected boolean clicksInCheckBox(MouseEvent e, TreePath path) { // if (!_tree.isCheckBoxVisible(path)) { // return false; // } else { // Rectangle bounds = _tree.getPathBounds(path); // if (_tree.getComponentOrientation().isLeftToRight()) { // return e.getX() < bounds.x + _hotspot; // } else { // return e.getX() > bounds.x + bounds.width - _hotspot; // } // } // } private TreePath preventToggleEvent(MouseEvent e) { TreePath pathForMouseEvent = getTreePathForMouseEvent(e); if (pathForMouseEvent != null) { int toggleCount = _tree.getToggleClickCount(); if (toggleCount != -1) { _toggleCount = toggleCount; _tree.setToggleClickCount(-1); } } return pathForMouseEvent; } public void mouseClicked(MouseEvent e) { preventToggleEvent(e); } public void mousePressed(MouseEvent e) { TreePath path = preventToggleEvent(e); if (path != null) { toggleSelection(path); e.consume(); } } public void mouseReleased(MouseEvent e) { TreePath path = preventToggleEvent(e); if (path != null) { e.consume(); } if (_toggleCount != -1) { _tree.setToggleClickCount(_toggleCount); } } public void mouseEntered(MouseEvent e) { } public void mouseExited(MouseEvent e) { } public void keyPressed(KeyEvent e) { if (e.isConsumed()) { return; } if (!_tree.isCheckBoxEnabled()) { return; } if (e.getModifiers() == 0 && e.getKeyChar() == KeyEvent.VK_SPACE) { toggleSelections(); } } public void keyTyped(KeyEvent e) { } public void keyReleased(KeyEvent e) { } public void valueChanged(TreeSelectionEvent e) { _tree.treeDidChange(); _tree.doWithValueChanged(e); } private void toggleSelection(TreePath path) { if (!_tree.isEnabled() || !_tree.isCheckBoxEnabled(path)) { return; } CheckBoxTreeSelectionModel selectionModel = _tree.getCheckBoxTreeSelectionModel(); boolean selected = selectionModel.isPathSelected(path, selectionModel.isDigIn()); selectionModel.removeTreeSelectionListener(this); try { if (!selectionModel.isSingleEventMode()) { selectionModel.setBatchMode(true); } if (selected) selectionModel.removeSelectionPath(path); else selectionModel.addSelectionPath(path); } finally { if (!selectionModel.isSingleEventMode()) { selectionModel.setBatchMode(false); } selectionModel.addTreeSelectionListener(this); _tree.treeDidChange(); _tree.doWithValueChanged(path); } } protected void toggleSelections() { TreePath[] treePaths = _tree.getSelectionPaths(); if (treePaths == null) { return; } for (int i = 0, length = treePaths.length; i < length; i++) { TreePath tmpTreePath = treePaths[i]; toggleSelection(tmpTreePath); } // for (TreePath treePath : treePaths) { // toggleSelection(treePath); // } } } /** * 更新UI */ public void updateUI() { super.updateUI(); setUI(new UIRoleTreeUI()); } /** * @param e 选中事件 */ protected void doWithValueChanged(TreeSelectionEvent e) { if (e.getNewLeadSelectionPath() != null) { if (!e.getNewLeadSelectionPath().getLastPathComponent().toString().equals(Inter.getLocText("FR-Designer_Role"))) { roleName = e.getNewLeadSelectionPath().getLastPathComponent().toString(); setTabRoleName(roleName); refreshRoleTree(roleName); refreshElementAndAuthorityPane(); HistoryTemplateListPane.getInstance().getCurrentEditingTemplate().judgeSheetAuthority(roleName); } } } /** * @param treepath 所选的节点路径 */ protected void doWithValueChanged(TreePath treepath) { if (treepath != null && !treepath.getLastPathComponent().toString().equals(Inter.getLocText("FR-Designer_Role"))) { roleName = treepath.getLastPathComponent().toString(); setTabRoleName(roleName); refreshRoleTree(roleName); refreshElementAndAuthorityPane(); HistoryTemplateListPane.getInstance().getCurrentEditingTemplate().judgeSheetAuthority(roleName); } } protected void setTabRoleName(String roleName) { } /** * 刷新角色树 * * @param selectedRole 角色 */ public void refreshRoleTree(String selectedRole) { if (EastRegionContainerPane.getInstance().getAuthorityEditionPane() instanceof AuthorityPropertyPane) { AuthorityPropertyPane authorityPropertyPane = (AuthorityPropertyPane) EastRegionContainerPane.getInstance().getAuthorityEditionPane(); authorityPropertyPane.populate(); EastRegionContainerPane.getInstance().replaceAuthorityEditionPane(authorityPropertyPane); } } public void setSelectedRole(String selectedRole, TreePath parent) { ExpandMutableTreeNode node = (ExpandMutableTreeNode) parent.getLastPathComponent(); if (node.children() != null && node.getChildCount() >= 0) { for (Enumeration e = node.children(); e.hasMoreElements(); ) { ExpandMutableTreeNode n = (ExpandMutableTreeNode) e.nextElement(); Object userObj = n.getUserObject(); String chilld = null; if (userObj instanceof String) { chilld = (String) userObj; } else if (userObj instanceof NameObject) { NameObject nameObject = (NameObject) userObj; chilld = nameObject.getName(); } if (ComparatorUtils.equals(chilld, selectedRole)) { this.setSelectionPath(parent.pathByAddingChild(n)); return; } else { setSelectedRole(selectedRole, parent.pathByAddingChild(n)); } } } } private void refreshElementAndAuthorityPane() { JComponent authorityToolBar = DesignerContext.getDesignerFrame().getToolbarComponent(); if (authorityToolBar instanceof BasicBeanPane) { //说明是工具栏的 ((BasicBeanPane) authorityToolBar).populateAuthority(); } HistoryTemplateListPane.getInstance().getCurrentEditingTemplate().repaint(); } public String getSelectedRoleName() { return roleName; } public void setSelectedRoleName(String name) { roleName = name; } private DefaultTreeCellRenderer roleTreeRenderer = new DefaultTreeCellRenderer() { private static final long serialVersionUID = 2L; public Component getTreeCellRendererComponent(JTree tree, Object value, boolean selected, boolean expanded, boolean leaf, int row, boolean hasFocus) { super.getTreeCellRendererComponent(tree, value, selected, expanded, leaf, row, hasFocus); ExpandMutableTreeNode treeNode = (ExpandMutableTreeNode) value; Object userObj = treeNode.getUserObject(); if (userObj instanceof String) { // p:这个是column field. this.setIcon(null); this.setText((String) userObj); } else if (userObj instanceof NameObject) { NameObject nameObject = (NameObject) userObj; this.setText(nameObject.getName()); this.setIcon(null); } // 这里新建一个Label作为render是因为JTree在动态刷新的时候,节点上render画布的的宽度不会变,会使得一部分比较长的数据显示为"..." this.setBackgroundNonSelectionColor(UIConstants.TREE_BACKGROUND); this.setForeground(UIConstants.FONT_COLOR); this.setBackgroundSelectionColor(UIConstants.FLESH_BLUE); return this; } }; /** * 去除不需要的鼠标监听器 * * @param component 组件 * @param l 所需的鼠标监听器 * @param index 插入的索引 */ private void replaceMouseListener(Component component, MouseListener l, int index) { component.removeMouseListener(treeMouseListener); MouseListener[] listeners = component.getMouseListeners(); for (int i = 0, length = listeners.length; i < length; i++) { component.removeMouseListener(listeners[i]); } // for (MouseListener listener : listeners) { // component.removeMouseListener(listener); // } for (int i = 0; i < listeners.length; i++) { MouseListener listener = listeners[i]; if (index == i) { component.addMouseListener(l); } if (listener instanceof CheckBoxTree.Handler) { continue; } component.addMouseListener(listener); } // index is too large, add to the end. if (index > listeners.length - 1) { component.addMouseListener(l); } } /** * 去除一些不需要的键盘监听器 * * @param component 组件 * @param l 所需的键盘监听器 * @param index 插入的索引 */ private void replaceKeyListener(Component component, KeyListener l, int index) { KeyListener[] listeners = component.getKeyListeners(); for (int i = 0, length = listeners.length; i < length; i++) { component.removeKeyListener(listeners[i]); } // for (MouseListener listener : listeners) { // component.removeMouseListener(listener); // } for (int i = 0; i < listeners.length; i++) { KeyListener listener = listeners[i]; if (index == i) { component.addKeyListener(l); } if (listener instanceof CheckBoxTree.Handler) { continue; } component.addKeyListener(listener); } // index is too large, add to the end. if (index > listeners.length - 1) { component.addKeyListener(l); } } /* * p:获得选中的NameObject = name + role. */ public NameObject getSelectedNameObject() { TreePath selectedTreePath = this.getSelectionPath(); if (selectedTreePath == null) { return null; } ExpandMutableTreeNode selectedTreeNode = (ExpandMutableTreeNode) selectedTreePath.getLastPathComponent(); Object selectedUserObject = selectedTreeNode.getUserObject(); return new NameObject(selectedUserObject.toString(), ""); } /** * p:添加一个NameObject节点 * * @param no 需要添加的节点 */ public void addNameObject(NameObject no) { if (no == null) { return; } DefaultTreeModel treeModel = (DefaultTreeModel) this.getModel(); // 新建一个放着NameObject的newChildTreeNode,加到Root下面 ExpandMutableTreeNode root = (ExpandMutableTreeNode) treeModel.getRoot(); ExpandMutableTreeNode newChildTreeNode = new ExpandMutableTreeNode(no); root.add(newChildTreeNode); newChildTreeNode.add(new ExpandMutableTreeNode()); treeModel.reload(root); } /** * 刷新树节点 */ public void refreshTreeNode() { DefaultTreeModel treeModel = (DefaultTreeModel) this.getModel(); ExpandMutableTreeNode root = (ExpandMutableTreeNode) treeModel.getRoot(); if (interceptRefresh(root)) { return; } ExpandMutableTreeNode[] new_nodes = loadChildTreeNodes(root); List childTreeNodeList = new ArrayList(); for (int i = 0, len = root.getChildCount(); i < len; i++) { if (root.getChildAt(i) instanceof ExpandMutableTreeNode) { childTreeNodeList.add((ExpandMutableTreeNode) root.getChildAt(i)); } else { childTreeNodeList.add((DefaultMutableTreeNode) root.getChildAt(i)); } } root.removeAllChildren(); for (int ci = 0; ci < new_nodes.length; ci++) { Object cUserObject = new_nodes[ci].getUserObject(); for (int ni = 0, nlen = childTreeNodeList.size(); ni < nlen; ni++) { ExpandMutableTreeNode cTreeNode = (ExpandMutableTreeNode) childTreeNodeList.get(ni); if (ComparatorUtils.equals(cTreeNode.getUserObject(), cUserObject)) { new_nodes[ci].setExpanded(cTreeNode.isExpanded()); if (cTreeNode.getFirstChild() instanceof ExpandMutableTreeNode && cTreeNode.isExpanded()) { checkChildNodes(cTreeNode, new_nodes[ci]); } break; } } root.add(new_nodes[ci]); } } protected void checkChildNodes(ExpandMutableTreeNode oldNode, ExpandMutableTreeNode newNode) { for (int i = 0; i < oldNode.getChildCount(); i++) { ExpandMutableTreeNode oldChild = (ExpandMutableTreeNode) oldNode.getChildAt(i); for (int j = 0; j < newNode.getChildCount(); j++) { ExpandMutableTreeNode newChild = (ExpandMutableTreeNode) newNode.getChildAt(j); ExpandMutableTreeNode[] nodes = RoleTree.this.loadChildTreeNodes(newChild); for (int k = 0; k < nodes.length; k++) { newChild.add(nodes[k]); } if (newChild.getChildCount() > 1 && ((ExpandMutableTreeNode) newChild.getFirstChild()).getUserObject() == PENDING) { newChild.remove(0); } if (ComparatorUtils.equals(oldChild.getUserObject(), newChild.getUserObject())) { newChild.setExpanded(oldChild.isExpanded()); } } } } public NameObject getRealSelectedNameObject() { TreePath selectedTreePath = this.getSelectionPath(); if (selectedTreePath == null) { return null; } ExpandMutableTreeNode selectedTreeNode = (ExpandMutableTreeNode) selectedTreePath.getLastPathComponent(); Object selectedUserObject = selectedTreeNode.getUserObject(); if (selectedUserObject instanceof NameObject) { return (NameObject) selectedUserObject; } selectedTreeNode = (ExpandMutableTreeNode) selectedTreeNode.getParent(); selectedUserObject = selectedTreeNode.getUserObject(); if (selectedUserObject instanceof NameObject) { return (NameObject) selectedUserObject; } return null; } } \ No newline at end of file +package com.fr.design.roleAuthority; + +import com.fr.design.gui.icheckbox.UICheckBox; +import com.fr.design.gui.itree.checkboxtree.CheckBoxTree; +import com.fr.design.gui.itree.checkboxtree.CheckBoxTreeSelectionModel; +import com.fr.general.NameObject; +import com.fr.design.constants.UIConstants; +import com.fr.design.beans.BasicBeanPane; +import com.fr.design.file.HistoryTemplateListPane; +import com.fr.design.gui.itree.refreshabletree.ExpandMutableTreeNode; +import com.fr.design.gui.itree.refreshabletree.UserObjectRefreshJTree; +import com.fr.design.mainframe.AuthorityPropertyPane; +import com.fr.design.mainframe.DesignerContext; +import com.fr.design.mainframe.EastRegionContainerPane; +import com.fr.general.ComparatorUtils; +import com.fr.general.Inter; + +import javax.swing.SwingUtilities; +import javax.swing.JTree; +import javax.swing.JComponent; +import javax.swing.event.TreeSelectionEvent; +import javax.swing.event.TreeSelectionListener; +import javax.swing.tree.DefaultMutableTreeNode; +import javax.swing.tree.DefaultTreeCellRenderer; +import javax.swing.tree.DefaultTreeModel; +import javax.swing.tree.TreePath; +import java.awt.Component; +import java.awt.event.KeyEvent; +import java.awt.event.KeyListener; +import java.awt.event.MouseEvent; +import java.awt.event.MouseListener; +import java.util.ArrayList; +import java.util.Enumeration; +import java.util.List; + +/** + * Author : daisy + * Time: 下午3:32 + * Date: 13-8-30 + */ +public class RoleTree extends UserObjectRefreshJTree { + private static final long serialVersionUID = 2L; + + private String roleName = null; + + public RoleTree() { + super(); + this.setCellRenderer(roleTreeRenderer); + this.setEnabled(true); + this.setEditable(true); + this.setRowHeight(20); + this.setDigIn(true); + Handler handler = createHandlerForRoleTree(); + this.replaceMouseListener(this, handler, 0); + this.replaceKeyListener(this, handler, 0); + this.addTreeSelectionListener(handler); +// this.removeMouseListener(treeMouseListener); +// this.addTreeSelectionListener(new TreeSelectionListener() { +// public void valueChanged(TreeSelectionEvent e) { +// doWithValueChanged(e); +// } +// }); + + } + + public boolean isCheckBoxVisible(TreePath path) { + return true; + } + + + /** + * Creates the mouse listener and key listener used by RoleTree. + * + * @return the Handler. + */ + protected Handler createHandlerForRoleTree() { + return new Handler(this); + } + + protected static class Handler implements MouseListener, KeyListener, TreeSelectionListener { + protected RoleTree _tree; + int _hotspot = new UICheckBox().getPreferredSize().width; + private int _toggleCount = -1; + + public Handler(RoleTree tree) { + _tree = tree; + } + + protected TreePath getTreePathForMouseEvent(MouseEvent e) { + if (!SwingUtilities.isLeftMouseButton(e)) { + return null; + } + + if (!_tree.isCheckBoxEnabled()) { + return null; + } + + TreePath path = _tree.getPathForLocation(e.getX(), e.getY()); + if (path == null) { + return null; + } + +// if (clicksInCheckBox(e, path)) { + + return path; +// } else { +// return null; +// } + } + +// protected boolean clicksInCheckBox(MouseEvent e, TreePath path) { +// if (!_tree.isCheckBoxVisible(path)) { +// return false; +// } else { +// Rectangle bounds = _tree.getPathBounds(path); +// if (_tree.getComponentOrientation().isLeftToRight()) { +// return e.getX() < bounds.x + _hotspot; +// } else { +// return e.getX() > bounds.x + bounds.width - _hotspot; +// } +// } +// } + + private TreePath preventToggleEvent(MouseEvent e) { + TreePath pathForMouseEvent = getTreePathForMouseEvent(e); + if (pathForMouseEvent != null) { + int toggleCount = _tree.getToggleClickCount(); + if (toggleCount != -1) { + _toggleCount = toggleCount; + _tree.setToggleClickCount(-1); + } + } + return pathForMouseEvent; + } + + public void mouseClicked(MouseEvent e) { + preventToggleEvent(e); + } + + public void mousePressed(MouseEvent e) { + TreePath path = preventToggleEvent(e); + if (path != null) { + toggleSelection(path); + e.consume(); + } + } + + public void mouseReleased(MouseEvent e) { + TreePath path = preventToggleEvent(e); + if (path != null) { + e.consume(); + } + if (_toggleCount != -1) { + _tree.setToggleClickCount(_toggleCount); + } + } + + public void mouseEntered(MouseEvent e) { + } + + public void mouseExited(MouseEvent e) { + } + + public void keyPressed(KeyEvent e) { + if (e.isConsumed()) { + return; + } + + if (!_tree.isCheckBoxEnabled()) { + return; + } + + if (e.getModifiers() == 0 && e.getKeyChar() == KeyEvent.VK_SPACE) { + toggleSelections(); + } + } + + public void keyTyped(KeyEvent e) { + } + + public void keyReleased(KeyEvent e) { + } + + public void valueChanged(TreeSelectionEvent e) { + _tree.treeDidChange(); + _tree.doWithValueChanged(e); + } + + private void toggleSelection(TreePath path) { + if (!_tree.isEnabled() || !_tree.isCheckBoxEnabled(path)) { + return; + } + CheckBoxTreeSelectionModel selectionModel = _tree.getCheckBoxTreeSelectionModel(); + boolean selected = selectionModel.isPathSelected(path, selectionModel.isDigIn()); + selectionModel.removeTreeSelectionListener(this); + try { + if (!selectionModel.isSingleEventMode()) { + selectionModel.setBatchMode(true); + } + if (selected) + selectionModel.removeSelectionPath(path); + else + selectionModel.addSelectionPath(path); + } finally { + if (!selectionModel.isSingleEventMode()) { + selectionModel.setBatchMode(false); + } + selectionModel.addTreeSelectionListener(this); + _tree.treeDidChange(); + _tree.doWithValueChanged(path); + } + } + + protected void toggleSelections() { + TreePath[] treePaths = _tree.getSelectionPaths(); + if (treePaths == null) { + return; + } + for (int i = 0, length = treePaths.length; i < length; i++) { + TreePath tmpTreePath = treePaths[i]; + toggleSelection(tmpTreePath); + } +// for (TreePath treePath : treePaths) { +// toggleSelection(treePath); +// } + } + } + + /** + * 更新UI + */ + public void updateUI() { + super.updateUI(); + setUI(new UIRoleTreeUI()); + } + + /** + * @param e 选中事件 + */ + protected void doWithValueChanged(TreeSelectionEvent e) { + if (e.getNewLeadSelectionPath() != null) { + if (!e.getNewLeadSelectionPath().getLastPathComponent().toString().equals(Inter.getLocText("FR-Designer_Role"))) { + roleName = e.getNewLeadSelectionPath().getLastPathComponent().toString(); + setTabRoleName(roleName); + refreshRoleTree(roleName); + refreshElementAndAuthorityPane(); + HistoryTemplateListPane.getInstance().getCurrentEditingTemplate().judgeSheetAuthority(roleName); + } + } + } + + /** + * @param treepath 所选的节点路径 + */ + protected void doWithValueChanged(TreePath treepath) { + if (treepath != null && !treepath.getLastPathComponent().toString().equals(Inter.getLocText("FR-Designer_Role"))) { + roleName = treepath.getLastPathComponent().toString(); + setTabRoleName(roleName); + refreshRoleTree(roleName); + refreshElementAndAuthorityPane(); + HistoryTemplateListPane.getInstance().getCurrentEditingTemplate().judgeSheetAuthority(roleName); + } + + } + + protected void setTabRoleName(String roleName) { + + } + + + /** + * 刷新角色树 + * + * @param selectedRole 角色 + */ + public void refreshRoleTree(String selectedRole) { + if (EastRegionContainerPane.getInstance().getAuthorityEditionPane() instanceof AuthorityPropertyPane) { + AuthorityPropertyPane authorityPropertyPane = (AuthorityPropertyPane) EastRegionContainerPane.getInstance().getAuthorityEditionPane(); + authorityPropertyPane.populate(); + EastRegionContainerPane.getInstance().replaceAuthorityEditionPane(authorityPropertyPane); + } + } + + public void setSelectedRole(String selectedRole, TreePath parent) { + ExpandMutableTreeNode node = (ExpandMutableTreeNode) parent.getLastPathComponent(); + if (node.children() != null && node.getChildCount() >= 0) { + for (Enumeration e = node.children(); e.hasMoreElements(); ) { + ExpandMutableTreeNode n = (ExpandMutableTreeNode) e.nextElement(); + Object userObj = n.getUserObject(); + String chilld = null; + if (userObj instanceof String) { + chilld = (String) userObj; + } else if (userObj instanceof NameObject) { + NameObject nameObject = (NameObject) userObj; + chilld = nameObject.getName(); + } + if (ComparatorUtils.equals(chilld, selectedRole)) { + this.setSelectionPath(parent.pathByAddingChild(n)); + return; + } else { + setSelectedRole(selectedRole, parent.pathByAddingChild(n)); + } + } + } + } + + + private void refreshElementAndAuthorityPane() { + JComponent authorityToolBar = DesignerContext.getDesignerFrame().getToolbarComponent(); + if (authorityToolBar instanceof BasicBeanPane) { + //说明是工具栏的 + ((BasicBeanPane) authorityToolBar).populateAuthority(); + } + HistoryTemplateListPane.getInstance().getCurrentEditingTemplate().repaint(); + } + + public String getSelectedRoleName() { + return roleName; + } + + public void setSelectedRoleName(String name) { + roleName = name; + } + + + private DefaultTreeCellRenderer roleTreeRenderer = new DefaultTreeCellRenderer() { + private static final long serialVersionUID = 2L; + + + public Component getTreeCellRendererComponent(JTree tree, Object value, boolean selected, boolean expanded, boolean leaf, int row, boolean hasFocus) { + super.getTreeCellRendererComponent(tree, value, selected, expanded, leaf, row, hasFocus); + ExpandMutableTreeNode treeNode = (ExpandMutableTreeNode) value; + Object userObj = treeNode.getUserObject(); + if (userObj instanceof String) { + // p:这个是column field. + this.setIcon(null); + this.setText((String) userObj); + } else if (userObj instanceof NameObject) { + NameObject nameObject = (NameObject) userObj; + this.setText(nameObject.getName()); + this.setIcon(null); + } + + + // 这里新建一个Label作为render是因为JTree在动态刷新的时候,节点上render画布的的宽度不会变,会使得一部分比较长的数据显示为"..." + this.setBackgroundNonSelectionColor(UIConstants.TREE_BACKGROUND); + this.setForeground(UIConstants.FONT_COLOR); + this.setBackgroundSelectionColor(UIConstants.FLESH_BLUE); + return this; + } + }; + + + /** + * 去除不需要的鼠标监听器 + * + * @param component 组件 + * @param l 所需的鼠标监听器 + * @param index 插入的索引 + */ + private void replaceMouseListener(Component component, MouseListener l, int index) { + + component.removeMouseListener(treeMouseListener); + + MouseListener[] listeners = component.getMouseListeners(); + for (int i = 0, length = listeners.length; i < length; i++) { + component.removeMouseListener(listeners[i]); + } +// for (MouseListener listener : listeners) { +// component.removeMouseListener(listener); +// } + for (int i = 0; i < listeners.length; i++) { + MouseListener listener = listeners[i]; + if (index == i) { + component.addMouseListener(l); + } + if (listener instanceof CheckBoxTree.Handler) { + continue; + } + component.addMouseListener(listener); + } + // index is too large, add to the end. + if (index > listeners.length - 1) { + component.addMouseListener(l); + } + } + + + /** + * 去除一些不需要的键盘监听器 + * + * @param component 组件 + * @param l 所需的键盘监听器 + * @param index 插入的索引 + */ + private void replaceKeyListener(Component component, KeyListener l, int index) { + + KeyListener[] listeners = component.getKeyListeners(); + for (int i = 0, length = listeners.length; i < length; i++) { + component.removeKeyListener(listeners[i]); + } +// for (MouseListener listener : listeners) { +// component.removeMouseListener(listener); +// } + for (int i = 0; i < listeners.length; i++) { + KeyListener listener = listeners[i]; + if (index == i) { + component.addKeyListener(l); + } + if (listener instanceof CheckBoxTree.Handler) { + continue; + } + + component.addKeyListener(listener); + } + // index is too large, add to the end. + if (index > listeners.length - 1) { + component.addKeyListener(l); + } + } + + /* + * p:获得选中的NameObject = name + role. + */ + public NameObject getSelectedNameObject() { + TreePath selectedTreePath = this.getSelectionPath(); + if (selectedTreePath == null) { + return null; + } + ExpandMutableTreeNode selectedTreeNode = (ExpandMutableTreeNode) selectedTreePath.getLastPathComponent(); + Object selectedUserObject = selectedTreeNode.getUserObject(); + return new NameObject(selectedUserObject.toString(), ""); + } + + + /** + * p:添加一个NameObject节点 + * + * @param no 需要添加的节点 + */ + public void addNameObject(NameObject no) { + if (no == null) { + return; + } + DefaultTreeModel treeModel = (DefaultTreeModel) this.getModel(); + + // 新建一个放着NameObject的newChildTreeNode,加到Root下面 + ExpandMutableTreeNode root = (ExpandMutableTreeNode) treeModel.getRoot(); + + ExpandMutableTreeNode newChildTreeNode = new ExpandMutableTreeNode(no); + root.add(newChildTreeNode); + newChildTreeNode.add(new ExpandMutableTreeNode()); + treeModel.reload(root); + } + + + /** + * 刷新树节点 + */ + public void refreshTreeNode() { + DefaultTreeModel treeModel = (DefaultTreeModel) this.getModel(); + ExpandMutableTreeNode root = (ExpandMutableTreeNode) treeModel.getRoot(); + if (interceptRefresh(root)) { + return; + } + + ExpandMutableTreeNode[] new_nodes = loadChildTreeNodes(root); + + List childTreeNodeList = new ArrayList(); + for (int i = 0, len = root.getChildCount(); i < len; i++) { + if (root.getChildAt(i) instanceof ExpandMutableTreeNode) { + childTreeNodeList.add((ExpandMutableTreeNode) root.getChildAt(i)); + } else { + childTreeNodeList.add((DefaultMutableTreeNode) root.getChildAt(i)); + } + } + + root.removeAllChildren(); + + for (int ci = 0; ci < new_nodes.length; ci++) { + Object cUserObject = new_nodes[ci].getUserObject(); + + for (int ni = 0, nlen = childTreeNodeList.size(); ni < nlen; ni++) { + ExpandMutableTreeNode cTreeNode = (ExpandMutableTreeNode) childTreeNodeList.get(ni); + if (ComparatorUtils.equals(cTreeNode.getUserObject(), cUserObject)) { + new_nodes[ci].setExpanded(cTreeNode.isExpanded()); + if (cTreeNode.getFirstChild() instanceof ExpandMutableTreeNode && cTreeNode.isExpanded()) { + checkChildNodes(cTreeNode, new_nodes[ci]); + } + break; + } + } + + root.add(new_nodes[ci]); + } + } + + + protected void checkChildNodes(ExpandMutableTreeNode oldNode, ExpandMutableTreeNode newNode) { + for (int i = 0; i < oldNode.getChildCount(); i++) { + ExpandMutableTreeNode oldChild = (ExpandMutableTreeNode) oldNode.getChildAt(i); + for (int j = 0; j < newNode.getChildCount(); j++) { + ExpandMutableTreeNode newChild = (ExpandMutableTreeNode) newNode.getChildAt(j); + ExpandMutableTreeNode[] nodes = RoleTree.this.loadChildTreeNodes(newChild); + for (int k = 0; k < nodes.length; k++) { + newChild.add(nodes[k]); + } + if (newChild.getChildCount() > 1 && ((ExpandMutableTreeNode) newChild.getFirstChild()).getUserObject() == PENDING) { + newChild.remove(0); + } + if (ComparatorUtils.equals(oldChild.getUserObject(), newChild.getUserObject())) { + newChild.setExpanded(oldChild.isExpanded()); + } + } + } + } + + public NameObject getRealSelectedNameObject() { + TreePath selectedTreePath = this.getSelectionPath(); + if (selectedTreePath == null) { + return null; + } + + ExpandMutableTreeNode selectedTreeNode = (ExpandMutableTreeNode) selectedTreePath.getLastPathComponent(); + Object selectedUserObject = selectedTreeNode.getUserObject(); + if (selectedUserObject instanceof NameObject) { + return (NameObject) selectedUserObject; + } + + selectedTreeNode = (ExpandMutableTreeNode) selectedTreeNode.getParent(); + selectedUserObject = selectedTreeNode.getUserObject(); + if (selectedUserObject instanceof NameObject) { + return (NameObject) selectedUserObject; + } + return null; + } + + +} \ No newline at end of file From 4dbcd0eb047f1ff164293db69faa5e24067b6032 Mon Sep 17 00:00:00 2001 From: hzzz Date: Wed, 20 Sep 2017 15:49:30 +0800 Subject: [PATCH 025/125] =?UTF-8?q?=E4=B8=8B=E6=8B=89=E6=A0=91=E8=83=8C?= =?UTF-8?q?=E6=99=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/com/fr/design/roleAuthority/RolesAlreadyEditedPane.java | 1 - 1 file changed, 1 deletion(-) diff --git a/designer_base/src/com/fr/design/roleAuthority/RolesAlreadyEditedPane.java b/designer_base/src/com/fr/design/roleAuthority/RolesAlreadyEditedPane.java index 5c6cc9d441..eaa176c9b6 100644 --- a/designer_base/src/com/fr/design/roleAuthority/RolesAlreadyEditedPane.java +++ b/designer_base/src/com/fr/design/roleAuthority/RolesAlreadyEditedPane.java @@ -39,7 +39,6 @@ public class RolesAlreadyEditedPane extends JPanel { THIS = new RolesAlreadyEditedPane(); } return THIS; - } From 146d4d97357244a303e8a2fe9e2be5fb3a486c44 Mon Sep 17 00:00:00 2001 From: MoMeak Date: Wed, 20 Sep 2017 16:25:38 +0800 Subject: [PATCH 026/125] =?UTF-8?q?=20REPORT-4709=20[9.0=E4=BA=8C=E8=BD=AE?= =?UTF-8?q?=E5=9B=9E=E5=BD=92]=E5=8D=95=E5=85=83=E6=A0=BC=E5=B1=9E?= =?UTF-8?q?=E6=80=A7-=E6=8F=92=E5=85=A5=E8=A1=8C=E7=AD=96=E7=95=A5-?= =?UTF-8?q?=E9=BB=98=E8=AE=A4=E5=80=BC=E7=B1=BB=E5=9E=8B=E4=B8=BA=E5=85=AC?= =?UTF-8?q?=E5=BC=8F=E4=B8=BA=E7=A9=BA=E6=97=B6=EF=BC=8C=E4=B8=8D=E4=BC=9A?= =?UTF-8?q?=E8=A7=A6=E5=8F=91=E4=BF=9D=E5=AD=98=20=20REPORT-4710=20[9.0?= =?UTF-8?q?=E4=BA=8C=E8=BD=AE=E5=9B=9E=E5=BD=92]=20=E5=8D=95=E5=85=83?= =?UTF-8?q?=E6=A0=BC=E6=A0=B7=E5=BC=8F=E8=BE=B9=E6=A1=86=E8=AE=BE=E7=BD=AE?= =?UTF-8?q?=E5=90=8E=E6=B7=BB=E5=8A=A0=E9=A2=9C=E8=89=B2=E8=83=8C=E6=99=AF?= =?UTF-8?q?=EF=BC=8C=E5=B0=B1=E6=97=A0=E6=B3=95=E6=9B=B4=E6=94=B9=E8=BE=B9?= =?UTF-8?q?=E6=A1=86=E8=AE=BE=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fr/design/editor/DoubleDeckValueEditorPane.java | 6 +++--- .../src/com/fr/design/editor/ValueEditorPane.java | 12 +++++------- .../com/fr/design/editor/editor/FormulaEditor.java | 4 ++++ .../src/com/fr/design/gui/style/BorderPane.java | 7 +------ .../backgroundpane/ColorBackgroundQuickPane.java | 5 +++-- 5 files changed, 16 insertions(+), 18 deletions(-) diff --git a/designer_base/src/com/fr/design/editor/DoubleDeckValueEditorPane.java b/designer_base/src/com/fr/design/editor/DoubleDeckValueEditorPane.java index 77f50aa6d5..be285dd947 100644 --- a/designer_base/src/com/fr/design/editor/DoubleDeckValueEditorPane.java +++ b/designer_base/src/com/fr/design/editor/DoubleDeckValueEditorPane.java @@ -217,9 +217,9 @@ public class DoubleDeckValueEditorPane extends BasicPane implements UIObserver, String name = currentEditor.getName(); Object columnIndex = currentEditor.getValue(); //bug86542,这边为啥要new一个公式出来,只保留content,其他属性全不要了? -// if (ComparatorUtils.equals(name, Inter.getLocText("Formula"))) { -// columnIndex = new Formula(columnIndex == null ? "" : columnIndex.toString()); -// } + if (columnIndex == null && ComparatorUtils.equals(name, Inter.getLocText("Formula"))) { + columnIndex = ((FormulaEditor) currentEditor).getFormula(); + } return columnIndex; } diff --git a/designer_base/src/com/fr/design/editor/ValueEditorPane.java b/designer_base/src/com/fr/design/editor/ValueEditorPane.java index 0a7600e2f4..6b2a7fd30d 100644 --- a/designer_base/src/com/fr/design/editor/ValueEditorPane.java +++ b/designer_base/src/com/fr/design/editor/ValueEditorPane.java @@ -2,6 +2,7 @@ package com.fr.design.editor; import com.fr.base.Formula; import com.fr.design.DesignerEnvManager; +import com.fr.design.editor.editor.*; import com.fr.design.event.GlobalNameListener; import com.fr.design.event.GlobalNameObserver; import com.fr.design.event.UIObserver; @@ -11,10 +12,6 @@ import com.fr.design.gui.imenu.UIMenuItem; import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.mainframe.DesignerContext; import com.fr.design.dialog.BasicPane; -import com.fr.design.editor.editor.ColumnNameEditor; -import com.fr.design.editor.editor.Editor; -import com.fr.design.editor.editor.TextEditor; -import com.fr.design.editor.editor.XMLANameEditor; import com.fr.general.ComparatorUtils; import com.fr.general.Inter; import com.fr.stable.StringUtils; @@ -207,9 +204,10 @@ public class ValueEditorPane extends BasicPane implements UIObserver, GlobalName String name = currentEditor.getName(); Object columnIndex = currentEditor.getValue(); //bug86542,这边为啥要new一个公式出来,只保留content,其他属性全不要了? -// if (ComparatorUtils.equals(name, Inter.getLocText("Formula"))) { -// columnIndex = new Formula(columnIndex == null ? "" : columnIndex.toString()); -// } + //MoMeak:我也想注释了,但是有bug啊。。。 + if (columnIndex == null && ComparatorUtils.equals(name, Inter.getLocText("Formula"))) { + columnIndex = ((FormulaEditor) currentEditor).getFormula(); + } return columnIndex; } diff --git a/designer_base/src/com/fr/design/editor/editor/FormulaEditor.java b/designer_base/src/com/fr/design/editor/editor/FormulaEditor.java index 44d8c9f8cd..943fb3a66d 100644 --- a/designer_base/src/com/fr/design/editor/editor/FormulaEditor.java +++ b/designer_base/src/com/fr/design/editor/editor/FormulaEditor.java @@ -96,6 +96,10 @@ public class FormulaEditor extends Editor { }).setVisible(true); } + public Formula getFormula(){ + return formula; + } + /** * Return the value of the CellEditor. */ diff --git a/designer_base/src/com/fr/design/gui/style/BorderPane.java b/designer_base/src/com/fr/design/gui/style/BorderPane.java index d5a3bd9146..a78c4fd7e2 100644 --- a/designer_base/src/com/fr/design/gui/style/BorderPane.java +++ b/designer_base/src/com/fr/design/gui/style/BorderPane.java @@ -203,21 +203,16 @@ public class BorderPane extends AbstractBasicStylePane implements GlobalNameObse CellBorderStyle cellBorderStyle = this.update(); HashSet borderSet = new HashSet(Arrays.asList(BORDERARRAY)); + style = style.deriveBackground(backgroundPane.update()); if (backgroundPane.currentPane != backgroundPane.paneList[1]){ if (borderSet.contains(globalNameListener.getGlobalName())) { style = style.deriveBorder(cellBorderStyle.getTopStyle(), cellBorderStyle.getTopColor(), cellBorderStyle.getBottomStyle(), cellBorderStyle.getBottomColor(), cellBorderStyle.getLeftStyle(), cellBorderStyle.getLeftColor(), cellBorderStyle.getRightStyle(), cellBorderStyle.getRightColor()); - style = style.deriveBackground(backgroundPane.update()); - } else { - style = style.deriveBackground(backgroundPane.update()); } }else { if (borderSet.contains(globalNameListener.getGlobalName()) && !((ColorBackgroundQuickPane) backgroundPane.currentPane).isBackGroundColor()){ style = style.deriveBorder(cellBorderStyle.getTopStyle(), cellBorderStyle.getTopColor(), cellBorderStyle.getBottomStyle(), cellBorderStyle.getBottomColor(), cellBorderStyle.getLeftStyle(), cellBorderStyle.getLeftColor(), cellBorderStyle.getRightStyle(), cellBorderStyle.getRightColor()); - style = style.deriveBackground(backgroundPane.update()); - } else { - style = style.deriveBackground(backgroundPane.update()); } } diff --git a/designer_base/src/com/fr/design/mainframe/backgroundpane/ColorBackgroundQuickPane.java b/designer_base/src/com/fr/design/mainframe/backgroundpane/ColorBackgroundQuickPane.java index 7839d0cdb1..ef106b17b0 100644 --- a/designer_base/src/com/fr/design/mainframe/backgroundpane/ColorBackgroundQuickPane.java +++ b/designer_base/src/com/fr/design/mainframe/backgroundpane/ColorBackgroundQuickPane.java @@ -29,8 +29,8 @@ public class ColorBackgroundQuickPane extends BackgroundQuickPane { public void populateBean(Background background) { ColorBackground colorBackgroud = (ColorBackground) background; - isBackGroundColor = false; this.detailColorSelectPane.setColor(colorBackgroud.getColor()); + isBackGroundColor = false; } public Background updateBean() { @@ -50,8 +50,9 @@ public class ColorBackgroundQuickPane extends BackgroundQuickPane { public void registerChangeListener(final UIObserverListener listener) { detailColorSelectPane.addChangeListener(new ChangeListener() { public void stateChanged(ChangeEvent e) { - listener.doChange(); isBackGroundColor = true; + listener.doChange(); + isBackGroundColor = false; } }); } From 436a6bd227ca9a77c6b1d50064681225ebf63f69 Mon Sep 17 00:00:00 2001 From: hzzz Date: Wed, 20 Sep 2017 16:32:30 +0800 Subject: [PATCH 027/125] toolbar border --- .../src/com/fr/design/constants/UIConstants.java | 2 +- .../com/fr/design/data/datapane/TableDataTreePane.java | 3 +++ .../fr/design/mainframe/DesignerFrameFileDealerPane.java | 9 ++++++--- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/designer_base/src/com/fr/design/constants/UIConstants.java b/designer_base/src/com/fr/design/constants/UIConstants.java index fd809bb81a..ae9f97d06f 100644 --- a/designer_base/src/com/fr/design/constants/UIConstants.java +++ b/designer_base/src/com/fr/design/constants/UIConstants.java @@ -64,6 +64,7 @@ public interface UIConstants { Constants.LINE_MEDIUM_DASH_DOT_DOT, //medium dash-dot-dot border Constants.LINE_SLANTED_DASH_DOT, //slanted dash-dot border }; + public static final Color TOOLBAR_BORDER_COLOR = new Color(0xD9DADD); public static final Color COMBOBOX_BTN_NORMAL = new Color(0xD9DADD); public static final Color COMBOBOX_BTN_ROLLOVER = new Color(0xC8C9CD); public static final Color COMBOBOX_BTN_PRESS = new Color(0xD8F2FD); @@ -116,7 +117,6 @@ public interface UIConstants { public static final Color POPUP_TITLE_BACKGROUND = new Color(0xd8f2fd); - public static final BufferedImage DRAG_BAR = BaseUtils.readImage("com/fr/design/images/control/bar.png"); public static final BufferedImage DRAG_BAR_RIGHT = BaseUtils.readImage("com/fr/design/images/control/barm.png"); public static final BufferedImage DRAG_BAR_LEFT = BaseUtils.readImage("com/fr/design/images/control/barl.png"); diff --git a/designer_base/src/com/fr/design/data/datapane/TableDataTreePane.java b/designer_base/src/com/fr/design/data/datapane/TableDataTreePane.java index c507995f41..7a4cf52042 100644 --- a/designer_base/src/com/fr/design/data/datapane/TableDataTreePane.java +++ b/designer_base/src/com/fr/design/data/datapane/TableDataTreePane.java @@ -6,6 +6,7 @@ import com.fr.data.TableDataSource; import com.fr.design.DesignModelAdapter; import com.fr.design.ExtraDesignClassManager; import com.fr.design.actions.UpdateAction; +import com.fr.design.constants.UIConstants; import com.fr.design.data.BasicTableDataTreePane; import com.fr.design.data.DesignTableDataManager; import com.fr.design.data.tabledata.StoreProcedureWorkerListener; @@ -111,6 +112,8 @@ public class TableDataTreePane extends BasicTableDataTreePane { ToolBarDef toolbarDef = new ToolBarDef(); toolbarDef.addShortCut(addMenuDef, SeparatorDef.DEFAULT, editAction, removeAction, SeparatorDef.DEFAULT, previewTableDataAction, connectionTableAction); UIToolbar toolBar = ToolBarDef.createJToolBar(); + toolBar.setBorder(BorderFactory.createMatteBorder(0, 0, 1, 0, UIConstants.TOOLBAR_BORDER_COLOR)); + toolBar.setBorderPainted(true); toolbarDef.updateToolBar(toolBar); JPanel toolbarPane = FRGUIPaneFactory.createBorderLayout_S_Pane(); diff --git a/designer_base/src/com/fr/design/mainframe/DesignerFrameFileDealerPane.java b/designer_base/src/com/fr/design/mainframe/DesignerFrameFileDealerPane.java index f89a0766f8..0c780fe941 100644 --- a/designer_base/src/com/fr/design/mainframe/DesignerFrameFileDealerPane.java +++ b/designer_base/src/com/fr/design/mainframe/DesignerFrameFileDealerPane.java @@ -79,10 +79,13 @@ public class DesignerFrameFileDealerPane extends JPanel implements FileToolbarSt private DesignerFrameFileDealerPane() { setLayout(new BorderLayout()); toolBar = ToolBarDef.createJToolBar(); - toolBar.setBorder(BorderFactory.createEmptyBorder(3, 0, 4, 0)); + toolBar.setBorder(BorderFactory.createMatteBorder(0, 0, 1, 0, UIConstants.TOOLBAR_BORDER_COLOR)); + toolBar.setBorderPainted(true); JPanel tooBarPane = FRGUIPaneFactory.createBorderLayout_S_Pane(); - - tooBarPane.add(toolBar, BorderLayout.CENTER); + JPanel parent = new JPanel(new BorderLayout()); + parent.add(toolBar, BorderLayout.CENTER); + parent.setBorder(BorderFactory.createEmptyBorder(3, 0, 4, 0)); + tooBarPane.add(parent, BorderLayout.CENTER); tooBarPane.add(new UIMenuHighLight(), BorderLayout.SOUTH); add(tooBarPane, BorderLayout.NORTH); From f756f4d1d9377f05d3d2dbda308f57c1b317149c Mon Sep 17 00:00:00 2001 From: hzzz Date: Wed, 20 Sep 2017 17:09:09 +0800 Subject: [PATCH 028/125] =?UTF-8?q?=E6=96=B0=E5=BB=BA=E6=A8=A1=E6=9D=BF?= =?UTF-8?q?=E6=8C=89=E9=92=AE=E8=83=8C=E6=99=AF=E8=89=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- designer_base/src/com/fr/design/file/NewTemplatePane.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/designer_base/src/com/fr/design/file/NewTemplatePane.java b/designer_base/src/com/fr/design/file/NewTemplatePane.java index 58cae2ab98..1900cda0d4 100644 --- a/designer_base/src/com/fr/design/file/NewTemplatePane.java +++ b/designer_base/src/com/fr/design/file/NewTemplatePane.java @@ -10,6 +10,7 @@ import java.awt.event.MouseEvent; import java.awt.event.MouseListener; import java.awt.event.MouseMotionListener; import java.awt.geom.Line2D; +import java.awt.geom.Rectangle2D; /** * Author : daisy @@ -45,6 +46,8 @@ public abstract class NewTemplatePane extends JComponent implements MouseListene public void paintComponent(Graphics g) { super.paintComponent(g); g2d = (Graphics2D) g; + g2d.setColor(UIConstants.COMBOBOX_BTN_NORMAL); + g2d.fill(new Rectangle2D.Double(0, 0, getWidth(),getHeight())); int sheetIconY = (getHeight() - newWorkBookIconMode.getIconHeight()) / 2; newWorkBookIconMode.paintIcon(this, g2d, newIconStartX, sheetIconY); // paintUnderLine(g2d); From 533bc6316adcd0475afa9d3dfc1d03b387ff9c34 Mon Sep 17 00:00:00 2001 From: hzzz Date: Wed, 20 Sep 2017 17:14:34 +0800 Subject: [PATCH 029/125] =?UTF-8?q?=E5=B0=8F=E6=B4=9E=E6=B4=9E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- designer_base/src/com/fr/design/file/MutilTempalteTabPane.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/designer_base/src/com/fr/design/file/MutilTempalteTabPane.java b/designer_base/src/com/fr/design/file/MutilTempalteTabPane.java index 4fc8b0640a..44307b018e 100644 --- a/designer_base/src/com/fr/design/file/MutilTempalteTabPane.java +++ b/designer_base/src/com/fr/design/file/MutilTempalteTabPane.java @@ -373,7 +373,7 @@ public class MutilTempalteTabPane extends JComponent implements MouseListener, M private void paintDefaultBackground(Graphics2D g2d) { //画默认背景 g2d.setPaint(new GradientPaint(1, 1, new Color(217, 218, 221), 1, getHeight() - 1, new Color(217, 218, 221))); - g2d.fillRect(getX(), getY(), getWidth(), getHeight()); + g2d.fillRect(0, 0, getWidth(), getHeight()); } From b565a87b3ec34065303e1f2874551aa7da1e5e8f Mon Sep 17 00:00:00 2001 From: hzzz Date: Wed, 20 Sep 2017 17:20:14 +0800 Subject: [PATCH 030/125] =?UTF-8?q?=E5=8F=82=E6=95=B0=E6=A0=8F=E6=A0=87?= =?UTF-8?q?=E5=B0=BA=E9=A2=9C=E8=89=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- designer_base/src/com/fr/design/constants/UIConstants.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/designer_base/src/com/fr/design/constants/UIConstants.java b/designer_base/src/com/fr/design/constants/UIConstants.java index ae9f97d06f..cbd831735d 100644 --- a/designer_base/src/com/fr/design/constants/UIConstants.java +++ b/designer_base/src/com/fr/design/constants/UIConstants.java @@ -103,7 +103,7 @@ public interface UIConstants { public static final Color SELECTED_BACKGROUND = new Color(0xdeedfe); public static final Color SELECTED_BORDER_LINE_COLOR = new Color(0x3384f0); public static final Color DEFAULT_BG_RULER = new Color(0xffffff); - public static final Color RULER_LINE_COLOR = new Color(0xababab); + public static final Color RULER_LINE_COLOR = new Color(0xD9DADD); public static final Color RULER_SCALE_COLOR = new Color(0x4e504f); public static final Color PROPERTY_PANE_BACKGROUND = new Color(0xdadadd); public static final Color SPLIT_LINE = new Color(201, 198, 184); @@ -117,6 +117,7 @@ public interface UIConstants { public static final Color POPUP_TITLE_BACKGROUND = new Color(0xd8f2fd); + public static final BufferedImage DRAG_BAR = BaseUtils.readImage("com/fr/design/images/control/bar.png"); public static final BufferedImage DRAG_BAR_RIGHT = BaseUtils.readImage("com/fr/design/images/control/barm.png"); public static final BufferedImage DRAG_BAR_LEFT = BaseUtils.readImage("com/fr/design/images/control/barl.png"); From c515500b2da8603d04b31fb5358667ba49b8fe2d Mon Sep 17 00:00:00 2001 From: plough Date: Wed, 20 Sep 2017 17:36:51 +0800 Subject: [PATCH 031/125] =?UTF-8?q?REPORT-4714=20=E5=8D=95=E5=85=83?= =?UTF-8?q?=E6=A0=BC=E8=83=8C=E6=99=AF=E9=80=89=E6=8B=A9=E5=9B=BE=E7=89=87?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/fr/design/gui/style/BackgroundPane.java | 7 +++++++ .../backgroundpane/BackgroundQuickPane.java | 2 ++ .../backgroundpane/ColorBackgroundQuickPane.java | 5 +++++ .../GradientBackgroundQuickPane.java | 15 +++++++++++++++ .../backgroundpane/ImageBackgroundQuickPane.java | 6 ++++++ .../backgroundpane/NullBackgroundQuickPane.java | 5 +++++ .../PatternBackgroundQuickPane.java | 7 +++++++ .../TextureBackgroundQuickPane.java | 6 ++++++ 8 files changed, 53 insertions(+) diff --git a/designer_base/src/com/fr/design/gui/style/BackgroundPane.java b/designer_base/src/com/fr/design/gui/style/BackgroundPane.java index a1841a9544..6e7ffd28da 100644 --- a/designer_base/src/com/fr/design/gui/style/BackgroundPane.java +++ b/designer_base/src/com/fr/design/gui/style/BackgroundPane.java @@ -140,6 +140,7 @@ public class BackgroundPane extends AbstractBasicStylePane { * Populate background. */ public void populateBean(Background background) { + resetPaneList(); for (int i = 0; i < paneList.length; i++) { BackgroundQuickPane pane = paneList[i]; if (pane.accept(background)) { @@ -151,6 +152,12 @@ public class BackgroundPane extends AbstractBasicStylePane { } } + private void resetPaneList() { + for (BackgroundQuickPane pane : paneList) { + pane.reset(); + } + } + /** * Update background. */ diff --git a/designer_base/src/com/fr/design/mainframe/backgroundpane/BackgroundQuickPane.java b/designer_base/src/com/fr/design/mainframe/backgroundpane/BackgroundQuickPane.java index 1b796c438b..850132d863 100644 --- a/designer_base/src/com/fr/design/mainframe/backgroundpane/BackgroundQuickPane.java +++ b/designer_base/src/com/fr/design/mainframe/backgroundpane/BackgroundQuickPane.java @@ -21,6 +21,8 @@ public abstract class BackgroundQuickPane extends BasicBeanPane impl @Override public abstract String title4PopupWindow(); + public abstract void reset(); + /** * 组件是否需要响应添加的观察者事件 * diff --git a/designer_base/src/com/fr/design/mainframe/backgroundpane/ColorBackgroundQuickPane.java b/designer_base/src/com/fr/design/mainframe/backgroundpane/ColorBackgroundQuickPane.java index 7839d0cdb1..818ac8c3bb 100644 --- a/designer_base/src/com/fr/design/mainframe/backgroundpane/ColorBackgroundQuickPane.java +++ b/designer_base/src/com/fr/design/mainframe/backgroundpane/ColorBackgroundQuickPane.java @@ -76,4 +76,9 @@ public class ColorBackgroundQuickPane extends BackgroundQuickPane { public String title4PopupWindow() { return Inter.getLocText("Color"); } + + @Override + public void reset() { + this.detailColorSelectPane.setColor(null); + } } \ No newline at end of file diff --git a/designer_base/src/com/fr/design/mainframe/backgroundpane/GradientBackgroundQuickPane.java b/designer_base/src/com/fr/design/mainframe/backgroundpane/GradientBackgroundQuickPane.java index 97ba9cbe7c..dc7fd94167 100644 --- a/designer_base/src/com/fr/design/mainframe/backgroundpane/GradientBackgroundQuickPane.java +++ b/designer_base/src/com/fr/design/mainframe/backgroundpane/GradientBackgroundQuickPane.java @@ -119,4 +119,19 @@ public class GradientBackgroundQuickPane extends BackgroundQuickPane { return Inter.getLocText("Gradient-Color"); } + @Override + public void reset() { + this.gradientBar.getSelectColorPointBtnP1().setColorInner(Color.WHITE); + this.gradientBar.getSelectColorPointBtnP2().setColorInner(Color.BLACK); + directionPane.setSelectedItem(0); + int startValue = 4; + int endValue = this.gradientBarWidth; + gradientBar.setStartValue(startValue); + gradientBar.setEndValue(endValue); + if(this.gradientBar.getSelectColorPointBtnP1() != null && this.gradientBar.getSelectColorPointBtnP2() != null){ + this.gradientBar.getSelectColorPointBtnP1().setX(startValue); + this.gradientBar.getSelectColorPointBtnP2().setX(endValue); + } + } + } \ No newline at end of file diff --git a/designer_base/src/com/fr/design/mainframe/backgroundpane/ImageBackgroundQuickPane.java b/designer_base/src/com/fr/design/mainframe/backgroundpane/ImageBackgroundQuickPane.java index 4dafe476a4..22fa2c1e28 100644 --- a/designer_base/src/com/fr/design/mainframe/backgroundpane/ImageBackgroundQuickPane.java +++ b/designer_base/src/com/fr/design/mainframe/backgroundpane/ImageBackgroundQuickPane.java @@ -179,4 +179,10 @@ public class ImageBackgroundQuickPane extends BackgroundQuickPane { public String title4PopupWindow() { return Inter.getLocText("FR-Background_Image"); } + + @Override + public void reset() { + imageLayoutPane.setSelectedIndex(0); + previewPane.setImage(null); + } } \ No newline at end of file diff --git a/designer_base/src/com/fr/design/mainframe/backgroundpane/NullBackgroundQuickPane.java b/designer_base/src/com/fr/design/mainframe/backgroundpane/NullBackgroundQuickPane.java index 60d39ed2d6..ff4b0b590f 100644 --- a/designer_base/src/com/fr/design/mainframe/backgroundpane/NullBackgroundQuickPane.java +++ b/designer_base/src/com/fr/design/mainframe/backgroundpane/NullBackgroundQuickPane.java @@ -51,4 +51,9 @@ public class NullBackgroundQuickPane extends BackgroundQuickPane { return Inter.getLocText("Background-Null"); } + @Override + public void reset() { + // do nothing + } + } \ No newline at end of file diff --git a/designer_base/src/com/fr/design/mainframe/backgroundpane/PatternBackgroundQuickPane.java b/designer_base/src/com/fr/design/mainframe/backgroundpane/PatternBackgroundQuickPane.java index 86a96a2cbf..4b51108bde 100644 --- a/designer_base/src/com/fr/design/mainframe/backgroundpane/PatternBackgroundQuickPane.java +++ b/designer_base/src/com/fr/design/mainframe/backgroundpane/PatternBackgroundQuickPane.java @@ -215,4 +215,11 @@ public class PatternBackgroundQuickPane extends BackgroundQuickPane { public String title4PopupWindow() { return Inter.getLocText("FR-Designer_Background-Pattern"); } + + @Override + public void reset() { + patternButtonArray[0].setSelected(true); + foregroundColorPane.setSelectObject(null); + backgroundColorPane.setSelectObject(null); + } } \ No newline at end of file diff --git a/designer_base/src/com/fr/design/mainframe/backgroundpane/TextureBackgroundQuickPane.java b/designer_base/src/com/fr/design/mainframe/backgroundpane/TextureBackgroundQuickPane.java index 33e09057b6..fc0ae8f8a2 100644 --- a/designer_base/src/com/fr/design/mainframe/backgroundpane/TextureBackgroundQuickPane.java +++ b/designer_base/src/com/fr/design/mainframe/backgroundpane/TextureBackgroundQuickPane.java @@ -169,4 +169,10 @@ public class TextureBackgroundQuickPane extends BackgroundQuickPane { public String title4PopupWindow() { return Inter.getLocText("Background-Texture"); } + + @Override + public void reset() { + this.texturePaint = null; + textureButtonArray[0].setSelected(true); + } } \ No newline at end of file From 67cfaaa9d10ff128f1a5e699e68952a98c2ffa45 Mon Sep 17 00:00:00 2001 From: hzzz Date: Wed, 20 Sep 2017 17:49:36 +0800 Subject: [PATCH 032/125] =?UTF-8?q?Grid=E7=BA=BF=E9=A2=9C=E8=89=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fr/design/mainframe/ElementCasePane.java | 1 - designer/src/com/fr/grid/Grid.java | 325 ++++++++---------- designer/src/com/fr/grid/GridHeader.java | 4 +- 3 files changed, 137 insertions(+), 193 deletions(-) diff --git a/designer/src/com/fr/design/mainframe/ElementCasePane.java b/designer/src/com/fr/design/mainframe/ElementCasePane.java index 94fdcead8f..1a6cf0ddae 100644 --- a/designer/src/com/fr/design/mainframe/ElementCasePane.java +++ b/designer/src/com/fr/design/mainframe/ElementCasePane.java @@ -390,7 +390,6 @@ public abstract class ElementCasePane extends Tar grid.setDefaultFloatEditor(Image.class, new ImageFloatEditor()); DesignerEnvManager designerEnvManager = DesignerEnvManager.getEnvManager(); - grid.setGridLineColor(designerEnvManager.getGridLineColor()); grid.setPaginationLineColor(designerEnvManager.getPaginationLineColor()); } diff --git a/designer/src/com/fr/grid/Grid.java b/designer/src/com/fr/grid/Grid.java index f90b000d4e..94c6f4a43a 100644 --- a/designer/src/com/fr/grid/Grid.java +++ b/designer/src/com/fr/grid/Grid.java @@ -10,7 +10,6 @@ import com.fr.design.constants.UIConstants; import com.fr.design.fun.GridUIProcessor; import com.fr.design.gui.itextfield.UITextField; import com.fr.design.mainframe.ElementCasePane; -import com.fr.design.mainframe.templateinfo.TemplateInfoCollector; import com.fr.design.utils.gui.GUICoreUtils; import com.fr.general.ComparatorUtils; import com.fr.grid.event.CellEditorEvent; @@ -36,7 +35,6 @@ import javax.swing.plaf.ComponentUI; import java.awt.*; import java.awt.event.MouseEvent; import java.awt.geom.Point2D; -import java.util.Date; import java.util.Hashtable; import java.util.Iterator; @@ -57,7 +55,7 @@ public class Grid extends BaseGridComponent { transient private TemplateCellElement editingCellElement; private boolean showGridLine = true; - private Color gridLineColor = new Color(0xf0f0f3); // line color. + private Color gridLineColor = UIConstants.RULER_LINE_COLOR; // line color. private boolean isShowPaginateLine = true; private Color paginationLineColor = Color.RED; // line color of paper @@ -146,12 +144,10 @@ public class Grid extends BaseGridComponent { } /** - * 应用界面设置 - * - * - * @date 2014-12-21-下午6:32:43 - * - */ + * 应用界面设置 + * + * @date 2014-12-21-下午6:32:43 + */ public void updateUI() { GridUIProcessor localGridUIProcessor = ExtraDesignClassManager.getInstance().getSingle(GridUIProcessor.MARK_STRING, new DefaultGridUIProcessor()); ComponentUI localComponentUI = localGridUIProcessor.appearanceForGrid(this.resolution); @@ -160,14 +156,11 @@ public class Grid extends BaseGridComponent { /** - * 是否显示格子线 - * - * @return 是否显示格子线 - * - * - * @date 2014-12-21-下午6:32:13 - * - */ + * 是否显示格子线 + * + * @return 是否显示格子线 + * @date 2014-12-21-下午6:32:13 + */ public boolean isShowGridLine() { return showGridLine; } @@ -183,7 +176,7 @@ public class Grid extends BaseGridComponent { this.getElementCasePane().repaint(); } - public GridMouseAdapter getGridMouseAdapter(){ + public GridMouseAdapter getGridMouseAdapter() { return this.gridMouseAdapter; } @@ -210,14 +203,11 @@ public class Grid extends BaseGridComponent { } /** - * 是否显示分页线 - * - * @return 是否显示分页线 - * - * - * @date 2014-12-21-下午6:31:45 - * - */ + * 是否显示分页线 + * + * @return 是否显示分页线 + * @date 2014-12-21-下午6:31:45 + */ public boolean isShowPaginateLine() { return isShowPaginateLine; } @@ -253,14 +243,11 @@ public class Grid extends BaseGridComponent { /** - * 是否显示垂直冻结线 - * - * @return 是否显示垂直冻结线 - * - * - * @date 2014-12-21-下午6:29:35 - * - */ + * 是否显示垂直冻结线 + * + * @return 是否显示垂直冻结线 + * @date 2014-12-21-下午6:29:35 + */ public boolean isShowVerticalFrozenLine() { return isShowVerticalFrozenLine; } @@ -295,14 +282,11 @@ public class Grid extends BaseGridComponent { } /** - * 是否显示水平冻结线 - * - * @return 是否显示水平冻结线 - * - * - * @date 2014-12-21-下午6:29:35 - * - */ + * 是否显示水平冻结线 + * + * @return 是否显示水平冻结线 + * @date 2014-12-21-下午6:29:35 + */ public boolean isShowHorizontalFrozenLine() { return isShowHorizontalFrozenLine; } @@ -377,14 +361,11 @@ public class Grid extends BaseGridComponent { } /** - * 组件是否可以被编辑 - * - * @return 组件是否可以被编辑 - * - * - * @date 2014-12-21-下午6:29:09 - * - */ + * 组件是否可以被编辑 + * + * @return 组件是否可以被编辑 + * @date 2014-12-21-下午6:29:09 + */ public boolean isEditable() { return editable; } @@ -501,27 +482,21 @@ public class Grid extends BaseGridComponent { // /////////////editor begin /** - * 是否处于编辑状态 - * - * @return 是否处于编辑状态 - * - * - * @date 2014-12-21-下午6:28:45 - * - */ + * 是否处于编辑状态 + * + * @return 是否处于编辑状态 + * @date 2014-12-21-下午6:28:45 + */ public boolean isEditing() { return this.editorComponent != null; } /** - * 当前编辑对象是否为单元格 - * - * @return 当前编辑对象是否为单元格 - * - * - * @date 2014-12-21-下午6:28:18 - * - */ + * 当前编辑对象是否为单元格 + * + * @return 当前编辑对象是否为单元格 + * @date 2014-12-21-下午6:28:18 + */ public boolean isCellEditing() { return this.isEditing() && cellEditor != null && notShowingTableSelectPane; } @@ -534,27 +509,21 @@ public class Grid extends BaseGridComponent { } /** - * 是否处于智能选择单元格阶段 - * - * @return 是否处于智能选择单元格阶段 - * - * - * @date 2014-12-21-下午6:27:36 - * - */ + * 是否处于智能选择单元格阶段 + * + * @return 是否处于智能选择单元格阶段 + * @date 2014-12-21-下午6:27:36 + */ public boolean IsNotShowingTableSelectPane() { return this.notShowingTableSelectPane; } /** - * 当前是否在编辑悬浮元素 - * - * @return 是否在编辑悬浮元素 - * - * - * @date 2014-12-21-下午6:26:46 - * - */ + * 当前是否在编辑悬浮元素 + * + * @return 是否在编辑悬浮元素 + * @date 2014-12-21-下午6:26:46 + */ public boolean isFloatEditing() { return this.isEditing() && floatEditor != null; } @@ -566,7 +535,7 @@ public class Grid extends BaseGridComponent { * @param column the column of the cell to edit, where 0 is the first column; * @param row the row of the cell to edit, where 0 is the first row * @return the editor for this cell; if null return the default - * editor for this type of cell + * editor for this type of cell * @see com.fr.design.cell.editor.CellEditor */ public CellEditor getCellEditor(int column, int row) { @@ -598,7 +567,7 @@ public class Grid extends BaseGridComponent { * edited. If nothing is being edited, returns -1. * * @return the index of the column that contains the cell currently being - * edited; returns -1 if nothing being edited + * edited; returns -1 if nothing being edited */ public int getEditingColumn() { return editingColumn; @@ -618,7 +587,7 @@ public class Grid extends BaseGridComponent { * If nothing is being edited, returns -1. * * @return the index of the row that contains the cell currently being - * edited; returns -1 if nothing being edited + * edited; returns -1 if nothing being edited */ public int getEditingRow() { return editingRow; @@ -800,25 +769,20 @@ public class Grid extends BaseGridComponent { } /** - * 开始单元格编辑 - * - * - * @date 2014-12-21-下午6:25:17 - * - */ + * 开始单元格编辑 + * + * @date 2014-12-21-下午6:25:17 + */ public void startEditing() { this.startEditing(false); } /** - * 开始单元格编辑 - * - * @param byKeyEvent 是否为键盘触发 - * - * - * @date 2014-12-21-下午6:25:17 - * - */ + * 开始单元格编辑 + * + * @param byKeyEvent 是否为键盘触发 + * @date 2014-12-21-下午6:25:17 + */ protected void startEditing(boolean byKeyEvent) { ElementCasePane reportPane = this.getElementCasePane(); ElementCase report = reportPane.getEditingElementCase(); @@ -867,19 +831,15 @@ public class Grid extends BaseGridComponent { } /** - * 开始单元格编辑 - * - * @param column 列 - * @param row 行 - * @param cellTypeClass 单元格类型 - * @param byKeyEvent 是否为键盘触发 - * - * @return 编辑是否成功 - * - * - * @date 2014-12-21-下午6:25:17 - * - */ + * 开始单元格编辑 + * + * @param column 列 + * @param row 行 + * @param cellTypeClass 单元格类型 + * @param byKeyEvent 是否为键盘触发 + * @return 编辑是否成功 + * @date 2014-12-21-下午6:25:17 + */ public boolean startCellEditingAt_DEC(int column, int row, Class cellTypeClass, boolean byKeyEvent) { if (this.isEditing()) { this.stopEditing();// 需要先停止正在进行的编辑. @@ -954,12 +914,10 @@ public class Grid extends BaseGridComponent { } /** - * 停止编辑状态 - * - * - * @date 2014-12-21-下午6:24:54 - * - */ + * 停止编辑状态 + * + * @date 2014-12-21-下午6:24:54 + */ public void stopEditing() { // 首先判断是哪种类型的编辑. if (this.isCellEditing()) { @@ -1117,11 +1075,11 @@ public class Grid extends BaseGridComponent { if (styleChange || imageChange) { return true; } - } else { - if(newValue instanceof RichText){ - setShowAsHtml(this.editingCellElement); - } - + } else { + if (newValue instanceof RichText) { + setShowAsHtml(this.editingCellElement); + } + Object oldValue = this.editingCellElement.getValue(); if (!ComparatorUtils.equals_exactly(oldValue, newValue)) { editingCellElement.setValue(newValue); @@ -1130,16 +1088,16 @@ public class Grid extends BaseGridComponent { } return false; } - - private void setShowAsHtml(CellElement cellElement){ - CellGUIAttr guiAttr = cellElement.getCellGUIAttr(); - if(guiAttr == null){ - guiAttr = new CellGUIAttr(); - cellElement.setCellGUIAttr(guiAttr); - } - - guiAttr.setShowAsHTML(true); - } + + private void setShowAsHtml(CellElement cellElement) { + CellGUIAttr guiAttr = cellElement.getCellGUIAttr(); + if (guiAttr == null) { + guiAttr = new CellGUIAttr(); + cellElement.setCellGUIAttr(guiAttr); + } + + guiAttr.setShowAsHTML(true); + } /** * 当单元格里的内容过长时,自动调整单元格 @@ -1148,34 +1106,32 @@ public class Grid extends BaseGridComponent { */ private void shrinkToFit(TemplateElementCase tplEC) { if (editingCellElement == null) { - return; + return; } - + Object editElementValue = editingCellElement.getValue(); if (valueNeedFit(editElementValue)) { - int mode = this.getElementCasePane().getReportSettings().getShrinkToFitMode(); + int mode = this.getElementCasePane().getReportSettings().getShrinkToFitMode(); GridUtils.shrinkToFit(mode, tplEC, editingCellElement); } } - + //是否需要根据内容自动调整, 目前只有字符串, 数字, 富文本需要 - private boolean valueNeedFit(Object value){ - if(value == null){ - return false; - } - - return value instanceof String || - value instanceof Number || - value instanceof RichText; - } - - /** - * 取消编辑状态 - * - * - * @date 2014-12-21-下午6:24:34 - * - */ + private boolean valueNeedFit(Object value) { + if (value == null) { + return false; + } + + return value instanceof String || + value instanceof Number || + value instanceof RichText; + } + + /** + * 取消编辑状态 + * + * @date 2014-12-21-下午6:24:34 + */ public void cancelEditing() { if (this.isEditing()) { removeEditor(); @@ -1184,12 +1140,10 @@ public class Grid extends BaseGridComponent { } /** - * 移除选中组件 - * - * - * @date 2014-12-21-下午6:24:16 - * - */ + * 移除选中组件 + * + * @date 2014-12-21-下午6:24:16 + */ public void removeEditor() { if (this.isCellEditing()) { this.removeCellEditor(); @@ -1199,12 +1153,10 @@ public class Grid extends BaseGridComponent { } /** - * 移除单元格组件 - * - * - * @date 2014-12-21-下午6:24:00 - * - */ + * 移除单元格组件 + * + * @date 2014-12-21-下午6:24:00 + */ public void removeCellEditor() { CellEditor cellEditor = getCellEditor(); if (cellEditor == null) { @@ -1233,12 +1185,10 @@ public class Grid extends BaseGridComponent { } /** - * 移除悬浮元素组件 - * - * - * @date 2014-12-21-下午6:23:38 - * - */ + * 移除悬浮元素组件 + * + * @date 2014-12-21-下午6:23:38 + */ public void removeFloatEditor() { FloatEditor floatEditor = getFloatEditor(); if (floatEditor != null) { @@ -1290,31 +1240,24 @@ public class Grid extends BaseGridComponent { // /////////////editor end /** - * 鼠标点击事件 - * - * @param evtX x坐标 - * @param evtY y坐标 - * - * - * @date 2014-12-21-下午6:22:56 - * - */ + * 鼠标点击事件 + * + * @param evtX x坐标 + * @param evtY y坐标 + * @date 2014-12-21-下午6:22:56 + */ public void doMousePress(double evtX, double evtY) { dispatchEvent(new MouseEvent(this, MouseEvent.MOUSE_PRESSED, System.currentTimeMillis(), 0, (int) evtX, (int) evtY, 1, false)); } /** * 计算oldRectangle,因为CellElement的合并会变成多大的区域. - * - * @param report 当前格子报表 - * @param oldRectangle 之前的选中区域 - * - * @return 插入的区域 - * - * - * @date 2014-12-21-下午6:22:21 - * - */ + * + * @param report 当前格子报表 + * @param oldRectangle 之前的选中区域 + * @return 插入的区域 + * @date 2014-12-21-下午6:22:21 + */ public Rectangle caculateIntersectsUnion(ElementCase report, Rectangle oldRectangle) { Rectangle newRectangle = new Rectangle(oldRectangle); diff --git a/designer/src/com/fr/grid/GridHeader.java b/designer/src/com/fr/grid/GridHeader.java index e5f7be0030..e27bf97359 100644 --- a/designer/src/com/fr/grid/GridHeader.java +++ b/designer/src/com/fr/grid/GridHeader.java @@ -1,5 +1,7 @@ package com.fr.grid; +import com.fr.design.constants.UIConstants; + import java.awt.*; @@ -7,7 +9,7 @@ public abstract class GridHeader extends BaseGridComponent { public final static int SIZE_ADJUST = 4; //属性 - private Color separatorLineColor = new Color(172, 168, 153); //separator lines + private Color separatorLineColor = UIConstants.RULER_LINE_COLOR; //separator lines private Color selectedForeground = Color.black; private Color selectedBackground = new Color(208, 240, 252); From ee554425edcc1358d52bf976ae36d47f6d617f5d Mon Sep 17 00:00:00 2001 From: hzzz Date: Wed, 20 Sep 2017 18:24:15 +0800 Subject: [PATCH 033/125] =?UTF-8?q?=E6=95=B0=E5=80=BC=E8=B0=83=E6=95=B4?= =?UTF-8?q?=E6=8E=A7=E4=BB=B6=E6=8C=89=E9=92=AE=E9=A2=9C=E8=89=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/fr/design/gui/ibutton/UIButtonUI.java | 3 +- .../com/fr/design/gui/ispinner/UISpinner.java | 42 ++++++++++++++++++- 2 files changed, 43 insertions(+), 2 deletions(-) diff --git a/designer_base/src/com/fr/design/gui/ibutton/UIButtonUI.java b/designer_base/src/com/fr/design/gui/ibutton/UIButtonUI.java index 74168e7d2c..f55a732896 100644 --- a/designer_base/src/com/fr/design/gui/ibutton/UIButtonUI.java +++ b/designer_base/src/com/fr/design/gui/ibutton/UIButtonUI.java @@ -60,6 +60,7 @@ public class UIButtonUI extends BasicButtonUI { private void paintContent(Graphics g, AbstractButton b, String text) { if (b.getIcon() != null) { + g.setColor(Color.red); paintIcon(g, b); } if (!StringUtils.isEmpty(text)) { @@ -160,7 +161,7 @@ public class UIButtonUI extends BasicButtonUI { paintModelIcon(model, icon, g, c); } - private void paintModelIcon(ButtonModel model, Icon icon, Graphics g, JComponent c) { + protected void paintModelIcon(ButtonModel model, Icon icon, Graphics g, JComponent c) { if (model.isPressed() && model.isArmed()) { icon.paintIcon(c, g, iconRec.x + getTextShiftOffset(), iconRec.y + getTextShiftOffset()); diff --git a/designer_base/src/com/fr/design/gui/ispinner/UISpinner.java b/designer_base/src/com/fr/design/gui/ispinner/UISpinner.java index 124a1acf34..2ffd53e19f 100644 --- a/designer_base/src/com/fr/design/gui/ispinner/UISpinner.java +++ b/designer_base/src/com/fr/design/gui/ispinner/UISpinner.java @@ -6,8 +6,9 @@ import com.fr.design.event.GlobalNameObserver; import com.fr.design.event.UIObserver; import com.fr.design.event.UIObserverListener; import com.fr.design.gui.ibutton.UIButton; +import com.fr.design.gui.ibutton.UIButtonUI; import com.fr.design.gui.itextfield.UINumberField; -import com.fr.design.utils.gui.GUICoreUtils; +import com.fr.design.utils.gui.GUIPaintUtils; import com.fr.stable.Constants; import com.fr.stable.StringUtils; @@ -16,6 +17,7 @@ import javax.swing.event.ChangeEvent; import javax.swing.event.ChangeListener; import javax.swing.event.DocumentEvent; import javax.swing.event.DocumentListener; +import javax.swing.plaf.ButtonUI; import java.awt.*; import java.awt.event.*; @@ -164,6 +166,34 @@ public class UISpinner extends JPanel implements UIObserver, GlobalNameObserver } } + private class ButtionUI extends UIButtonUI { + private boolean isNormalPaint = true; + + @Override + protected void doExtraPainting(UIButton b, Graphics2D g2d, int w, int h, String selectedRoles) { + if (isPressed(b) && b.isPressedPainted()) { + isNormalPaint = false; + Color pressColor = UIConstants.COMBOBOX_BTN_PRESS; + GUIPaintUtils.fillPressed(g2d, 0, 0, w, h, b.isRoundBorder(), b.getRectDirection(), b.isDoneAuthorityEdited(selectedRoles), pressColor); + } else if (isRollOver(b)) { + isNormalPaint = false; + Color hoverColor = UIConstants.COMBOBOX_BTN_ROLLOVER; + GUIPaintUtils.fillRollOver(g2d, 0, 0, w, h, b.isRoundBorder(), b.getRectDirection(), b.isDoneAuthorityEdited(selectedRoles), b.isPressedPainted(), hoverColor); + } else if (b.isNormalPainted()) { + isNormalPaint = true; + GUIPaintUtils.fillNormal(g2d, 0, 0, w, h, b.isRoundBorder(), b.getRectDirection(), b.isDoneAuthorityEdited(selectedRoles), b.isPressedPainted()); + } + } + + @Override + protected void paintModelIcon(ButtonModel model, Icon icon, Graphics g, JComponent c) { + if (isNormalPaint) { + g.setColor(UIConstants.COMBOBOX_BTN_NORMAL); + g.fillRect(0, 0, c.getWidth(), c.getHeight()); + } + super.paintModelIcon(model, icon, g, c); + } + } private void initComponents() { textField = initNumberField(); @@ -174,12 +204,22 @@ public class UISpinner extends JPanel implements UIObserver, GlobalNameObserver public boolean shouldResponseChangeListener() { return false; } + + @Override + public ButtonUI getUI() { + return new ButtionUI(); + } }; preButton.setRoundBorder(true, Constants.LEFT); nextButton = new UIButton(UIConstants.ARROW_DOWN_ICON) { public boolean shouldResponseChangeListener() { return false; } + + @Override + public ButtonUI getUI() { + return new ButtionUI(); + } }; nextButton.setRoundBorder(true, Constants.LEFT); setLayout(new BorderLayout()); From 963d3e46da65e4f633221502707157ceaf2890df Mon Sep 17 00:00:00 2001 From: hzzz Date: Wed, 20 Sep 2017 18:25:34 +0800 Subject: [PATCH 034/125] tmp --- designer_base/src/com/fr/design/gui/ibutton/UIButtonUI.java | 1 - 1 file changed, 1 deletion(-) diff --git a/designer_base/src/com/fr/design/gui/ibutton/UIButtonUI.java b/designer_base/src/com/fr/design/gui/ibutton/UIButtonUI.java index f55a732896..a93841ff32 100644 --- a/designer_base/src/com/fr/design/gui/ibutton/UIButtonUI.java +++ b/designer_base/src/com/fr/design/gui/ibutton/UIButtonUI.java @@ -60,7 +60,6 @@ public class UIButtonUI extends BasicButtonUI { private void paintContent(Graphics g, AbstractButton b, String text) { if (b.getIcon() != null) { - g.setColor(Color.red); paintIcon(g, b); } if (!StringUtils.isEmpty(text)) { From 1b805c0e8bcf03c5bfacf8ab06cec4adc3515a85 Mon Sep 17 00:00:00 2001 From: mengao <283296419@qq.com> Date: Wed, 20 Sep 2017 22:23:49 +0800 Subject: [PATCH 035/125] =?UTF-8?q?=E6=95=B4=E7=90=86=E9=9D=A2=E6=9D=BF?= =?UTF-8?q?=EF=BC=8C=E4=BF=AE=E6=94=B9=E7=9B=91=E6=8E=A7=E5=88=B7=E6=96=B0?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E7=82=B9=E6=8F=90=E7=A4=BA=E8=AE=BE=E7=BD=AE?= =?UTF-8?q?=E9=9D=A2=E6=9D=BF=20=E4=BF=AE=E6=94=B9=E5=9B=BD=E9=99=85?= =?UTF-8?q?=E5=8C=96=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/fr/design/chart/ChartTypePane.java | 7 ++-- .../impl/ChartHyperPoplinkPane.java | 8 +++-- .../mainframe/MiddleChartPropertyPane.java | 5 +-- .../chart/gui/data/ChartDataFilterPane.java | 3 +- ...goryPlotMoreCateReportDataContentPane.java | 4 +-- .../CategoryPlotReportDataContentPane.java | 2 +- .../table/MeterPlotTableDataContentPane.java | 3 +- ...anChartBubblePlotTableDataContentPane.java | 2 +- .../component/VanChartFillStylePane.java | 6 ++-- .../component/VanChartTooltipContentPane.java | 2 +- .../format/FormatPaneWithOutFont.java | 3 +- .../chart/designer/other/AutoRefreshPane.java | 3 -- .../style/VanChartRangeLegendPane.java | 1 + .../style/axis/VanChartBaseAxisPane.java | 6 ++-- .../VanChartPlotRefreshTooltipPane.java | 32 +++++++++++++------ .../chart/map/designer/VanChartGroupPane.java | 7 +++- .../VanMapAreaPointAndLineGroupPane.java | 6 ++++ .../type/VanChartMapSourceChoosePane.java | 31 +++++++++++------- .../MultiPiePlotTableDataContentPane.java | 17 +++++----- ...StructureIndependentVanChartInterface.java | 10 ++++++ 20 files changed, 104 insertions(+), 54 deletions(-) diff --git a/designer_chart/src/com/fr/design/chart/ChartTypePane.java b/designer_chart/src/com/fr/design/chart/ChartTypePane.java index d48ab810ab..01040d6c54 100644 --- a/designer_chart/src/com/fr/design/chart/ChartTypePane.java +++ b/designer_chart/src/com/fr/design/chart/ChartTypePane.java @@ -97,12 +97,15 @@ public class ChartTypePane extends ChartCommonWizardPane { if (value instanceof ChartIcon) { this.setIcon((ChartIcon) value); setHorizontalAlignment(UILabel.CENTER); + ChartIcon chartIcon = (ChartIcon) value; if (isSelected) { // 深蓝色. this.setBackground(new Color(57, 107, 181)); + this.setBorder(GUICoreUtils.createTitledBorder(getChartName(chartIcon), Color.WHITE)); + } else { + this.setBorder(GUICoreUtils.createTitledBorder(getChartName(chartIcon))); } - ChartIcon chartIcon = (ChartIcon) value; - this.setBorder(GUICoreUtils.createTitledBorder(getChartName(chartIcon), null)); + } return this; } diff --git a/designer_chart/src/com/fr/design/chart/series/SeriesCondition/impl/ChartHyperPoplinkPane.java b/designer_chart/src/com/fr/design/chart/series/SeriesCondition/impl/ChartHyperPoplinkPane.java index cd449d0dbf..3d9e0026db 100644 --- a/designer_chart/src/com/fr/design/chart/series/SeriesCondition/impl/ChartHyperPoplinkPane.java +++ b/designer_chart/src/com/fr/design/chart/series/SeriesCondition/impl/ChartHyperPoplinkPane.java @@ -28,6 +28,7 @@ import java.awt.*; */ public class ChartHyperPoplinkPane extends BasicBeanPane { private static final long serialVersionUID = 2469115951510144738L; + private static final int EDIT_PANE_WIDTH = 248; private UITextField itemNameTextField; private ChartHyperEditPane hyperEditPane; private ChartComponent chartComponent; @@ -41,15 +42,16 @@ public class ChartHyperPoplinkPane extends BasicBeanPane { } hyperEditPane = new ChartHyperEditPane(getChartParaType(), getValueEditorPane(), getValueEditorPane()); - this.add(hyperEditPane, BorderLayout.CENTER); + hyperEditPane.setPreferredSize(new Dimension(EDIT_PANE_WIDTH, (int)hyperEditPane.getPreferredSize().getHeight()));// 固定属性配置面板大小,灵活调整图表显示面板. + this.add(hyperEditPane, BorderLayout.WEST); ChartCollection cc = createChartCollection(); chartComponent = new ChartComponent(); - chartComponent.setPreferredSize(new Dimension(300, 170));// 在单元格弹出时 需要调整保证属性表的大小. + chartComponent.setPreferredSize(new Dimension((int)this.getPreferredSize().getWidth()-EDIT_PANE_WIDTH, 170));// 在单元格弹出时 需要调整保证属性表的大小. chartComponent.setSupportEdit(false); chartComponent.populate(cc); - this.add(chartComponent, BorderLayout.EAST); + this.add(chartComponent, BorderLayout.CENTER); hyperEditPane.populate(cc); diff --git a/designer_chart/src/com/fr/design/mainframe/MiddleChartPropertyPane.java b/designer_chart/src/com/fr/design/mainframe/MiddleChartPropertyPane.java index 1d9732205d..3224d6d241 100644 --- a/designer_chart/src/com/fr/design/mainframe/MiddleChartPropertyPane.java +++ b/designer_chart/src/com/fr/design/mainframe/MiddleChartPropertyPane.java @@ -33,10 +33,11 @@ public abstract class MiddleChartPropertyPane extends BaseChartPropertyPane{ protected void initComponenet() { this.setLayout(new BorderLayout()); - this.setBorder(null); + this.setBorder(BorderFactory.createEmptyBorder(10,0,0,0)); createNameLabel(); - this.add(createNorthComponent(), BorderLayout.NORTH); + //去掉上方名字,先注释掉 +// this.add(createNorthComponent(), BorderLayout.NORTH); chartEditPane = StableUtils.construct(ChartEditPane.class); chartEditPane.setSupportCellData(true); } diff --git a/designer_chart/src/com/fr/design/mainframe/chart/gui/data/ChartDataFilterPane.java b/designer_chart/src/com/fr/design/mainframe/chart/gui/data/ChartDataFilterPane.java index 9a4a67b16e..a30f28c3e7 100644 --- a/designer_chart/src/com/fr/design/mainframe/chart/gui/data/ChartDataFilterPane.java +++ b/designer_chart/src/com/fr/design/mainframe/chart/gui/data/ChartDataFilterPane.java @@ -59,9 +59,10 @@ public class ChartDataFilterPane extends ThirdTabPane { if (nameArray.length > 1) { pane.add(tabPane); this.add(pane, BorderLayout.NORTH); + centerPane.setBorder(BorderFactory.createEmptyBorder(10,0,0,0)); } + centerPane.setBorder(null); } - centerPane.setBorder(BorderFactory.createEmptyBorder(10,0,0,0)); this.add(centerPane, BorderLayout.CENTER); } diff --git a/designer_chart/src/com/fr/design/mainframe/chart/gui/data/report/CategoryPlotMoreCateReportDataContentPane.java b/designer_chart/src/com/fr/design/mainframe/chart/gui/data/report/CategoryPlotMoreCateReportDataContentPane.java index 34486394ac..90bb3af827 100644 --- a/designer_chart/src/com/fr/design/mainframe/chart/gui/data/report/CategoryPlotMoreCateReportDataContentPane.java +++ b/designer_chart/src/com/fr/design/mainframe/chart/gui/data/report/CategoryPlotMoreCateReportDataContentPane.java @@ -67,7 +67,7 @@ public class CategoryPlotMoreCateReportDataContentPane extends CategoryPlotRepor catePane.add(boxPane, BorderLayout.SOUTH); - catePane.setBorder(BorderFactory.createEmptyBorder(0,24,10,15)); + catePane.setBorder(BorderFactory.createEmptyBorder(0,24,10,6)); this.add(catePane, "0,0,2,0"); filterPane = new ChartDataFilterPane(new Bar2DPlot(), parent); @@ -96,7 +96,7 @@ public class CategoryPlotMoreCateReportDataContentPane extends CategoryPlotRepor private TinyFormulaPane addNewCatePane() { final TinyFormulaPane pane = initCategoryBox(StringUtils.EMPTY); - pane.setPreferredSize(new Dimension(106, 16)); + pane.setPreferredSize(new Dimension(100, 16)); pane.registerChangeListener(uiobListener); diff --git a/designer_chart/src/com/fr/design/mainframe/chart/gui/data/report/CategoryPlotReportDataContentPane.java b/designer_chart/src/com/fr/design/mainframe/chart/gui/data/report/CategoryPlotReportDataContentPane.java index d65f04b616..34489350ac 100644 --- a/designer_chart/src/com/fr/design/mainframe/chart/gui/data/report/CategoryPlotReportDataContentPane.java +++ b/designer_chart/src/com/fr/design/mainframe/chart/gui/data/report/CategoryPlotReportDataContentPane.java @@ -34,7 +34,7 @@ public class CategoryPlotReportDataContentPane extends AbstractReportDataContent initEveryPane(); categoryName = initCategoryBox(Inter.getLocText("FR-Chart-Category_Name")); categoryName.setPreferredSize(new Dimension(246,30)); - categoryName.setBorder(BorderFactory.createEmptyBorder(0,24,0,15)); + categoryName.setBorder(BorderFactory.createEmptyBorder(0,24,0,7)); this.add(categoryName, "0,0,2,0"); filterPane = new ChartDataFilterPane(new Bar2DPlot(), parent); JPanel panel = TableLayout4VanChartHelper.createExpandablePaneWithTitle(Inter.getLocText("FR-Chart-Data_Filter"),filterPane); diff --git a/designer_chart/src/com/fr/design/mainframe/chart/gui/data/table/MeterPlotTableDataContentPane.java b/designer_chart/src/com/fr/design/mainframe/chart/gui/data/table/MeterPlotTableDataContentPane.java index b8cb14bed5..a220804e14 100644 --- a/designer_chart/src/com/fr/design/mainframe/chart/gui/data/table/MeterPlotTableDataContentPane.java +++ b/designer_chart/src/com/fr/design/mainframe/chart/gui/data/table/MeterPlotTableDataContentPane.java @@ -47,8 +47,9 @@ public class MeterPlotTableDataContentPane extends AbstractTableDataContentPane JPanel jPanel = TableLayout4VanChartHelper.createExpandablePaneWithTitle(Inter.getLocText("FR-Chart-Data_Filter"),filterPane); JPanel panel = TableLayoutHelper.createTableLayoutPane(components,rowSize,columnSize); - filterPane.setBorder(BorderFactory.createEmptyBorder(10,10,0,15)); + filterPane.setBorder(BorderFactory.createEmptyBorder(0,10,0,15)); panel.setBorder(BorderFactory.createEmptyBorder(10,24,10,15)); + jPanel.setBorder(BorderFactory.createEmptyBorder(0,12,0,5)); this.add(getJSeparator(),BorderLayout.NORTH); this.add(panel,BorderLayout.CENTER); diff --git a/designer_chart/src/com/fr/plugin/chart/bubble/data/VanChartBubblePlotTableDataContentPane.java b/designer_chart/src/com/fr/plugin/chart/bubble/data/VanChartBubblePlotTableDataContentPane.java index 3c055caae3..8c2607a02e 100644 --- a/designer_chart/src/com/fr/plugin/chart/bubble/data/VanChartBubblePlotTableDataContentPane.java +++ b/designer_chart/src/com/fr/plugin/chart/bubble/data/VanChartBubblePlotTableDataContentPane.java @@ -60,7 +60,7 @@ public class VanChartBubblePlotTableDataContentPane extends AbstractTableDataCon }; JPanel north = TableLayout4VanChartHelper.createGapTableLayoutPane(components_north,rowSize_north,columnSize_north); - north.setBorder(BorderFactory.createEmptyBorder(6, 24, 10, 15)); + north.setBorder(BorderFactory.createEmptyBorder(10, 24, 10, 15)); JPanel filterPane = TableLayout4VanChartHelper.createExpandablePaneWithTitle(Inter.getLocText("FR-Chart-Data_Filter"),dataScreeningPane); dataScreeningPane.setBorder(BorderFactory.createEmptyBorder(0,5,0,5)); filterPane.setBorder(BorderFactory.createEmptyBorder(0,5,0,5)); diff --git a/designer_chart/src/com/fr/plugin/chart/designer/component/VanChartFillStylePane.java b/designer_chart/src/com/fr/plugin/chart/designer/component/VanChartFillStylePane.java index 1cfc178311..b544ca1d5a 100644 --- a/designer_chart/src/com/fr/plugin/chart/designer/component/VanChartFillStylePane.java +++ b/designer_chart/src/com/fr/plugin/chart/designer/component/VanChartFillStylePane.java @@ -26,12 +26,14 @@ public class VanChartFillStylePane extends ChartFillStylePane { new Component[]{null,customPane}, }; - return TableLayout4VanChartHelper.createGapTableLayoutPane(components,rowSize,columnSize); + JPanel panel = TableLayout4VanChartHelper.createGapTableLayoutPane(components,rowSize,columnSize); + panel.setBorder(BorderFactory.createEmptyBorder(5,5,0,0)); + return panel; } @Override public Dimension getPreferredSize() { if(styleSelectBox.getSelectedIndex() != styleSelectBox.getItemCount() - 1) { - return new Dimension(styleSelectBox.getPreferredSize().width, 26); + return new Dimension(styleSelectBox.getPreferredSize().width, 30); } return super.getPreferredSize(); } diff --git a/designer_chart/src/com/fr/plugin/chart/designer/component/VanChartTooltipContentPane.java b/designer_chart/src/com/fr/plugin/chart/designer/component/VanChartTooltipContentPane.java index 08d5c2f00b..9b38bc7c75 100644 --- a/designer_chart/src/com/fr/plugin/chart/designer/component/VanChartTooltipContentPane.java +++ b/designer_chart/src/com/fr/plugin/chart/designer/component/VanChartTooltipContentPane.java @@ -61,7 +61,7 @@ public class VanChartTooltipContentPane extends BasicBeanPane { - private static final int P_W = 320; - private static final int P_H = 460; private VanChart chart; private UIButtonGroup moreLabel; @@ -140,7 +138,6 @@ public class AutoRefreshPane extends BasicBeanPane { } }); - dialog.setSize(P_W, P_H); dialog.setVisible(true); } }); diff --git a/designer_chart/src/com/fr/plugin/chart/designer/style/VanChartRangeLegendPane.java b/designer_chart/src/com/fr/plugin/chart/designer/style/VanChartRangeLegendPane.java index 0c8fd37037..d8f527400d 100644 --- a/designer_chart/src/com/fr/plugin/chart/designer/style/VanChartRangeLegendPane.java +++ b/designer_chart/src/com/fr/plugin/chart/designer/style/VanChartRangeLegendPane.java @@ -102,6 +102,7 @@ public class VanChartRangeLegendPane extends VanChartPlotLegendPane { initLegendTypeButtonListener(); JPanel legendTypeButtonWithTilePane = createTableLayoutPaneWithTitle(Inter.getLocText("Plugin-ChartF_Legend_Form"),legendTypeButton); + legendTypeButtonWithTilePane.setBorder(BorderFactory.createEmptyBorder(0,5,0,0)); rangeLegendPane = createRangeLegendPane(); diff --git a/designer_chart/src/com/fr/plugin/chart/designer/style/axis/VanChartBaseAxisPane.java b/designer_chart/src/com/fr/plugin/chart/designer/style/axis/VanChartBaseAxisPane.java index 2123588c72..9a5c0ee4da 100644 --- a/designer_chart/src/com/fr/plugin/chart/designer/style/axis/VanChartBaseAxisPane.java +++ b/designer_chart/src/com/fr/plugin/chart/designer/style/axis/VanChartBaseAxisPane.java @@ -134,7 +134,7 @@ public class VanChartBaseAxisPane extends FurtherBasicBeanPane { new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_TextRotation")),titleTextRotation}, }; - JPanel panel = TableLayoutHelper.createTableLayoutPane(components, row, col); + JPanel panel = TableLayout4VanChartHelper.createGapTableLayoutPane(components, row, col); return TableLayout4VanChartHelper.createExpandablePaneWithTitle(PaneTitleConstants.CHART_STYLE_TITLE_TITLE, panel); } @@ -222,7 +222,7 @@ public class VanChartBaseAxisPane extends FurtherBasicBeanPane { mainTick = new UIButtonGroup(strings, values); secondTick = new UIButtonGroup(strings, values); - JPanel panel = TableLayoutHelper.createTableLayoutPane(getLineStylePaneComponents(), row, col); + JPanel panel = TableLayout4VanChartHelper.createGapTableLayoutPane(getLineStylePaneComponents(), row, col); return TableLayout4VanChartHelper.createExpandablePaneWithTitle(Inter.getLocText("Plugin-ChartF_AxisLineStyle"), panel); } @@ -249,7 +249,7 @@ public class VanChartBaseAxisPane extends FurtherBasicBeanPane { new Component[]{new UILabel(Inter.getLocText("FR-Designer_AxisReversed")),reversed}, } ; - JPanel panel = TableLayoutHelper.createTableLayoutPane(components, row, col); + JPanel panel = TableLayout4VanChartHelper.createGapTableLayoutPane(components, row, col); return TableLayout4VanChartHelper.createExpandablePaneWithTitle(Inter.getLocText("Chart-Layout_Position"), panel); } diff --git a/designer_chart/src/com/fr/plugin/chart/designer/style/tooltip/VanChartPlotRefreshTooltipPane.java b/designer_chart/src/com/fr/plugin/chart/designer/style/tooltip/VanChartPlotRefreshTooltipPane.java index bf3845ea78..eb18f499a3 100644 --- a/designer_chart/src/com/fr/plugin/chart/designer/style/tooltip/VanChartPlotRefreshTooltipPane.java +++ b/designer_chart/src/com/fr/plugin/chart/designer/style/tooltip/VanChartPlotRefreshTooltipPane.java @@ -1,6 +1,7 @@ package com.fr.plugin.chart.designer.style.tooltip; import com.fr.chart.chartattr.Plot; +import com.fr.design.dialog.BasicScrollPane; import com.fr.design.gui.ilable.UILabel; import com.fr.design.gui.ispinner.UISpinner; import com.fr.design.layout.TableLayout; @@ -29,7 +30,7 @@ public class VanChartPlotRefreshTooltipPane extends VanChartPlotTooltipNoCheckPa public VanChartPlotRefreshTooltipPane(Plot plot) { super(plot, null); - this.setSize(270,400); + this.setPreferredSize(new Dimension(320, 400)); } protected JPanel createTooltipPane(Plot plot) { @@ -45,13 +46,25 @@ public class VanChartPlotRefreshTooltipPane extends VanChartPlotTooltipNoCheckPa Component[][] components = createComponents(plot); JPanel panel = TableLayoutHelper.createTableLayoutPane(components,rowSize,columnSize); - JScrollPane jScrollPane = new JScrollPane(panel); - jScrollPane.setPreferredSize(new Dimension(P_W, P_H)); - - jScrollPane.setVerticalScrollBarPolicy (JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED); - JPanel jPanel = new JPanel(); - jPanel.add(jScrollPane); - return jPanel; + BasicScrollPane scrollPane = new BasicScrollPane() { + + @Override + protected String title4PopupWindow() { + return null; + } + + @Override + protected JPanel createContentPane() { + return panel; + } + + @Override + public void populateBean(Object ob) { + return; + } + }; + scrollPane.setPreferredSize(new Dimension(P_W, P_H)); + return scrollPane; } protected Component[][] createComponents(Plot plot) { @@ -78,9 +91,10 @@ public class VanChartPlotRefreshTooltipPane extends VanChartPlotTooltipNoCheckPa double f = TableLayout.FILL; double e = TableLayout4VanChartHelper.EDIT_AREA_WIDTH; double[] columnSize = {f, e}; - double[] rowSize = {p}; + double[] rowSize = {p, p}; Component[][] components = new Component[][]{ + new Component[]{null, null}, new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Duration_Time")), duration}, }; diff --git a/designer_chart/src/com/fr/plugin/chart/map/designer/VanChartGroupPane.java b/designer_chart/src/com/fr/plugin/chart/map/designer/VanChartGroupPane.java index f23604b1fb..844bb7e443 100644 --- a/designer_chart/src/com/fr/plugin/chart/map/designer/VanChartGroupPane.java +++ b/designer_chart/src/com/fr/plugin/chart/map/designer/VanChartGroupPane.java @@ -3,6 +3,7 @@ package com.fr.plugin.chart.map.designer; import com.fr.design.gui.ibutton.UIButtonGroup; import javax.swing.*; +import javax.swing.border.Border; import javax.swing.event.ChangeEvent; import javax.swing.event.ChangeListener; import java.awt.*; @@ -34,9 +35,13 @@ public abstract class VanChartGroupPane extends JPanel{ cardLayout.show(centerPane, nameList[buttonGroup.getSelectedIndex()]); } }); - + buttonGroup.setBorder(getButtonGroupBorder()); this.setLayout(new BorderLayout(0, 4)); this.add(buttonGroup, BorderLayout.NORTH); this.add(centerPane, BorderLayout.CENTER); } + + protected Border getButtonGroupBorder () { + return null; + } } diff --git a/designer_chart/src/com/fr/plugin/chart/map/designer/VanMapAreaPointAndLineGroupPane.java b/designer_chart/src/com/fr/plugin/chart/map/designer/VanMapAreaPointAndLineGroupPane.java index df9e994e2d..681ba3a651 100644 --- a/designer_chart/src/com/fr/plugin/chart/map/designer/VanMapAreaPointAndLineGroupPane.java +++ b/designer_chart/src/com/fr/plugin/chart/map/designer/VanMapAreaPointAndLineGroupPane.java @@ -3,6 +3,7 @@ package com.fr.plugin.chart.map.designer; import com.fr.general.Inter; import javax.swing.*; +import javax.swing.border.Border; /** * Created by Mitisky on 16/5/20. @@ -17,4 +18,9 @@ public class VanMapAreaPointAndLineGroupPane extends VanChartGroupPane { public VanMapAreaPointAndLineGroupPane(final JPanel areaPane, final JPanel pointPane, final JPanel linePane){ super(new String[]{AREA_MAP_STRING, POINT_MAP_STRING, LINE_MAP_STRING}, new JPanel[]{areaPane, pointPane, linePane}); } + + @Override + protected Border getButtonGroupBorder () { + return BorderFactory.createEmptyBorder(0,8,0,18); + } } diff --git a/designer_chart/src/com/fr/plugin/chart/map/designer/type/VanChartMapSourceChoosePane.java b/designer_chart/src/com/fr/plugin/chart/map/designer/type/VanChartMapSourceChoosePane.java index 77bc8020e9..b89bc667db 100644 --- a/designer_chart/src/com/fr/plugin/chart/map/designer/type/VanChartMapSourceChoosePane.java +++ b/designer_chart/src/com/fr/plugin/chart/map/designer/type/VanChartMapSourceChoosePane.java @@ -213,9 +213,9 @@ public class VanChartMapSourceChoosePane extends JPanel implements UIObserver { sourceTitleLabel = createSourceTitleLabel(); double p = TableLayout.PREFERRED; - double f = TableLayout.FILL; + double d = TableLayout4VanChartHelper.DESCRIPTION_AREA_WIDTH; double e = TableLayout4VanChartHelper.EDIT_AREA_WIDTH; - double[] columnSize = {f, e}; + double[] columnSize = {d, e}; double[] rowSize = {p, p}; Component[][] components = new Component[][]{ new Component[]{null,null}, @@ -288,39 +288,45 @@ public class VanChartMapSourceChoosePane extends JPanel implements UIObserver { layerCardPane.add(pane, itemName); } - panel.add(gisLayer, BorderLayout.CENTER); + JPanel panel1 = TableLayout4VanChartHelper.createGapTableLayoutPane(Inter.getLocText("Plugin-ChartF_Gis_Layer"), gisLayer); + + panel.add(panel1, BorderLayout.CENTER); panel.add(layerCardPane, BorderLayout.SOUTH); - return TableLayout4VanChartHelper.createGapTableLayoutPane(Inter.getLocText("Plugin-ChartF_Gis_Layer"), panel); + return panel; } private JPanel createCustomTileLayer() { double p = TableLayout.PREFERRED; double[] rowSize = {p, p}; - double[] COLUMN_SIZE = {p, TableLayout.FILL}; + double[] COLUMN_SIZE = {TableLayout4VanChartHelper.DESCRIPTION_AREA_WIDTH, TableLayout4VanChartHelper.SECOND_EDIT_AREA_WIDTH-3}; customTileLayer = new UITextArea(); attribution = new UITextArea(); Component[][] comps = new Component[][]{ - new Component[]{new UILabel("url", SwingConstants.RIGHT), customTileLayer}, + new Component[]{new UILabel("url"), customTileLayer}, new Component[]{new UILabel("Attribution"), attribution} }; - return TableLayoutHelper.createTableLayoutPane(comps, rowSize, COLUMN_SIZE); + JPanel panel = TableLayout4VanChartHelper.createGapTableLayoutPane(comps, rowSize, COLUMN_SIZE); + panel.setBorder(TableLayout4VanChartHelper.SECOND_EDIT_AREA_BORDER); + return panel; } private JPanel createWMSPanel() { final double p = TableLayout.PREFERRED; double[] rowSize = {p}; + double[] COLUMN_SIZE = {TableLayout4VanChartHelper.DESCRIPTION_AREA_WIDTH, 84,44}; + wmsUrl = new UITextArea(); connectButton = new UIButton(Inter.getLocText("Plugin-ChartF_Connect_WMP")); Component[][] comps = new Component[][]{ - new Component[]{new UILabel("url", SwingConstants.RIGHT), wmsUrl, connectButton} + new Component[]{new UILabel("url"), wmsUrl, connectButton} }; - JPanel northPane = TableLayoutHelper.createTableLayoutPane(comps,rowSize, COLUMN_SIZE); - + JPanel northPane = TableLayout4VanChartHelper.createGapTableLayoutPane(comps, rowSize, COLUMN_SIZE); + northPane.setBorder(TableLayout4VanChartHelper.SECOND_EDIT_AREA_BORDER); JPanel wmsPanel = new JPanel(new BorderLayout(0, 4)); wmsLayerPane = new JPanel(new BorderLayout()); resetWMSLayerPane(new ArrayList()); @@ -429,11 +435,12 @@ public class VanChartMapSourceChoosePane extends JPanel implements UIObserver { double p = TableLayout.PREFERRED; double f = TableLayout.FILL; + double d = TableLayout4VanChartHelper.DESCRIPTION_AREA_WIDTH; double e = TableLayout4VanChartHelper.EDIT_AREA_WIDTH; double s = TableLayout4VanChartHelper.SECOND_EDIT_AREA_WIDTH; double[] rowSize = {p,p,p}; - double[] columnSize = {f, e}; - double[] column = {f, s}; + double[] columnSize = {d, e}; + double[] column = {d, s}; Component[][] comps = new Component[][]{ new Component[]{null, null}, diff --git a/designer_chart/src/com/fr/plugin/chart/multilayer/data/MultiPiePlotTableDataContentPane.java b/designer_chart/src/com/fr/plugin/chart/multilayer/data/MultiPiePlotTableDataContentPane.java index becec4822c..b5dad1e1c5 100644 --- a/designer_chart/src/com/fr/plugin/chart/multilayer/data/MultiPiePlotTableDataContentPane.java +++ b/designer_chart/src/com/fr/plugin/chart/multilayer/data/MultiPiePlotTableDataContentPane.java @@ -33,6 +33,7 @@ import java.util.List; public class MultiPiePlotTableDataContentPane extends AbstractTableDataContentPane implements UIObserver { private static final int HT = 20; private static final int WD = 100; + private static final int LABEL_WIDTH = 72; private UISpinner levelNumEdit; private UITextField nameField; @@ -84,7 +85,7 @@ public class MultiPiePlotTableDataContentPane extends AbstractTableDataContentPa private JPanel createCenterPane() { double p = TableLayout.PREFERRED; double f = TableLayout.FILL; - double[] columnSize_center = {f, COMPONENT_WIDTH}; + double[] columnSize_center = {LABEL_WIDTH, COMPONENT_WIDTH}; double[] rowSize_center = new double[levelNum + 3]; initLevelNameList(); @@ -113,8 +114,9 @@ public class MultiPiePlotTableDataContentPane extends AbstractTableDataContentPa registerListener4Center(); - return TableLayout4VanChartHelper.createGapTableLayoutPane(components_center,rowSize_center,columnSize_center); - + JPanel panel = TableLayout4VanChartHelper.createGapTableLayoutPane(components_center,rowSize_center,columnSize_center); + panel.setBorder(BorderFactory.createEmptyBorder(0,10,0,0)); + return panel; } @@ -147,8 +149,7 @@ public class MultiPiePlotTableDataContentPane extends AbstractTableDataContentPa private JPanel createNorthPane() { double p = TableLayout.PREFERRED; - double f = TableLayout.FILL; - double[] columnSize_north = {f, COMPONENT_WIDTH}; + double[] columnSize_north = {LABEL_WIDTH, COMPONENT_WIDTH}; double[] rowSize_north = {p, p, p}; levelNumEdit = new UISpinner(1, 15, 1, levelNum){ @@ -169,10 +170,8 @@ public class MultiPiePlotTableDataContentPane extends AbstractTableDataContentPa super.setTextFieldValue(value); } }; - levelNumEdit.setPreferredSize(new Dimension(WD, HT)); nameField = new UITextField(); - nameField.setPreferredSize(new Dimension(WD, HT)); Component[][] components_north = new Component[][]{ new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_MultiPie_Series_Name")), nameField}, @@ -180,7 +179,9 @@ public class MultiPiePlotTableDataContentPane extends AbstractTableDataContentPa new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Level_Number")), levelNumEdit}, }; - return TableLayout4VanChartHelper.createGapTableLayoutPane(components_north, rowSize_north, columnSize_north); + JPanel panel = TableLayout4VanChartHelper.createGapTableLayoutPane(components_north, rowSize_north, columnSize_north); + panel.setBorder(BorderFactory.createEmptyBorder(0,10,0,0)); + return panel; } private void refreshCenterPane(){ diff --git a/designer_chart/src/com/fr/plugin/chart/structure/desinger/StructureIndependentVanChartInterface.java b/designer_chart/src/com/fr/plugin/chart/structure/desinger/StructureIndependentVanChartInterface.java index 52eeda2ed9..65725cf532 100644 --- a/designer_chart/src/com/fr/plugin/chart/structure/desinger/StructureIndependentVanChartInterface.java +++ b/designer_chart/src/com/fr/plugin/chart/structure/desinger/StructureIndependentVanChartInterface.java @@ -5,6 +5,7 @@ import com.fr.chart.chartattr.Plot; import com.fr.design.beans.BasicBeanPane; import com.fr.design.condition.ConditionAttributesPane; import com.fr.design.gui.frpane.AttributeChangeListener; +import com.fr.design.gui.ibutton.UIButtonGroup; import com.fr.design.mainframe.chart.AbstractChartAttrPane; import com.fr.design.mainframe.chart.gui.ChartDataPane; import com.fr.design.mainframe.chart.gui.ChartStylePane; @@ -13,6 +14,7 @@ import com.fr.design.mainframe.chart.gui.data.table.AbstractTableDataContentPane import com.fr.design.mainframe.chart.gui.type.AbstractChartTypePane; import com.fr.general.Inter; import com.fr.plugin.chart.base.VanChartConstants; +import com.fr.plugin.chart.designer.TableLayout4VanChartHelper; import com.fr.plugin.chart.designer.other.VanChartInteractivePaneWithOutSort; import com.fr.plugin.chart.designer.other.VanChartOtherPane; import com.fr.plugin.chart.designer.style.VanChartStylePane; @@ -23,6 +25,8 @@ import com.fr.plugin.chart.structure.desinger.style.VanChartStructureSeriesPane; import com.fr.plugin.chart.structure.desinger.type.VanChartStructureTypePane; import com.fr.plugin.chart.vanchart.AbstractIndependentVanChartUI; +import javax.swing.*; + /** * Created by shine on 2017/2/15. */ @@ -60,6 +64,12 @@ public class StructureIndependentVanChartInterface extends AbstractIndependentVa protected BasicBeanPane createInteractivePane() { return new VanChartInteractivePaneWithOutSort(){ + @Override + protected JPanel getzoomTypePane(UIButtonGroup zoomType) { + JPanel panel = TableLayout4VanChartHelper.createGapTableLayoutPane(Inter.getLocText("Plugin-ChartF_ZoomType"), zoomType); + return panel; + } + @Override protected String[] getNameArray() { return new String[]{Inter.getLocText("Plugin-ChartF_XYAxis"), Inter.getLocText("Chart-Use_None")}; From 4183e3b50c374cff57c502d11332a648de4bbfe9 Mon Sep 17 00:00:00 2001 From: plough Date: Thu, 21 Sep 2017 11:25:04 +0800 Subject: [PATCH 036/125] =?UTF-8?q?=E6=97=A0JIRA=E4=BB=BB=E5=8A=A1?= =?UTF-8?q?=EF=BC=8C=E4=BF=AE=E5=A4=8D=E5=9B=BD=E9=99=85=E5=8C=96=E9=94=99?= =?UTF-8?q?=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- designer/src/com/fr/design/report/UnitFieldPane.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/designer/src/com/fr/design/report/UnitFieldPane.java b/designer/src/com/fr/design/report/UnitFieldPane.java index e74155a932..e115e8a3f9 100644 --- a/designer/src/com/fr/design/report/UnitFieldPane.java +++ b/designer/src/com/fr/design/report/UnitFieldPane.java @@ -48,7 +48,7 @@ public class UnitFieldPane extends JPanel { } else if (unitType == Constants.UNIT_INCH) { this.setText(Inter.getLocText("FR-Designer_Unit_INCH")); } else { - this.setText(Inter.getLocText("FR-Designer_Unit_MM-mm")); + this.setText(Inter.getLocText("FR-Designer_Unit_MM")); } //ajust the heigt of unitLabel. From 73b5b4c02747bee28673dece3fc9fcb640e6bfdd Mon Sep 17 00:00:00 2001 From: juhaoyu <2335173323@qq.com> Date: Thu, 21 Sep 2017 11:48:59 +0800 Subject: [PATCH 037/125] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=88=A4=E6=96=AD?= =?UTF-8?q?=E6=98=AF=E5=90=A6=E6=9C=89Designer=E7=9A=84=E6=96=B9=E6=B3=95?= =?UTF-8?q?=EF=BC=8C=E4=B8=8D=E7=94=A8installHome=E5=88=A4=E6=96=AD?= =?UTF-8?q?=E4=BA=86=EF=BC=8C=E5=90=A6=E5=88=99=E6=8A=A5=E8=A1=A8=E7=BB=84?= =?UTF-8?q?=E5=90=8C=E5=AD=A6=E4=BB=A3=E7=A0=81=E5=90=AF=E5=8A=A8=E7=9A=84?= =?UTF-8?q?=E6=97=B6=E5=80=99=E5=88=A4=E6=96=AD=E5=87=BA=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- designer_base/src/com/fr/start/BaseDesigner.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/designer_base/src/com/fr/start/BaseDesigner.java b/designer_base/src/com/fr/start/BaseDesigner.java index 43a3377ccc..a3d278f8ab 100644 --- a/designer_base/src/com/fr/start/BaseDesigner.java +++ b/designer_base/src/com/fr/start/BaseDesigner.java @@ -29,6 +29,7 @@ import com.fr.general.Inter; import com.fr.general.ModuleContext; import com.fr.general.SiteCenter; import com.fr.plugin.PluginCollector; +import com.fr.plugin.conversion.PluginConversionModule; import com.fr.plugin.manage.PluginManager; import com.fr.plugin.manage.PluginStartup; import com.fr.stable.ArrayUtils; @@ -66,7 +67,8 @@ public abstract class BaseDesigner extends ToolBarMenuDock { RestartHelper.deleteRecordFilesWhenStart(); //初始化插件引擎 PluginStartup.start(); - + //标记一下是设计器启动 + PluginConversionModule.getInstance().markDesignerStart(); SiteCenter.getInstance(); DesignUtils.setPort(getStartPort()); From 21e0b24f5ec3d615ad6bd2277d55a8858f32fa33 Mon Sep 17 00:00:00 2001 From: mengao <283296419@qq.com> Date: Thu, 21 Sep 2017 14:24:38 +0800 Subject: [PATCH 038/125] =?UTF-8?q?=E4=BF=AE=E6=94=B9design=E6=A8=A1?= =?UTF-8?q?=E5=9D=97=E7=BC=96=E8=AF=91=E4=B8=8D=E9=80=9A=E8=BF=87=E9=97=AE?= =?UTF-8?q?=E9=A2=98=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../designer/style/tooltip/VanChartPlotRefreshTooltipPane.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/designer_chart/src/com/fr/plugin/chart/designer/style/tooltip/VanChartPlotRefreshTooltipPane.java b/designer_chart/src/com/fr/plugin/chart/designer/style/tooltip/VanChartPlotRefreshTooltipPane.java index eb18f499a3..2f0979f318 100644 --- a/designer_chart/src/com/fr/plugin/chart/designer/style/tooltip/VanChartPlotRefreshTooltipPane.java +++ b/designer_chart/src/com/fr/plugin/chart/designer/style/tooltip/VanChartPlotRefreshTooltipPane.java @@ -45,7 +45,7 @@ public class VanChartPlotRefreshTooltipPane extends VanChartPlotTooltipNoCheckPa double[] rowSize = {p,p,p,p,p,p,p,p,p,p,p}; Component[][] components = createComponents(plot); - JPanel panel = TableLayoutHelper.createTableLayoutPane(components,rowSize,columnSize); + final JPanel panel = TableLayoutHelper.createTableLayoutPane(components,rowSize,columnSize); BasicScrollPane scrollPane = new BasicScrollPane() { @Override From 9c877ee17d5202a056cc81c8b83fbb053ba56563 Mon Sep 17 00:00:00 2001 From: MoMeak Date: Thu, 21 Sep 2017 16:25:57 +0800 Subject: [PATCH 039/125] =?UTF-8?q?REPORT-4755=20[9.0=E4=BA=8C=E8=BD=AE?= =?UTF-8?q?=E5=9B=9E=E5=BD=92]=E8=AE=BE=E8=AE=A1=E5=99=A8=E5=85=AC?= =?UTF-8?q?=E5=BC=8F=E7=BC=96=E8=BE=91=E7=95=8C=E9=9D=A2=EF=BC=8C=E5=85=AC?= =?UTF-8?q?=E5=BC=8F=E8=AF=B4=E6=98=8E=E8=83=8C=E6=99=AF=E8=89=B2=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- designer_base/src/com/fr/design/formula/FormulaPane.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/designer_base/src/com/fr/design/formula/FormulaPane.java b/designer_base/src/com/fr/design/formula/FormulaPane.java index 9ef2e4b2be..156a2e2f2e 100644 --- a/designer_base/src/com/fr/design/formula/FormulaPane.java +++ b/designer_base/src/com/fr/design/formula/FormulaPane.java @@ -703,7 +703,7 @@ public class FormulaPane extends BasicPane implements KeyListener, UIFormula { UIScrollPane desScrollPane = new UIScrollPane(descriptionTextArea); desScrollPane.setBorder(null); this.add(this.createNamePane(Inter.getLocText("FR-Designer_FormulaPane_Formula_Description") + ":", desScrollPane), BorderLayout.EAST); - descriptionTextArea.setBackground(new Color(255, 255, 225)); + descriptionTextArea.setBackground(Color.white); descriptionTextArea.setLineWrap(true); descriptionTextArea.setWrapStyleWord(true); descriptionTextArea.setEditable(false); From d9cb9c1aa51c5f477510451000cd14f029fcc6c9 Mon Sep 17 00:00:00 2001 From: plough Date: Thu, 21 Sep 2017 16:55:13 +0800 Subject: [PATCH 040/125] =?UTF-8?q?=E6=97=A0JIRA=E4=BB=BB=E5=8A=A1?= =?UTF-8?q?=EF=BC=8C=E4=BF=AE=E6=94=B9=E6=82=AC=E5=81=9C=E6=8F=90=E7=A4=BA?= =?UTF-8?q?=E7=9A=84=E5=88=9D=E5=A7=8B=E5=8C=96=E6=97=B6=E9=97=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- designer_base/src/com/fr/design/gui/ibutton/UIButton.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/designer_base/src/com/fr/design/gui/ibutton/UIButton.java b/designer_base/src/com/fr/design/gui/ibutton/UIButton.java index 776a6a284a..91602372da 100644 --- a/designer_base/src/com/fr/design/gui/ibutton/UIButton.java +++ b/designer_base/src/com/fr/design/gui/ibutton/UIButton.java @@ -36,7 +36,7 @@ public class UIButton extends JButton implements UIObserver { private CellBorderStyle border = null; protected UIObserverListener uiObserverListener; - private static final int TOOLTIP_INIT_DELAY = 1000; // 延迟 1s 显示提示文字 + private static final int TOOLTIP_INIT_DELAY = 300; // 延迟 0.3s 显示提示文字 public UIButton() { this(StringUtils.EMPTY); From df9381bb8fa20bf13e098565d1209fb8e1723c43 Mon Sep 17 00:00:00 2001 From: mengao <283296419@qq.com> Date: Thu, 21 Sep 2017 19:41:26 +0800 Subject: [PATCH 041/125] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=9B=B7=E8=BE=BE?= =?UTF-8?q?=E5=9B=BE=E8=AD=A6=E6=88=92=E7=BA=BF=E3=80=81=E9=97=B4=E9=9A=94?= =?UTF-8?q?=E8=83=8C=E6=99=AFbug=20=E8=81=9A=E5=90=88=E6=8A=A5=E8=A1=A8?= =?UTF-8?q?=E5=92=8C=E8=A1=A8=E5=8D=95=E4=B8=AD=EF=BC=8C=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E5=AF=B9=E8=B6=85=E9=93=BE=E4=B8=8B=E6=8B=89=E9=80=89=E9=A1=B9?= =?UTF-8?q?=E7=9A=84=E8=BF=87=E6=BB=A4=20=E6=9B=B4=E6=8D=A2=E4=B8=8D?= =?UTF-8?q?=E9=80=8F=E6=98=8E=E5=BA=A6=E6=8E=A7=E4=BB=B6=EF=BC=8C=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=E7=BB=84=E4=BB=B6bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../gui/controlpane/UIListControlPane.java | 8 +++- .../fr/design/gui/style/NumberDragBar.java | 6 ++- .../SeriesCondition/LabelAlphaPane.java | 35 +++++++++++----- .../component/VanChartHyperLinkPane.java | 41 +++++++++++++++++++ .../background/AlertLineListControlPane.java | 11 ++++- .../background/BackgroundListControlPane.java | 11 ++++- .../background/VanChartAxisAreaPane.java | 12 +++++- .../radar/VanChartRadarAxisAreaPane.java | 34 +++++++++------ 8 files changed, 127 insertions(+), 31 deletions(-) diff --git a/designer_base/src/com/fr/design/gui/controlpane/UIListControlPane.java b/designer_base/src/com/fr/design/gui/controlpane/UIListControlPane.java index 617619bc22..5047fcb7b5 100644 --- a/designer_base/src/com/fr/design/gui/controlpane/UIListControlPane.java +++ b/designer_base/src/com/fr/design/gui/controlpane/UIListControlPane.java @@ -162,11 +162,15 @@ public abstract class UIListControlPane extends UIControlPane { if (creators.length == 1) { addItemShortCut = new AddItemUpdateAction(creators); } else { - addItemShortCut = new AddItemMenuDef(creators); + addItemShortCut = getAddItemMenuDef(creators); } return new AbsoluteEnableShortCut(addItemShortCut); } + protected AddItemMenuDef getAddItemMenuDef (NameableCreator[] creators) { + return new AddItemMenuDef(creators); + } + @Override protected ShortCut4JControlPane removeItemShortCut() { return new NormalEnableShortCut(new RemoveItemAction()); @@ -557,7 +561,7 @@ public abstract class UIListControlPane extends UIControlPane { } } - private boolean whetherAdd(String itemName) { + protected boolean whetherAdd(String itemName){ JTemplate jTemplate = HistoryTemplateListPane.getInstance().getCurrentEditingTemplate(); if (jTemplate == null) { return false; diff --git a/designer_base/src/com/fr/design/gui/style/NumberDragBar.java b/designer_base/src/com/fr/design/gui/style/NumberDragBar.java index 0fa223a791..95596db4c5 100644 --- a/designer_base/src/com/fr/design/gui/style/NumberDragBar.java +++ b/designer_base/src/com/fr/design/gui/style/NumberDragBar.java @@ -53,6 +53,8 @@ public class NumberDragBar extends JComponent { @Override protected void paintComponent(Graphics g) { int width = this.getWidth(); + //x值在这里计算,setValue时,有时会因为组件还没画,获取到的是0 + x = (value - minValue) * (width - WIDTH_ADJUST) / (maxValue - minValue) + X_ADJUST; Graphics2D g2 = (Graphics2D)g; RenderingHints qualityHints = new RenderingHints(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON); qualityHints.put(RenderingHints.KEY_RENDERING, RenderingHints.VALUE_RENDER_QUALITY); @@ -118,8 +120,8 @@ public class NumberDragBar extends JComponent { if(getWidth() <= 0) { Thread.sleep(500); } - int width = getWidth(); - x = (value - minValue) * (width - WIDTH_ADJUST) / (maxValue - minValue) + X_ADJUST; +// int width = getWidth(); +// x = (value - minValue) * (width - WIDTH_ADJUST) / (maxValue - minValue) + X_ADJUST; validate(); repaint(); revalidate(); diff --git a/designer_chart/src/com/fr/design/chart/series/SeriesCondition/LabelAlphaPane.java b/designer_chart/src/com/fr/design/chart/series/SeriesCondition/LabelAlphaPane.java index 3ba7316931..122e39cf37 100644 --- a/designer_chart/src/com/fr/design/chart/series/SeriesCondition/LabelAlphaPane.java +++ b/designer_chart/src/com/fr/design/chart/series/SeriesCondition/LabelAlphaPane.java @@ -4,20 +4,26 @@ import com.fr.chart.base.AttrAlpha; import com.fr.chart.base.DataSeriesCondition; import com.fr.design.condition.ConditionAttrSingleConditionPane; import com.fr.design.condition.ConditionAttributesPane; +import com.fr.design.gui.frpane.UINumberDragPane; import com.fr.design.gui.ilable.UILabel; -import com.fr.design.style.AlphaPane; import com.fr.general.Inter; +import javax.swing.*; +import java.awt.*; + /** -* @author richie -* @date 2015-03-26 -* @since 8.0 -*/ + * @author richie + * @date 2015-03-26 + * @since 8.0 + */ public class LabelAlphaPane extends ConditionAttrSingleConditionPane { - private static final int ALPHASIZE = 100; + private static final double ALPHASIZE = 100.0; + private static final int PANEL_WIDTH = 200; + private static final int PANEL_HIGHT = 20; private UILabel nameLabel; - private AlphaPane alphaPane; + private UINumberDragPane alphaPane; + private AttrAlpha attrAlpha = new AttrAlpha(); @@ -25,10 +31,17 @@ public class LabelAlphaPane extends ConditionAttrSingleConditionPane list = new ArrayList(); if (nameHyperlink_array != null) { @@ -218,4 +227,36 @@ public class VanChartHyperLinkPane extends VanChartUIListControlPane { } return null; } + + protected class AddVanChartItemMenuDef extends AddItemMenuDef{ + + public AddVanChartItemMenuDef(NameableCreator[] creators) { + super(creators); + } + + @Override + protected boolean whetherAdd(String itemName){ + JTemplate jTemplate = HistoryTemplateListPane.getInstance().getCurrentEditingTemplate(); + if (jTemplate == null) { + return false; + } + //先屏蔽掉这个,之后还有别的 + String[] names = {Inter.getLocText("FR-Hyperlink_Chart_Float"), Inter.getLocText("FR-Hyperlink_Chart_Cell")}; + for (String name : names){ + if(!jTemplate.isJWorkBook() && ComparatorUtils.equals(itemName,name)){ + if(jTemplate.getEditingReportIndex() == BaseJForm.ELEMENTCASE_TAB && ComparatorUtils.equals(itemName, names[0])){ + //表单报表块中图表悬浮元素超链,只屏蔽联动悬浮元素 + return false; + } else if(jTemplate.getEditingReportIndex() == BaseJForm.FORM_TAB) { + //表单图表超链屏蔽掉联动悬浮元素和联动单元格 + return false; + } + } + } + String formName = Inter.getLocText("Hyperlink-Form_link"); + return !(jTemplate.isJWorkBook() && ComparatorUtils.equals(itemName, formName)); + } + } + + } diff --git a/designer_chart/src/com/fr/plugin/chart/designer/style/background/AlertLineListControlPane.java b/designer_chart/src/com/fr/plugin/chart/designer/style/background/AlertLineListControlPane.java index 3dfb4f4302..6857302d08 100644 --- a/designer_chart/src/com/fr/plugin/chart/designer/style/background/AlertLineListControlPane.java +++ b/designer_chart/src/com/fr/plugin/chart/designer/style/background/AlertLineListControlPane.java @@ -1,6 +1,7 @@ package com.fr.plugin.chart.designer.style.background; import com.fr.chart.chartattr.Plot; +import com.fr.design.beans.BasicBeanPane; import com.fr.design.gui.controlpane.NameableCreator; import com.fr.design.gui.controlpane.ShortCut4JControlPane; import com.fr.general.ComparatorUtils; @@ -52,7 +53,7 @@ public class AlertLineListControlPane extends VanChartUIListControlPane { List yAxisList = rectanglePlot.getYAxisList(); String[] axisNames = DefaultAxisHelper.getAllAxisNames(xAxisList, yAxisList); - ChartNameObjectCreator[] creators = {new ChartNameObjectCreator(axisNames, Inter.getLocText("Plugin-ChartF_AlertLine"), VanChartAlertValue.class, VanChartAlertValuePane.class)}; + ChartNameObjectCreator[] creators = {new ChartNameObjectCreator(getAlertAxisName(axisNames), Inter.getLocText("Plugin-ChartF_AlertLine"), VanChartAlertValue.class, getAlertPaneClass())}; refreshNameableCreator(creators); @@ -111,4 +112,12 @@ public class AlertLineListControlPane extends VanChartUIListControlPane { axis.setAlertValues(axisAlerts); } } + + protected Class getAlertPaneClass() { + return VanChartAlertValuePane.class; + } + + protected String[] getAlertAxisName(String[] axisNames) { + return axisNames; + } } diff --git a/designer_chart/src/com/fr/plugin/chart/designer/style/background/BackgroundListControlPane.java b/designer_chart/src/com/fr/plugin/chart/designer/style/background/BackgroundListControlPane.java index e514812499..e288e51a54 100644 --- a/designer_chart/src/com/fr/plugin/chart/designer/style/background/BackgroundListControlPane.java +++ b/designer_chart/src/com/fr/plugin/chart/designer/style/background/BackgroundListControlPane.java @@ -1,6 +1,7 @@ package com.fr.plugin.chart.designer.style.background; import com.fr.chart.chartattr.Plot; +import com.fr.design.beans.BasicBeanPane; import com.fr.design.gui.controlpane.NameableCreator; import com.fr.design.gui.controlpane.ShortCut4JControlPane; import com.fr.general.ComparatorUtils; @@ -54,7 +55,7 @@ public class BackgroundListControlPane extends VanChartUIListControlPane { List yAxisList = rectanglePlot.getYAxisList(); String[] axisNames = DefaultAxisHelper.getAllAxisNames(xAxisList, yAxisList); - BackgroundNameObjectCreator[] creators = {new BackgroundNameObjectCreator(axisNames, Inter.getLocText("Plugin-ChartF_CustomIntervalBackground"), VanChartCustomIntervalBackground.class, VanChartCustomIntervalBackgroundPane.class)}; + BackgroundNameObjectCreator[] creators = {new BackgroundNameObjectCreator(getCustomIntervalBackgroundAxisName(axisNames), Inter.getLocText("Plugin-ChartF_CustomIntervalBackground"), VanChartCustomIntervalBackground.class, getIntervalPaneClass())}; refreshNameableCreator(creators); @@ -123,4 +124,12 @@ public class BackgroundListControlPane extends VanChartUIListControlPane { axis.setCustomIntervalBackgroundArray(axisCustomBackground); } } + + protected Class getIntervalPaneClass() { + return VanChartCustomIntervalBackgroundPane.class; + } + + protected String[] getCustomIntervalBackgroundAxisName(String[] axisNames) { + return axisNames; + } } diff --git a/designer_chart/src/com/fr/plugin/chart/designer/style/background/VanChartAxisAreaPane.java b/designer_chart/src/com/fr/plugin/chart/designer/style/background/VanChartAxisAreaPane.java index 1ac56791b9..886a461efe 100644 --- a/designer_chart/src/com/fr/plugin/chart/designer/style/background/VanChartAxisAreaPane.java +++ b/designer_chart/src/com/fr/plugin/chart/designer/style/background/VanChartAxisAreaPane.java @@ -75,12 +75,16 @@ public class VanChartAxisAreaPane extends BasicBeanPane { } protected JPanel createAlertLinePane() { - alertLine = new AlertLineListControlPane(); + alertLine = getAlertLinePane(); JPanel panel = TableLayout4VanChartHelper.createExpandablePaneWithTitle(Inter.getLocText("Plugin-ChartF_AlertLine"), alertLine); alertLine.setBorder(BorderFactory.createEmptyBorder(10, 5, 0, 0)); return panel; } + protected AlertLineListControlPane getAlertLinePane () { + return new AlertLineListControlPane(); + } + protected JPanel createIntervalPane(double[] row, double[] col) { isDefaultIntervalBackground = new UIButtonGroup(new String[]{Inter.getLocText("Plugin-ChartF_Default_Interval"), Inter.getLocText("Plugin-ChartF_CustomIntervalBackground")}); horizontalColorBackground = new ColorSelectBox(100); @@ -88,7 +92,7 @@ public class VanChartAxisAreaPane extends BasicBeanPane { Component[][] components = getIntervalPaneComponents(); JPanel defaultPane = TableLayoutHelper.createTableLayoutPane(components, row, col); defaultPane.setBorder(BorderFactory.createEmptyBorder(0,12,0,0)); - customIntervalBackground = new BackgroundListControlPane(); + customIntervalBackground = getBackgroundListControlPane(); cardLayout = new CardLayout(); centerPane = new JPanel(cardLayout); @@ -109,6 +113,10 @@ public class VanChartAxisAreaPane extends BasicBeanPane { return panel; } + protected BackgroundListControlPane getBackgroundListControlPane() { + return new BackgroundListControlPane(); + } + protected Component[][] getIntervalPaneComponents() { return new Component[][]{ new Component[]{null, null}, diff --git a/designer_chart/src/com/fr/plugin/chart/designer/style/background/radar/VanChartRadarAxisAreaPane.java b/designer_chart/src/com/fr/plugin/chart/designer/style/background/radar/VanChartRadarAxisAreaPane.java index b215406a9d..558f4568d4 100644 --- a/designer_chart/src/com/fr/plugin/chart/designer/style/background/radar/VanChartRadarAxisAreaPane.java +++ b/designer_chart/src/com/fr/plugin/chart/designer/style/background/radar/VanChartRadarAxisAreaPane.java @@ -3,8 +3,8 @@ package com.fr.plugin.chart.designer.style.background.radar; import com.fr.design.beans.BasicBeanPane; import com.fr.design.gui.ilable.UILabel; import com.fr.general.Inter; -import com.fr.plugin.chart.attr.axis.VanChartAlertValue; -import com.fr.plugin.chart.attr.axis.VanChartCustomIntervalBackground; +import com.fr.plugin.chart.designer.style.background.AlertLineListControlPane; +import com.fr.plugin.chart.designer.style.background.BackgroundListControlPane; import com.fr.plugin.chart.designer.style.background.VanChartAxisAreaPane; import java.awt.*; @@ -30,19 +30,29 @@ public class VanChartRadarAxisAreaPane extends VanChartAxisAreaPane { }; } - protected Class getAlertPaneClass() { - return VanChartRadarAlertValuePane.class; - } + @Override + protected AlertLineListControlPane getAlertLinePane() { + return new AlertLineListControlPane(){ + protected Class getAlertPaneClass() { + return VanChartRadarAlertValuePane.class; + } - protected void setAlertDemoAxisName(VanChartAlertValue demo, String[] axisNames) { - demo.setAxisName(axisNames[axisNames.length - 1]);//默认y轴,居左居右 + protected String[] getAlertAxisName(String[] axisNames) { + return new String[]{axisNames[axisNames.length - 1]};//默认y轴,居左居右 + } + }; } - protected Class getIntervalPaneClass() { - return VanChartRadarCustomIntervalBackgroundPane.class; - } + @Override + protected BackgroundListControlPane getBackgroundListControlPane() { + return new BackgroundListControlPane(){ + protected Class getIntervalPaneClass() { + return VanChartRadarCustomIntervalBackgroundPane.class; + } - protected void setCustomIntervalBackgroundDemoAxisName(VanChartCustomIntervalBackground demo, String[] axisNames) { - demo.setAxisName(axisNames[axisNames.length - 1]); + protected String[] getCustomIntervalBackgroundAxisName(String[] axisNames) { + return new String[]{axisNames[axisNames.length - 1]}; + } + }; } } \ No newline at end of file From 0e646e2c5bfb51f24f76e9119eae6acc54213a66 Mon Sep 17 00:00:00 2001 From: hzzz Date: Thu, 21 Sep 2017 20:27:11 +0800 Subject: [PATCH 042/125] =?UTF-8?q?=E5=A4=8D=E9=80=89=E6=A1=86=E6=A0=91?= =?UTF-8?q?=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fr/design/gui/itree/checkboxtree/NullTristateCheckBox.java | 1 - 1 file changed, 1 deletion(-) diff --git a/designer_base/src/com/fr/design/gui/itree/checkboxtree/NullTristateCheckBox.java b/designer_base/src/com/fr/design/gui/itree/checkboxtree/NullTristateCheckBox.java index 0642f96f4a..bd1747c8ac 100644 --- a/designer_base/src/com/fr/design/gui/itree/checkboxtree/NullTristateCheckBox.java +++ b/designer_base/src/com/fr/design/gui/itree/checkboxtree/NullTristateCheckBox.java @@ -65,7 +65,6 @@ public class NullTristateCheckBox extends TristateCheckBox { // @Override public void updateUI() { - super.updateUI(); clearAttribute(); } From 3718d8c56854f0d9d83182c7369b185533413663 Mon Sep 17 00:00:00 2001 From: kerry Date: Fri, 22 Sep 2017 09:40:36 +0800 Subject: [PATCH 043/125] =?UTF-8?q?REPORT-4694=20tab=E7=BB=84=E4=BB=B6?= =?UTF-8?q?=EF=BC=8C=E5=88=87=E6=8D=A2tab=E6=97=B6=E7=BB=84=E4=BB=B6?= =?UTF-8?q?=E5=86=85=E5=AE=B9=E6=B2=A1=E6=9C=89=E6=94=B9=E5=8F=98=E5=92=8C?= =?UTF-8?q?=E6=8E=A7=E4=BB=B6=E8=BE=B9=E7=95=8C=E5=8F=AF=E7=BC=96=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../component/WidgetAbsoluteBoundPane.java | 24 ++-- .../designer/component/WidgetBoundPane.java | 110 +++++++++++++++++- .../layout/WTabFitLayoutDefinePane.java | 41 ++++++- .../layout/WTitleLayoutDefinePane.java | 6 +- 4 files changed, 164 insertions(+), 17 deletions(-) diff --git a/designer_form/src/com/fr/design/widget/ui/designer/component/WidgetAbsoluteBoundPane.java b/designer_form/src/com/fr/design/widget/ui/designer/component/WidgetAbsoluteBoundPane.java index 7cf0493de7..3862b5f00c 100644 --- a/designer_form/src/com/fr/design/widget/ui/designer/component/WidgetAbsoluteBoundPane.java +++ b/designer_form/src/com/fr/design/widget/ui/designer/component/WidgetAbsoluteBoundPane.java @@ -1,26 +1,20 @@ package com.fr.design.widget.ui.designer.component; import com.fr.design.designer.creator.XCreator; -import com.fr.design.designer.creator.XLayoutContainer; -import com.fr.design.designer.creator.XWAbsoluteLayout; import com.fr.design.gui.ispinner.UISpinner; import com.fr.design.widget.WidgetBoundsPaneFactory; -import com.fr.form.ui.container.WAbsoluteLayout; - +import com.fr.form.ui.container.WLayout; import java.awt.*; /** * Created by ibm on 2017/8/3. */ public class WidgetAbsoluteBoundPane extends WidgetBoundPane { - protected XWAbsoluteLayout parent; private UISpinner x; private UISpinner y; public WidgetAbsoluteBoundPane(XCreator source){ super(source); - XLayoutContainer xLayoutContainer = getParent(source); - this.parent = (XWAbsoluteLayout) xLayoutContainer; } public void initBoundPane() { @@ -40,13 +34,25 @@ public class WidgetAbsoluteBoundPane extends WidgetBoundPane { if (parent == null) { return; } - WAbsoluteLayout wabs = parent.toData(); + WLayout wabs = parent.toData(); wabs.setBounds(creator.toData(), bounds); creator.setBounds(bounds); } + + public void limitWidth(WLayout wabs, int w, Rectangle bounds, Rectangle rec){ + bounds.width = w; + } + + public void limitHeight(WLayout wabs, int h, Rectangle bounds, Rectangle rec){ + bounds.height = h; + } + + + + protected String title4PopupWindow() { - return ""; + return "absoluteBound"; } public void populate() { diff --git a/designer_form/src/com/fr/design/widget/ui/designer/component/WidgetBoundPane.java b/designer_form/src/com/fr/design/widget/ui/designer/component/WidgetBoundPane.java index da5334cc27..4af43dbd10 100644 --- a/designer_form/src/com/fr/design/widget/ui/designer/component/WidgetBoundPane.java +++ b/designer_form/src/com/fr/design/widget/ui/designer/component/WidgetBoundPane.java @@ -1,11 +1,22 @@ package com.fr.design.widget.ui.designer.component; +import com.fr.design.designer.beans.AdapterBus; +import com.fr.design.designer.beans.adapters.layout.FRFitLayoutAdapter; import com.fr.design.designer.creator.*; +import com.fr.design.designer.creator.cardlayout.XWCardLayout; import com.fr.design.dialog.BasicPane; import com.fr.design.gui.ispinner.UISpinner; import com.fr.design.layout.FRGUIPaneFactory; +import com.fr.design.mainframe.FormDesigner; +import com.fr.design.mainframe.WidgetPropertyPane; +import com.fr.design.utils.ComponentUtils; import com.fr.design.widget.WidgetBoundsPaneFactory; +import com.fr.form.ui.PaddingMargin; +import com.fr.form.ui.container.WFitLayout; +import com.fr.form.ui.container.WLayout; +import com.fr.general.Inter; +import javax.swing.*; import java.awt.*; /** @@ -13,6 +24,9 @@ import java.awt.*; */ public class WidgetBoundPane extends BasicPane { + private static final int MINHEIGHT = WLayout.MIN_HEIGHT; + private static final int MINWIDTH = WLayout.MIN_WIDTH; + protected XLayoutContainer parent; protected XCreator creator; protected UISpinner width; protected UISpinner height; @@ -20,6 +34,7 @@ public class WidgetBoundPane extends BasicPane { public WidgetBoundPane(XCreator source) { this.setLayout(FRGUIPaneFactory.createBorderLayout()); this.creator = source; + this.parent = getParent(source); initBoundPane(); } @@ -34,19 +49,20 @@ public class WidgetBoundPane extends BasicPane { public void initBoundPane() { width = new UISpinner(0, 1200, 1); height = new UISpinner(0, 1200, 1); + if (creator.acceptType(XWCardLayout.class)) { + width.setEnabled(false); + height.setEnabled(false); + } this.add(WidgetBoundsPaneFactory.createBoundsPane(width, height)); } public void update() { - Rectangle bounds = new Rectangle(creator.getBounds()); - bounds.width = (int) width.getValue(); - bounds.height = (int) height.getValue(); - creator.setBounds(bounds); + fix(); } protected String title4PopupWindow() { - return ""; + return "widgetBound"; } public void populate() { @@ -54,4 +70,88 @@ public class WidgetBoundPane extends BasicPane { width.setValue(bounds.width); height.setValue(bounds.height); } + + public void fix() { + Rectangle bounds = new Rectangle(creator.getBounds()); + int w = (int) width.getValue(); + int h = (int) height.getValue(); + Rectangle rec = ComponentUtils.getRelativeBounds(parent); + WLayout wabs = parent.toData(); + if (bounds.width != w) { + limitWidth(wabs, w, bounds, rec); + } + if (bounds.height != h) { + limitHeight(wabs, h, bounds, rec); + } + creator.setBounds(bounds); + } + + + public void adjustComponents(Rectangle bounds, int difference, int row) { + FormDesigner formDesigner = WidgetPropertyPane.getInstance().getEditingFormDesigner(); + Rectangle backupBounds = getBound(); + FRFitLayoutAdapter layoutAdapter = (FRFitLayoutAdapter) AdapterBus.searchLayoutAdapter(formDesigner, creator); + if (layoutAdapter != null) { + layoutAdapter.setEdit(true); + layoutAdapter.calculateBounds(backupBounds, bounds, creator, row, difference); + } + } + + public void limitWidth(WLayout wabs, int w, Rectangle bounds, Rectangle rec) { + int difference = 0; + int minWidth = (int) (MINWIDTH * ((WFitLayout) wabs).getResolutionScaling()); + PaddingMargin margin = wabs.getMargin(); + if (bounds.width != w) { + if (bounds.width == rec.width - margin.getLeft() - margin.getRight()) { + JOptionPane.showMessageDialog(null, Inter.getLocText("FR-Designer-Beyond_Bounds")); + width.setValue(bounds.width); + return; + } else if (w < minWidth) { + JOptionPane.showMessageDialog(null, Inter.getLocText("FR-Designer-Min_Width") + Integer.toString(minWidth)); + width.setValue(bounds.width); + return; + } + difference = bounds.width - w; + bounds.width = w; + } + width.setValue(bounds.width); + wabs.setBounds(creator.toData(), bounds); + adjustComponents(bounds, difference, 0); + } + + public void limitHeight(WLayout wabs, int h, Rectangle bounds, Rectangle rec) { + int difference = 0; + PaddingMargin margin = wabs.getMargin(); + int minHeight = (int) (MINHEIGHT * ((WFitLayout) wabs).getResolutionScaling()); + if (bounds.height != h) { + if (bounds.height == rec.height - margin.getTop() - margin.getBottom()) { + JOptionPane.showMessageDialog(null, Inter.getLocText("FR-Designer-Beyond_Bounds")); + height.setValue(bounds.height); + return; + } else if (h < minHeight) { + JOptionPane.showMessageDialog(null, Inter.getLocText("FR-Designer-Min_Height") + Integer.toString(minHeight)); + height.setValue(bounds.height); + return; + } + difference = bounds.height - h; + bounds.height = h; + } + wabs.setBounds(creator.toData(), bounds); + creator.setBounds(bounds); + adjustComponents(bounds, difference, 1); + } + + + public Rectangle getBound() { + Rectangle bounds = new Rectangle(creator.getBounds()); + if (parent == null) { + return bounds; + } + Rectangle rec = ComponentUtils.getRelativeBounds(parent); + bounds.x += rec.x; + bounds.y += rec.y; + return bounds; + + } + } diff --git a/designer_form/src/com/fr/design/widget/ui/designer/layout/WTabFitLayoutDefinePane.java b/designer_form/src/com/fr/design/widget/ui/designer/layout/WTabFitLayoutDefinePane.java index 82ea84af0c..b522950a31 100644 --- a/designer_form/src/com/fr/design/widget/ui/designer/layout/WTabFitLayoutDefinePane.java +++ b/designer_form/src/com/fr/design/widget/ui/designer/layout/WTabFitLayoutDefinePane.java @@ -2,6 +2,9 @@ package com.fr.design.widget.ui.designer.layout; import com.fr.design.designer.IntervalConstants; import com.fr.design.designer.creator.XCreator; +import com.fr.design.designer.creator.cardlayout.XWCardLayout; +import com.fr.design.designer.creator.cardlayout.XWCardMainBorderLayout; +import com.fr.design.designer.creator.cardlayout.XWTabFitLayout; import com.fr.design.foldablepane.UIExpandablePane; import com.fr.design.gui.ilable.UILabel; import com.fr.design.gui.ispinner.UISpinner; @@ -11,7 +14,12 @@ import com.fr.design.layout.TableLayoutHelper; import com.fr.design.widget.ui.designer.AbstractDataModify; import com.fr.design.widget.ui.designer.component.PaddingBoundPane; import com.fr.design.widget.ui.designer.component.TabFitLayoutBackgroundPane; +import com.fr.form.ui.CardSwitchButton; +import com.fr.form.ui.container.cardlayout.WCardMainBorderLayout; +import com.fr.form.ui.container.cardlayout.WCardTagLayout; +import com.fr.form.ui.container.cardlayout.WCardTitleLayout; import com.fr.form.ui.container.cardlayout.WTabFitLayout; +import com.fr.general.ComparatorUtils; import com.fr.general.Inter; import javax.swing.*; @@ -70,16 +78,47 @@ public class WTabFitLayoutDefinePane extends AbstractDataModify { borderStyle.populate(ob); paddingBoundPane.populate(ob); componentInterval.setValue(ob.getCompInterval()); + if(ob.getCurrentCard() == null){ + ob.setCurrentCard(getRelateSwitchButton(ob)); + } titleField.setText(ob.getCurrentCard().getText()); } + private CardSwitchButton getRelateSwitchButton(WTabFitLayout layout){ + int index = layout.getIndex(); + + XWCardLayout cardLayout = (XWCardLayout)creator.getBackupParent(); + XWCardMainBorderLayout border = (XWCardMainBorderLayout)cardLayout.getBackupParent(); + WCardMainBorderLayout borderLayout = border.toData(); + WCardTitleLayout titleLayout = borderLayout.getTitlePart(); + if(titleLayout == null){ + return null; + } + + WCardTagLayout tagLayout = titleLayout.getTagPart(); + return tagLayout == null ? null : tagLayout.getSwitchButton(index); + } + + + private void setLayoutGap(int gap, WTabFitLayout layout, XWTabFitLayout xwTabFitLayout) { + if(xwTabFitLayout.canAddInterval(gap)){ + int interval = layout.getCompInterval(); + if (gap != interval) { + xwTabFitLayout.moveContainerMargin(); + xwTabFitLayout.moveCompInterval(xwTabFitLayout.getAcualInterval()); + layout.setCompInterval(gap); + xwTabFitLayout.addCompInterval(xwTabFitLayout.getAcualInterval()); + } + } + } @Override public WTabFitLayout updateBean() { WTabFitLayout layout = (WTabFitLayout) creator.toData(); borderStyle.update(layout); paddingBoundPane.update(layout); - layout.setCompInterval((int)componentInterval.getValue()); + int gap = (int)componentInterval.getValue(); + setLayoutGap(gap, layout, (XWTabFitLayout)creator); layout.getCurrentCard().setText(titleField.getText()); return layout; } diff --git a/designer_form/src/com/fr/design/widget/ui/designer/layout/WTitleLayoutDefinePane.java b/designer_form/src/com/fr/design/widget/ui/designer/layout/WTitleLayoutDefinePane.java index dd0b80bba7..a507a99b89 100644 --- a/designer_form/src/com/fr/design/widget/ui/designer/layout/WTitleLayoutDefinePane.java +++ b/designer_form/src/com/fr/design/widget/ui/designer/layout/WTitleLayoutDefinePane.java @@ -12,6 +12,7 @@ import com.fr.design.widget.ui.designer.AbstractDataModify; import com.fr.design.widget.ui.designer.component.PaddingBoundPane; import com.fr.form.ui.*; import com.fr.form.ui.container.WTitleLayout; +import com.fr.general.ComparatorUtils; import com.fr.general.Inter; import javax.swing.*; @@ -32,7 +33,6 @@ public abstract class WTitleLayoutDefinePane Date: Fri, 22 Sep 2017 10:14:10 +0800 Subject: [PATCH 044/125] =?UTF-8?q?=E9=A2=84=E8=A7=88=E6=8C=89=E9=92=AE?= =?UTF-8?q?=E5=9B=9E=E9=80=80=20&=20=E4=B8=8B=E6=8B=89=E6=A1=86=E5=9B=9E?= =?UTF-8?q?=E9=80=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- designer/src/com/fr/start/Designer.java | 14 ++++++-------- .../design/gui/icombobox/UIComboBoxRenderer.java | 13 ++++++++++--- 2 files changed, 16 insertions(+), 11 deletions(-) diff --git a/designer/src/com/fr/start/Designer.java b/designer/src/com/fr/start/Designer.java index bd4c455e71..9d93644a28 100644 --- a/designer/src/com/fr/start/Designer.java +++ b/designer/src/com/fr/start/Designer.java @@ -135,26 +135,24 @@ public class Designer extends BaseDesigner { public UILargeToolbar createLargeToolbar() { UILargeToolbar largeToolbar = super.createLargeToolbar(); largeToolbar.setLayout(new FlowLayout(FlowLayout.CENTER, 0, 4)); - JPanel templeJpanel = new JPanel() { + largeToolbar.add(new JPanel() { public Dimension getPreferredSize() { Dimension dim = super.getPreferredSize(); dim.width = 1; return dim; } - }; - templeJpanel.setBackground(Color.WHITE); - largeToolbar.add(templeJpanel); + }); createRunButton(largeToolbar); largeToolbar.add(run); - templeJpanel = new JPanel() { + run.setBackground(UIConstants.TREE_BACKGROUND); + largeToolbar.add(new JPanel() { public Dimension getPreferredSize() { Dimension dim = super.getPreferredSize(); dim.width = GAP; return dim; } - }; - templeJpanel.setBackground(Color.WHITE); - largeToolbar.add(templeJpanel); + }); + largeToolbar.addSeparator(new Dimension(2, 42)); largeToolbar.setBorder(new MatteBorder(new Insets(0, 0, 1, 0), UIConstants.LINE_COLOR)); return largeToolbar; } diff --git a/designer_base/src/com/fr/design/gui/icombobox/UIComboBoxRenderer.java b/designer_base/src/com/fr/design/gui/icombobox/UIComboBoxRenderer.java index 4be4fdcf09..9e5a0c3b9f 100644 --- a/designer_base/src/com/fr/design/gui/icombobox/UIComboBoxRenderer.java +++ b/designer_base/src/com/fr/design/gui/icombobox/UIComboBoxRenderer.java @@ -26,9 +26,16 @@ public class UIComboBoxRenderer extends DefaultListCellRenderer { public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus) { cellHasFocus = cellHasFocus && !this.isEnabled(); JLabel renderer =(JLabel) super.getListCellRendererComponent(list, value, index, isSelected, cellHasFocus); - renderer.setForeground(Color.black); - list.setSelectionBackground(UIConstants.COMBOBOX_BTN_PRESS); - list.setSelectionForeground(Color.black); + renderer.setOpaque(true); + list.setSelectionBackground(UIConstants.NORMAL_BLUE); + list.setSelectionForeground(Color.WHITE); + if (isSelected) { + renderer.setForeground(list.getSelectionForeground()); + renderer.setBackground(list.getSelectionBackground()); + } else { + renderer.setForeground(list.getForeground()); + renderer.setBackground(list.getBackground()); + } renderer.setText(" " + renderer.getText()); return renderer; } From e4c3f89c19f471b883d9ec77f6eacd1d8b37dfaf Mon Sep 17 00:00:00 2001 From: hzzz Date: Fri, 22 Sep 2017 10:30:06 +0800 Subject: [PATCH 045/125] =?UTF-8?q?=E7=AE=AD=E5=A4=B4=E5=9B=BE=E6=A0=87=20?= =?UTF-8?q?&=20tab=E9=A2=9C=E8=89=B2=E9=97=B4=E8=B7=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/fr/design/gui/ibutton/UIHeadGroup.java | 4 ++-- .../fr/design/images/buttonicon/leftNormal.png | Bin 165 -> 193 bytes 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/designer_base/src/com/fr/design/gui/ibutton/UIHeadGroup.java b/designer_base/src/com/fr/design/gui/ibutton/UIHeadGroup.java index 3e7c488c14..28957a87ce 100644 --- a/designer_base/src/com/fr/design/gui/ibutton/UIHeadGroup.java +++ b/designer_base/src/com/fr/design/gui/ibutton/UIHeadGroup.java @@ -23,8 +23,8 @@ public class UIHeadGroup extends JPanel { public UIHeadGroup(String[] textArray) { labelButtonList = new ArrayList(textArray.length); - this.setBackground(UIConstants.NORMAL_BACKGROUND); - this.setLayout(new GridLayout(0, textArray.length, 1, 0)); + this.setBackground(UIConstants.TREE_BACKGROUND); + this.setLayout(new GridLayout(0, textArray.length, 0, 0)); // this.setBorder(BorderFactory.createEmptyBorder(1, 1, 1, 1)); for (int i = 0; i < textArray.length; i++) { final int index = i; diff --git a/designer_base/src/com/fr/design/images/buttonicon/leftNormal.png b/designer_base/src/com/fr/design/images/buttonicon/leftNormal.png index 883288d2f6653cab07d065ff049b8429839eb462..e23f392bbb12e35b5bb062cdecea6994ebecfda7 100644 GIT binary patch delta 152 zcmV;J0B8TD0l@)~F@JkWL_t(26=Pr+P_TCGTA5|bmgylof(e;}%wE2Hxx&w%KaVgn zG6o@wW7Pms{Qv*|13-oH$cjO13=Q}cW7PmOc>z!Y!(@p*<60RXIgClOTZf{MNX00000EGX+0i^+uF?3%^L_t(26=PtaJ6O4Lr58R+nb0Nw{{6dk`SRrr=;AOwh6a$t z|NsB%acRP;0iPzE8jv(OfY>mAR|6v>V`F4w- From c64a31bfe8f4de2c74462fbd6b5b5cb859b380b7 Mon Sep 17 00:00:00 2001 From: mengao <283296419@qq.com> Date: Fri, 22 Sep 2017 10:55:37 +0800 Subject: [PATCH 046/125] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E8=B6=85=E9=93=BE?= =?UTF-8?q?=E8=BF=87=E6=BB=A4helper=E7=B1=BB=EF=BC=8C=E5=A4=84=E7=90=86?= =?UTF-8?q?=E5=8D=95=E5=85=83=E6=A0=BC=E3=80=81=E5=9B=BE=E8=A1=A8=E8=B6=85?= =?UTF-8?q?=E9=93=BE=E4=B8=8B=E6=8B=89=E9=80=89=E9=A1=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fr/design/gui/HyperlinkFilterHelper.java | 59 ++++++++++++++++++ .../gui/controlpane/JListControlPane.java | 21 +------ .../gui/controlpane/UIListControlPane.java | 17 +----- .../gui/frpane/UICorrelationComboBoxPane.java | 61 +++++-------------- .../component/VanChartHyperLinkPane.java | 29 ++------- 5 files changed, 83 insertions(+), 104 deletions(-) create mode 100644 designer_base/src/com/fr/design/gui/HyperlinkFilterHelper.java diff --git a/designer_base/src/com/fr/design/gui/HyperlinkFilterHelper.java b/designer_base/src/com/fr/design/gui/HyperlinkFilterHelper.java new file mode 100644 index 0000000000..db6aa9c4d9 --- /dev/null +++ b/designer_base/src/com/fr/design/gui/HyperlinkFilterHelper.java @@ -0,0 +1,59 @@ +package com.fr.design.gui; + +import com.fr.design.file.HistoryTemplateListPane; +import com.fr.design.mainframe.BaseJForm; +import com.fr.design.mainframe.JTemplate; +import com.fr.general.ComparatorUtils; +import com.fr.general.Inter; + +/** + * Created by mengao on 2017/9/22. + * 单元格超链、图表超链在不同类型模版中,下拉选项不同 + */ +public class HyperlinkFilterHelper { + + public static boolean whetherAddHyperlink4cell(String itemName){ + JTemplate jTemplate = getCurrentEditingTemplate (); + if (jTemplate == null) { + return false; + } + //先屏蔽掉这个,之后还有别的 + String[] names = {Inter.getLocText("FR-Hyperlink_Chart_Float")}; + for (String name : names) { + if (!jTemplate.isJWorkBook() && ComparatorUtils.equals(itemName, name)) { + return false; + } + } + return whetherAddFormLink(jTemplate, itemName); + } + + public static boolean whetherAddHyperlink4Chart(String itemName){ + JTemplate jTemplate = getCurrentEditingTemplate (); + if (jTemplate == null) { + return false; + } + //先屏蔽掉这个,之后还有别的 + String[] names = {Inter.getLocText("FR-Hyperlink_Chart_Float"), Inter.getLocText("FR-Hyperlink_Chart_Cell")}; + for (String name : names){ + if(!jTemplate.isJWorkBook() && ComparatorUtils.equals(itemName,name)){ + if(jTemplate.getEditingReportIndex() == BaseJForm.ELEMENTCASE_TAB && ComparatorUtils.equals(itemName, names[0])){ + //表单报表块中图表悬浮元素超链,只屏蔽联动悬浮元素 + return false; + } else if(jTemplate.getEditingReportIndex() == BaseJForm.FORM_TAB) { + //表单图表超链屏蔽掉联动悬浮元素和联动单元格 + return false; + } + } + } + return whetherAddFormLink(jTemplate, itemName); + } + + private static JTemplate getCurrentEditingTemplate () { + return HistoryTemplateListPane.getInstance().getCurrentEditingTemplate(); + } + + private static boolean whetherAddFormLink(JTemplate jTemplate, String itemName) { + String formName = Inter.getLocText("Hyperlink-Form_link"); + return !(jTemplate.isJWorkBook() && ComparatorUtils.equals(itemName, formName)); + } +} diff --git a/designer_base/src/com/fr/design/gui/controlpane/JListControlPane.java b/designer_base/src/com/fr/design/gui/controlpane/JListControlPane.java index 474b1ca6ff..83cf7a50d3 100644 --- a/designer_base/src/com/fr/design/gui/controlpane/JListControlPane.java +++ b/designer_base/src/com/fr/design/gui/controlpane/JListControlPane.java @@ -8,13 +8,12 @@ import com.fr.design.data.tabledata.tabledatapane.GlobalMultiTDTableDataPane; import com.fr.design.data.tabledata.tabledatapane.GlobalTreeTableDataPane; import com.fr.design.data.tabledata.tabledatapane.MultiTDTableDataPane; import com.fr.design.data.tabledata.tabledatapane.TreeTableDataPane; -import com.fr.design.file.HistoryTemplateListPane; +import com.fr.design.gui.HyperlinkFilterHelper; import com.fr.design.gui.icontainer.UIScrollPane; import com.fr.design.gui.ilist.JNameEdList; import com.fr.design.gui.ilist.ListModelElement; import com.fr.design.gui.ilist.ModNameActionListener; import com.fr.design.layout.FRGUIPaneFactory; -import com.fr.design.mainframe.JTemplate; import com.fr.design.menu.LineSeparator; import com.fr.design.menu.MenuDef; import com.fr.design.menu.ShortCut; @@ -384,7 +383,7 @@ public abstract class JListControlPane extends JControlPane { private void wrapActionListener(NameableCreator[] creators) { for (final NameableCreator creator : creators) { - if (!whetherAdd(creator.menuName())) { + if (!HyperlinkFilterHelper.whetherAddHyperlink4cell(creator.menuName())) { continue; } boolean isTrue = ComparatorUtils.equals(creator.menuName(), Inter.getLocText("Datasource-Stored_Procedure")) || @@ -414,22 +413,6 @@ public abstract class JListControlPane extends JControlPane { }); } } - - private boolean whetherAdd(String itemName) { - JTemplate jTemplate = HistoryTemplateListPane.getInstance().getCurrentEditingTemplate(); - if (jTemplate == null) { - return false; - } - //先屏蔽掉这个,之后还有别的 - String[] names = {Inter.getLocText("FR-Hyperlink_Chart_Float")}; - for (String name : names) { - if (!jTemplate.isJWorkBook() && ComparatorUtils.equals(itemName, name)) { - return false; - } - } - String formName = Inter.getLocText("Hyperlink-Form_link"); - return !(jTemplate.isJWorkBook() && ComparatorUtils.equals(itemName, formName)); - } } /* diff --git a/designer_base/src/com/fr/design/gui/controlpane/UIListControlPane.java b/designer_base/src/com/fr/design/gui/controlpane/UIListControlPane.java index 5047fcb7b5..f1cd5f8740 100644 --- a/designer_base/src/com/fr/design/gui/controlpane/UIListControlPane.java +++ b/designer_base/src/com/fr/design/gui/controlpane/UIListControlPane.java @@ -11,7 +11,7 @@ import com.fr.design.data.tabledata.tabledatapane.GlobalMultiTDTableDataPane; import com.fr.design.data.tabledata.tabledatapane.GlobalTreeTableDataPane; import com.fr.design.data.tabledata.tabledatapane.MultiTDTableDataPane; import com.fr.design.data.tabledata.tabledatapane.TreeTableDataPane; -import com.fr.design.file.HistoryTemplateListPane; +import com.fr.design.gui.HyperlinkFilterHelper; import com.fr.design.gui.ibutton.UIButton; import com.fr.design.gui.icontainer.UIScrollPane; import com.fr.design.gui.ilist.ListModelElement; @@ -19,7 +19,6 @@ import com.fr.design.gui.ilist.ModNameActionListener; import com.fr.design.gui.ilist.UINameEdList; import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.mainframe.DesignerContext; -import com.fr.design.mainframe.JTemplate; import com.fr.design.menu.LineSeparator; import com.fr.design.menu.MenuDef; import com.fr.design.menu.ShortCut; @@ -562,19 +561,7 @@ public abstract class UIListControlPane extends UIControlPane { } protected boolean whetherAdd(String itemName){ - JTemplate jTemplate = HistoryTemplateListPane.getInstance().getCurrentEditingTemplate(); - if (jTemplate == null) { - return false; - } - //先屏蔽掉这个,之后还有别的 - String[] names = {Inter.getLocText("FR-Hyperlink_Chart_Float")}; - for (String name : names) { - if (!jTemplate.isJWorkBook() && ComparatorUtils.equals(itemName, name)) { - return false; - } - } - String formName = Inter.getLocText("Hyperlink-Form_link"); - return !(jTemplate.isJWorkBook() && ComparatorUtils.equals(itemName, formName)); + return HyperlinkFilterHelper.whetherAddHyperlink4cell(itemName); } } diff --git a/designer_base/src/com/fr/design/gui/frpane/UICorrelationComboBoxPane.java b/designer_base/src/com/fr/design/gui/frpane/UICorrelationComboBoxPane.java index b2e30f41f5..3ed7994b93 100644 --- a/designer_base/src/com/fr/design/gui/frpane/UICorrelationComboBoxPane.java +++ b/designer_base/src/com/fr/design/gui/frpane/UICorrelationComboBoxPane.java @@ -1,28 +1,14 @@ package com.fr.design.gui.frpane; -import java.awt.BorderLayout; -import java.awt.Component; -import java.awt.Container; -import java.awt.Dimension; -import java.awt.LayoutManager; -import java.awt.event.ActionEvent; -import java.awt.event.ActionListener; -import java.util.ArrayList; -import java.util.List; - -import javax.swing.JFrame; -import javax.swing.JPanel; -import javax.swing.JPopupMenu; -import javax.swing.SwingUtilities; -import javax.swing.event.ChangeEvent; -import javax.swing.event.ChangeListener; - import com.fr.base.BaseUtils; -import com.fr.design.constants.UIConstants; import com.fr.design.beans.BasicBeanPane; +import com.fr.design.constants.UIConstants; +import com.fr.design.dialog.DialogActionAdapter; +import com.fr.design.dialog.DialogActionListener; +import com.fr.design.dialog.UIDialog; import com.fr.design.event.UIObserver; import com.fr.design.event.UIObserverListener; -import com.fr.design.file.HistoryTemplateListPane; +import com.fr.design.gui.HyperlinkFilterHelper; import com.fr.design.gui.ibutton.UIButton; import com.fr.design.gui.imenu.UIMenuItem; import com.fr.design.gui.imenutable.UIMenuNameableCreator; @@ -30,11 +16,7 @@ import com.fr.design.gui.imenutable.UIMenuTable; import com.fr.design.hyperlink.ReportletHyperlinkPane; import com.fr.design.hyperlink.WebHyperlinkPane; import com.fr.design.javascript.EmailPane; -import com.fr.design.mainframe.BaseJForm; -import com.fr.design.mainframe.JTemplate; -import com.fr.design.dialog.DialogActionAdapter; -import com.fr.design.dialog.DialogActionListener; -import com.fr.design.dialog.UIDialog; +import com.fr.design.utils.gui.GUICoreUtils; import com.fr.general.ComparatorUtils; import com.fr.general.Inter; import com.fr.js.AbstractJavaScript; @@ -43,7 +25,15 @@ import com.fr.js.ReportletHyperlink; import com.fr.js.WebHyperlink; import com.fr.stable.ArrayUtils; import com.fr.stable.StringUtils; -import com.fr.design.utils.gui.GUICoreUtils; + +import javax.swing.*; +import javax.swing.event.ChangeEvent; +import javax.swing.event.ChangeListener; +import java.awt.*; +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; +import java.util.ArrayList; +import java.util.List; public class UICorrelationComboBoxPane extends JPanel implements UIObserver { private static final Dimension DIALOG_SIZE = new Dimension(500, 500); @@ -98,7 +88,7 @@ public class UICorrelationComboBoxPane extends JPanel implements UIObserver { if (values.size() > 1) { for (UIMenuNameableCreator value : values) { final String itemName = value.getName(); - if(!whetherAdd(itemName)){ + if(!HyperlinkFilterHelper.whetherAddHyperlink4Chart(itemName)){ continue; } UIMenuItem item = new UIMenuItem(itemName); @@ -135,25 +125,6 @@ public class UICorrelationComboBoxPane extends JPanel implements UIObserver { initAddButtonListener(); } - private boolean whetherAdd(String itemName){ - JTemplate jTemplate = HistoryTemplateListPane.getInstance().getCurrentEditingTemplate(); - //先屏蔽掉这个,之后还有别的 - String[] names = {Inter.getLocText("FR-Hyperlink_Chart_Float"), Inter.getLocText("FR-Hyperlink_Chart_Cell")}; - for (String name : names){ - if(!jTemplate.isJWorkBook() && ComparatorUtils.equals(itemName,name)){ - if(jTemplate.getEditingReportIndex() == BaseJForm.ELEMENTCASE_TAB && ComparatorUtils.equals(itemName, names[0])){ - //表单报表块中图表悬浮元素超链,只屏蔽联动悬浮元素 - return false; - } else if(jTemplate.getEditingReportIndex() == BaseJForm.FORM_TAB) { - //表单图表超链屏蔽掉联动悬浮元素和联动单元格 - return false; - } - } - } - String formName = Inter.getLocText("Hyperlink-Form_link"); - return !(jTemplate.isJWorkBook() && ComparatorUtils.equals(itemName, formName)); - } - private String createUnrepeatedName(String prefix) { List all = tablePane.updateBean(); // richer:生成的名字从1开始. kunsnat: 添加属性从0开始. diff --git a/designer_chart/src/com/fr/plugin/chart/custom/component/VanChartHyperLinkPane.java b/designer_chart/src/com/fr/plugin/chart/custom/component/VanChartHyperLinkPane.java index e5a73a7bc0..2f0e0c628f 100644 --- a/designer_chart/src/com/fr/plugin/chart/custom/component/VanChartHyperLinkPane.java +++ b/designer_chart/src/com/fr/plugin/chart/custom/component/VanChartHyperLinkPane.java @@ -7,15 +7,12 @@ import com.fr.chart.web.ChartHyperRelateFloatLink; import com.fr.design.ExtraDesignClassManager; import com.fr.design.beans.BasicBeanPane; import com.fr.design.designer.TargetComponent; -import com.fr.design.file.HistoryTemplateListPane; import com.fr.design.fun.HyperlinkProvider; +import com.fr.design.gui.HyperlinkFilterHelper; import com.fr.design.gui.controlpane.NameObjectCreator; import com.fr.design.gui.controlpane.NameableCreator; import com.fr.design.gui.imenutable.UIMenuNameableCreator; -import com.fr.design.mainframe.BaseJForm; -import com.fr.design.mainframe.JTemplate; import com.fr.design.module.DesignModuleFactory; -import com.fr.general.ComparatorUtils; import com.fr.general.Inter; import com.fr.general.NameObject; import com.fr.js.EmailJavaScript; @@ -228,33 +225,15 @@ public class VanChartHyperLinkPane extends VanChartUIListControlPane { return null; } - protected class AddVanChartItemMenuDef extends AddItemMenuDef{ + protected class AddVanChartItemMenuDef extends AddItemMenuDef { public AddVanChartItemMenuDef(NameableCreator[] creators) { super(creators); } @Override - protected boolean whetherAdd(String itemName){ - JTemplate jTemplate = HistoryTemplateListPane.getInstance().getCurrentEditingTemplate(); - if (jTemplate == null) { - return false; - } - //先屏蔽掉这个,之后还有别的 - String[] names = {Inter.getLocText("FR-Hyperlink_Chart_Float"), Inter.getLocText("FR-Hyperlink_Chart_Cell")}; - for (String name : names){ - if(!jTemplate.isJWorkBook() && ComparatorUtils.equals(itemName,name)){ - if(jTemplate.getEditingReportIndex() == BaseJForm.ELEMENTCASE_TAB && ComparatorUtils.equals(itemName, names[0])){ - //表单报表块中图表悬浮元素超链,只屏蔽联动悬浮元素 - return false; - } else if(jTemplate.getEditingReportIndex() == BaseJForm.FORM_TAB) { - //表单图表超链屏蔽掉联动悬浮元素和联动单元格 - return false; - } - } - } - String formName = Inter.getLocText("Hyperlink-Form_link"); - return !(jTemplate.isJWorkBook() && ComparatorUtils.equals(itemName, formName)); + protected boolean whetherAdd(String itemName) { + return HyperlinkFilterHelper.whetherAddHyperlink4Chart(itemName); } } From 50756270be6f6567b6e500203b9185b107b07b27 Mon Sep 17 00:00:00 2001 From: mengao <283296419@qq.com> Date: Fri, 22 Sep 2017 10:56:37 +0800 Subject: [PATCH 047/125] =?UTF-8?q?=E6=A0=BC=E5=BC=8F=E5=8C=96=E4=BB=A3?= =?UTF-8?q?=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fr/design/gui/HyperlinkFilterHelper.java | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/designer_base/src/com/fr/design/gui/HyperlinkFilterHelper.java b/designer_base/src/com/fr/design/gui/HyperlinkFilterHelper.java index db6aa9c4d9..b0a1f27bc2 100644 --- a/designer_base/src/com/fr/design/gui/HyperlinkFilterHelper.java +++ b/designer_base/src/com/fr/design/gui/HyperlinkFilterHelper.java @@ -12,8 +12,8 @@ import com.fr.general.Inter; */ public class HyperlinkFilterHelper { - public static boolean whetherAddHyperlink4cell(String itemName){ - JTemplate jTemplate = getCurrentEditingTemplate (); + public static boolean whetherAddHyperlink4cell(String itemName) { + JTemplate jTemplate = getCurrentEditingTemplate(); if (jTemplate == null) { return false; } @@ -27,19 +27,19 @@ public class HyperlinkFilterHelper { return whetherAddFormLink(jTemplate, itemName); } - public static boolean whetherAddHyperlink4Chart(String itemName){ - JTemplate jTemplate = getCurrentEditingTemplate (); + public static boolean whetherAddHyperlink4Chart(String itemName) { + JTemplate jTemplate = getCurrentEditingTemplate(); if (jTemplate == null) { return false; } //先屏蔽掉这个,之后还有别的 String[] names = {Inter.getLocText("FR-Hyperlink_Chart_Float"), Inter.getLocText("FR-Hyperlink_Chart_Cell")}; - for (String name : names){ - if(!jTemplate.isJWorkBook() && ComparatorUtils.equals(itemName,name)){ - if(jTemplate.getEditingReportIndex() == BaseJForm.ELEMENTCASE_TAB && ComparatorUtils.equals(itemName, names[0])){ + for (String name : names) { + if (!jTemplate.isJWorkBook() && ComparatorUtils.equals(itemName, name)) { + if (jTemplate.getEditingReportIndex() == BaseJForm.ELEMENTCASE_TAB && ComparatorUtils.equals(itemName, names[0])) { //表单报表块中图表悬浮元素超链,只屏蔽联动悬浮元素 return false; - } else if(jTemplate.getEditingReportIndex() == BaseJForm.FORM_TAB) { + } else if (jTemplate.getEditingReportIndex() == BaseJForm.FORM_TAB) { //表单图表超链屏蔽掉联动悬浮元素和联动单元格 return false; } @@ -48,7 +48,7 @@ public class HyperlinkFilterHelper { return whetherAddFormLink(jTemplate, itemName); } - private static JTemplate getCurrentEditingTemplate () { + private static JTemplate getCurrentEditingTemplate() { return HistoryTemplateListPane.getInstance().getCurrentEditingTemplate(); } From dc8f26b12764d5f14fe4009bd8c1f3552a5f4b91 Mon Sep 17 00:00:00 2001 From: kerry Date: Fri, 22 Sep 2017 11:55:05 +0800 Subject: [PATCH 048/125] =?UTF-8?q?REPORT-4713=20=E8=A1=A8=E5=8D=95?= =?UTF-8?q?=E6=8A=A5=E8=A1=A8=E5=9D=97=E5=B7=A5=E5=85=B7=E6=A0=8F=E7=8A=B6?= =?UTF-8?q?=E6=80=81=E5=88=87=E6=8D=A2=E5=90=8E=EF=BC=8C=E6=B2=A1=E6=B3=95?= =?UTF-8?q?=E6=92=A4=E9=94=80=E6=93=8D=E4=BD=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../design/widget/ui/AbstractDataModify.java | 10 +++++++ .../mainframe/widget/BasicPropertyPane.java | 2 +- .../accessibles/BaseAccessibleEditor.java | 12 +++++++- .../src/com/fr/design/widget/DataModify.java | 5 ++++ .../AccessibleElementCaseToolBarEditor.java | 30 +++++++++++++++++++ .../widget/ui/FormWidgetCardPane.java | 15 +++++++--- .../ui/designer/AbstractDataModify.java | 7 +++++ .../ui/designer/DateEditorDefinePane.java | 10 +++---- .../designer/component/PaddingBoundPane.java | 9 ++++-- .../component/WidgetAbsoluteBoundPane.java | 6 ++++ .../designer/component/WidgetBoundPane.java | 2 ++ .../layout/ElementEditorDefinePane.java | 10 +++++-- 12 files changed, 103 insertions(+), 15 deletions(-) diff --git a/designer/src/com/fr/design/widget/ui/AbstractDataModify.java b/designer/src/com/fr/design/widget/ui/AbstractDataModify.java index 23c5a02f82..b7ab8a6063 100644 --- a/designer/src/com/fr/design/widget/ui/AbstractDataModify.java +++ b/designer/src/com/fr/design/widget/ui/AbstractDataModify.java @@ -3,6 +3,7 @@ package com.fr.design.widget.ui; import com.fr.design.beans.BasicBeanPane; import com.fr.design.data.DataCreatorUI; import com.fr.design.widget.DataModify; +import com.fr.stable.StringUtils; import javax.swing.*; @@ -10,6 +11,7 @@ import javax.swing.*; * Created by richie on 15/11/16. */ public abstract class AbstractDataModify extends BasicBeanPane implements DataModify { + protected String globalName; @Override public DataCreatorUI dataUI() { @@ -20,4 +22,12 @@ public abstract class AbstractDataModify extends BasicBeanPane implements public JComponent toSwingComponent() { return this; } + + public void setGlobalName(String globalName){ + this.globalName = globalName; + } + + public String getGlobalName(){ + return globalName; + } } \ No newline at end of file diff --git a/designer_base/src/com/fr/design/mainframe/widget/BasicPropertyPane.java b/designer_base/src/com/fr/design/mainframe/widget/BasicPropertyPane.java index 21287530ee..c66530b62a 100644 --- a/designer_base/src/com/fr/design/mainframe/widget/BasicPropertyPane.java +++ b/designer_base/src/com/fr/design/mainframe/widget/BasicPropertyPane.java @@ -25,7 +25,7 @@ public class BasicPropertyPane extends BasicPane { this.setLayout(FRGUIPaneFactory.createBorderLayout()); this.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0)); widgetName = new UITextField(); - + widgetName.setGlobalName(Inter.getLocText("FR-Designer_Widget_Name")); double f = TableLayout.FILL; double p = TableLayout.PREFERRED; double[] rowSize = {p}; diff --git a/designer_base/src/com/fr/design/mainframe/widget/accessibles/BaseAccessibleEditor.java b/designer_base/src/com/fr/design/mainframe/widget/accessibles/BaseAccessibleEditor.java index c71cd8ad1d..43231203ef 100644 --- a/designer_base/src/com/fr/design/mainframe/widget/accessibles/BaseAccessibleEditor.java +++ b/designer_base/src/com/fr/design/mainframe/widget/accessibles/BaseAccessibleEditor.java @@ -7,6 +7,7 @@ import java.util.ArrayList; import javax.swing.BorderFactory; +import com.fr.design.event.UIObserverListener; import com.fr.design.gui.ibutton.UIButton; import javax.swing.JComponent; @@ -77,7 +78,14 @@ public class BaseAccessibleEditor extends BasicPane implements AccessibleEditor setOpaque(false); if (showButton) { - btPopup = new UIButton(); + btPopup = new UIButton(){ + public void registerChangeListener(UIObserverListener listener) { + return; + } + public boolean shouldResponseChangeListener() { + return false; + } + }; initPopupButton(); btPopup.addActionListener(new ActionListener() { @@ -189,4 +197,6 @@ public class BaseAccessibleEditor extends BasicPane implements AccessibleEditor public static void showMessage(String message, Component editorComponent) { JOptionPane.showMessageDialog(editorComponent, message, "Validation Error", JOptionPane.ERROR_MESSAGE); } + + } \ No newline at end of file diff --git a/designer_base/src/com/fr/design/widget/DataModify.java b/designer_base/src/com/fr/design/widget/DataModify.java index 25ab46a687..96552e7f0e 100644 --- a/designer_base/src/com/fr/design/widget/DataModify.java +++ b/designer_base/src/com/fr/design/widget/DataModify.java @@ -15,4 +15,9 @@ public interface DataModify { DataCreatorUI dataUI(); JComponent toSwingComponent(); + + String getGlobalName(); + + void setGlobalName(String globalName); + } \ No newline at end of file diff --git a/designer_form/src/com/fr/design/mainframe/widget/accessibles/AccessibleElementCaseToolBarEditor.java b/designer_form/src/com/fr/design/mainframe/widget/accessibles/AccessibleElementCaseToolBarEditor.java index 1695892ba6..31c0749c99 100644 --- a/designer_form/src/com/fr/design/mainframe/widget/accessibles/AccessibleElementCaseToolBarEditor.java +++ b/designer_form/src/com/fr/design/mainframe/widget/accessibles/AccessibleElementCaseToolBarEditor.java @@ -5,11 +5,16 @@ import com.fr.design.dialog.DialogActionAdapter; import com.fr.design.gui.core.WidgetOption; import com.fr.design.mainframe.FormWebWidgetConstants; import com.fr.design.mainframe.widget.editors.ElementCaseToolBarPane; +import com.fr.design.mainframe.widget.editors.ITextComponent; +import com.fr.design.mainframe.widget.editors.TextField; import com.fr.design.mainframe.widget.wrappers.ElementCaseToolBarWrapper; import com.fr.form.web.FormToolBarManager; +import com.fr.general.Inter; import com.fr.stable.ArrayUtils; import javax.swing.*; +import javax.swing.event.DocumentEvent; +import javax.swing.event.DocumentListener; import java.util.ArrayList; import java.util.Arrays; import java.util.List; @@ -54,4 +59,29 @@ public class AccessibleElementCaseToolBarEditor extends UneditableAccessibleEdit options.addAll(defaultOptions); return options.toArray(new WidgetOption[options.size()]); } + + protected ITextComponent createTextField() { + TextField textField = new TextField(){ + protected void initListener() { + if (shouldResponseChangeListener()) { + getDocument().addDocumentListener(new DocumentListener() { + @Override + public void insertUpdate(DocumentEvent e) { + } + @Override + public void removeUpdate(DocumentEvent e) { + attributeChange(); + } + @Override + public void changedUpdate(DocumentEvent e) { + + } + }); + } + } + }; + textField.setGlobalName(Inter.getLocText("Form-EC_toolbar")); + return textField; + } + } diff --git a/designer_form/src/com/fr/design/mainframe/widget/ui/FormWidgetCardPane.java b/designer_form/src/com/fr/design/mainframe/widget/ui/FormWidgetCardPane.java index fb75edbabb..3cfe27375d 100644 --- a/designer_form/src/com/fr/design/mainframe/widget/ui/FormWidgetCardPane.java +++ b/designer_form/src/com/fr/design/mainframe/widget/ui/FormWidgetCardPane.java @@ -18,6 +18,7 @@ import com.fr.form.ui.Widget; import com.fr.form.ui.container.WScaleLayout; import com.fr.form.ui.container.WTitleLayout; import com.fr.form.ui.widget.CRBoundsWidget; +import com.fr.general.ComparatorUtils; import com.fr.general.Inter; import com.fr.stable.StringUtils; @@ -199,13 +200,19 @@ public class FormWidgetCardPane extends AbstractAttrNoScrollPane { public void updateCreator() { + currentEditorDefinePane.setGlobalName(getGlobalName()); Widget widget = currentEditorDefinePane.updateBean(); - widgetPropertyPane.update(widget); - if (widgetBoundPane != null) { + if(ComparatorUtils.equals(getGlobalName(), Inter.getLocText("FR-Designer_Widget_Name"))){ + widgetPropertyPane.update(widget); + xCreator.resetCreatorName(widget.getWidgetName()); + designer.getEditListenerTable().fireCreatorModified(xCreator, DesignerEvent.CREATOR_RENAMED); + return; + } + + if (widgetBoundPane != null && ComparatorUtils.equals(getGlobalName(), Inter.getLocText("FR-Designer_Coords_And_Size"))) { widgetBoundPane.update(); } - xCreator.resetCreatorName(widget.getWidgetName()); - designer.getEditListenerTable().fireCreatorModified(xCreator, DesignerEvent.CREATOR_RENAMED); + fireValueChanged(); } diff --git a/designer_form/src/com/fr/design/widget/ui/designer/AbstractDataModify.java b/designer_form/src/com/fr/design/widget/ui/designer/AbstractDataModify.java index 7e521ac916..e0fc7c11ca 100644 --- a/designer_form/src/com/fr/design/widget/ui/designer/AbstractDataModify.java +++ b/designer_form/src/com/fr/design/widget/ui/designer/AbstractDataModify.java @@ -12,6 +12,7 @@ import javax.swing.*; */ public abstract class AbstractDataModify extends BasicBeanPane implements DataModify { protected XCreator creator; + protected String globalName; public AbstractDataModify(XCreator xCreator){ @@ -28,5 +29,11 @@ public abstract class AbstractDataModify extends BasicBeanPane implements return this; } + public void setGlobalName(String globalName){ + this.globalName = globalName; + } + public String getGlobalName(){ + return globalName; + } } \ No newline at end of file diff --git a/designer_form/src/com/fr/design/widget/ui/designer/DateEditorDefinePane.java b/designer_form/src/com/fr/design/widget/ui/designer/DateEditorDefinePane.java index ed9b5de27a..9bcd832da9 100644 --- a/designer_form/src/com/fr/design/widget/ui/designer/DateEditorDefinePane.java +++ b/designer_form/src/com/fr/design/widget/ui/designer/DateEditorDefinePane.java @@ -64,12 +64,12 @@ public class DateEditorDefinePane extends DirectWriteEditorDefinePane Date: Fri, 22 Sep 2017 12:13:55 +0800 Subject: [PATCH 049/125] =?UTF-8?q?=E4=BF=AE=E6=94=B9import?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/fr/design/widget/ui/AbstractDataModify.java | 4 ++-- .../design/mainframe/widget/BasicPropertyPane.java | 6 ++++-- .../widget/accessibles/BaseAccessibleEditor.java | 6 +++++- .../src/com/fr/design/widget/DataModify.java | 3 ++- .../AccessibleElementCaseToolBarEditor.java | 2 +- .../mainframe/widget/ui/FormWidgetCardPane.java | 7 +++++-- .../widget/ui/designer/AbstractDataModify.java | 3 ++- .../widget/ui/designer/DateEditorDefinePane.java | 9 +++++++-- .../ui/designer/component/PaddingBoundPane.java | 7 +++++-- .../designer/component/WidgetAbsoluteBoundPane.java | 3 ++- .../ui/designer/component/WidgetBoundPane.java | 5 +++-- .../ui/designer/layout/ElementEditorDefinePane.java | 6 ++++-- .../ui/designer/layout/WTabFitLayoutDefinePane.java | 7 ++++--- .../ui/designer/layout/WTitleLayoutDefinePane.java | 13 +++++++------ 14 files changed, 53 insertions(+), 28 deletions(-) diff --git a/designer/src/com/fr/design/widget/ui/AbstractDataModify.java b/designer/src/com/fr/design/widget/ui/AbstractDataModify.java index b7ab8a6063..3836464b28 100644 --- a/designer/src/com/fr/design/widget/ui/AbstractDataModify.java +++ b/designer/src/com/fr/design/widget/ui/AbstractDataModify.java @@ -3,9 +3,9 @@ package com.fr.design.widget.ui; import com.fr.design.beans.BasicBeanPane; import com.fr.design.data.DataCreatorUI; import com.fr.design.widget.DataModify; -import com.fr.stable.StringUtils; -import javax.swing.*; +import javax.swing.JComponent; + /** * Created by richie on 15/11/16. diff --git a/designer_base/src/com/fr/design/mainframe/widget/BasicPropertyPane.java b/designer_base/src/com/fr/design/mainframe/widget/BasicPropertyPane.java index c66530b62a..6546bd56ca 100644 --- a/designer_base/src/com/fr/design/mainframe/widget/BasicPropertyPane.java +++ b/designer_base/src/com/fr/design/mainframe/widget/BasicPropertyPane.java @@ -8,8 +8,10 @@ import com.fr.design.layout.TableLayout; import com.fr.design.layout.TableLayoutHelper; import com.fr.general.Inter; -import javax.swing.*; -import java.awt.*; +import javax.swing.BorderFactory; +import javax.swing.JPanel; +import java.awt.BorderLayout; +import java.awt.Component; /** * Created by plough on 2017/8/7. diff --git a/designer_base/src/com/fr/design/mainframe/widget/accessibles/BaseAccessibleEditor.java b/designer_base/src/com/fr/design/mainframe/widget/accessibles/BaseAccessibleEditor.java index 43231203ef..ec6d4405ed 100644 --- a/designer_base/src/com/fr/design/mainframe/widget/accessibles/BaseAccessibleEditor.java +++ b/designer_base/src/com/fr/design/mainframe/widget/accessibles/BaseAccessibleEditor.java @@ -1,6 +1,10 @@ package com.fr.design.mainframe.widget.accessibles; -import java.awt.*; +import java.awt.BorderLayout; +import java.awt.Color; +import java.awt.Component; +import java.awt.Dimension; +import java.awt.Insets; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.util.ArrayList; diff --git a/designer_base/src/com/fr/design/widget/DataModify.java b/designer_base/src/com/fr/design/widget/DataModify.java index 96552e7f0e..b901d7c69e 100644 --- a/designer_base/src/com/fr/design/widget/DataModify.java +++ b/designer_base/src/com/fr/design/widget/DataModify.java @@ -2,7 +2,8 @@ package com.fr.design.widget; import com.fr.design.data.DataCreatorUI; -import javax.swing.*; +import javax.swing.JComponent; + public interface DataModify { diff --git a/designer_form/src/com/fr/design/mainframe/widget/accessibles/AccessibleElementCaseToolBarEditor.java b/designer_form/src/com/fr/design/mainframe/widget/accessibles/AccessibleElementCaseToolBarEditor.java index 31c0749c99..ec675fe7ed 100644 --- a/designer_form/src/com/fr/design/mainframe/widget/accessibles/AccessibleElementCaseToolBarEditor.java +++ b/designer_form/src/com/fr/design/mainframe/widget/accessibles/AccessibleElementCaseToolBarEditor.java @@ -12,7 +12,7 @@ import com.fr.form.web.FormToolBarManager; import com.fr.general.Inter; import com.fr.stable.ArrayUtils; -import javax.swing.*; +import javax.swing.SwingUtilities; import javax.swing.event.DocumentEvent; import javax.swing.event.DocumentListener; import java.util.ArrayList; diff --git a/designer_form/src/com/fr/design/mainframe/widget/ui/FormWidgetCardPane.java b/designer_form/src/com/fr/design/mainframe/widget/ui/FormWidgetCardPane.java index 3cfe27375d..0bc744e51c 100644 --- a/designer_form/src/com/fr/design/mainframe/widget/ui/FormWidgetCardPane.java +++ b/designer_form/src/com/fr/design/mainframe/widget/ui/FormWidgetCardPane.java @@ -22,8 +22,11 @@ import com.fr.general.ComparatorUtils; import com.fr.general.Inter; import com.fr.stable.StringUtils; -import javax.swing.*; -import java.awt.*; +import javax.swing.BorderFactory; +import javax.swing.JComponent; +import javax.swing.JPanel; +import java.awt.BorderLayout; + /** * Created by ibm on 2017/7/25. diff --git a/designer_form/src/com/fr/design/widget/ui/designer/AbstractDataModify.java b/designer_form/src/com/fr/design/widget/ui/designer/AbstractDataModify.java index e0fc7c11ca..3aca5f00a7 100644 --- a/designer_form/src/com/fr/design/widget/ui/designer/AbstractDataModify.java +++ b/designer_form/src/com/fr/design/widget/ui/designer/AbstractDataModify.java @@ -5,7 +5,8 @@ import com.fr.design.data.DataCreatorUI; import com.fr.design.designer.creator.XCreator; import com.fr.design.widget.DataModify; -import javax.swing.*; +import javax.swing.JComponent; + /** * Created by kerry on 17/07/28. diff --git a/designer_form/src/com/fr/design/widget/ui/designer/DateEditorDefinePane.java b/designer_form/src/com/fr/design/widget/ui/designer/DateEditorDefinePane.java index 9bcd832da9..5931cf7742 100644 --- a/designer_form/src/com/fr/design/widget/ui/designer/DateEditorDefinePane.java +++ b/designer_form/src/com/fr/design/widget/ui/designer/DateEditorDefinePane.java @@ -20,10 +20,15 @@ import com.fr.script.Calculator; import com.fr.stable.ArrayUtils; import com.fr.stable.UtilEvalError; -import javax.swing.*; +import javax.swing.BorderFactory; +import javax.swing.JPanel; +import javax.swing.SwingConstants; import javax.swing.event.ChangeEvent; import javax.swing.event.ChangeListener; -import java.awt.*; +import java.awt.BorderLayout; +import java.awt.CardLayout; +import java.awt.Color; +import java.awt.Component; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.text.SimpleDateFormat; diff --git a/designer_form/src/com/fr/design/widget/ui/designer/component/PaddingBoundPane.java b/designer_form/src/com/fr/design/widget/ui/designer/component/PaddingBoundPane.java index bb2bbe3bf1..a5b13c66a4 100644 --- a/designer_form/src/com/fr/design/widget/ui/designer/component/PaddingBoundPane.java +++ b/designer_form/src/com/fr/design/widget/ui/designer/component/PaddingBoundPane.java @@ -11,8 +11,11 @@ import com.fr.form.ui.AbstractMarginWidget; import com.fr.form.ui.PaddingMargin; import com.fr.general.Inter; -import javax.swing.*; -import java.awt.*; +import javax.swing.BorderFactory; +import javax.swing.JPanel; +import javax.swing.SwingConstants; +import java.awt.Component; + /** * Created by ibm on 2017/8/3. diff --git a/designer_form/src/com/fr/design/widget/ui/designer/component/WidgetAbsoluteBoundPane.java b/designer_form/src/com/fr/design/widget/ui/designer/component/WidgetAbsoluteBoundPane.java index 402348f411..c35cc79269 100644 --- a/designer_form/src/com/fr/design/widget/ui/designer/component/WidgetAbsoluteBoundPane.java +++ b/designer_form/src/com/fr/design/widget/ui/designer/component/WidgetAbsoluteBoundPane.java @@ -6,7 +6,8 @@ import com.fr.design.widget.WidgetBoundsPaneFactory; import com.fr.form.ui.container.WLayout; import com.fr.general.Inter; -import java.awt.*; +import java.awt.Rectangle; + /** * Created by ibm on 2017/8/3. diff --git a/designer_form/src/com/fr/design/widget/ui/designer/component/WidgetBoundPane.java b/designer_form/src/com/fr/design/widget/ui/designer/component/WidgetBoundPane.java index 916a499f58..68feb15960 100644 --- a/designer_form/src/com/fr/design/widget/ui/designer/component/WidgetBoundPane.java +++ b/designer_form/src/com/fr/design/widget/ui/designer/component/WidgetBoundPane.java @@ -16,8 +16,9 @@ import com.fr.form.ui.container.WFitLayout; import com.fr.form.ui.container.WLayout; import com.fr.general.Inter; -import javax.swing.*; -import java.awt.*; +import javax.swing.JOptionPane; +import java.awt.Rectangle; + /** * Created by ibm on 2017/7/30. diff --git a/designer_form/src/com/fr/design/widget/ui/designer/layout/ElementEditorDefinePane.java b/designer_form/src/com/fr/design/widget/ui/designer/layout/ElementEditorDefinePane.java index 0bc4b818f6..9fd1c6e94b 100644 --- a/designer_form/src/com/fr/design/widget/ui/designer/layout/ElementEditorDefinePane.java +++ b/designer_form/src/com/fr/design/widget/ui/designer/layout/ElementEditorDefinePane.java @@ -11,8 +11,10 @@ import com.fr.form.web.FormToolBarManager; import com.fr.general.ComparatorUtils; import com.fr.general.Inter; -import javax.swing.*; -import java.awt.*; +import javax.swing.BorderFactory; +import javax.swing.JPanel; +import java.awt.BorderLayout; +import java.awt.Component; /** * Created by ibm on 2017/8/7. diff --git a/designer_form/src/com/fr/design/widget/ui/designer/layout/WTabFitLayoutDefinePane.java b/designer_form/src/com/fr/design/widget/ui/designer/layout/WTabFitLayoutDefinePane.java index b522950a31..b3678eecd9 100644 --- a/designer_form/src/com/fr/design/widget/ui/designer/layout/WTabFitLayoutDefinePane.java +++ b/designer_form/src/com/fr/design/widget/ui/designer/layout/WTabFitLayoutDefinePane.java @@ -19,11 +19,12 @@ import com.fr.form.ui.container.cardlayout.WCardMainBorderLayout; import com.fr.form.ui.container.cardlayout.WCardTagLayout; import com.fr.form.ui.container.cardlayout.WCardTitleLayout; import com.fr.form.ui.container.cardlayout.WTabFitLayout; -import com.fr.general.ComparatorUtils; import com.fr.general.Inter; -import javax.swing.*; -import java.awt.*; +import javax.swing.BorderFactory; +import javax.swing.JPanel; +import java.awt.BorderLayout; +import java.awt.Component; /** * Created by ibm on 2017/8/5. diff --git a/designer_form/src/com/fr/design/widget/ui/designer/layout/WTitleLayoutDefinePane.java b/designer_form/src/com/fr/design/widget/ui/designer/layout/WTitleLayoutDefinePane.java index a507a99b89..ac1659b316 100644 --- a/designer_form/src/com/fr/design/widget/ui/designer/layout/WTitleLayoutDefinePane.java +++ b/designer_form/src/com/fr/design/widget/ui/designer/layout/WTitleLayoutDefinePane.java @@ -2,21 +2,22 @@ package com.fr.design.widget.ui.designer.layout; import com.fr.design.designer.creator.XCreator; import com.fr.design.foldablepane.UIExpandablePane; -import com.fr.design.gui.icheckbox.UICheckBox; import com.fr.design.gui.ilable.UILabel; import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.layout.TableLayout; import com.fr.design.layout.TableLayoutHelper; import com.fr.design.mainframe.widget.accessibles.AccessibleWLayoutBorderStyleEditor; import com.fr.design.widget.ui.designer.AbstractDataModify; -import com.fr.design.widget.ui.designer.component.PaddingBoundPane; -import com.fr.form.ui.*; -import com.fr.form.ui.container.WTitleLayout; +import com.fr.form.ui.AbstractBorderStyleWidget; +import com.fr.form.ui.LayoutBorderStyle; import com.fr.general.ComparatorUtils; import com.fr.general.Inter; -import javax.swing.*; -import java.awt.*; +import javax.swing.BorderFactory; +import javax.swing.JPanel; +import java.awt.BorderLayout; +import java.awt.Component; + /** * Created by ibm on 2017/8/3. From a4ba146687e3ad4a4215b960437ff7a4bf33de38 Mon Sep 17 00:00:00 2001 From: XiaXiang Date: Fri, 22 Sep 2017 12:35:08 +0800 Subject: [PATCH 050/125] =?UTF-8?q?alphafine=E5=8A=A0=E5=8A=9F=E8=83=BD?= =?UTF-8?q?=E7=82=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../alphafine/AlphaFineConfigManager.java | 6 + .../fr/design/mainframe/DesignerFrame.java | 1847 ++++++++--------- .../mainframe/toolbar/ToolBarMenuDock.java | 253 +-- 3 files changed, 1060 insertions(+), 1046 deletions(-) diff --git a/designer_base/src/com/fr/design/actions/help/alphafine/AlphaFineConfigManager.java b/designer_base/src/com/fr/design/actions/help/alphafine/AlphaFineConfigManager.java index 405a5e64d4..b335bbad03 100644 --- a/designer_base/src/com/fr/design/actions/help/alphafine/AlphaFineConfigManager.java +++ b/designer_base/src/com/fr/design/actions/help/alphafine/AlphaFineConfigManager.java @@ -1,5 +1,6 @@ package com.fr.design.actions.help.alphafine; +import com.fr.base.FRContext; import com.fr.base.FRCoreContext; import com.fr.general.VT4FR; import com.fr.stable.OperatingSystem; @@ -247,4 +248,9 @@ public class AlphaFineConfigManager implements XMLable { public void setOperateCount(int operateCount) { this.operateCount = operateCount; } + + + public static boolean isALPHALicAvailable() { + return FRContext.getCurrentEnv() != null && VT4FR.isLicAvailable(FRCoreContext.getBytes()) && VT4FR.ALPHA_FINE.support(); + } } diff --git a/designer_base/src/com/fr/design/mainframe/DesignerFrame.java b/designer_base/src/com/fr/design/mainframe/DesignerFrame.java index f28c43de77..df92a6bf09 100644 --- a/designer_base/src/com/fr/design/mainframe/DesignerFrame.java +++ b/designer_base/src/com/fr/design/mainframe/DesignerFrame.java @@ -6,16 +6,22 @@ package com.fr.design.mainframe; import com.fr.base.BaseUtils; import com.fr.base.Env; import com.fr.base.FRContext; +import com.fr.base.FRCoreContext; import com.fr.design.DesignModelAdapter; import com.fr.design.DesignState; import com.fr.design.DesignerEnvManager; import com.fr.design.ExtraDesignClassManager; +import com.fr.design.actions.help.alphafine.AlphaFineConfigManager; import com.fr.design.constants.UIConstants; import com.fr.design.data.DesignTableDataManager; import com.fr.design.data.datapane.TableDataTreePane; import com.fr.design.event.TargetModifiedEvent; import com.fr.design.event.TargetModifiedListener; -import com.fr.design.file.*; +import com.fr.design.file.HistoryTemplateListPane; +import com.fr.design.file.MutilTempalteTabPane; +import com.fr.design.file.NewTemplatePane; +import com.fr.design.file.SaveSomeTemplatePane; +import com.fr.design.file.TemplateTreePane; import com.fr.design.fun.TitlePlaceProcessor; import com.fr.design.gui.ibutton.UIButton; import com.fr.design.gui.imenu.UIMenuHighLight; @@ -37,6 +43,7 @@ import com.fr.general.ComparatorUtils; import com.fr.general.FRLogger; import com.fr.general.GeneralContext; import com.fr.general.Inter; +import com.fr.general.VT4FR; import com.fr.plugin.context.PluginContext; import com.fr.plugin.injectable.PluginModule; import com.fr.plugin.manage.PluginFilter; @@ -54,8 +61,20 @@ import javax.swing.border.MatteBorder; import java.awt.*; import java.awt.datatransfer.DataFlavor; import java.awt.datatransfer.Transferable; -import java.awt.dnd.*; -import java.awt.event.*; +import java.awt.dnd.DnDConstants; +import java.awt.dnd.DropTarget; +import java.awt.dnd.DropTargetDragEvent; +import java.awt.dnd.DropTargetDropEvent; +import java.awt.dnd.DropTargetEvent; +import java.awt.dnd.DropTargetListener; +import java.awt.event.ComponentAdapter; +import java.awt.event.ComponentEvent; +import java.awt.event.MouseAdapter; +import java.awt.event.MouseEvent; +import java.awt.event.MouseListener; +import java.awt.event.WindowAdapter; +import java.awt.event.WindowEvent; +import java.awt.event.WindowListener; import java.awt.image.BufferedImage; import java.io.File; import java.io.IOException; @@ -65,115 +84,226 @@ import java.util.List; import java.util.logging.Level; public class DesignerFrame extends JFrame implements JTemplateActionListener, TargetModifiedListener { - private static final long serialVersionUID = -8732559571067484460L; - private static final int LEFT_ALIGN_GAP = -5; - private static final int MENU_HEIGHT = 26; - private static final Integer SECOND_LAYER = new Integer(100); - private static final Integer TOP_LAYER = new Integer((200)); - - public static final String DESIGNER_FRAME_NAME = "designer_frame"; - public static final Dimension MIN_SIZE = new Dimension(100, 100); - - private static java.util.List> appList = new java.util.ArrayList>(); - - private ToolBarMenuDock ad; - - private DesktopCardPane centerTemplateCardPane; - - private JPanel toolbarPane; - private JComponent toolbarComponent; - - private JPanel menuPane; - private JMenuBar menuBar; - private JPanel eastCenterPane; - private UIToolbar combineUp; - private NewTemplatePane newWorkBookPane = null; - private Icon closeMode = UIConstants.CLOSE_OF_AUTHORITY; - private JLayeredPane layeredPane = this.getLayeredPane(); - private JPanel basePane = new JPanel(); - // 上面的虚线 - private DottedLine upDottedLine; - // 下面的虚线 - private DottedLine downDottedLine; - - // 左边的虚线 - private DottedLine leftDottedLine; - - // 右边的虚线 - private DottedLine rightDottedLine; - - private int contentWidth = (int) (Toolkit.getDefaultToolkit().getScreenSize().getWidth()); - private int contentHeight = (int) (Toolkit.getDefaultToolkit().getScreenSize().getHeight()); - - private WindowAdapter windowAdapter = new WindowAdapter() { - public void windowOpened(WindowEvent e) { - HistoryTemplateListPane.getInstance().getCurrentEditingTemplate().setComposite(); - reCalculateFrameSize(); - HistoryTemplateListPane.getInstance().getCurrentEditingTemplate().doResize(); - - } - - @Override - public void windowClosing(WindowEvent e) { - SaveSomeTemplatePane saveSomeTempaltePane = new SaveSomeTemplatePane(true); - // 只有一个文件未保存时 - if (HistoryTemplateListPane.getInstance().getHistoryCount() == 1) { - int choose = saveSomeTempaltePane.saveLastOneTemplate(); - if (choose != JOptionPane.CANCEL_OPTION) { - DesignerFrame.this.exit(); - } - } else { - if (saveSomeTempaltePane.showSavePane()) { - DesignerFrame.this.exit(); - } - } - } - - }; - - private JComponent closeButton = new JComponent() { - protected void paintComponent(Graphics g) { - g.setColor(UIConstants.NORMAL_BACKGROUND); - g.fillArc(0, 0, UIConstants.CLOSE_AUTHORITY_HEIGHT_AND_WIDTH, UIConstants.CLOSE_AUTHORITY_HEIGHT_AND_WIDTH, - 0, 360); - closeMode.paintIcon(this, g, 0, 0); - } - }; - - /** - * 注册app. - * - * @param app - * 注册app. - */ - public static void registApp(App app) { - if (app != null) { - appList.add(app); - } - } - + public static final String DESIGNER_FRAME_NAME = "designer_frame"; + public static final Dimension MIN_SIZE = new Dimension(100, 100); + private static final long serialVersionUID = -8732559571067484460L; + private static final int LEFT_ALIGN_GAP = -5; + private static final int MENU_HEIGHT = 26; + private static final Integer SECOND_LAYER = new Integer(100); + private static final Integer TOP_LAYER = new Integer((200)); + private static java.util.List> appList = new java.util.ArrayList>(); + + private ToolBarMenuDock ad; + + private DesktopCardPane centerTemplateCardPane; + + private JPanel toolbarPane; + private JComponent toolbarComponent; + + private JPanel menuPane; + private JMenuBar menuBar; + private JPanel eastCenterPane; + private UIToolbar combineUp; + private NewTemplatePane newWorkBookPane = null; + private Icon closeMode = UIConstants.CLOSE_OF_AUTHORITY; + private JLayeredPane layeredPane = this.getLayeredPane(); + private JPanel basePane = new JPanel(); + // 上面的虚线 + private DottedLine upDottedLine; + // 下面的虚线 + private DottedLine downDottedLine; + + // 左边的虚线 + private DottedLine leftDottedLine; + + // 右边的虚线 + private DottedLine rightDottedLine; + + private int contentWidth = (int) (Toolkit.getDefaultToolkit().getScreenSize().getWidth()); + private int contentHeight = (int) (Toolkit.getDefaultToolkit().getScreenSize().getHeight()); + + private WindowAdapter windowAdapter = new WindowAdapter() { + public void windowOpened(WindowEvent e) { + HistoryTemplateListPane.getInstance().getCurrentEditingTemplate().setComposite(); + reCalculateFrameSize(); + HistoryTemplateListPane.getInstance().getCurrentEditingTemplate().doResize(); + + } + + @Override + public void windowClosing(WindowEvent e) { + SaveSomeTemplatePane saveSomeTempaltePane = new SaveSomeTemplatePane(true); + // 只有一个文件未保存时 + if (HistoryTemplateListPane.getInstance().getHistoryCount() == 1) { + int choose = saveSomeTempaltePane.saveLastOneTemplate(); + if (choose != JOptionPane.CANCEL_OPTION) { + DesignerFrame.this.exit(); + } + } else { + if (saveSomeTempaltePane.showSavePane()) { + DesignerFrame.this.exit(); + } + } + } + + }; + + private JComponent closeButton = new JComponent() { + protected void paintComponent(Graphics g) { + g.setColor(UIConstants.NORMAL_BACKGROUND); + g.fillArc(0, 0, UIConstants.CLOSE_AUTHORITY_HEIGHT_AND_WIDTH, UIConstants.CLOSE_AUTHORITY_HEIGHT_AND_WIDTH, + 0, 360); + closeMode.paintIcon(this, g, 0, 0); + } + }; + private MouseListener closeMouseListener = new MouseAdapter() { + public void mousePressed(MouseEvent e) { + closeMode = UIConstants.CLOSE_PRESS_AUTHORITY; + closeButton.setBackground(UIConstants.NORMAL_BACKGROUND); + closeButton.repaint(); + } + + public void mouseExited(MouseEvent e) { + closeMode = UIConstants.CLOSE_OF_AUTHORITY; + closeButton.setBackground(UIConstants.NORMAL_BACKGROUND); + closeButton.repaint(); + } + + public void mouseMoved(MouseEvent e) { + closeMode = UIConstants.CLOSE_OVER_AUTHORITY; + closeButton.setBackground(UIConstants.NORMAL_BACKGROUND); + closeButton.repaint(); + } + + public void mouseReleased(MouseEvent e) { + if (BaseUtils.isAuthorityEditing()) { + BaseUtils.setAuthorityEditing(false); + WestRegionContainerPane.getInstance().replaceDownPane( + TableDataTreePane.getInstance(DesignModelAdapter.getCurrentModelAdapter())); + HistoryTemplateListPane.getInstance().getCurrentEditingTemplate().refreshEastPropertiesPane(); + DesignerContext.getDesignerFrame().resetToolkitByPlus( + HistoryTemplateListPane.getInstance().getCurrentEditingTemplate().getToolBarMenuDockPlus()); + needToAddAuhtorityPaint(); + refreshDottedLine(); + fireAuthorityStateToNomal(); + } + } + + public void mouseEntered(MouseEvent e) { + closeMode = UIConstants.CLOSE_OVER_AUTHORITY; + closeButton.setBackground(UIConstants.NORMAL_BACKGROUND); + closeButton.repaint(); + } + }; + + public DesignerFrame(ToolBarMenuDock ad) { + + setName(DESIGNER_FRAME_NAME); + this.ad = ad; + this.initTitleIcon(); + this.setTitle();// james:因为有默认的了 + // set this to context. + DesignerContext.setDesignerFrame(this); + + // the content pane + basePane.setLayout(new BorderLayout()); + toolbarPane = new JPanel() { + public Dimension getPreferredSize() { + Dimension dim = super.getPreferredSize(); + // dim.height = TOOLBAR_HEIGHT; + return dim; + } + }; + toolbarPane.setLayout(FRGUIPaneFactory.createBorderLayout()); + JPanel eastPane = FRGUIPaneFactory.createBorderLayout_S_Pane(); + eastPane.add(ad.createLargeToolbar(), BorderLayout.WEST); + eastCenterPane = FRGUIPaneFactory.createBorderLayout_S_Pane(); + eastCenterPane.add(combineUp = combineUpTooBar(null), BorderLayout.NORTH); + JPanel panel = FRGUIPaneFactory.createBorderLayout_S_Pane(); + panel.add(newWorkBookPane = ad.getNewTemplatePane(), BorderLayout.WEST); + panel.add(MutilTempalteTabPane.getInstance(), BorderLayout.CENTER); + eastCenterPane.add(panel, BorderLayout.CENTER); + + eastPane.add(eastCenterPane, BorderLayout.CENTER); + toolbarPane.add(eastPane, BorderLayout.NORTH); + toolbarPane.add(new UIMenuHighLight(), BorderLayout.SOUTH); + + JPanel centerPane = FRGUIPaneFactory.createBorderLayout_S_Pane(); + centerPane.add(centerTemplateCardPane = new DesktopCardPane(), BorderLayout.CENTER); + centerPane.add(toolbarPane, BorderLayout.NORTH); + + + basePane.add(centerPane, BorderLayout.CENTER); + laoyoutWestPane(); +// JPanel eastRegionPane = new JPanel(new BorderLayout()); +// eastRegionPane.add(EastRegionContainerPane.getInstance(), BorderLayout.CENTER); +// eastRegionPane.add(JSliderPane.getInstance(), BorderLayout.SOUTH); +// basePane.add(eastRegionPane, BorderLayout.EAST); + + basePane.add(EastRegionContainerPane.getInstance(), BorderLayout.EAST); + basePane.setBounds(0, 0, contentWidth, contentHeight); + + // 数值越小。越在底层 + layeredPane.add(basePane); + // 调整Window大小 + modWindowBounds(); + + + // p:检查所有按钮的可见性和是否可以编辑性. + checkToolbarMenuEnable(); + + // window close listener. + this.addWindowListeners(getFrameListeners()); + + this.addComponentListener(new ComponentAdapter() { + public void componentResized(ComponentEvent e) { + reCalculateFrameSize(); + if (BaseUtils.isAuthorityEditing()) { + doResize(); + } + } + }); + this.setDefaultCloseOperation(WindowConstants.DO_NOTHING_ON_CLOSE); + this.setVisible(false); + this.setExtendedState(JFrame.MAXIMIZED_BOTH); + this.setDropTarget(new DropTarget(this, DnDConstants.ACTION_MOVE, new FileDropTargetListener(), true)); + closeMode = UIConstants.CLOSE_OF_AUTHORITY; + initMenuPane(); + } + + /** + * 注册app. + * + * @param app 注册app. + */ + public static void registApp(App app) { + if (app != null) { + appList.add(app); + } + } + public static void removeApp(App app) { - + if (app != null) { appList.remove(app); } } - protected DesktopCardPane getCenterTemplateCardPane() { - return centerTemplateCardPane; - } - - /** - * 初始menuPane的方法 方便OEM时修改该组件 - */ - protected void initMenuPane(){ - menuPane = FRGUIPaneFactory.createBorderLayout_S_Pane(); - menuPane.add(new UIMenuHighLight(), BorderLayout.SOUTH); - menuPane.add(initNorthEastPane(ad), BorderLayout.EAST); - basePane.add(menuPane, BorderLayout.NORTH); - this.resetToolkitByPlus(null); - } - + protected DesktopCardPane getCenterTemplateCardPane() { + return centerTemplateCardPane; + } + + /** + * 初始menuPane的方法 方便OEM时修改该组件 + */ + protected void initMenuPane() { + menuPane = FRGUIPaneFactory.createBorderLayout_S_Pane(); + menuPane.add(new UIMenuHighLight(), BorderLayout.SOUTH); + menuPane.add(initNorthEastPane(ad), BorderLayout.EAST); + basePane.add(menuPane, BorderLayout.NORTH); + this.resetToolkitByPlus(null); + } + /** * @param ad * @return @@ -184,658 +314,532 @@ public class DesignerFrame extends JFrame implements JTemplateActionListener, Ta final JPanel northEastPane = FRGUIPaneFactory.createBorderLayout_S_Pane(); //优先级为-1,保证最后全面刷新一次 GeneralContext.listenPluginRunningChanged(new PluginEventListener(-1) { - + @Override public void on(PluginEvent event) { - + refreshNorthEastPane(northEastPane, ad); DesignUtils.refreshDesignerFrame(FRContext.getCurrentEnv()); } }, new PluginFilter() { - + @Override public boolean accept(PluginContext context) { - + return context.contain(PluginModule.ExtraDesign); } }); refreshNorthEastPane(northEastPane, ad); - return northEastPane; - } - + return northEastPane; + } + private void refreshNorthEastPane(JPanel northEastPane, ToolBarMenuDock ad) { - + northEastPane.removeAll(); TitlePlaceProcessor processor = ExtraDesignClassManager.getInstance().getSingle(TitlePlaceProcessor.MARK_STRING); if (processor == null) { processor = new DefaultTitlePlace(); } processor.hold(northEastPane, LogMessageBar.getInstance(), ad.createBBSLoginPane()); - if (DesignerEnvManager.getEnvManager().getAlphaFineConfigManager().isEnabled()) { - northEastPane.add(ad.createAlphafinePane(), BorderLayout.CENTER); - } + if (AlphaFineConfigManager.isALPHALicAvailable() && DesignerEnvManager.getEnvManager().getAlphaFineConfigManager().isEnabled()) { + northEastPane.add(ad.createAlphafinePane(), BorderLayout.CENTER); + } } - - public DesignerFrame(ToolBarMenuDock ad) { - - setName(DESIGNER_FRAME_NAME); - this.ad = ad; - this.initTitleIcon(); - this.setTitle();// james:因为有默认的了 - // set this to context. - DesignerContext.setDesignerFrame(this); - - // the content pane - basePane.setLayout(new BorderLayout()); - toolbarPane = new JPanel() { - public Dimension getPreferredSize() { - Dimension dim = super.getPreferredSize(); - // dim.height = TOOLBAR_HEIGHT; - return dim; - } - }; - toolbarPane.setLayout(FRGUIPaneFactory.createBorderLayout()); - JPanel eastPane = FRGUIPaneFactory.createBorderLayout_S_Pane(); - eastPane.add(ad.createLargeToolbar(), BorderLayout.WEST); - eastCenterPane = FRGUIPaneFactory.createBorderLayout_S_Pane(); - eastCenterPane.add(combineUp = combineUpTooBar(null), BorderLayout.NORTH); - JPanel panel = FRGUIPaneFactory.createBorderLayout_S_Pane(); - panel.add(newWorkBookPane =ad.getNewTemplatePane(), BorderLayout.WEST); - panel.add(MutilTempalteTabPane.getInstance(), BorderLayout.CENTER); - eastCenterPane.add(panel, BorderLayout.CENTER); - - eastPane.add(eastCenterPane, BorderLayout.CENTER); - toolbarPane.add(eastPane, BorderLayout.NORTH); - toolbarPane.add(new UIMenuHighLight(), BorderLayout.SOUTH); - - JPanel centerPane = FRGUIPaneFactory.createBorderLayout_S_Pane(); - centerPane.add(centerTemplateCardPane = new DesktopCardPane(), BorderLayout.CENTER); - centerPane.add(toolbarPane, BorderLayout.NORTH); - - - basePane.add(centerPane, BorderLayout.CENTER); - laoyoutWestPane(); -// JPanel eastRegionPane = new JPanel(new BorderLayout()); -// eastRegionPane.add(EastRegionContainerPane.getInstance(), BorderLayout.CENTER); -// eastRegionPane.add(JSliderPane.getInstance(), BorderLayout.SOUTH); -// basePane.add(eastRegionPane, BorderLayout.EAST); - basePane.add(EastRegionContainerPane.getInstance(), BorderLayout.EAST); - basePane.setBounds(0, 0, contentWidth, contentHeight); - - // 数值越小。越在底层 - layeredPane.add(basePane); - // 调整Window大小 - modWindowBounds(); - - - - // p:检查所有按钮的可见性和是否可以编辑性. - checkToolbarMenuEnable(); - - // window close listener. - this.addWindowListeners(getFrameListeners()); - - this.addComponentListener(new ComponentAdapter() { - public void componentResized(ComponentEvent e) { - reCalculateFrameSize(); - if (BaseUtils.isAuthorityEditing()) { - doResize(); - } - } - }); - this.setDefaultCloseOperation(WindowConstants.DO_NOTHING_ON_CLOSE); - this.setVisible(false); - this.setExtendedState(JFrame.MAXIMIZED_BOTH); - this.setDropTarget(new DropTarget(this, DnDConstants.ACTION_MOVE, new FileDropTargetListener(), true)); - closeMode = UIConstants.CLOSE_OF_AUTHORITY; - initMenuPane(); - } - - public void initTitleIcon() { - try { - @SuppressWarnings("unchecked") - List image = ICODecoder.read(DesignerFrame.class - .getResourceAsStream("/com/fr/base/images/oem/logo.ico")); - this.setIconImages(image); - } catch (IOException e) { - FRContext.getLogger().error(e.getMessage(), e); - this.setIconImage(BaseUtils.readImage("/com/fr/base/images/oem/logo.png")); - } - } - - private void addWindowListeners(ArrayList listeners){ - for(WindowListener listener : listeners){ - this.addWindowListener(listener); - } - } - - protected ArrayList getFrameListeners(){ - ArrayList arrayList = new ArrayList(); - arrayList.add(windowAdapter); - return arrayList; - } - - - protected void laoyoutWestPane(){ - basePane.add(WestRegionContainerPane.getInstance(), BorderLayout.WEST); - } - - // 调整windows大小 - private void reCalculateFrameSize() { - contentHeight = layeredPane.getHeight(); - contentWidth = layeredPane.getWidth(); - layeredPane.remove(basePane); - basePane.setBounds(0, 0, contentWidth, contentHeight); - layeredPane.add(basePane); - layeredPane.repaint(); - } - - /** - * 更新 - */ - public void populateAuthorityArea() { - int centerWidth = contentWidth - WestRegionContainerPane.getInstance().getContainerWidth() - - EastRegionContainerPane.getInstance().getContainerWidth(); - // 上面的虚线 - upDottedLine = new DottedLine(UIScrollBar.HORIZONTAL, centerWidth); - upDottedLine.setBounds(WestRegionContainerPane.getInstance().getContainerWidth(), MENU_HEIGHT - 1, centerWidth, - 3); - - // 下面的虚线 - downDottedLine = new DottedLine(UIScrollBar.HORIZONTAL, centerWidth); - downDottedLine.setBounds(WestRegionContainerPane.getInstance().getContainerWidth(), contentHeight - 3, - centerWidth, 3); - - // 左边的虚线 - leftDottedLine = new DottedLine(UIScrollBar.VERTICAL, contentHeight - MENU_HEIGHT); - leftDottedLine.setBounds(WestRegionContainerPane.getInstance().getContainerWidth(), MENU_HEIGHT, 3, - contentHeight - MENU_HEIGHT); - - rightDottedLine = new DottedLine(UIScrollBar.VERTICAL, contentHeight - MENU_HEIGHT); - rightDottedLine.setBounds(contentWidth - EastRegionContainerPane.getInstance().getContainerWidth() - 3, - MENU_HEIGHT, 3, contentHeight - MENU_HEIGHT); - - } - - private void addDottedLine() { - layeredPane.add(upDottedLine, SECOND_LAYER); - layeredPane.add(downDottedLine, SECOND_LAYER); - layeredPane.add(leftDottedLine, SECOND_LAYER); - layeredPane.add(rightDottedLine, SECOND_LAYER); - layeredPane.add(closeButton, TOP_LAYER); - } - - private void removeDottedLine() { - layeredPane.remove(upDottedLine); - layeredPane.remove(downDottedLine); - layeredPane.remove(leftDottedLine); - layeredPane.remove(rightDottedLine); - layeredPane.remove(closeButton); - } - - public JLayeredPane getContentFrame() { - return layeredPane; - } - - /** - * 刷新 - */ - public void refreshDottedLine() { - if (BaseUtils.isAuthorityEditing()) { - populateAuthorityArea(); - populateCloseButton(); - addDottedLine(); - } else { - removeDottedLine(); - } - layeredPane.repaint(); - } - - /** - * 刷新DottedLine - */ - public void doResize() { - removeDottedLine(); - populateAuthorityArea(); - populateCloseButton(); - addDottedLine(); - } - - private MouseListener closeMouseListener = new MouseAdapter() { - public void mousePressed(MouseEvent e) { - closeMode = UIConstants.CLOSE_PRESS_AUTHORITY; - closeButton.setBackground(UIConstants.NORMAL_BACKGROUND); - closeButton.repaint(); - } - - public void mouseExited(MouseEvent e) { - closeMode = UIConstants.CLOSE_OF_AUTHORITY; - closeButton.setBackground(UIConstants.NORMAL_BACKGROUND); - closeButton.repaint(); - } - - public void mouseMoved(MouseEvent e) { - closeMode = UIConstants.CLOSE_OVER_AUTHORITY; - closeButton.setBackground(UIConstants.NORMAL_BACKGROUND); - closeButton.repaint(); - } - - public void mouseReleased(MouseEvent e) { - if (BaseUtils.isAuthorityEditing()) { - BaseUtils.setAuthorityEditing(false); - WestRegionContainerPane.getInstance().replaceDownPane( - TableDataTreePane.getInstance(DesignModelAdapter.getCurrentModelAdapter())); - HistoryTemplateListPane.getInstance().getCurrentEditingTemplate().refreshEastPropertiesPane(); - DesignerContext.getDesignerFrame().resetToolkitByPlus( - HistoryTemplateListPane.getInstance().getCurrentEditingTemplate().getToolBarMenuDockPlus()); - needToAddAuhtorityPaint(); - refreshDottedLine(); - fireAuthorityStateToNomal(); - } - } - - public void mouseEntered(MouseEvent e) { - closeMode = UIConstants.CLOSE_OVER_AUTHORITY; - closeButton.setBackground(UIConstants.NORMAL_BACKGROUND); - closeButton.repaint(); - } - }; - - /** - * 刷新CloseButton - */ - public void populateCloseButton() { - - closeButton.addMouseListener(closeMouseListener); - closeButton.setBackground(UIConstants.NORMAL_BACKGROUND); - closeButton.setBorder(null); - int x = contentWidth - EastRegionContainerPane.getInstance().getContainerWidth() - closeMode.getIconWidth() / 2; - int y = MENU_HEIGHT - closeMode.getIconHeight() / 2; - closeButton.setBounds(x, y, UIConstants.CLOSE_AUTHORITY_HEIGHT_AND_WIDTH, - UIConstants.CLOSE_AUTHORITY_HEIGHT_AND_WIDTH); - } - - /** - * 退出权限编辑时,将所有的做过权限编辑的状态,作为一个状态赋给报、报表主体 - */ - private void fireAuthorityStateToNomal() { - java.util.List> opendedTemplate = HistoryTemplateListPane.getInstance().getHistoryList(); - for (int i = 0; i < opendedTemplate.size(); i++) { - // 如果在权限编辑时做过操作,则将做过的操作作为一个整体状态赋给正在报表 - if (opendedTemplate.get(i).isDoSomethingInAuthority()) { - opendedTemplate.get(i).fireAuthorityStateToNomal(); - } - } - } - - public void setCloseMode(Icon closeMode) { - this.closeMode = closeMode; - } - - private UIToolbar combineUpTooBar(JComponent[] toolbar4Form) { - combineUp = new UIToolbar(FlowLayout.LEFT); - combineUp.setBorder(new MatteBorder(new Insets(0, LEFT_ALIGN_GAP, 1, 0), UIConstants.LINE_COLOR)); - combineUp.setLayout(new FlowLayout(FlowLayout.LEFT, 5, 2)); - UIButton[] fixButtons = ad.createUp(); - for (int i = 0; i < fixButtons.length; i++) { - combineUp.add(fixButtons[i]); - } - if (!BaseUtils.isAuthorityEditing()) { - combineUp.addSeparator(new Dimension(2, 16)); - if (toolbar4Form != null) { - for (int i = 0; i < toolbar4Form.length; i++) { - combineUp.add(toolbar4Form[i]); - } - } - } - - //添加分享按钮 - addShareButton(); - - //添加插件中的按钮 - addExtraButtons(); - - return combineUp; - } - - private void addExtraButtons(){ - JTemplate jt = HistoryTemplateListPane.getInstance().getCurrentEditingTemplate(); - if(jt == null){ - return; - } - - - UIButton[] extraButtons = jt.createExtraButtons(); - for (int i = 0; i < extraButtons.length; i++) { - combineUp.add(extraButtons[i]); - } - if (extraButtons.length > 0) { - combineUp.addSeparator(new Dimension(2, 16)); - } - } - - private void addShareButton(){ - JTemplate jt = HistoryTemplateListPane.getInstance().getCurrentEditingTemplate(); - if(jt == null){ - return; - } - - combineUp.addSeparator(new Dimension(2, 16)); - UIButton[] shareButtons = jt.createShareButton(); - for (int i = 0; i < shareButtons.length; i++) { - combineUp.add(shareButtons[i]); - } - } - - /** - * 检查 - * - * @param flag - * 组件是否可见 - * @param al - * 组件名称 - */ - public void checkCombineUp(boolean flag, ArrayList al) { - combineUp.checkComponentsByNames(flag, al); - - } - - /** - * 刷新工具条. - */ - public void refreshToolbar() { - this.ad.updateToolBarDef(); - } - - /** - * 重置相关的工具条. - * - * @param plus - * 工具条中相关信息 - */ - public void resetToolkitByPlus(ToolBarMenuDockPlus plus) { - if (plus == null) { - plus = ToolBarMenuDock.NULLAVOID; - } - - DesignState designState = new DesignState(plus); - MenuManager.getInstance().setMenus4Designer(designState); - if (menuBar != null) { - menuPane.remove(menuBar); - } - menuPane.add(menuBar = ad.createJMenuBar(plus), BorderLayout.CENTER); - - if (combineUp != null) { - eastCenterPane.remove(combineUp); - combineUp = null; - } - - // 保存撤销那些按钮的面板 - eastCenterPane.add(combineUp = combineUpTooBar(ad.resetUpToolBar(plus)), BorderLayout.NORTH); - - if (toolbarComponent != null) { - toolbarPane.remove(toolbarComponent); - } - - // 颜色,字体那些按钮的工具栏 - toolbarPane.add(toolbarComponent = ad.resetToolBar(toolbarComponent, plus), BorderLayout.CENTER); - - this.checkToolbarMenuEnable(); - this.validate(); - layeredPane.repaint(); - } - - public JComponent getToolbarComponent() { - return this.toolbarComponent; - } - - /** - * 判断是否在权限编辑状态,若是在权限编辑状态,则需要有虚线框和关闭突变 - */ - public void needToAddAuhtorityPaint() { - - newWorkBookPane.setButtonGray(BaseUtils.isAuthorityEditing()); - } - - /** - * 检查工具条. - */ - private void checkToolbarMenuEnable() { - if (this.ad != null) { - this.ad.updateMenuDef(); - this.ad.updateToolBarDef(); - } - } - - /** - * 设置标题 - */ - public void setTitle() { + + public void initTitleIcon() { + try { + @SuppressWarnings("unchecked") + List image = ICODecoder.read(DesignerFrame.class + .getResourceAsStream("/com/fr/base/images/oem/logo.ico")); + this.setIconImages(image); + } catch (IOException e) { + FRContext.getLogger().error(e.getMessage(), e); + this.setIconImage(BaseUtils.readImage("/com/fr/base/images/oem/logo.png")); + } + } + + private void addWindowListeners(ArrayList listeners) { + for (WindowListener listener : listeners) { + this.addWindowListener(listener); + } + } + + protected ArrayList getFrameListeners() { + ArrayList arrayList = new ArrayList(); + arrayList.add(windowAdapter); + return arrayList; + } + + protected void laoyoutWestPane() { + basePane.add(WestRegionContainerPane.getInstance(), BorderLayout.WEST); + } + + // 调整windows大小 + private void reCalculateFrameSize() { + contentHeight = layeredPane.getHeight(); + contentWidth = layeredPane.getWidth(); + layeredPane.remove(basePane); + basePane.setBounds(0, 0, contentWidth, contentHeight); + layeredPane.add(basePane); + layeredPane.repaint(); + } + + /** + * 更新 + */ + public void populateAuthorityArea() { + int centerWidth = contentWidth - WestRegionContainerPane.getInstance().getContainerWidth() + - EastRegionContainerPane.getInstance().getContainerWidth(); + // 上面的虚线 + upDottedLine = new DottedLine(UIScrollBar.HORIZONTAL, centerWidth); + upDottedLine.setBounds(WestRegionContainerPane.getInstance().getContainerWidth(), MENU_HEIGHT - 1, centerWidth, + 3); + + // 下面的虚线 + downDottedLine = new DottedLine(UIScrollBar.HORIZONTAL, centerWidth); + downDottedLine.setBounds(WestRegionContainerPane.getInstance().getContainerWidth(), contentHeight - 3, + centerWidth, 3); + + // 左边的虚线 + leftDottedLine = new DottedLine(UIScrollBar.VERTICAL, contentHeight - MENU_HEIGHT); + leftDottedLine.setBounds(WestRegionContainerPane.getInstance().getContainerWidth(), MENU_HEIGHT, 3, + contentHeight - MENU_HEIGHT); + + rightDottedLine = new DottedLine(UIScrollBar.VERTICAL, contentHeight - MENU_HEIGHT); + rightDottedLine.setBounds(contentWidth - EastRegionContainerPane.getInstance().getContainerWidth() - 3, + MENU_HEIGHT, 3, contentHeight - MENU_HEIGHT); + + } + + private void addDottedLine() { + layeredPane.add(upDottedLine, SECOND_LAYER); + layeredPane.add(downDottedLine, SECOND_LAYER); + layeredPane.add(leftDottedLine, SECOND_LAYER); + layeredPane.add(rightDottedLine, SECOND_LAYER); + layeredPane.add(closeButton, TOP_LAYER); + } + + private void removeDottedLine() { + layeredPane.remove(upDottedLine); + layeredPane.remove(downDottedLine); + layeredPane.remove(leftDottedLine); + layeredPane.remove(rightDottedLine); + layeredPane.remove(closeButton); + } + + public JLayeredPane getContentFrame() { + return layeredPane; + } + + /** + * 刷新 + */ + public void refreshDottedLine() { + if (BaseUtils.isAuthorityEditing()) { + populateAuthorityArea(); + populateCloseButton(); + addDottedLine(); + } else { + removeDottedLine(); + } + layeredPane.repaint(); + } + + /** + * 刷新DottedLine + */ + public void doResize() { + removeDottedLine(); + populateAuthorityArea(); + populateCloseButton(); + addDottedLine(); + } + + /** + * 刷新CloseButton + */ + public void populateCloseButton() { + + closeButton.addMouseListener(closeMouseListener); + closeButton.setBackground(UIConstants.NORMAL_BACKGROUND); + closeButton.setBorder(null); + int x = contentWidth - EastRegionContainerPane.getInstance().getContainerWidth() - closeMode.getIconWidth() / 2; + int y = MENU_HEIGHT - closeMode.getIconHeight() / 2; + closeButton.setBounds(x, y, UIConstants.CLOSE_AUTHORITY_HEIGHT_AND_WIDTH, + UIConstants.CLOSE_AUTHORITY_HEIGHT_AND_WIDTH); + } + + /** + * 退出权限编辑时,将所有的做过权限编辑的状态,作为一个状态赋给报、报表主体 + */ + private void fireAuthorityStateToNomal() { + java.util.List> opendedTemplate = HistoryTemplateListPane.getInstance().getHistoryList(); + for (int i = 0; i < opendedTemplate.size(); i++) { + // 如果在权限编辑时做过操作,则将做过的操作作为一个整体状态赋给正在报表 + if (opendedTemplate.get(i).isDoSomethingInAuthority()) { + opendedTemplate.get(i).fireAuthorityStateToNomal(); + } + } + } + + public void setCloseMode(Icon closeMode) { + this.closeMode = closeMode; + } + + private UIToolbar combineUpTooBar(JComponent[] toolbar4Form) { + combineUp = new UIToolbar(FlowLayout.LEFT); + combineUp.setBorder(new MatteBorder(new Insets(0, LEFT_ALIGN_GAP, 1, 0), UIConstants.LINE_COLOR)); + combineUp.setLayout(new FlowLayout(FlowLayout.LEFT, 5, 2)); + UIButton[] fixButtons = ad.createUp(); + for (int i = 0; i < fixButtons.length; i++) { + combineUp.add(fixButtons[i]); + } + if (!BaseUtils.isAuthorityEditing()) { + combineUp.addSeparator(new Dimension(2, 16)); + if (toolbar4Form != null) { + for (int i = 0; i < toolbar4Form.length; i++) { + combineUp.add(toolbar4Form[i]); + } + } + } + + //添加分享按钮 + addShareButton(); + + //添加插件中的按钮 + addExtraButtons(); + + return combineUp; + } + + private void addExtraButtons() { + JTemplate jt = HistoryTemplateListPane.getInstance().getCurrentEditingTemplate(); + if (jt == null) { + return; + } + + + UIButton[] extraButtons = jt.createExtraButtons(); + for (int i = 0; i < extraButtons.length; i++) { + combineUp.add(extraButtons[i]); + } + if (extraButtons.length > 0) { + combineUp.addSeparator(new Dimension(2, 16)); + } + } + + private void addShareButton() { + JTemplate jt = HistoryTemplateListPane.getInstance().getCurrentEditingTemplate(); + if (jt == null) { + return; + } + + combineUp.addSeparator(new Dimension(2, 16)); + UIButton[] shareButtons = jt.createShareButton(); + for (int i = 0; i < shareButtons.length; i++) { + combineUp.add(shareButtons[i]); + } + } + + /** + * 检查 + * + * @param flag 组件是否可见 + * @param al 组件名称 + */ + public void checkCombineUp(boolean flag, ArrayList al) { + combineUp.checkComponentsByNames(flag, al); + + } + + /** + * 刷新工具条. + */ + public void refreshToolbar() { + this.ad.updateToolBarDef(); + } + + /** + * 重置相关的工具条. + * + * @param plus 工具条中相关信息 + */ + public void resetToolkitByPlus(ToolBarMenuDockPlus plus) { + if (plus == null) { + plus = ToolBarMenuDock.NULLAVOID; + } + + DesignState designState = new DesignState(plus); + MenuManager.getInstance().setMenus4Designer(designState); + if (menuBar != null) { + menuPane.remove(menuBar); + } + menuPane.add(menuBar = ad.createJMenuBar(plus), BorderLayout.CENTER); + + if (combineUp != null) { + eastCenterPane.remove(combineUp); + combineUp = null; + } + + // 保存撤销那些按钮的面板 + eastCenterPane.add(combineUp = combineUpTooBar(ad.resetUpToolBar(plus)), BorderLayout.NORTH); + + if (toolbarComponent != null) { + toolbarPane.remove(toolbarComponent); + } + + // 颜色,字体那些按钮的工具栏 + toolbarPane.add(toolbarComponent = ad.resetToolBar(toolbarComponent, plus), BorderLayout.CENTER); + + this.checkToolbarMenuEnable(); + this.validate(); + layeredPane.repaint(); + } + + public JComponent getToolbarComponent() { + return this.toolbarComponent; + } + + /** + * 判断是否在权限编辑状态,若是在权限编辑状态,则需要有虚线框和关闭突变 + */ + public void needToAddAuhtorityPaint() { + + newWorkBookPane.setButtonGray(BaseUtils.isAuthorityEditing()); + } + + /** + * 检查工具条. + */ + private void checkToolbarMenuEnable() { + if (this.ad != null) { + this.ad.updateMenuDef(); + this.ad.updateToolBarDef(); + } + } + + /** + * 设置标题 + */ + public void setTitle() { JTemplate editingTemplate = HistoryTemplateListPane.getInstance().getCurrentEditingTemplate(); StringBuilder defaultTitleSB = new StringBuilder(); defaultTitleSB.append(ProductConstants.PRODUCT_NAME); - defaultTitleSB.append(" "); - defaultTitleSB.append(ProductConstants.BRANCH); - // james:标识登录的用户和登录的ENV - String envName = DesignerEnvManager.getEnvManager().getCurEnvName(); - Env env = DesignerEnvManager.getEnvManager().getEnv(envName); - if (env != null) { - defaultTitleSB.append(env.getUser()).append('@').append(envName).append('['); - defaultTitleSB.append(env.getEnvDescription()); - defaultTitleSB.append(']'); - if (editingTemplate != null) { - String path = editingTemplate.getEditingFILE().getPath(); - if (!editingTemplate.getEditingFILE().exists()) { - path = FILEFactory.MEM_PREFIX + path; - } else if (path.startsWith(ProjectConstants.REPORTLETS_NAME)) { - path = env.getPath() + File.separator + path; - } - defaultTitleSB.append(" " + path); - } - - } - setTitle(defaultTitleSB.toString()); - } - - /** - * modify window bounds. - */ - private void modWindowBounds() { - // set the window bounds to the same as last closed - DesignerEnvManager designerEnvManager = DesignerEnvManager.getEnvManager(); - Rectangle windowBounds = designerEnvManager.getWindowBounds(); - if (windowBounds != null) { - int locX = windowBounds.x; - int locY = windowBounds.y; - - if (!OperatingSystem.isWindows()) { - locX = Math.max(1, locX); - locY = Math.max(1, locY); - } - - this.setLocation(new Point(locX, locY)); - - int width = windowBounds.width; - int height = windowBounds.height; - if (width > MIN_SIZE.width && height > MIN_SIZE.height) { - this.setSize(width, height); - } else { - GUICoreUtils.setWindowFullScreen(this); - } - } else { - GUICoreUtils.setWindowFullScreen(this); - } - } - - + defaultTitleSB.append(" "); + defaultTitleSB.append(ProductConstants.BRANCH); + // james:标识登录的用户和登录的ENV + String envName = DesignerEnvManager.getEnvManager().getCurEnvName(); + Env env = DesignerEnvManager.getEnvManager().getEnv(envName); + if (env != null) { + defaultTitleSB.append(env.getUser()).append('@').append(envName).append('['); + defaultTitleSB.append(env.getEnvDescription()); + defaultTitleSB.append(']'); + if (editingTemplate != null) { + String path = editingTemplate.getEditingFILE().getPath(); + if (!editingTemplate.getEditingFILE().exists()) { + path = FILEFactory.MEM_PREFIX + path; + } else if (path.startsWith(ProjectConstants.REPORTLETS_NAME)) { + path = env.getPath() + File.separator + path; + } + defaultTitleSB.append(" " + path); + } + + } + setTitle(defaultTitleSB.toString()); + } + + /** + * modify window bounds. + */ + private void modWindowBounds() { + // set the window bounds to the same as last closed + DesignerEnvManager designerEnvManager = DesignerEnvManager.getEnvManager(); + Rectangle windowBounds = designerEnvManager.getWindowBounds(); + if (windowBounds != null) { + int locX = windowBounds.x; + int locY = windowBounds.y; + + if (!OperatingSystem.isWindows()) { + locX = Math.max(1, locX); + locY = Math.max(1, locY); + } + + this.setLocation(new Point(locX, locY)); + + int width = windowBounds.width; + int height = windowBounds.height; + if (width > MIN_SIZE.width && height > MIN_SIZE.height) { + this.setSize(width, height); + } else { + GUICoreUtils.setWindowFullScreen(this); + } + } else { + GUICoreUtils.setWindowFullScreen(this); + } + } + + /** * 报表运行环境改变时,需要刷新某些面板 * * @param env 环境 */ public void refreshEnv(Env env) { - + this.setTitle(); DesignerFrameFileDealerPane.getInstance().refreshDockingView(); TableDataTreePane.getInstance(DesignModelAdapter.getCurrentModelAdapter()); TemplateTreePane.getInstance().refreshDockingView(); DesignTableDataManager.clearGlobalDs(); - EastRegionContainerPane.getInstance().refreshDownPane(); - } - - /** - * 返回选中的模板. - */ - public JTemplate getSelectedJTemplate() { - return this.centerTemplateCardPane.getSelectedJTemplate(); - } - - /** - * 保存当前编辑的模板 - */ - - public void saveCurrentEditingTemplate() { - JTemplate editingTemplate = HistoryTemplateListPane.getInstance().getCurrentEditingTemplate(); - if (editingTemplate == null) { - return; - } - if (editingTemplate.isSaved()) {// isSaved == true表示已经保存过,或者新建的一张模板 - if (editingTemplate.getEditingFILE().exists()) {// 表示磁盘上的某一张已经保存过的模板,要添加到历史中 - // HistoryTemplateListPane.getInstance().addHistory(); - } - } else { - editingTemplate.stopEditing(); - if (!editingTemplate.getEditingFILE().exists()) { - int returnVal = JOptionPane.showConfirmDialog(DesignerContext.getDesignerFrame(), - Inter.getLocText("Utils-Would_you_like_to_save") + " \"" + editingTemplate.getEditingFILE() - + "\" ?", ProductConstants.PRODUCT_NAME, JOptionPane.YES_NO_OPTION, - JOptionPane.QUESTION_MESSAGE); - if (returnVal == JOptionPane.YES_OPTION && editingTemplate.saveTemplate()) { - editingTemplate.saveTemplate(); - FRLogger.getLogger().log( - Level.INFO, - Inter.getLocText(new String[] { "Template", "already-saved" }, new String[] { - editingTemplate.getEditingFILE().getName(), "." })); - } - } else { - if (editingTemplate.saveTemplate()) { - editingTemplate.saveTemplate(); - FRLogger.getLogger().log( - Level.INFO, - Inter.getLocText(new String[] { "Template", "already-saved" }, new String[] { - editingTemplate.getEditingFILE().getName(), "." })); - } - } - } - } - - /** - * 添加新建模板, 并激活. - */ - public void addAndActivateJTemplate() { - addAndActivateJTemplate(ad.createNewTemplate()); - layeredPane.repaint(); - } - - /** - * 添加 模板, 并激活. - * - * @param jt - * 添加的模板. - */ - public void addAndActivateJTemplate(JTemplate jt) { - if (jt == null || jt.getEditingFILE() == null) { - return; - } - jt.addJTemplateActionListener(this); - jt.addTargetModifiedListener(this); - centerTemplateCardPane.showJTemplate(jt); - setTitle(); - layeredPane.repaint(); - } - - /** - * 激活已经存在的模板 - * - * @param jt - * 模板 - */ - public void activateJTemplate(JTemplate jt) { - if (jt == null || jt.getEditingFILE() == null) { - return; - } - centerTemplateCardPane.showJTemplate(jt); - setTitle(); - layeredPane.repaint(); - } - - /** - * 对象侦听 - * - * @param e - * 事件 - */ - public void targetModified(TargetModifiedEvent e) { - this.checkToolbarMenuEnable(); - } - - /** - * 模板关闭时 处理. - * - * @param jt - * 模板 - */ - public void templateClosed(JTemplate jt) { - } - - /** - * 模板打开时 处理. - * - * @param jt - * 模板 - */ - public void templateOpened(JTemplate jt) { - } - - /** - * 模板保存时 处理. - * - * @param jt - * 模板 - */ - public void templateSaved(JTemplate jt) { - this.checkToolbarMenuEnable(); - } - - /** - * 打开模板文件,如果是已经打开的就激活此模板所对应的JInternalFrame - * - * @param tplFile - * 文件 - */ - public void openTemplate(FILE tplFile) { - // 测试连接,如果连接失败,则提示 - try { - if (FRContext.getCurrentEnv() != null - && !FRContext.getCurrentEnv().testServerConnectionWithOutShowMessagePane()) { - JOptionPane.showMessageDialog( - DesignerContext.getDesignerFrame(), - Inter.getLocText(new String[] { "FR-Chart-Server_disconnected", "FR-Server-Design_template_unopened" }, new String[] { - ",", "!" }), Inter.getLocText("FR-Server-All_Error"), JOptionPane.ERROR_MESSAGE); - return; - } - } catch (Exception e) { - FRLogger.getLogger().error(e.getMessage()); - } - - // p:判断一下,如何文件为空或者文件不存在,直接返回. - if (tplFile == null || !tplFile.exists()) { - JOptionPane.showMessageDialog(this, Inter.getLocText("Warning-Template_Do_Not_Exsit"), - ProductConstants.PRODUCT_NAME, JOptionPane.INFORMATION_MESSAGE); - DesignerFrameFileDealerPane.getInstance().refresh(); - return; - } + EastRegionContainerPane.getInstance().refreshDownPane(); + } + + /** + * 返回选中的模板. + */ + public JTemplate getSelectedJTemplate() { + return this.centerTemplateCardPane.getSelectedJTemplate(); + } + + /** + * 保存当前编辑的模板 + */ + + public void saveCurrentEditingTemplate() { + JTemplate editingTemplate = HistoryTemplateListPane.getInstance().getCurrentEditingTemplate(); + if (editingTemplate == null) { + return; + } + if (editingTemplate.isSaved()) {// isSaved == true表示已经保存过,或者新建的一张模板 + if (editingTemplate.getEditingFILE().exists()) {// 表示磁盘上的某一张已经保存过的模板,要添加到历史中 + // HistoryTemplateListPane.getInstance().addHistory(); + } + } else { + editingTemplate.stopEditing(); + if (!editingTemplate.getEditingFILE().exists()) { + int returnVal = JOptionPane.showConfirmDialog(DesignerContext.getDesignerFrame(), + Inter.getLocText("Utils-Would_you_like_to_save") + " \"" + editingTemplate.getEditingFILE() + + "\" ?", ProductConstants.PRODUCT_NAME, JOptionPane.YES_NO_OPTION, + JOptionPane.QUESTION_MESSAGE); + if (returnVal == JOptionPane.YES_OPTION && editingTemplate.saveTemplate()) { + editingTemplate.saveTemplate(); + FRLogger.getLogger().log( + Level.INFO, + Inter.getLocText(new String[]{"Template", "already-saved"}, new String[]{ + editingTemplate.getEditingFILE().getName(), "."})); + } + } else { + if (editingTemplate.saveTemplate()) { + editingTemplate.saveTemplate(); + FRLogger.getLogger().log( + Level.INFO, + Inter.getLocText(new String[]{"Template", "already-saved"}, new String[]{ + editingTemplate.getEditingFILE().getName(), "."})); + } + } + } + } + + /** + * 添加新建模板, 并激活. + */ + public void addAndActivateJTemplate() { + addAndActivateJTemplate(ad.createNewTemplate()); + layeredPane.repaint(); + } + + /** + * 添加 模板, 并激活. + * + * @param jt 添加的模板. + */ + public void addAndActivateJTemplate(JTemplate jt) { + if (jt == null || jt.getEditingFILE() == null) { + return; + } + jt.addJTemplateActionListener(this); + jt.addTargetModifiedListener(this); + centerTemplateCardPane.showJTemplate(jt); + setTitle(); + layeredPane.repaint(); + } + + /** + * 激活已经存在的模板 + * + * @param jt 模板 + */ + public void activateJTemplate(JTemplate jt) { + if (jt == null || jt.getEditingFILE() == null) { + return; + } + centerTemplateCardPane.showJTemplate(jt); + setTitle(); + layeredPane.repaint(); + } + + /** + * 对象侦听 + * + * @param e 事件 + */ + public void targetModified(TargetModifiedEvent e) { + this.checkToolbarMenuEnable(); + } + + /** + * 模板关闭时 处理. + * + * @param jt 模板 + */ + public void templateClosed(JTemplate jt) { + } + + /** + * 模板打开时 处理. + * + * @param jt 模板 + */ + public void templateOpened(JTemplate jt) { + } + + /** + * 模板保存时 处理. + * + * @param jt 模板 + */ + public void templateSaved(JTemplate jt) { + this.checkToolbarMenuEnable(); + } + + /** + * 打开模板文件,如果是已经打开的就激活此模板所对应的JInternalFrame + * + * @param tplFile 文件 + */ + public void openTemplate(FILE tplFile) { + // 测试连接,如果连接失败,则提示 + try { + if (FRContext.getCurrentEnv() != null + && !FRContext.getCurrentEnv().testServerConnectionWithOutShowMessagePane()) { + JOptionPane.showMessageDialog( + DesignerContext.getDesignerFrame(), + Inter.getLocText(new String[]{"FR-Chart-Server_disconnected", "FR-Server-Design_template_unopened"}, new String[]{ + ",", "!"}), Inter.getLocText("FR-Server-All_Error"), JOptionPane.ERROR_MESSAGE); + return; + } + } catch (Exception e) { + FRLogger.getLogger().error(e.getMessage()); + } + + // p:判断一下,如何文件为空或者文件不存在,直接返回. + if (tplFile == null || !tplFile.exists()) { + JOptionPane.showMessageDialog(this, Inter.getLocText("Warning-Template_Do_Not_Exsit"), + ProductConstants.PRODUCT_NAME, JOptionPane.INFORMATION_MESSAGE); + DesignerFrameFileDealerPane.getInstance().refresh(); + return; + } try { openFile(tplFile); @@ -844,209 +848,198 @@ public class DesignerFrame extends JFrame implements JTemplateActionListener, Ta addAndActivateJTemplate(); } - } - - /** - * 是否不合版本的设计器 - * - * @param jt - * 当前模板 - * - * @return 是否不合版本 - * - * - * @date 2014-10-14-下午6:30:37 - */ - private boolean inValidDesigner(JTemplate jt) { - return jt.isOldDesigner() || (!jt.isJWorkBook() && jt.isNewDesigner()); - } - - /** - * 打开指定的文件 - * - * @param tplFile - * 指定的文件 - * - * - * @date 2014-10-14-下午6:31:05 - */ - private void openFile(FILE tplFile) { - String fileName = tplFile.getName(); - int indexOfLastDot = fileName.lastIndexOf(CoreConstants.DOT); - if (indexOfLastDot < 0) { - return; - } - String fileExtention = fileName.substring(indexOfLastDot + 1); - for (int i = 0, len = appList.size(); i < len; i++) { - App app = appList.get(i); - String[] defaultAppExtentions = app.defaultExtentions(); - boolean opened = false; - for (int j = 0; j < defaultAppExtentions.length; j++) { - if (defaultAppExtentions[j].equalsIgnoreCase(fileExtention)) { - JTemplate jt = null; - try { - jt = app.openTemplate(tplFile); - } catch (Exception e) { - FRLogger.getLogger().error(e.getMessage(), e); - } - if (jt == null) { - return; - } - // 新的form不往前兼容 - if (inValidDesigner(jt)) { - this.addAndActivateJTemplate(); - MutilTempalteTabPane.getInstance().setTemTemplate( - HistoryTemplateListPane.getInstance().getCurrentEditingTemplate()); - } else { - activeTemplate(tplFile, jt); - } - opened = true; - break; - } - } - if (opened) { - break; - } - } - } - - /** - * 激活指定的模板 - * - * @param tplFile - * 模板文件 - * @param jt - * 当前报表 - * - * - * @date 2014-10-14-下午6:31:23 - */ - private void activeTemplate(FILE tplFile, JTemplate jt) { - // 如果该模板已经打开,则进行激活就可以了 - String fullName = StableUtils.pathJoin(new String[] { ProjectConstants.REPORTLETS_NAME, tplFile.getName() }); - if (tplFile instanceof FileNodeFILE) { - fullName = ((FileNodeFILE) tplFile).getEnvPath() + "/" + tplFile.getPath(); - } - // 如果是从文件夹打开的文件,不是从设计器文件树打开的文件,则直接取path就行 - if (tplFile instanceof FileFILE) { - fullName = tplFile.getPath(); - } - fullName = fullName.replaceAll("/", "\\\\"); - int index = HistoryTemplateListPane.getInstance().contains(fullName); - if (index != -1) { - this.activateJTemplate(HistoryTemplateListPane.getInstance().getHistoryList().get(index)); - } else { - this.addAndActivateJTemplate(jt); - } - - } - - /** - * Exit退出 - */ - public void exit() { - Thread thread = new Thread() { - @Override - public void run() { - DesignerEnvManager.doEndMapSaveWorkersIndesign(); - } - }; - thread.start(); - - try { - thread.join(); - } catch (InterruptedException e) { - FRLogger.getLogger().error("Map Thread Error"); - } - - DesignerEnvManager.getEnvManager().setLastOpenFile( - HistoryTemplateListPane.getInstance().getCurrentEditingTemplate().getEditingFILE().getPath()); - - DesignerEnvManager.getEnvManager().setLastWestRegionToolPaneY( - WestRegionContainerPane.getInstance().getToolPaneY()); - DesignerEnvManager.getEnvManager().setLastWestRegionContainerWidth( - WestRegionContainerPane.getInstance().getContainerWidth()); - DesignerEnvManager.getEnvManager().setLastEastRegionToolPaneY( - EastRegionContainerPane.getInstance().getToolPaneY()); - DesignerEnvManager.getEnvManager().setLastEastRegionContainerWidth( - EastRegionContainerPane.getInstance().getContainerWidth()); - - DesignerEnvManager.getEnvManager().saveXMLFile(); - - Env currentEnv = FRContext.getCurrentEnv(); - try { - currentEnv.signOut(); - GeneralContext.fireEnvSignOutListener(); - } catch (Exception e) { - FRContext.getLogger().error(e.getMessage(), e); - } - this.setVisible(false); - this.dispose(); - - this.ad.shutDown(); - - System.exit(0); - } - - // harry:添加程序外拖拽文件进来打开的功能 - class FileDropTargetListener implements DropTargetListener { - - @Override - public void dragEnter(DropTargetDragEvent event) { - } - - @Override - public void dragExit(DropTargetEvent event) { - } - - @Override - public void dragOver(DropTargetDragEvent event) { - } - - @Override - public void dropActionChanged(DropTargetDragEvent event) { - if (!isDragAcceptable(event)) { - event.rejectDrag(); - return; - } - } - - @SuppressWarnings("unchecked") - @Override - public void drop(DropTargetDropEvent event) { - if (!isDropAcceptable(event)) { - event.rejectDrop(); - return; - } - - event.acceptDrop(DnDConstants.ACTION_MOVE); - Transferable transferable = event.getTransferable(); - DataFlavor[] flavors = transferable.getTransferDataFlavors(); - for (int i = 0; i < flavors.length; i++) { - DataFlavor d = flavors[i]; - try { - if (ComparatorUtils.equals(d, DataFlavor.javaFileListFlavor)) { - List fileList = (List) transferable.getTransferData(d); - Iterator iterator = fileList.iterator(); - while (iterator.hasNext()) { - File f = iterator.next(); - DesignerContext.getDesignerFrame().openTemplate(new FileFILE(f)); - } - } - } catch (Exception e) { - FRContext.getLogger().error(e.getMessage(), e); - } - } - event.dropComplete(true); - } - - public boolean isDragAcceptable(DropTargetDragEvent event) { - return (event.getDropAction() & DnDConstants.ACTION_COPY_OR_MOVE) != 0; - } - - public boolean isDropAcceptable(DropTargetDropEvent event) { - return (event.getDropAction() & DnDConstants.ACTION_COPY_OR_MOVE) != 0; - } - } + } + + /** + * 是否不合版本的设计器 + * + * @param jt 当前模板 + * @return 是否不合版本 + * @date 2014-10-14-下午6:30:37 + */ + private boolean inValidDesigner(JTemplate jt) { + return jt.isOldDesigner() || (!jt.isJWorkBook() && jt.isNewDesigner()); + } + + /** + * 打开指定的文件 + * + * @param tplFile 指定的文件 + * @date 2014-10-14-下午6:31:05 + */ + private void openFile(FILE tplFile) { + String fileName = tplFile.getName(); + int indexOfLastDot = fileName.lastIndexOf(CoreConstants.DOT); + if (indexOfLastDot < 0) { + return; + } + String fileExtention = fileName.substring(indexOfLastDot + 1); + for (int i = 0, len = appList.size(); i < len; i++) { + App app = appList.get(i); + String[] defaultAppExtentions = app.defaultExtentions(); + boolean opened = false; + for (int j = 0; j < defaultAppExtentions.length; j++) { + if (defaultAppExtentions[j].equalsIgnoreCase(fileExtention)) { + JTemplate jt = null; + try { + jt = app.openTemplate(tplFile); + } catch (Exception e) { + FRLogger.getLogger().error(e.getMessage(), e); + } + if (jt == null) { + return; + } + // 新的form不往前兼容 + if (inValidDesigner(jt)) { + this.addAndActivateJTemplate(); + MutilTempalteTabPane.getInstance().setTemTemplate( + HistoryTemplateListPane.getInstance().getCurrentEditingTemplate()); + } else { + activeTemplate(tplFile, jt); + } + opened = true; + break; + } + } + if (opened) { + break; + } + } + } + + /** + * 激活指定的模板 + * + * @param tplFile 模板文件 + * @param jt 当前报表 + * @date 2014-10-14-下午6:31:23 + */ + private void activeTemplate(FILE tplFile, JTemplate jt) { + // 如果该模板已经打开,则进行激活就可以了 + String fullName = StableUtils.pathJoin(new String[]{ProjectConstants.REPORTLETS_NAME, tplFile.getName()}); + if (tplFile instanceof FileNodeFILE) { + fullName = ((FileNodeFILE) tplFile).getEnvPath() + "/" + tplFile.getPath(); + } + // 如果是从文件夹打开的文件,不是从设计器文件树打开的文件,则直接取path就行 + if (tplFile instanceof FileFILE) { + fullName = tplFile.getPath(); + } + fullName = fullName.replaceAll("/", "\\\\"); + int index = HistoryTemplateListPane.getInstance().contains(fullName); + if (index != -1) { + this.activateJTemplate(HistoryTemplateListPane.getInstance().getHistoryList().get(index)); + } else { + this.addAndActivateJTemplate(jt); + } + + } + + /** + * Exit退出 + */ + public void exit() { + Thread thread = new Thread() { + @Override + public void run() { + DesignerEnvManager.doEndMapSaveWorkersIndesign(); + } + }; + thread.start(); + + try { + thread.join(); + } catch (InterruptedException e) { + FRLogger.getLogger().error("Map Thread Error"); + } + + DesignerEnvManager.getEnvManager().setLastOpenFile( + HistoryTemplateListPane.getInstance().getCurrentEditingTemplate().getEditingFILE().getPath()); + + DesignerEnvManager.getEnvManager().setLastWestRegionToolPaneY( + WestRegionContainerPane.getInstance().getToolPaneY()); + DesignerEnvManager.getEnvManager().setLastWestRegionContainerWidth( + WestRegionContainerPane.getInstance().getContainerWidth()); + DesignerEnvManager.getEnvManager().setLastEastRegionToolPaneY( + EastRegionContainerPane.getInstance().getToolPaneY()); + DesignerEnvManager.getEnvManager().setLastEastRegionContainerWidth( + EastRegionContainerPane.getInstance().getContainerWidth()); + + DesignerEnvManager.getEnvManager().saveXMLFile(); + + Env currentEnv = FRContext.getCurrentEnv(); + try { + currentEnv.signOut(); + GeneralContext.fireEnvSignOutListener(); + } catch (Exception e) { + FRContext.getLogger().error(e.getMessage(), e); + } + this.setVisible(false); + this.dispose(); + + this.ad.shutDown(); + + System.exit(0); + } + + // harry:添加程序外拖拽文件进来打开的功能 + class FileDropTargetListener implements DropTargetListener { + + @Override + public void dragEnter(DropTargetDragEvent event) { + } + + @Override + public void dragExit(DropTargetEvent event) { + } + + @Override + public void dragOver(DropTargetDragEvent event) { + } + + @Override + public void dropActionChanged(DropTargetDragEvent event) { + if (!isDragAcceptable(event)) { + event.rejectDrag(); + return; + } + } + + @SuppressWarnings("unchecked") + @Override + public void drop(DropTargetDropEvent event) { + if (!isDropAcceptable(event)) { + event.rejectDrop(); + return; + } + + event.acceptDrop(DnDConstants.ACTION_MOVE); + Transferable transferable = event.getTransferable(); + DataFlavor[] flavors = transferable.getTransferDataFlavors(); + for (int i = 0; i < flavors.length; i++) { + DataFlavor d = flavors[i]; + try { + if (ComparatorUtils.equals(d, DataFlavor.javaFileListFlavor)) { + List fileList = (List) transferable.getTransferData(d); + Iterator iterator = fileList.iterator(); + while (iterator.hasNext()) { + File f = iterator.next(); + DesignerContext.getDesignerFrame().openTemplate(new FileFILE(f)); + } + } + } catch (Exception e) { + FRContext.getLogger().error(e.getMessage(), e); + } + } + event.dropComplete(true); + } + + public boolean isDragAcceptable(DropTargetDragEvent event) { + return (event.getDropAction() & DnDConstants.ACTION_COPY_OR_MOVE) != 0; + } + + public boolean isDropAcceptable(DropTargetDropEvent event) { + return (event.getDropAction() & DnDConstants.ACTION_COPY_OR_MOVE) != 0; + } + } } \ No newline at end of file diff --git a/designer_base/src/com/fr/design/mainframe/toolbar/ToolBarMenuDock.java b/designer_base/src/com/fr/design/mainframe/toolbar/ToolBarMenuDock.java index a8305a49ac..9dab4fb664 100644 --- a/designer_base/src/com/fr/design/mainframe/toolbar/ToolBarMenuDock.java +++ b/designer_base/src/com/fr/design/mainframe/toolbar/ToolBarMenuDock.java @@ -5,17 +5,33 @@ package com.fr.design.mainframe.toolbar; import com.fr.base.BaseUtils; import com.fr.base.FRContext; -import com.fr.base.FRCoreContext; import com.fr.design.DesignState; import com.fr.design.ExtraDesignClassManager; import com.fr.design.actions.UpdateAction; -import com.fr.design.actions.community.*; -import com.fr.design.actions.file.*; +import com.fr.design.actions.community.BBSAction; +import com.fr.design.actions.community.BugAction; +import com.fr.design.actions.community.NeedAction; +import com.fr.design.actions.community.QuestionAction; +import com.fr.design.actions.community.SignAction; +import com.fr.design.actions.community.UpAction; +import com.fr.design.actions.community.VideoAction; +import com.fr.design.actions.file.CloseCurrentTemplateAction; +import com.fr.design.actions.file.ExitDesignerAction; +import com.fr.design.actions.file.OpenRecentReportMenuDef; +import com.fr.design.actions.file.OpenTemplateAction; +import com.fr.design.actions.file.PreferenceAction; +import com.fr.design.actions.file.SwitchExistEnv; import com.fr.design.actions.help.AboutAction; import com.fr.design.actions.help.TutorialAction; import com.fr.design.actions.help.WebDemoAction; import com.fr.design.actions.help.alphafine.AlphaFineAction; -import com.fr.design.actions.server.*; +import com.fr.design.actions.help.alphafine.AlphaFineConfigManager; +import com.fr.design.actions.server.ConnectionListAction; +import com.fr.design.actions.server.FunctionManagerAction; +import com.fr.design.actions.server.GlobalParameterAction; +import com.fr.design.actions.server.GlobalTableDataAction; +import com.fr.design.actions.server.PlatformManagerAction; +import com.fr.design.actions.server.PluginManagerAction; import com.fr.design.file.NewTemplatePane; import com.fr.design.fun.MenuHandler; import com.fr.design.fun.TableDataPaneProcessor; @@ -35,7 +51,6 @@ import com.fr.env.RemoteEnv; import com.fr.general.ComparatorUtils; import com.fr.general.GeneralContext; import com.fr.general.Inter; -import com.fr.general.VT4FR; import com.fr.plugin.context.PluginContext; import com.fr.plugin.context.PluginRuntime; import com.fr.plugin.manage.PluginFilter; @@ -48,8 +63,11 @@ import com.fr.stable.StringUtils; import javax.swing.*; import java.awt.*; -import java.util.*; +import java.util.ArrayList; +import java.util.Arrays; import java.util.List; +import java.util.Locale; +import java.util.Set; /** * @author richer @@ -61,12 +79,63 @@ import java.util.List; * 还有docking的状态的保存,下次打开设计器,也应该是这样的 */ public abstract class ToolBarMenuDock { + public static final int PANLE_HEIGNT = 26; + public static final ToolBarMenuDockPlus NULLAVOID = new ToolBarMenuDockPlus() { + + @Override + public ToolBarDef[] toolbars4Target() { + return new ToolBarDef[0]; + } + + + @Override + public ShortCut[] shortcut4FileMenu() { + return new ShortCut[0]; + } + + @Override + public MenuDef[] menus4Target() { + return new MenuDef[0]; + } + + @Override + public JPanel[] toolbarPanes4Form() { + return new JPanel[0]; + } + + public JComponent[] toolBarButton4Form() { + return new JComponent[0]; + } + + public JComponent toolBar4Authority() { + return new JPanel(); + } + + @Override + public int getMenuState() { + return DesignState.WORK_SHEET; + } + + public int getToolBarHeight() { + return PANLE_HEIGNT; + } + + /** + * 导出菜单的子菜单 ,目前用于图表设计器 + * + * @return 子菜单 + */ + public ShortCut[] shortcut4ExportMenu() { + return new ShortCut[0]; + } + + }; private static final String FINEREPORT = "FineReport"; private static final int MENUBAR_HEIGHT = 22; - public static final int PANLE_HEIGNT = 26; private MenuDef[] menus; private ToolBarDef toolBarDef; private List shortCutsList; + /** * 更新菜单 */ @@ -118,6 +187,10 @@ public abstract class ToolBarMenuDock { return jMenuBar; } + ////////////////////////////////////////////////////////////////////////////////////////// + ///////////////////////////////menu below///////////////////////////////////////////////// + ////////////////////////////////////////////////////////////////////////////////////////// + /** * 生成报表设计和表单设计的编辑区域 * @@ -127,10 +200,6 @@ public abstract class ToolBarMenuDock { return null; } - ////////////////////////////////////////////////////////////////////////////////////////// - ///////////////////////////////menu below///////////////////////////////////////////////// - ////////////////////////////////////////////////////////////////////////////////////////// - public MenuDef[] menus(final ToolBarMenuDockPlus plus) { java.util.List menuList = new java.util.ArrayList(); // 添加文件菜单 @@ -164,6 +233,7 @@ public abstract class ToolBarMenuDock { /** * 获取所有actionmodel + * * @param menuList */ private void addAllUpdateActionsToList(List menuList) { @@ -175,6 +245,7 @@ public abstract class ToolBarMenuDock { /** * 递归获取所有UpdateAction + * * @param menuDef */ private void addUpdateActionToList(MenuDef menuDef, int level) { @@ -195,11 +266,11 @@ public abstract class ToolBarMenuDock { } } - public void addCommunityMenuDef(java.util.List menuList){ + public void addCommunityMenuDef(java.util.List menuList) { Locale locale = FRContext.getLocale(); - Locale [] locales =supportCommunityLocales(); - for(int i = 0; i < locales.length; i++) { - if(locale.equals(locales[i])){ + Locale[] locales = supportCommunityLocales(); + for (int i = 0; i < locales.length; i++) { + if (locale.equals(locales[i])) { menuList.add(createCommunityMenuDef()); break; } @@ -218,13 +289,13 @@ public abstract class ToolBarMenuDock { // 给菜单加插件入口 for (MenuDef m : menuDefs) { switch (m.getAnchor()) { - case MenuHandler.TEMPLATE : + case MenuHandler.TEMPLATE: insertMenu(m, MenuHandler.TEMPLATE, new TemplateTargetAction(plus)); break; - case MenuHandler.INSERT : + case MenuHandler.INSERT: insertMenu(m, MenuHandler.INSERT); break; - case MenuHandler.CELL : + case MenuHandler.CELL: insertMenu(m, MenuHandler.CELL); break; default: @@ -271,7 +342,7 @@ public abstract class ToolBarMenuDock { addSwitchExistEnvAction(menuDef); - menuDef.addShortCut( new ExitDesignerAction()); + menuDef.addShortCut(new ExitDesignerAction()); insertMenu(menuDef, MenuHandler.FILE); return menuDef; @@ -293,7 +364,7 @@ public abstract class ToolBarMenuDock { menuDef.addShortCut(new SwitchExistEnv()); } - protected ShortCut openTemplateAction(){ + protected ShortCut openTemplateAction() { return new OpenTemplateAction(); } @@ -308,17 +379,15 @@ public abstract class ToolBarMenuDock { * 创建论坛登录面板, chart那边不需要 * * @return 面板组件 - * */ - public Component createBBSLoginPane(){ + public Component createBBSLoginPane() { return new UILabel(); } - public Component createAlphafinePane(){ + public Component createAlphafinePane() { return new UILabel(); } - protected MenuDef createServerMenuDef(ToolBarMenuDockPlus plus) { MenuDef menuDef = new MenuDef(Inter.getLocText("FR-Designer_M-Server"), 'S'); @@ -361,6 +430,7 @@ public abstract class ToolBarMenuDock { /** * 创建帮助子菜单 + * * @return 帮组菜单的子菜单 */ public ShortCut[] createHelpShortCuts() { @@ -372,25 +442,22 @@ public abstract class ToolBarMenuDock { shortCuts.add(new TutorialAction()); } shortCuts.add(SeparatorDef.DEFAULT); - //shortCuts.add(new TutorialAction()); shortCuts.add(SeparatorDef.DEFAULT); - if (ComparatorUtils.equals(ProductConstants.APP_NAME,FINEREPORT)) { - - // mod by anchore 16/11/17 去掉反馈 - //shortCuts.add(new FeedBackAction()); + if (ComparatorUtils.equals(ProductConstants.APP_NAME, FINEREPORT)) { shortCuts.add(SeparatorDef.DEFAULT); + } + if (AlphaFineConfigManager.isALPHALicAvailable()) { + shortCuts.add(new AlphaFineAction()); shortCuts.add(SeparatorDef.DEFAULT); - // shortCuts.add(new ForumAction()); } shortCuts.add(SeparatorDef.DEFAULT); - shortCuts.add(new AlphaFineAction()); - shortCuts.add(SeparatorDef.DEFAULT); shortCuts.add(new AboutAction()); return shortCuts.toArray(new ShortCut[shortCuts.size()]); } /** * 创建社区子菜单 + * * @return 社区菜单的子菜单 */ public ShortCut[] createCommunityShortCuts() { @@ -405,6 +472,7 @@ public abstract class ToolBarMenuDock { shortCuts.add(new SignAction()); return shortCuts.toArray(new ShortCut[shortCuts.size()]); } + public MenuDef createHelpMenuDef() { MenuDef menuDef = new MenuDef(Inter.getLocText("FR-Designer_Help"), 'H'); ShortCut[] otherHelpShortCuts = createHelpShortCuts(); @@ -414,6 +482,7 @@ public abstract class ToolBarMenuDock { insertMenu(menuDef, MenuHandler.HELP); return menuDef; } + public MenuDef createCommunityMenuDef() { MenuDef menuDef = new MenuDef(Inter.getLocText("FR-Designer_COMMUNITY"), 'C'); ShortCut[] otherCommunityShortCuts = createCommunityShortCuts(); @@ -423,6 +492,7 @@ public abstract class ToolBarMenuDock { insertMenu(menuDef, MenuHandler.BBS); return menuDef; } + /** * 生成工具栏 * @@ -460,7 +530,6 @@ public abstract class ToolBarMenuDock { } } - protected JPanel polyToolBar(String text) { JPanel panel = new JPanel(new BorderLayout()) { public Dimension getPreferredSize() { @@ -477,7 +546,6 @@ public abstract class ToolBarMenuDock { return panel; } - /** * 重置上面的工具栏 * @@ -488,7 +556,6 @@ public abstract class ToolBarMenuDock { return plus.toolBarButton4Form(); } - /** * 创建大的工具按钮 * @@ -507,62 +574,11 @@ public abstract class ToolBarMenuDock { return new UIButton[0]; } - protected void refreshLargeToolbarState() { } - public static final ToolBarMenuDockPlus NULLAVOID = new ToolBarMenuDockPlus() { - - @Override - public ToolBarDef[] toolbars4Target() { - return new ToolBarDef[0]; - } - - - @Override - public ShortCut[] shortcut4FileMenu() { - return new ShortCut[0]; - } - - @Override - public MenuDef[] menus4Target() { - return new MenuDef[0]; - } - - @Override - public JPanel[] toolbarPanes4Form() { - return new JPanel[0]; - } - - public JComponent[] toolBarButton4Form() { - return new JComponent[0]; - } - - public JComponent toolBar4Authority() { - return new JPanel(); - } - - @Override - public int getMenuState() { - return DesignState.WORK_SHEET; - } - public int getToolBarHeight(){ - return PANLE_HEIGNT; - } - - /** - * 导出菜单的子菜单 ,目前用于图表设计器 - * - * @return 子菜单 - */ - public ShortCut[] shortcut4ExportMenu(){ - return new ShortCut[0]; - } - - }; - - public NewTemplatePane getNewTemplatePane(){ + public NewTemplatePane getNewTemplatePane() { return new NewTemplatePane() { @Override public Icon getNew() { @@ -584,28 +600,28 @@ public abstract class ToolBarMenuDock { protected void insertMenu(MenuDef menuDef, String anchor) { insertMenu(menuDef, anchor, new NoTargetAction()); } - + protected void insertMenu(MenuDef menuDef, String anchor, ShortCutMethodAction action) { - + listenPluginMenuChange(menuDef, anchor, action); Set set = ExtraDesignClassManager.getInstance().getArray(MenuHandler.MARK_STRING); addExtraMenus(menuDef, anchor, action, set); - + } - + private void listenPluginMenuChange(final MenuDef menuDef, final String anchor, final ShortCutMethodAction action) { - + PluginFilter filter = new PluginFilter() { - + @Override public boolean accept(PluginContext context) { - + return context.contain(MenuHandler.MARK_STRING); } }; - + GeneralContext.listenPlugin(PluginEventType.BeforeStop, new PluginEventListener() { - + @Override public void on(PluginEvent event) { PluginRuntime runtime = event.getContext().getRuntime(); @@ -614,59 +630,59 @@ public abstract class ToolBarMenuDock { } }, filter); GeneralContext.listenPlugin(PluginEventType.AfterRun, new PluginEventListener() { - + @Override public void on(PluginEvent event) { - + PluginRuntime runtime = event.getContext().getRuntime(); Set menuHandlers = runtime.get(MenuHandler.MARK_STRING); addExtraMenus(menuDef, anchor, action, menuHandlers); } }, filter); } - + private void removeExtraMenus(MenuDef menuDef, String anchor, ShortCutMethodAction action, Set set) { - - + + List target = new ArrayList<>(); for (MenuHandler handler : set) { if (ComparatorUtils.equals(handler.category(), anchor)) { target.add(handler); } } - + for (MenuHandler handler : target) { int insertPosition = handler.insertPosition(menuDef.getShortCutCount()); if (insertPosition == MenuHandler.HIDE) { return; } ShortCut shortCut = action.methodAction(handler); - if (shortCut == null){ + if (shortCut == null) { continue; } menuDef.removeShortCut(shortCut); } } - + private void addExtraMenus(MenuDef menuDef, String anchor, ShortCutMethodAction action, Set set) { - + List target = new ArrayList<>(); for (MenuHandler handler : set) { if (ComparatorUtils.equals(handler.category(), anchor)) { target.add(handler); } } - + for (MenuHandler handler : target) { int insertPosition = handler.insertPosition(menuDef.getShortCutCount()); if (insertPosition == MenuHandler.HIDE) { return; } ShortCut shortCut = action.methodAction(handler); - if (shortCut == null){ + if (shortCut == null) { continue; } - + if (insertPosition == MenuHandler.LAST) { if (handler.insertSeparatorBefore()) { menuDef.addShortCut(SeparatorDef.DEFAULT); @@ -676,48 +692,47 @@ public abstract class ToolBarMenuDock { menuDef.insertShortCut(insertPosition, shortCut); if (handler.insertSeparatorBefore()) { menuDef.insertShortCut(insertPosition, SeparatorDef.DEFAULT); - insertPosition ++; + insertPosition++; } if (handler.insertSeparatorAfter()) { - insertPosition ++; + insertPosition++; menuDef.insertShortCut(insertPosition, SeparatorDef.DEFAULT); } } } } - + /** * 设计器退出时, 做的一些操作. - * */ - public void shutDown(){ + public void shutDown() { } - private interface ShortCutMethodAction{ + private interface ShortCutMethodAction { public ShortCut methodAction(MenuHandler handler); } - private abstract class AbstractShortCutMethodAction implements ShortCutMethodAction{ + private abstract class AbstractShortCutMethodAction implements ShortCutMethodAction { - public ShortCut methodAction(MenuHandler handler){ + public ShortCut methodAction(MenuHandler handler) { return handler.shortcut(); } } //不需要编辑对象的菜单, 比如文件, 服务器, 关于 - private class NoTargetAction extends AbstractShortCutMethodAction{ + private class NoTargetAction extends AbstractShortCutMethodAction { } //模板为对象的菜单, 比如模板, 后续如果单元格也要, 直接加个CellTargetAction即可. //在methodAction中做handler.shortcut(cell), 不需要修改handler中原有接口, 加个shortcut(cell). - private class TemplateTargetAction extends AbstractShortCutMethodAction{ + private class TemplateTargetAction extends AbstractShortCutMethodAction { private ToolBarMenuDockPlus plus; - public TemplateTargetAction(ToolBarMenuDockPlus plus){ + public TemplateTargetAction(ToolBarMenuDockPlus plus) { this.plus = plus; } From 365cf23f880dc86e25bf884ec44d81177d4d233f Mon Sep 17 00:00:00 2001 From: hzzz Date: Fri, 22 Sep 2017 12:37:00 +0800 Subject: [PATCH 051/125] =?UTF-8?q?=E5=9B=BE=E6=A0=87=E7=99=BD=E8=89=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../actions/cell/style/AlignmentAction.java | 207 ++++++++++-------- .../cell/style/ReportFontBoldAction.java | 140 ++++++------ .../cell/style/ReportFontItalicAction.java | 14 +- .../cell/style/ReportFontUnderlineAction.java | 13 +- .../fr/design/mainframe/ElementCasePane.java | 99 ++------- .../fr/design/gui/ibutton/UIToggleButton.java | 2 +- 6 files changed, 237 insertions(+), 238 deletions(-) diff --git a/designer/src/com/fr/design/actions/cell/style/AlignmentAction.java b/designer/src/com/fr/design/actions/cell/style/AlignmentAction.java index 326b47f650..c3b690c97e 100644 --- a/designer/src/com/fr/design/actions/cell/style/AlignmentAction.java +++ b/designer/src/com/fr/design/actions/cell/style/AlignmentAction.java @@ -1,111 +1,134 @@ package com.fr.design.actions.cell.style; -import javax.swing.Icon; - import com.fr.base.BaseUtils; import com.fr.base.Style; import com.fr.base.chart.BaseChartCollection; -import com.fr.design.constants.UIConstants; import com.fr.design.actions.ButtonGroupAction; import com.fr.design.actions.utils.ReportActionUtils; +import com.fr.design.constants.UIConstants; import com.fr.design.gui.ibutton.UIButtonGroup; -import com.fr.general.Inter; +import com.fr.design.gui.ibutton.UIToggleButton; import com.fr.design.mainframe.ElementCasePane; +import com.fr.general.Inter; import com.fr.grid.selection.FloatSelection; import com.fr.grid.selection.Selection; import com.fr.report.cell.FloatElement; import com.fr.report.elementcase.TemplateElementCase; +import com.fr.stable.Constants; + +import javax.swing.*; public class AlignmentAction extends ButtonGroupAction implements StyleActionInterface { - public AlignmentAction(ElementCasePane t, Icon[] iconArray, - Integer[] valueArray) { - super(t, iconArray, valueArray); - } - - - /** - * executeStyle - * - * @param style - * @param selectedStyle - * @return style - */ - public Style executeStyle(Style style, Style selectedStyle) { - return style.deriveHorizontalAlignment(getSelectedValue()); - } - - /** - * 更新Style - * - * @param style style - */ - public void updateStyle(Style style) { - setSelectedIndex(BaseUtils.getAlignment4Horizontal(style)); - } - - /** - * executeActionReturnUndoRecordNeeded - * - * @return - */ - public boolean executeActionReturnUndoRecordNeeded() { - ElementCasePane reportPane = this.getEditingComponent(); - if (reportPane == null) { - return false; - } - - return ReportActionUtils.executeAction(this, reportPane); - } - - /** - * update - */ - public void update() { - super.update(); - - //peter:如果当前没有ReportFrame,不需要继续. - if (!this.isEnabled()) { - return; - } - - //got simple cell element from row and column - ElementCasePane reportPane = this.getEditingComponent(); - if (reportPane == null) { - this.setEnabled(false); - return; - } - Selection cs = reportPane.getSelection(); - TemplateElementCase tplEC = reportPane.getEditingElementCase(); - - if (tplEC != null && cs instanceof FloatSelection) { - FloatElement selectedFloat = tplEC.getFloatElement(((FloatSelection) cs).getSelectedFloatName()); - Object value = selectedFloat.getValue(); - if (value instanceof BaseChartCollection) { - this.setEnabled(false); - return; - } - } - this.updateStyle(ReportActionUtils.getCurrentStyle(reportPane)); - } - - /** - * 创建工具条,且有提示 - * - * @return - */ - public UIButtonGroup createToolBarComponent() { - UIButtonGroup group = super.createToolBarComponent(); - if (group != null) { - group.setForToolBarButtonGroup(true); - group.setAllToolTips(new String[]{Inter.getLocText("StyleAlignment-Left"), Inter.getLocText("Center"), Inter.getLocText("StyleAlignment-Right")}); - } - for (int i = 0; i < 3; i++) { - group.getButton(i).setRoundBorder(true, UIConstants.ARC); - group.getButton(i).setBorderPainted(true); - } - return group; - } + private static final Icon[] normalBlackIcon = new Icon[]{ + BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/h_left_normal.png"), + BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/h_center_normal.png"), + BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/h_right_normal.png")}; + + private static final Icon[] toggleWhiteIcon = new Icon[]{ + BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/h_left_normal_white.png"), + BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/h_center_normal_white.png"), + BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/h_right_normal_white.png")}; + + private static final Integer[] valueArray = new Integer[]{Constants.LEFT, Constants.CENTER, Constants.RIGHT}; + + public AlignmentAction(ElementCasePane t) { + super(t, normalBlackIcon, valueArray); + } + + + /** + * executeStyle + * + * @param style + * @param selectedStyle + * @return style + */ + public Style executeStyle(Style style, Style selectedStyle) { + return style.deriveHorizontalAlignment(getSelectedValue()); + } + + /** + * 更新Style + * + * @param style style + */ + public void updateStyle(Style style) { + UIButtonGroup buttonGroup = createToolBarComponent(); + int selected = BaseUtils.getAlignment4Horizontal(style); + for (int i = 0; i < normalBlackIcon.length; i++) { + UIToggleButton button = buttonGroup.getButton(i); + Icon currentIcon = button.getIcon(); + Icon newIcon = selected == valueArray[i] ? toggleWhiteIcon[i] : normalBlackIcon[i]; + if (newIcon != currentIcon) { + button.setIcon(newIcon); + } + } + setSelectedIndex(selected); + } + + /** + * executeActionReturnUndoRecordNeeded + * + * @return + */ + public boolean executeActionReturnUndoRecordNeeded() { + ElementCasePane reportPane = this.getEditingComponent(); + if (reportPane == null) { + return false; + } + + return ReportActionUtils.executeAction(this, reportPane); + } + + /** + * update + */ + public void update() { + super.update(); + + //peter:如果当前没有ReportFrame,不需要继续. + if (!this.isEnabled()) { + return; + } + + //got simple cell element from row and column + ElementCasePane reportPane = this.getEditingComponent(); + if (reportPane == null) { + this.setEnabled(false); + return; + } + Selection cs = reportPane.getSelection(); + TemplateElementCase tplEC = reportPane.getEditingElementCase(); + + if (tplEC != null && cs instanceof FloatSelection) { + FloatElement selectedFloat = tplEC.getFloatElement(((FloatSelection) cs).getSelectedFloatName()); + Object value = selectedFloat.getValue(); + if (value instanceof BaseChartCollection) { + this.setEnabled(false); + return; + } + } + this.updateStyle(ReportActionUtils.getCurrentStyle(reportPane)); + } + + /** + * 创建工具条,且有提示 + * + * @return + */ + public UIButtonGroup createToolBarComponent() { + UIButtonGroup group = super.createToolBarComponent(); + if (group != null) { + group.setForToolBarButtonGroup(true); + group.setAllToolTips(new String[]{Inter.getLocText("StyleAlignment-Left"), Inter.getLocText("Center"), Inter.getLocText("StyleAlignment-Right")}); + } + for (int i = 0; i < 3; i++) { + group.getButton(i).setRoundBorder(true, UIConstants.ARC); + group.getButton(i).setBorderPainted(true); + } + return group; + } } \ No newline at end of file diff --git a/designer/src/com/fr/design/actions/cell/style/ReportFontBoldAction.java b/designer/src/com/fr/design/actions/cell/style/ReportFontBoldAction.java index 101d1f1f0d..0abe5ff4b2 100644 --- a/designer/src/com/fr/design/actions/cell/style/ReportFontBoldAction.java +++ b/designer/src/com/fr/design/actions/cell/style/ReportFontBoldAction.java @@ -8,84 +8,96 @@ import com.fr.base.Style; import com.fr.base.core.StyleUtils; import com.fr.design.actions.ToggleButtonUpdateAction; import com.fr.design.gui.ibutton.UIToggleButton; -import com.fr.general.FRFont; -import com.fr.general.Inter; import com.fr.design.mainframe.ElementCasePane; import com.fr.design.utils.gui.GUICoreUtils; +import com.fr.general.FRFont; +import com.fr.general.Inter; + +import javax.swing.*; /** * Bold. */ public class ReportFontBoldAction extends AbstractStyleAction implements ToggleButtonUpdateAction { - private UIToggleButton button; - protected Style style; + private UIToggleButton button; + protected Style style; + private final static Icon blackIcon = BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/bold.png"); + private final static Icon whiteIcon = BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/bold_white.png"); + + public ReportFontBoldAction(ElementCasePane t) { + super(t); - public ReportFontBoldAction(ElementCasePane t) { - super(t); + this.setName(Inter.getLocText("FRFont-bold")); + this.setSmallIcon(blackIcon); + } - this.setName(Inter.getLocText("FRFont-bold")); - this.setSmallIcon(BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/bold.png")); - } + /** + * 根据按钮状态获取格式 + * + * @param style + * @param defStyle + * @return + */ + @Override + public Style executeStyle(Style style, Style defStyle) { + button = createToolBarComponent(); + button.setIcon(getToggleButtonIcon(button.isSelected())); + button.setSelected(!button.isSelected()); + if (button.isSelected()) { + setSelectedFont(style); + button.setSelected(false); + } else { + setUnselectedFont(style); + button.setSelected(true); + } - /** - * 根据按钮状态获取格式 - * - * @param style - * @param defStyle - * @return - */ - @Override - public Style executeStyle(Style style, Style defStyle) { - createToolBarComponent().setSelected(!createToolBarComponent().isSelected()); - if (createToolBarComponent().isSelected()) { - setSelectedFont(style); - createToolBarComponent().setSelected(false); - } else { - setUnselectedFont(style); - createToolBarComponent().setSelected(true); - } + return this.style; + } - return this.style; - } + protected Icon getToggleButtonIcon(boolean isSelected) { + return isSelected ? blackIcon : whiteIcon; + } - protected void setSelectedFont(Style style) { - this.style = StyleUtils.boldReportFont(style); - } + protected void setSelectedFont(Style style) { + this.style = StyleUtils.boldReportFont(style); + } - protected void setUnselectedFont(Style style) { - this.style = StyleUtils.unBoldReportFont(style); - } + protected void setUnselectedFont(Style style) { + this.style = StyleUtils.unBoldReportFont(style); + } - /** - * Update Style. - */ - @Override - public void updateStyle(Style style) { - if (style == null) { - return; - } - FRFont frFont = style.getFRFont(); - if (frFont == null) { - return; - } - createToolBarComponent().setSelected(isStyle(frFont)); - } + /** + * Update Style. + */ + @Override + public void updateStyle(Style style) { + if (style == null) { + return; + } + FRFont frFont = style.getFRFont(); + if (frFont == null) { + return; + } + button = createToolBarComponent(); + button.setSelected(isStyle(frFont)); + button.setIcon(getToggleButtonIcon(!button.isSelected())); + } - protected boolean isStyle(FRFont frFont) { - return frFont.isBold(); - } + protected boolean isStyle(FRFont frFont) { + return frFont.isBold(); + } - /** - * Gets component on toolbar. - * - * @return the created components on toolbar. - */ - @Override - public UIToggleButton createToolBarComponent() { - if (button == null) { - button = GUICoreUtils.createToolBarComponent(this); - button.setEventBannded(true); - } - return button; - } + /** + * Gets component on toolbar. + * + * @return the created components on toolbar. + */ + @Override + public UIToggleButton createToolBarComponent() { + if (button == null) { + button = GUICoreUtils.createToolBarComponent(this); + button.setEventBannded(true); + } + return button; + } } \ No newline at end of file diff --git a/designer/src/com/fr/design/actions/cell/style/ReportFontItalicAction.java b/designer/src/com/fr/design/actions/cell/style/ReportFontItalicAction.java index 1e6c87a1aa..7857cefe8b 100644 --- a/designer/src/com/fr/design/actions/cell/style/ReportFontItalicAction.java +++ b/designer/src/com/fr/design/actions/cell/style/ReportFontItalicAction.java @@ -10,16 +10,21 @@ import com.fr.general.FRFont; import com.fr.general.Inter; import com.fr.design.mainframe.ElementCasePane; +import javax.swing.*; + /** * Bold. */ public class ReportFontItalicAction extends ReportFontBoldAction { - - public ReportFontItalicAction(ElementCasePane t) { + + private final static Icon blackIcon = BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/italic.png"); + private final static Icon whiteIcon = BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/italic_white.png"); + + public ReportFontItalicAction(ElementCasePane t) { super(t); this.setName(Inter.getLocText("FRFont-italic")); - this.setSmallIcon(BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/italic.png")); + this.setSmallIcon(blackIcon); } @@ -31,6 +36,9 @@ public class ReportFontItalicAction extends ReportFontBoldAction { this.style = StyleUtils.unItalicReportFont(style); } + protected Icon getToggleButtonIcon(boolean isSelected) { + return isSelected ? blackIcon : whiteIcon; + } protected boolean isStyle(FRFont frFont) { return frFont.isItalic(); diff --git a/designer/src/com/fr/design/actions/cell/style/ReportFontUnderlineAction.java b/designer/src/com/fr/design/actions/cell/style/ReportFontUnderlineAction.java index e79782abfb..96369867db 100644 --- a/designer/src/com/fr/design/actions/cell/style/ReportFontUnderlineAction.java +++ b/designer/src/com/fr/design/actions/cell/style/ReportFontUnderlineAction.java @@ -11,15 +11,21 @@ import com.fr.general.Inter; import com.fr.design.mainframe.ElementCasePane; import com.fr.stable.Constants; +import javax.swing.*; + /** * Bold. */ public class ReportFontUnderlineAction extends ReportFontBoldAction { - public ReportFontUnderlineAction(ElementCasePane t) { + + private final static Icon blackIcon = BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/underline.png"); + private final static Icon whiteIcon = BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/underline_white.png"); + + public ReportFontUnderlineAction(ElementCasePane t) { super(t); this.setName(Inter.getLocText("FRFont-Underline")); - this.setSmallIcon(BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/underline.png")); + this.setSmallIcon(blackIcon); } protected void setSelectedFont (Style style) { @@ -30,6 +36,9 @@ public class ReportFontUnderlineAction extends ReportFontBoldAction { this.style = StyleUtils.setReportFontUnderline(style, false); } + protected Icon getToggleButtonIcon(boolean isSelected) { + return isSelected ? blackIcon : whiteIcon; + } protected boolean isStyle(FRFont frFont) { return frFont.getUnderline() != Constants.LINE_NONE; diff --git a/designer/src/com/fr/design/mainframe/ElementCasePane.java b/designer/src/com/fr/design/mainframe/ElementCasePane.java index 1a6cf0ddae..0445b09877 100644 --- a/designer/src/com/fr/design/mainframe/ElementCasePane.java +++ b/designer/src/com/fr/design/mainframe/ElementCasePane.java @@ -3,34 +3,7 @@ */ package com.fr.design.mainframe; -import java.awt.AWTEvent; -import java.awt.Adjustable; -import java.awt.Dimension; -import java.awt.Image; -import java.awt.Rectangle; -import java.awt.datatransfer.Clipboard; -import java.awt.datatransfer.DataFlavor; -import java.awt.datatransfer.Transferable; -import java.awt.event.*; -import java.lang.reflect.Constructor; -import java.util.Set; - -import javax.swing.AbstractAction; -import javax.swing.ActionMap; -import javax.swing.Icon; -import javax.swing.InputMap; -import javax.swing.JComponent; -import javax.swing.JPanel; -import javax.swing.JPopupMenu; -import javax.swing.JScrollBar; -import javax.swing.KeyStroke; - -import com.fr.base.BaseUtils; -import com.fr.base.DynamicUnitList; -import com.fr.base.FRContext; -import com.fr.base.Formula; -import com.fr.base.ScreenResolution; -import com.fr.base.Style; +import com.fr.base.*; import com.fr.design.DesignState; import com.fr.design.DesignerEnvManager; import com.fr.design.ExtraDesignClassManager; @@ -39,30 +12,8 @@ import com.fr.design.actions.ExitAuthorityEditAction; import com.fr.design.actions.UpdateAction; import com.fr.design.actions.cell.BorderAction; import com.fr.design.actions.cell.CleanAuthorityAction; -import com.fr.design.actions.cell.style.AlignmentAction; -import com.fr.design.actions.cell.style.ReportFontBoldAction; -import com.fr.design.actions.cell.style.ReportFontForegroundAction; -import com.fr.design.actions.cell.style.ReportFontItalicAction; -import com.fr.design.actions.cell.style.ReportFontNameAction; -import com.fr.design.actions.cell.style.ReportFontSizeAction; -import com.fr.design.actions.cell.style.ReportFontUnderlineAction; -import com.fr.design.actions.cell.style.StyleBackgroundAction; -import com.fr.design.actions.columnrow.CancelColumnAction; -import com.fr.design.actions.columnrow.CancelRowAction; -import com.fr.design.actions.columnrow.ColumnHideAction; -import com.fr.design.actions.columnrow.ColumnWidthAction; -import com.fr.design.actions.columnrow.DeleteColumnAction; -import com.fr.design.actions.columnrow.DeleteRowAction; -import com.fr.design.actions.columnrow.FootColumnAction; -import com.fr.design.actions.columnrow.FootRowAction; -import com.fr.design.actions.columnrow.HeadColumnAction; -import com.fr.design.actions.columnrow.HeadRowAction; -import com.fr.design.actions.columnrow.InsertColumnAction; -import com.fr.design.actions.columnrow.InsertRowAction; -import com.fr.design.actions.columnrow.ResetColumnHideAction; -import com.fr.design.actions.columnrow.ResetRowHideAction; -import com.fr.design.actions.columnrow.RowHeightAction; -import com.fr.design.actions.columnrow.RowHideAction; +import com.fr.design.actions.cell.style.*; +import com.fr.design.actions.columnrow.*; import com.fr.design.actions.core.ActionFactory; import com.fr.design.actions.edit.CopyAction; import com.fr.design.actions.edit.CutAction; @@ -74,6 +25,7 @@ import com.fr.design.cell.clipboard.CellElementsClip; import com.fr.design.cell.clipboard.ElementsTransferable; import com.fr.design.cell.clipboard.FloatElementsClip; import com.fr.design.cell.editor.*; +import com.fr.design.cell.editor.CellEditor; import com.fr.design.constants.UIConstants; import com.fr.design.designer.EditingState; import com.fr.design.designer.TargetComponent; @@ -83,11 +35,7 @@ import com.fr.design.gui.ibutton.UIButton; import com.fr.design.gui.imenu.UIPopupMenu; import com.fr.design.mainframe.cell.QuickEditorRegion; import com.fr.design.mainframe.toolbar.ToolBarMenuDockPlus; -import com.fr.design.menu.KeySetUtils; -import com.fr.design.menu.MenuDef; -import com.fr.design.menu.NameSeparator; -import com.fr.design.menu.ShortCut; -import com.fr.design.menu.ToolBarDef; +import com.fr.design.menu.*; import com.fr.design.selection.QuickEditor; import com.fr.design.selection.Selectedable; import com.fr.design.selection.SelectionEvent; @@ -95,11 +43,7 @@ import com.fr.design.selection.SelectionListener; import com.fr.general.ComparatorUtils; import com.fr.general.FRLogger; import com.fr.general.Inter; -import com.fr.grid.Grid; -import com.fr.grid.GridColumn; -import com.fr.grid.GridCorner; -import com.fr.grid.GridRow; -import com.fr.grid.GridUtils; +import com.fr.grid.*; import com.fr.grid.dnd.ElementCasePaneDropTarget; import com.fr.grid.selection.CellSelection; import com.fr.grid.selection.Selection; @@ -119,9 +63,17 @@ import com.fr.report.elementcase.ElementCase; import com.fr.report.elementcase.TemplateElementCase; import com.fr.stable.ArrayUtils; import com.fr.stable.ColumnRow; -import com.fr.stable.Constants; import com.fr.stable.unit.FU; +import javax.swing.*; +import java.awt.*; +import java.awt.datatransfer.Clipboard; +import java.awt.datatransfer.DataFlavor; +import java.awt.datatransfer.Transferable; +import java.awt.event.*; +import java.lang.reflect.Constructor; +import java.util.Set; + import static com.fr.design.gui.syntax.ui.rtextarea.RTADefaultInputMap.DEFAULT_MODIFIER; /** @@ -186,7 +138,7 @@ public abstract class ElementCasePane extends Tar /** * Constructor. */ - public ElementCasePane(T t) { + public ElementCasePane(T t) { super(t); // marks:能触发processEvent,不管是否给component增加listener。这里是使在reportPane中的任意位置滑动鼠标轮都能 // 下拉grid。 @@ -209,7 +161,7 @@ public abstract class ElementCasePane extends Tar this.setLayout(new RGridLayout()); //todo 直接修改分辨率 - if (this.resolution == 0){ + if (this.resolution == 0) { this.resolution = ScreenResolution.getScreenResolution(); } @@ -243,7 +195,6 @@ public abstract class ElementCasePane extends Tar } - public int getMenuState() { return DesignState.WORK_SHEET; } @@ -294,8 +245,8 @@ public abstract class ElementCasePane extends Tar setFormatState(DesignerContext.FORMAT_STATE_NULL); formatBrush.setSelected(false); grid.setCursor(UIConstants.CELL_DEFAULT_CURSOR); - if(DesignerContext.getReferencedElementCasePane() == null){ - return; + if (DesignerContext.getReferencedElementCasePane() == null) { + return; } ((ElementCasePane) DesignerContext.getReferencedElementCasePane()).getGrid().setNotShowingTableSelectPane(true); @@ -348,11 +299,11 @@ public abstract class ElementCasePane extends Tar } - public void setResolution(int resolution){ + public void setResolution(int resolution) { this.resolution = resolution; } - public int getResolution(){ + public int getResolution() { return this.resolution; } @@ -1149,7 +1100,7 @@ public abstract class ElementCasePane extends Tar HeadColumnAction headcolumnAction = new HeadColumnAction(this); FootColumnAction footcolumnAction = new FootColumnAction(this); - ColumnRow selectedCellPoint = GridUtils.getAdjustEventColumnRow_withresolution(this, evt.getX(), evt.getY(),this.resolution); + ColumnRow selectedCellPoint = GridUtils.getAdjustEventColumnRow_withresolution(this, evt.getX(), evt.getY(), this.resolution); ElementCase elementCase = this.getEditingElementCase(); boolean cancel = false; ReportPageAttrProvider reportPageAttr = elementCase.getReportPageAttr(); @@ -1267,11 +1218,7 @@ public abstract class ElementCasePane extends Tar protected ToolBarDef createAlignmentToolBar() { return ShortCut.asToolBarDef(new ShortCut[]{ - new AlignmentAction(this, new Icon[]{ - BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/h_left_normal.png"), - BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/h_center_normal.png"), - BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/h_right_normal.png")}, - new Integer[]{Constants.LEFT, Constants.CENTER, Constants.RIGHT})} + new AlignmentAction(this)} ); } diff --git a/designer_base/src/com/fr/design/gui/ibutton/UIToggleButton.java b/designer_base/src/com/fr/design/gui/ibutton/UIToggleButton.java index 21c8bb419a..c51a72acdf 100644 --- a/designer_base/src/com/fr/design/gui/ibutton/UIToggleButton.java +++ b/designer_base/src/com/fr/design/gui/ibutton/UIToggleButton.java @@ -122,7 +122,7 @@ public class UIToggleButton extends UIButton implements GlobalNameObserver{ @Override public void mouseClicked(MouseEvent e) { if (isEnabled() && !isEventBannded) { - setSelectedWithFireListener(!isSelected()); + setSelectedWithFireListener(!isSelected()); } } }; From 6627a860f8e15c7b1fe46c92aae28c3ec3f312ec Mon Sep 17 00:00:00 2001 From: hzzz Date: Fri, 22 Sep 2017 12:37:05 +0800 Subject: [PATCH 052/125] =?UTF-8?q?=E5=9B=BE=E6=A0=87=E7=99=BD=E8=89=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/com/fr/design/images/m_format/.DS_Store | Bin 0 -> 6148 bytes .../design/images/m_format/cellstyle/.DS_Store | Bin 0 -> 8196 bytes .../images/m_format/cellstyle/bold_white.png | Bin 0 -> 235 bytes .../m_format/cellstyle/h_center_normal_white.png | Bin 0 -> 119 bytes .../m_format/cellstyle/h_left_normal_white.png | Bin 0 -> 128 bytes .../m_format/cellstyle/h_right_normal_white.png | Bin 0 -> 142 bytes .../images/m_format/cellstyle/italic_white.png | Bin 0 -> 158 bytes .../m_format/cellstyle/underline_white.png | Bin 0 -> 176 bytes 8 files changed, 0 insertions(+), 0 deletions(-) create mode 100644 designer_base/src/com/fr/design/images/m_format/.DS_Store create mode 100644 designer_base/src/com/fr/design/images/m_format/cellstyle/.DS_Store create mode 100644 designer_base/src/com/fr/design/images/m_format/cellstyle/bold_white.png create mode 100644 designer_base/src/com/fr/design/images/m_format/cellstyle/h_center_normal_white.png create mode 100644 designer_base/src/com/fr/design/images/m_format/cellstyle/h_left_normal_white.png create mode 100644 designer_base/src/com/fr/design/images/m_format/cellstyle/h_right_normal_white.png create mode 100644 designer_base/src/com/fr/design/images/m_format/cellstyle/italic_white.png create mode 100644 designer_base/src/com/fr/design/images/m_format/cellstyle/underline_white.png diff --git a/designer_base/src/com/fr/design/images/m_format/.DS_Store b/designer_base/src/com/fr/design/images/m_format/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..bf4865111dbb346a1de4da555831d48f400f975e GIT binary patch literal 6148 zcmeHK!A{#i5SJDj#hwMrJ_12hn5DrUNx>P8`%yKiXyo` z&<~)!7WyCX5k2-NdS_;LQ-MOS2&x%r_RY@D%-V0QT`vHL-YD(>cmUv_5;k0HZV?(M zos)+35DHzRgbGd|1r?3wqS*7^d zDHGby^ArPgT0e~5CTcwJmbUY(3X@C~y0)qDem}|LeB8@NSzPLPTikKh{OGr))pgu~ zw>+6_cH6SE)t$EGq_es4qAj~yFQ-%2S$V$k=ELVNUr)b%|8aKy^Fk+qz|U68GmA60 zMB^4(j)Njg^XwCj&N62ijLZNtzzjSf2J9B*EIy!T=0{})n1Q=tfc6K8O6Xgx4eG4} z8~S~u@g^Y&+H{v7loox9wLu&~5hfMUqzZe*5GEb{(#H7~Yl9{ogq|7e*qMdBp$I)Y z`lSvB;Tz{8Y_X2qrN$HMY`Lpy1TigECNMN(`mpc%E=~*wolcTMZ|r;iSyS z%2X&yMh7mD?xa#}<2fo26=*8JwR@K)R8U4UyMCW!#RShdonGL0`a>G7h)#C>$8=3g zT2V=JKeqJ^so1r!Lz<#*E{F}i!l)}+;O|Rw*ZKv)^5ARDgJbwQr}uP0TQHRVvDKp* zYE(l7j;=m6coyRAoHp{Xx84 z;<~_k!k&0Fmw2}s?tx*8wb0+2BfHsq?e8ryZ1;Wu=3LgRjl@9?AHCy9+}g;Y2YEOi zkjqXy4C&*auT7i>4$H{H5||MVPhWWS?B*dE$@$?h3~CGkUhul_aP)+uM3k(9d_bf- zc>NZ?@BtohoI4B%satGq&2`H4|Lgs~|KH+>kt!+>6}W2(sLuJ@^D}s5YU_r7Tx%yd z-r?ZJ{VHt*f|Hcvuu_i0?*3tj>jYgHlNwuTi#uq4{f7X2O_PD+{y+U)VexkxXQzq# JKmFVL|4%AqyZrzF literal 0 HcmV?d00001 diff --git a/designer_base/src/com/fr/design/images/m_format/cellstyle/bold_white.png b/designer_base/src/com/fr/design/images/m_format/cellstyle/bold_white.png new file mode 100644 index 0000000000000000000000000000000000000000..f10c6bef134a73de2e0380c969788d90f2b1a2f7 GIT binary patch literal 235 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|mU_B4hFAzD zCrH#iuvh!RC}PEXr0+(}=?*=POZ|FmPwQDO9qQ@nsh{|C<^;jM*p7XlL)bpm)cZ57IRrY~|gz_Y|q;=gy}Pa*il%;gB`7j5Y@C?(K3;E6KhVJpp00i_>zopr0O2oD`v3p{ literal 0 HcmV?d00001 diff --git a/designer_base/src/com/fr/design/images/m_format/cellstyle/h_center_normal_white.png b/designer_base/src/com/fr/design/images/m_format/cellstyle/h_center_normal_white.png new file mode 100644 index 0000000000000000000000000000000000000000..2f7432769b62e696e9e0dcb5435310f779d377b0 GIT binary patch literal 119 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|3_V>OLo5W7 z6C^%02tH~4@8HnqFVWZ_Q>#%G;G=L&HDsgYv!06v2?-Ls%n?}&8rT>vHA=9rHPHbP0l+XkK(VHPU literal 0 HcmV?d00001 diff --git a/designer_base/src/com/fr/design/images/m_format/cellstyle/h_left_normal_white.png b/designer_base/src/com/fr/design/images/m_format/cellstyle/h_left_normal_white.png new file mode 100644 index 0000000000000000000000000000000000000000..94a2be8dc23a2d9b565ec594da58c405fde6f30f GIT binary patch literal 128 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|tUO&DLo5W7 z6C^%02tH~4@8HnqFVWZ_Q>#(sQN$RU@OxQZ3ddc;OXk;vd$@?2>?lwCcOXv literal 0 HcmV?d00001 diff --git a/designer_base/src/com/fr/design/images/m_format/cellstyle/h_right_normal_white.png b/designer_base/src/com/fr/design/images/m_format/cellstyle/h_right_normal_white.png new file mode 100644 index 0000000000000000000000000000000000000000..e8d21e9d0650b8156d9b892c6440fa62edb8be98 GIT binary patch literal 142 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|JUm?-Lo5W7 z6C^%02tH~4@8HnqFVWZ_Q>#(6VV1+1?iJ6Ol5$-NttU9!iZ7V$0~09M{2J4cXS7jo hQ5W|GUG6QRt8U3KbLh*2~7Y85HxlG literal 0 HcmV?d00001 From 66cebb04cb0161bf388be0c61aa0d9ae38bfb9bb Mon Sep 17 00:00:00 2001 From: hzzz Date: Fri, 22 Sep 2017 12:37:17 +0800 Subject: [PATCH 053/125] tmp --- .../src/com/fr/design/images/m_format/.DS_Store | Bin 6148 -> 0 bytes .../design/images/m_format/cellstyle/.DS_Store | Bin 8196 -> 0 bytes 2 files changed, 0 insertions(+), 0 deletions(-) delete mode 100644 designer_base/src/com/fr/design/images/m_format/.DS_Store delete mode 100644 designer_base/src/com/fr/design/images/m_format/cellstyle/.DS_Store diff --git a/designer_base/src/com/fr/design/images/m_format/.DS_Store b/designer_base/src/com/fr/design/images/m_format/.DS_Store deleted file mode 100644 index bf4865111dbb346a1de4da555831d48f400f975e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6148 zcmeHK!A{#i5SJDj#hwMrJ_12hn5DrUNx>P8`%yKiXyo` z&<~)!7WyCX5k2-NdS_;LQ-MOS2&x%r_RY@D%-V0QT`vHL-YD(>cmUv_5;k0HZV?(M zos)+35DHzRgbGd|1r?3wqS*7^d zDHGby^ArPgT0e~5CTcwJmbUY(3X@C~y0)qDem}|LeB8@NSzPLPTikKh{OGr))pgu~ zw>+6_cH6SE)t$EGq_es4qAj~yFQ-%2S$V$k=ELVNUr)b%|8aKy^Fk+qz|U68GmA60 zMB^4(j)Njg^XwCj&N62ijLZNtzzjSf2J9B*EIy!T=0{})n1Q=tfc6K8O6Xgx4eG4} z8~S~u@g^Y&+H{v7loox9wLu&~5hfMUqzZe*5GEb{(#H7~Yl9{ogq|7e*qMdBp$I)Y z`lSvB;Tz{8Y_X2qrN$HMY`Lpy1TigECNMN(`mpc%E=~*wolcTMZ|r;iSyS z%2X&yMh7mD?xa#}<2fo26=*8JwR@K)R8U4UyMCW!#RShdonGL0`a>G7h)#C>$8=3g zT2V=JKeqJ^so1r!Lz<#*E{F}i!l)}+;O|Rw*ZKv)^5ARDgJbwQr}uP0TQHRVvDKp* zYE(l7j;=m6coyRAoHp{Xx84 z;<~_k!k&0Fmw2}s?tx*8wb0+2BfHsq?e8ryZ1;Wu=3LgRjl@9?AHCy9+}g;Y2YEOi zkjqXy4C&*auT7i>4$H{H5||MVPhWWS?B*dE$@$?h3~CGkUhul_aP)+uM3k(9d_bf- zc>NZ?@BtohoI4B%satGq&2`H4|Lgs~|KH+>kt!+>6}W2(sLuJ@^D}s5YU_r7Tx%yd z-r?ZJ{VHt*f|Hcvuu_i0?*3tj>jYgHlNwuTi#uq4{f7X2O_PD+{y+U)VexkxXQzq# JKmFVL|4%AqyZrzF From 3fc4230154b8a75f1559b25d8fa9491e175746c3 Mon Sep 17 00:00:00 2001 From: XiaXiang Date: Fri, 22 Sep 2017 12:42:34 +0800 Subject: [PATCH 054/125] rt --- designer_base/src/com/fr/design/mainframe/DesignerFrame.java | 2 -- 1 file changed, 2 deletions(-) diff --git a/designer_base/src/com/fr/design/mainframe/DesignerFrame.java b/designer_base/src/com/fr/design/mainframe/DesignerFrame.java index df92a6bf09..b456b0a1ad 100644 --- a/designer_base/src/com/fr/design/mainframe/DesignerFrame.java +++ b/designer_base/src/com/fr/design/mainframe/DesignerFrame.java @@ -6,7 +6,6 @@ package com.fr.design.mainframe; import com.fr.base.BaseUtils; import com.fr.base.Env; import com.fr.base.FRContext; -import com.fr.base.FRCoreContext; import com.fr.design.DesignModelAdapter; import com.fr.design.DesignState; import com.fr.design.DesignerEnvManager; @@ -43,7 +42,6 @@ import com.fr.general.ComparatorUtils; import com.fr.general.FRLogger; import com.fr.general.GeneralContext; import com.fr.general.Inter; -import com.fr.general.VT4FR; import com.fr.plugin.context.PluginContext; import com.fr.plugin.injectable.PluginModule; import com.fr.plugin.manage.PluginFilter; From 83061d0ba2a44e084dcbbf8a92c4da9a257fc006 Mon Sep 17 00:00:00 2001 From: XiaXiang Date: Fri, 22 Sep 2017 12:43:14 +0800 Subject: [PATCH 055/125] rt --- .../alphafine/AlphaFineConfigManager.java | 48 ++++++------------- 1 file changed, 15 insertions(+), 33 deletions(-) diff --git a/designer_base/src/com/fr/design/actions/help/alphafine/AlphaFineConfigManager.java b/designer_base/src/com/fr/design/actions/help/alphafine/AlphaFineConfigManager.java index b335bbad03..8d58ce4578 100644 --- a/designer_base/src/com/fr/design/actions/help/alphafine/AlphaFineConfigManager.java +++ b/designer_base/src/com/fr/design/actions/help/alphafine/AlphaFineConfigManager.java @@ -16,79 +16,68 @@ import javax.swing.*; */ public class AlphaFineConfigManager implements XMLable { + private static AlphaFineConfigManager alphaFineConfigManager = new AlphaFineConfigManager(); /** * 是否开启alphafine */ private boolean isEnabled = true; - /** * 是否联网搜索 */ private boolean isSearchOnLine = true; /** - * 快捷键设置 + * 搜索范围 */ - private String shortcuts; - /** - * 搜索范围 + * 快捷键设置 */ - + private String shortcuts; /** * 猜您需要 */ private boolean isContainRecommend = true; - /** * 设置 */ private boolean isContainAction = true; - /** * 帮助文档 */ private boolean isContainDocument = true; - /** * 模板 */ private boolean isContainTemplate = true; - /** * 模板内容 */ private boolean isContainFileContent; - /** * 应用中心 */ private boolean isContainPlugin = true; - /** * 快捷键 */ private KeyStroke shortCutKeyStore; - /** * 是否提醒 */ private boolean isNeedRemind = true; - /** * 直接操作菜单次数 */ private int operateCount; - - - - private static AlphaFineConfigManager alphaFineConfigManager = new AlphaFineConfigManager(); - public static AlphaFineConfigManager getInstance() { return alphaFineConfigManager; } + public static boolean isALPHALicAvailable() { + return FRContext.getCurrentEnv() != null && VT4FR.isLicAvailable(FRCoreContext.getBytes()) && VT4FR.ALPHA_FINE.support(); + } + @Override public Object clone() throws CloneNotSupportedException { AlphaFineConfigManager manager = (AlphaFineConfigManager) super.clone(); @@ -131,8 +120,6 @@ public class AlphaFineConfigManager implements XMLable { writer.end(); } - - public boolean isSearchOnLine() { return isSearchOnLine; } @@ -148,20 +135,20 @@ public class AlphaFineConfigManager implements XMLable { return shortcuts; } + public void setShortcuts(String shortcuts) { + this.shortcuts = shortcuts; + this.shortCutKeyStore = convert2KeyStroke(this.shortcuts); + } + /** * 返回默认快捷键 + * * @return */ private String getDefaultShortCuts() { - return OperatingSystem.isMacOS()? "meta + D" : "ctrl + D"; + return OperatingSystem.isMacOS() ? "meta + D" : "ctrl + D"; } - public void setShortcuts(String shortcuts) { - this.shortcuts = shortcuts; - this.shortCutKeyStore = convert2KeyStroke(this.shortcuts); - } - - public boolean isContainAction() { return isContainAction; } @@ -248,9 +235,4 @@ public class AlphaFineConfigManager implements XMLable { public void setOperateCount(int operateCount) { this.operateCount = operateCount; } - - - public static boolean isALPHALicAvailable() { - return FRContext.getCurrentEnv() != null && VT4FR.isLicAvailable(FRCoreContext.getBytes()) && VT4FR.ALPHA_FINE.support(); - } } From 716f2a8b25bbb03ab8589cd5c45af27e7c726be8 Mon Sep 17 00:00:00 2001 From: vito Date: Fri, 22 Sep 2017 15:35:32 +0800 Subject: [PATCH 056/125] =?UTF-8?q?REPORT-3686=20=E8=BF=9C=E7=A8=8B?= =?UTF-8?q?=E8=AE=BE=E8=AE=A1=E8=AF=B7=E6=B1=82=E6=B2=A1=E6=9C=89=E6=9D=83?= =?UTF-8?q?=E9=99=90=E6=8E=A7=E5=88=B6=202/2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- designer_base/src/com/fr/env/RemoteEnv.java | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/designer_base/src/com/fr/env/RemoteEnv.java b/designer_base/src/com/fr/env/RemoteEnv.java index 41e4860d2b..2188b322b0 100644 --- a/designer_base/src/com/fr/env/RemoteEnv.java +++ b/designer_base/src/com/fr/env/RemoteEnv.java @@ -175,12 +175,8 @@ public class RemoteEnv extends AbstractEnv { * 根据nameValuePairs,也就是参数对,生成PostMethod,不同之处在于,参数拼在path后面,不是method.addParameters */ private HttpClient createHttpMethod2(HashMap para) throws EnvException { - StringBuilder sb = new StringBuilder(path); - - sb.append('?'); - sb.append("id=").append(createUserID()); - - return new HttpClient(sb.toString(), para, true); + String methodPath = path + '?' + "id=" + createUserID(); + return new HttpClient(methodPath, para, true); } @@ -362,7 +358,7 @@ public class RemoteEnv extends AbstractEnv { Inter.getLocText(new String[]{"Datasource-Connection_failed", "Registration-User_Name", "Password", "Error"}, new String[]{",", "", "", "!"}) , Inter.getLocText("FR-Server-All_Error"), JOptionPane.ERROR_MESSAGE); return false; - } else if (res.indexOf("RegistEditionException") != -1) { + } else if (res.contains("RegistEditionException")) { if (needMessage) { JOptionPane.showMessageDialog(parentComponent, Inter.getLocText(new String[]{"Datasource-Connection_failed", "Version-does-not-support"}, new String[]{",", "!"})); } else { @@ -415,9 +411,8 @@ public class RemoteEnv extends AbstractEnv { para.put("op", "fr_remote_design"); para.put("cmd", "heart_beat"); para.put("user", user); - para.put("userid", userID); - HttpClient client = createHttpMethod(para, true); + HttpClient client = createHttpMethod(para); execute4InputStream(client); //这做法不好, 30秒刷一次, 刷新的时候会重新构建树, 构建完会把子节点都收缩起来, 效果太差. @@ -552,7 +547,7 @@ public class RemoteEnv extends AbstractEnv { if (resJSON == null) { return false; } - if (resJSON.indexOf("RegistEditionException") != -1) { + if (resJSON.contains("RegistEditionException")) { JOptionPane.showMessageDialog(null, Inter.getLocText("FR-Lic_does_not_Support_Remote")); return false; } From fb3d56a3125a1fdb35ac1cbabce3220a491e165e Mon Sep 17 00:00:00 2001 From: plough Date: Fri, 22 Sep 2017 16:28:20 +0800 Subject: [PATCH 057/125] =?UTF-8?q?REPORT-4688=20[9.0=E4=BA=8C=E8=BD=AE?= =?UTF-8?q?=E5=9B=9E=E5=BD=92]=E6=96=B0=E5=BB=BAsheet2=EF=BC=8C=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=E6=82=AC=E6=B5=AE=E5=85=83=E7=B4=A0=EF=BC=8C=E6=92=A4?= =?UTF-8?q?=E9=94=80=E4=B8=80=E6=AC=A1=E6=93=8D=E4=BD=9C=E5=90=8Esheet2?= =?UTF-8?q?=E8=A2=AB=E6=95=B4=E4=B8=AA=E5=88=A0=E9=99=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fr/design/mainframe/ElementCasePaneDelegate.java | 3 +++ .../src/com/fr/design/mainframe/ReportFloatPane.java | 11 +++++++++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/designer/src/com/fr/design/mainframe/ElementCasePaneDelegate.java b/designer/src/com/fr/design/mainframe/ElementCasePaneDelegate.java index b358b53024..bbc87fa78c 100644 --- a/designer/src/com/fr/design/mainframe/ElementCasePaneDelegate.java +++ b/designer/src/com/fr/design/mainframe/ElementCasePaneDelegate.java @@ -176,6 +176,9 @@ public class ElementCasePaneDelegate extends ElementCasePane { for (int i = 0; i < actions.length; i++) { subMenuDef.addShortCut(actions[i]); } + + // 顺便更新右侧属性面板悬浮元素tab中的菜单项 + ReportFloatPane.getInstance().refreshInsertFloatMenu(this); } // 格式菜单 diff --git a/designer/src/com/fr/design/mainframe/ReportFloatPane.java b/designer/src/com/fr/design/mainframe/ReportFloatPane.java index 9f579f4f96..8207c9db0f 100644 --- a/designer/src/com/fr/design/mainframe/ReportFloatPane.java +++ b/designer/src/com/fr/design/mainframe/ReportFloatPane.java @@ -23,7 +23,6 @@ import java.awt.*; public class ReportFloatPane extends JPanel { private static ReportFloatPane THIS; - private ElementCasePaneDelegate elementCasePaneDelegate; private MenuDef insertFloatMenu; private ReportFloatPane() { @@ -37,6 +36,14 @@ public class ReportFloatPane extends JPanel { return THIS; } + public void refreshInsertFloatMenu(ElementCasePaneDelegate elementCasePaneDelegate) { + UpdateAction[] actions = ActionFactory.createFloatInsertAction(ElementCasePane.class, elementCasePaneDelegate); + insertFloatMenu.clearShortCuts(); + for (int i = 0; i < actions.length; i++) { + insertFloatMenu.addShortCut(actions[i]); + } + } + private void initComponent() { this.setLayout(new BorderLayout()); @@ -72,7 +79,7 @@ public class ReportFloatPane extends JPanel { insertFloatMenu.setTooltip(Inter.getLocText("FR-Designer_T_Insert_Float")); insertFloatMenu.setIconPath("com/fr/design/images/control/addPopup.png"); JTemplate editingTemplate = HistoryTemplateListPane.getInstance().getCurrentEditingTemplate(); - elementCasePaneDelegate = (ElementCasePaneDelegate) editingTemplate.getCurrentElementCasePane(); + ElementCasePaneDelegate elementCasePaneDelegate = (ElementCasePaneDelegate) editingTemplate.getCurrentElementCasePane(); UpdateAction[] actions = ActionFactory.createFloatInsertAction(ElementCasePane.class, elementCasePaneDelegate); for (int i = 0; i < actions.length; i++) { insertFloatMenu.addShortCut(actions[i]); From 75805ca67962f1197b716a716479afccfe71042c Mon Sep 17 00:00:00 2001 From: plough Date: Fri, 22 Sep 2017 16:36:52 +0800 Subject: [PATCH 058/125] =?UTF-8?q?REPORT-4688=20=E8=B0=83=E6=95=B4?= =?UTF-8?q?=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/fr/design/mainframe/ReportFloatPane.java | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/designer/src/com/fr/design/mainframe/ReportFloatPane.java b/designer/src/com/fr/design/mainframe/ReportFloatPane.java index 8207c9db0f..e759600426 100644 --- a/designer/src/com/fr/design/mainframe/ReportFloatPane.java +++ b/designer/src/com/fr/design/mainframe/ReportFloatPane.java @@ -37,8 +37,8 @@ public class ReportFloatPane extends JPanel { } public void refreshInsertFloatMenu(ElementCasePaneDelegate elementCasePaneDelegate) { - UpdateAction[] actions = ActionFactory.createFloatInsertAction(ElementCasePane.class, elementCasePaneDelegate); insertFloatMenu.clearShortCuts(); + UpdateAction[] actions = ActionFactory.createFloatInsertAction(ElementCasePane.class, elementCasePaneDelegate); for (int i = 0; i < actions.length; i++) { insertFloatMenu.addShortCut(actions[i]); } @@ -49,7 +49,7 @@ public class ReportFloatPane extends JPanel { UIToolbar topToolBar = new UIToolbar(); topToolBar.setLayout(new BorderLayout()); - insertFloatMenu = createInsertToolBar(); + initInsertToolBar(); topToolBar.setPreferredSize(new Dimension(155,20)); topToolBar.add(createButtonUI(), BorderLayout.CENTER); topToolBar.setBorder(BorderFactory.createEmptyBorder(-1, -1, -1, -1)); @@ -73,19 +73,14 @@ public class ReportFloatPane extends JPanel { this.add(leftTopPane, BorderLayout.NORTH); } - private MenuDef createInsertToolBar() { - MenuDef insertFloatMenu = new MenuDef(true); + private void initInsertToolBar() { + insertFloatMenu = new MenuDef(true); insertFloatMenu.setName(KeySetUtils.INSERT_FLOAT.getMenuKeySetName()); insertFloatMenu.setTooltip(Inter.getLocText("FR-Designer_T_Insert_Float")); insertFloatMenu.setIconPath("com/fr/design/images/control/addPopup.png"); JTemplate editingTemplate = HistoryTemplateListPane.getInstance().getCurrentEditingTemplate(); ElementCasePaneDelegate elementCasePaneDelegate = (ElementCasePaneDelegate) editingTemplate.getCurrentElementCasePane(); - UpdateAction[] actions = ActionFactory.createFloatInsertAction(ElementCasePane.class, elementCasePaneDelegate); - for (int i = 0; i < actions.length; i++) { - insertFloatMenu.addShortCut(actions[i]); - } - return insertFloatMenu; - + refreshInsertFloatMenu(elementCasePaneDelegate); } private UIButton createButtonUI() { From 9fce24b6c9b5218daddb802d6f9a48714a373603 Mon Sep 17 00:00:00 2001 From: kerry Date: Fri, 22 Sep 2017 17:22:53 +0800 Subject: [PATCH 059/125] =?UTF-8?q?REPORT-4781=20=E5=BC=B9=E5=87=BA?= =?UTF-8?q?=E6=8E=A7=E4=BB=B6=E6=8C=89=E9=92=AE=E8=A7=86=E8=A7=89=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../accessibles/BaseAccessibleEditor.java | 30 ++++++++++++++++--- 1 file changed, 26 insertions(+), 4 deletions(-) diff --git a/designer_base/src/com/fr/design/mainframe/widget/accessibles/BaseAccessibleEditor.java b/designer_base/src/com/fr/design/mainframe/widget/accessibles/BaseAccessibleEditor.java index ec6d4405ed..e0d134ad6c 100644 --- a/designer_base/src/com/fr/design/mainframe/widget/accessibles/BaseAccessibleEditor.java +++ b/designer_base/src/com/fr/design/mainframe/widget/accessibles/BaseAccessibleEditor.java @@ -4,29 +4,31 @@ import java.awt.BorderLayout; import java.awt.Color; import java.awt.Component; import java.awt.Dimension; +import java.awt.Graphics2D; import java.awt.Insets; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.util.ArrayList; - +import javax.swing.AbstractButton; import javax.swing.BorderFactory; - +import com.fr.design.constants.UIConstants; import com.fr.design.event.UIObserverListener; import com.fr.design.gui.ibutton.UIButton; - import javax.swing.JComponent; import javax.swing.JOptionPane; import javax.swing.event.ChangeEvent; import javax.swing.event.ChangeListener; - +import javax.swing.plaf.ButtonUI; import com.fr.base.BaseUtils; import com.fr.design.Exception.ValidationException; +import com.fr.design.gui.ibutton.UIButtonUI; import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.mainframe.widget.editors.ITextComponent; import com.fr.design.mainframe.widget.editors.TextField; import com.fr.design.dialog.BasicPane; import com.fr.design.designer.properties.Decoder; import com.fr.design.designer.properties.Encoder; +import com.fr.design.utils.gui.GUIPaintUtils; /** * @since 6.5.3 @@ -89,6 +91,26 @@ public class BaseAccessibleEditor extends BasicPane implements AccessibleEditor public boolean shouldResponseChangeListener() { return false; } + @Override + public ButtonUI getUI() { + return new UIButtonUI() { + @Override + protected boolean isPressed(AbstractButton b) { + return model.isArmed() && model.isPressed(); + } + + @Override + protected void doExtraPainting(UIButton b, Graphics2D g2d, int w, int h, String selectedRoles) { + if (isPressed(b) && b.isPressedPainted()) { + GUIPaintUtils.fillPressed(g2d, 0, 0, w, h, b.isRoundBorder(), b.getRectDirection(), b.isDoneAuthorityEdited(selectedRoles), UIConstants.COMBOBOX_BTN_PRESS); + } else if (isRollOver(b)) { + GUIPaintUtils.fillRollOver(g2d, 0, 0, w, h, b.isRoundBorder(), b.getRectDirection(), b.isDoneAuthorityEdited(selectedRoles), b.isPressedPainted(), UIConstants.COMBOBOX_BTN_ROLLOVER); + } else if (b.isNormalPainted()) { + GUIPaintUtils.fillNormal(g2d, 0, 0, w, h, b.isRoundBorder(), b.getRectDirection(), b.isDoneAuthorityEdited(selectedRoles), b.isPressedPainted(), UIConstants.COMBOBOX_BTN_NORMAL); + } + } + }; + } }; initPopupButton(); btPopup.addActionListener(new ActionListener() { From 5e595038843abbeadbcbe180d37535ae15eee7e7 Mon Sep 17 00:00:00 2001 From: XiaXiang Date: Sat, 23 Sep 2017 00:12:10 +0800 Subject: [PATCH 060/125] =?UTF-8?q?=E6=A0=BC=E5=BC=8F=E5=8C=96=E4=BB=A3?= =?UTF-8?q?=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mainframe/alphafine/AlphaFineHelper.java | 1 - .../alphafine/cell/model/ActionModel.java | 11 +-- .../alphafine/component/AlphaFineDialog.java | 76 ++++++++++--------- .../alphafine/component/AlphaFinePane.java | 3 +- .../search/manager/FileSearchManager.java | 7 +- .../search/manager/RecentSearchManager.java | 29 +++++-- .../toolbar/UpdateActionManager.java | 12 +++ 7 files changed, 87 insertions(+), 52 deletions(-) diff --git a/designer/src/com/fr/design/mainframe/alphafine/AlphaFineHelper.java b/designer/src/com/fr/design/mainframe/alphafine/AlphaFineHelper.java index 178c6d7e31..012f5e8727 100644 --- a/designer/src/com/fr/design/mainframe/alphafine/AlphaFineHelper.java +++ b/designer/src/com/fr/design/mainframe/alphafine/AlphaFineHelper.java @@ -19,7 +19,6 @@ import java.util.List; * Created by XiaXiang on 2017/5/8. */ public class AlphaFineHelper { - public static final NoResultModel NO_RESULT_MODEL = new NoResultModel(Inter.getLocText("FR-Designer_AlphaFine_NoResult")); public static final NoResultModel NO_CONNECTION_MODEL = new NoResultModel(Inter.getLocText("FR-Designer_ConnectionFailed")); private static AlphaFineDialog alphaFineDialog; diff --git a/designer/src/com/fr/design/mainframe/alphafine/cell/model/ActionModel.java b/designer/src/com/fr/design/mainframe/alphafine/cell/model/ActionModel.java index 8e2ccd9a79..cf703d8795 100644 --- a/designer/src/com/fr/design/mainframe/alphafine/cell/model/ActionModel.java +++ b/designer/src/com/fr/design/mainframe/alphafine/cell/model/ActionModel.java @@ -1,5 +1,6 @@ package com.fr.design.mainframe.alphafine.cell.model; +import com.fr.design.actions.UpdateAction; import com.fr.design.mainframe.alphafine.CellType; import com.fr.general.FRLogger; import com.fr.json.JSONException; @@ -11,15 +12,15 @@ import javax.swing.*; * Created by XiaXiang on 2017/4/20. */ public class ActionModel extends AlphaCellModel { - private Action action; + private UpdateAction action; - public ActionModel(String name, String description, Action action, int searchCount) { + public ActionModel(String name, String description, UpdateAction action, int searchCount) { this(name, description, action); setSearchCount(searchCount); } - public ActionModel(String name, String description, Action action) { + public ActionModel(String name, String description, UpdateAction action) { super(name, null, CellType.ACTION); this.action = action; this.setDescription(description); @@ -43,11 +44,11 @@ public class ActionModel extends AlphaCellModel { return action != null ? action.hashCode() : 0; } - public Action getAction() { + public UpdateAction getAction() { return action; } - public void setAction(Action action) { + public void setAction(UpdateAction action) { this.action = action; } diff --git a/designer/src/com/fr/design/mainframe/alphafine/component/AlphaFineDialog.java b/designer/src/com/fr/design/mainframe/alphafine/component/AlphaFineDialog.java index e973c6a422..e712edb478 100644 --- a/designer/src/com/fr/design/mainframe/alphafine/component/AlphaFineDialog.java +++ b/designer/src/com/fr/design/mainframe/alphafine/component/AlphaFineDialog.java @@ -367,7 +367,6 @@ public class AlphaFineDialog extends UIDialog { * 停止加载状态 */ private void fireStopLoading() { - searchListModel.resetState(); if (searchResultPane != null) { removeLeftPane(); } @@ -665,25 +664,18 @@ public class AlphaFineDialog extends UIDialog { searchTextField.addKeyListener(new KeyAdapter() { @Override public void keyPressed(KeyEvent e) { - if (e.getKeyCode() == KeyEvent.VK_DOWN) { - searchResultList.requestFocus(); - searchResultList.setSelectedIndex(searchResultList.getSelectedIndex() + 1); - } - } - - @Override - public void keyReleased(KeyEvent e) { - int keyCode = e.getKeyCode(); - if (keyCode == KeyEvent.VK_ESCAPE) { - if (StringUtils.isBlank(searchTextField.getText()) || ComparatorUtils.equals(searchTextField.getText(), searchTextField.getPlaceHolder())) { - AlphaFineDialog.this.setVisible(false); - } else { - searchTextField.setText(null); - removeSearchResult(); + if (e.getKeyCode() == KeyEvent.VK_ENTER) { + if (searchResultList.getModel().getSize() > 1) { + dealWithSearchResult(searchResultList.getSelectedValue()); } - } else if (e.getKeyCode() == KeyEvent.VK_ENTER) { - dealWithSearchResult(searchResultList.getSelectedValue()); - } + } else if (e.getKeyCode() == KeyEvent.VK_DOWN) { + if (searchResultList.getSelectedIndex() == searchResultList.getModel().getSize() - 1) { + searchResultList.setSelectedIndex(0); + } + searchResultList.setSelectedIndex(searchResultList.getSelectedIndex() + 1); + } else if (e.getKeyCode() == KeyEvent.VK_UP) { + searchResultList.setSelectedIndex(searchResultList.getSelectedIndex() - 1); + } else escAlphaFine(e); } }); @@ -754,7 +746,9 @@ public class AlphaFineDialog extends UIDialog { private void doNavigate() { AlphaFineDialog.this.dispose(); final AlphaCellModel model = searchResultList.getSelectedValue(); - model.doAction(); + if (model != null) { + model.doAction(); + } } /** @@ -888,6 +882,21 @@ public class AlphaFineDialog extends UIDialog { this.splitLabel = splitLabel; } + /** + * 键盘退出AlphaFine + * + * @param e + */ + private void escAlphaFine(KeyEvent e) { + if (e.getKeyCode() == KeyEvent.VK_ESCAPE) { + if (StringUtils.isBlank(searchTextField.getText()) || ComparatorUtils.equals(searchTextField.getText(), searchTextField.getPlaceHolder())) { + AlphaFineDialog.this.setVisible(false); + } else { + searchTextField.setText(null); + removeSearchResult(); + } + } + } /** * +-------------------------------------+ @@ -907,7 +916,9 @@ public class AlphaFineDialog extends UIDialog { */ @Override public void setSelectedIndex(int index) { - if (index > 0 && checkSelectedIndex(index)) { + if (index == 0 && getModel().getSize() > 1) { + super.setSelectedIndex(1); + } else if (index > 0 && checkSelectedIndex(index)) { int previousIndex = getSelectedIndex(); super.setSelectedIndex(index); AlphaCellModel cellModel = getSelectedValue(); @@ -930,21 +941,6 @@ public class AlphaFineDialog extends UIDialog { } private void initListListener() { - addKeyListener(new KeyAdapter() { - @Override - public void keyPressed(KeyEvent e) { - if (e.getKeyCode() == KeyEvent.VK_ENTER) { - dealWithSearchResult(getSelectedValue()); - } else if (e.getKeyCode() == KeyEvent.VK_UP) { - if (getSelectedIndex() == 1) { - searchTextField.requestFocus(); - } - } else if (e.getKeyCode() == KeyEvent.VK_ESCAPE) { - searchTextField.requestFocus(); - } - } - }); - addMouseListener(new MouseAdapter() { @Override public void mouseClicked(MouseEvent e) { @@ -968,6 +964,14 @@ public class AlphaFineDialog extends UIDialog { } } }); + + addKeyListener(new KeyAdapter() { + @Override + public void keyPressed(KeyEvent e) { + escAlphaFine(e); + + } + }); } } diff --git a/designer/src/com/fr/design/mainframe/alphafine/component/AlphaFinePane.java b/designer/src/com/fr/design/mainframe/alphafine/component/AlphaFinePane.java index 8c962a0010..5d24a85c44 100644 --- a/designer/src/com/fr/design/mainframe/alphafine/component/AlphaFinePane.java +++ b/designer/src/com/fr/design/mainframe/alphafine/component/AlphaFinePane.java @@ -1,5 +1,6 @@ package com.fr.design.mainframe.alphafine.component; +import com.bulenkov.iconloader.IconLoader; import com.fr.design.DesignerEnvManager; import com.fr.design.actions.help.alphafine.AlphaFineContext; import com.fr.design.actions.help.alphafine.AlphaFineListener; @@ -27,7 +28,7 @@ public class AlphaFinePane extends BasicPane { Toolkit.getDefaultToolkit().addAWTEventListener(AlphaFineDialog.listener(), AWTEvent.KEY_EVENT_MASK); } UIButton refreshButton = new UIButton(); - refreshButton.setIcon(IOUtils.readIcon("/com/fr/design/mainframe/alphafine/images/smallsearch.png")); + refreshButton.setIcon(IconLoader.getIcon("/com/fr/design/mainframe/alphafine/images/smallsearch.png")); refreshButton.setToolTipText(Inter.getLocText("FR-Designer_AlphaFine")); refreshButton.set4ToolbarButton(); refreshButton.setRolloverEnabled(false); diff --git a/designer/src/com/fr/design/mainframe/alphafine/search/manager/FileSearchManager.java b/designer/src/com/fr/design/mainframe/alphafine/search/manager/FileSearchManager.java index 0c1a3b61b2..76cc8a6351 100644 --- a/designer/src/com/fr/design/mainframe/alphafine/search/manager/FileSearchManager.java +++ b/designer/src/com/fr/design/mainframe/alphafine/search/manager/FileSearchManager.java @@ -19,7 +19,12 @@ import com.fr.stable.StableUtils; import com.fr.stable.StringUtils; import com.fr.stable.project.ProjectConstants; -import java.io.*; +import java.io.BufferedReader; +import java.io.File; +import java.io.FileInputStream; +import java.io.FileNotFoundException; +import java.io.IOException; +import java.io.InputStreamReader; import java.util.ArrayList; import java.util.List; diff --git a/designer/src/com/fr/design/mainframe/alphafine/search/manager/RecentSearchManager.java b/designer/src/com/fr/design/mainframe/alphafine/search/manager/RecentSearchManager.java index 69959830c5..c191c0c11e 100644 --- a/designer/src/com/fr/design/mainframe/alphafine/search/manager/RecentSearchManager.java +++ b/designer/src/com/fr/design/mainframe/alphafine/search/manager/RecentSearchManager.java @@ -10,6 +10,7 @@ import com.fr.design.mainframe.alphafine.cell.model.ActionModel; import com.fr.design.mainframe.alphafine.cell.model.AlphaCellModel; import com.fr.design.mainframe.alphafine.cell.model.MoreModel; import com.fr.design.mainframe.alphafine.model.SearchResult; +import com.fr.design.mainframe.toolbar.UpdateActionManager; import com.fr.file.XMLFileManager; import com.fr.general.ComparatorUtils; import com.fr.general.FRLogger; @@ -26,8 +27,17 @@ import com.fr.stable.xml.XMLReadable; import com.fr.stable.xml.XMLTools; import com.fr.stable.xml.XMLableReader; -import java.io.*; -import java.util.*; +import java.io.File; +import java.io.FileOutputStream; +import java.io.FileWriter; +import java.io.IOException; +import java.io.OutputStream; +import java.io.StringReader; +import java.util.Collections; +import java.util.HashMap; +import java.util.Iterator; +import java.util.List; +import java.util.Map; /** * Created by XiaXiang on 2017/5/15. @@ -220,21 +230,24 @@ public class RecentSearchManager extends XMLFileManager implements AlphaFineSear recentModelList = recentKVModelMap.get(searchText); SearchResult resultModelList = recentModelList; Iterator modelIterator = resultModelList.iterator(); + SearchResult searchResult = new SearchResult(); while (modelIterator.hasNext()) { AlphaCellModel model = modelIterator.next(); - if (model.getType() == CellType.ACTION && !((ActionModel) model).getAction().isEnabled()) { - modelIterator.remove(); + if (model.getType() == CellType.ACTION && !UpdateActionManager.getUpdateActionManager().isEnable(((ActionModel) model).getAction())) { + continue; + } else { + searchResult.add(model); } } - Collections.sort(resultModelList); - int size = resultModelList.size(); + Collections.sort(searchResult); + int size = searchResult.size(); if (size > MAX_SIZE) { SearchResult result = new SearchResult(); - result.addAll(resultModelList.subList(0, MAX_SIZE)); + result.addAll(searchResult.subList(0, MAX_SIZE)); return result; } - return resultModelList; + return searchResult; } } return recentModelList; diff --git a/designer_base/src/com/fr/design/mainframe/toolbar/UpdateActionManager.java b/designer_base/src/com/fr/design/mainframe/toolbar/UpdateActionManager.java index 47ae6101fa..845eb3660e 100644 --- a/designer_base/src/com/fr/design/mainframe/toolbar/UpdateActionManager.java +++ b/designer_base/src/com/fr/design/mainframe/toolbar/UpdateActionManager.java @@ -1,5 +1,8 @@ package com.fr.design.mainframe.toolbar; +import com.fr.design.actions.UpdateAction; +import com.fr.general.ComparatorUtils; + import java.util.List; /** @@ -23,4 +26,13 @@ public class UpdateActionManager { public void setUpdateActions(List updateActions) { this.updateActions = updateActions; } + + public boolean isEnable(UpdateAction updateAction) { + for (UpdateActionModel action : updateActions) { + if (ComparatorUtils.equals(updateAction.getName(), action.getActionName()) && action.getAction().isEnabled()) { + return true; + } + } + return false; + } } From 96b74b956e6f36b788024d59d0d5a265f422838b Mon Sep 17 00:00:00 2001 From: XiaXiang Date: Sat, 23 Sep 2017 00:15:13 +0800 Subject: [PATCH 061/125] rt --- .../mainframe/alphafine/search/manager/PluginSearchManager.java | 1 + 1 file changed, 1 insertion(+) diff --git a/designer/src/com/fr/design/mainframe/alphafine/search/manager/PluginSearchManager.java b/designer/src/com/fr/design/mainframe/alphafine/search/manager/PluginSearchManager.java index 25efb5f6bd..2ea8ba0e84 100644 --- a/designer/src/com/fr/design/mainframe/alphafine/search/manager/PluginSearchManager.java +++ b/designer/src/com/fr/design/mainframe/alphafine/search/manager/PluginSearchManager.java @@ -103,6 +103,7 @@ public class PluginSearchManager implements AlphaFineSearchProcessor { if (jsonArray != null) { SearchResult searchResult = new SearchResult(); for (int i = 0; i < jsonArray.length(); i++) { + AlphaFineHelper.checkCancel(); PluginModel cellModel = getPluginModel(jsonArray.optJSONObject(i), false); if (!AlphaFineHelper.getFilterResult().contains(cellModel)) { searchResult.add(cellModel); From f79dc54891a6d0aae636c508b51eee524520a5bb Mon Sep 17 00:00:00 2001 From: XiaXiang Date: Sat, 23 Sep 2017 00:21:11 +0800 Subject: [PATCH 062/125] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E8=B4=A8=E9=87=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fr/design/mainframe/alphafine/component/AlphaFinePane.java | 2 +- designer/src/com/fr/start/Designer.java | 2 +- designer_base/src/com/fr/design/mainframe/DesignerFrame.java | 2 +- .../src/com/fr/design/mainframe/toolbar/ToolBarMenuDock.java | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/designer/src/com/fr/design/mainframe/alphafine/component/AlphaFinePane.java b/designer/src/com/fr/design/mainframe/alphafine/component/AlphaFinePane.java index 5d24a85c44..0034e5c606 100644 --- a/designer/src/com/fr/design/mainframe/alphafine/component/AlphaFinePane.java +++ b/designer/src/com/fr/design/mainframe/alphafine/component/AlphaFinePane.java @@ -23,7 +23,7 @@ public class AlphaFinePane extends BasicPane { private static AlphaFinePane alphaFinePane; public AlphaFinePane() { - setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 14)); + setLayout(new BorderLayout()); if (DesignerEnvManager.getEnvManager().getAlphaFineConfigManager().isEnabled()) { Toolkit.getDefaultToolkit().addAWTEventListener(AlphaFineDialog.listener(), AWTEvent.KEY_EVENT_MASK); } diff --git a/designer/src/com/fr/start/Designer.java b/designer/src/com/fr/start/Designer.java index bd4c455e71..07e262d63c 100644 --- a/designer/src/com/fr/start/Designer.java +++ b/designer/src/com/fr/start/Designer.java @@ -352,7 +352,7 @@ public class Designer extends BaseDesigner { * * @return 面板组件 */ - public Component createAlphafinePane() { + public Component createAlphaFinePane() { return AlphaFinePane.getAlphaFinePane(); } diff --git a/designer_base/src/com/fr/design/mainframe/DesignerFrame.java b/designer_base/src/com/fr/design/mainframe/DesignerFrame.java index b456b0a1ad..c85763a890 100644 --- a/designer_base/src/com/fr/design/mainframe/DesignerFrame.java +++ b/designer_base/src/com/fr/design/mainframe/DesignerFrame.java @@ -340,7 +340,7 @@ public class DesignerFrame extends JFrame implements JTemplateActionListener, Ta } processor.hold(northEastPane, LogMessageBar.getInstance(), ad.createBBSLoginPane()); if (AlphaFineConfigManager.isALPHALicAvailable() && DesignerEnvManager.getEnvManager().getAlphaFineConfigManager().isEnabled()) { - northEastPane.add(ad.createAlphafinePane(), BorderLayout.CENTER); + northEastPane.add(ad.createAlphaFinePane(), BorderLayout.CENTER); } } diff --git a/designer_base/src/com/fr/design/mainframe/toolbar/ToolBarMenuDock.java b/designer_base/src/com/fr/design/mainframe/toolbar/ToolBarMenuDock.java index 9dab4fb664..258a9e22bb 100644 --- a/designer_base/src/com/fr/design/mainframe/toolbar/ToolBarMenuDock.java +++ b/designer_base/src/com/fr/design/mainframe/toolbar/ToolBarMenuDock.java @@ -384,7 +384,7 @@ public abstract class ToolBarMenuDock { return new UILabel(); } - public Component createAlphafinePane() { + public Component createAlphaFinePane() { return new UILabel(); } From ed26cbcec1dc05ca68f923b5a84f4bfe8ca3a720 Mon Sep 17 00:00:00 2001 From: XiaXiang Date: Sat, 23 Sep 2017 00:56:20 +0800 Subject: [PATCH 063/125] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E8=B4=A8=E9=87=8F?= =?UTF-8?q?=EF=BC=8C=E6=A0=BC=E5=BC=8F=E5=8C=96=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../design/mainframe/alphafine/cell/model/ActionModel.java | 2 -- .../mainframe/alphafine/cell/model/AlphaCellModel.java | 5 +++-- .../mainframe/alphafine/cell/render/ContentCellRender.java | 3 +-- .../mainframe/alphafine/cell/render/TitleCellRender.java | 1 - .../design/mainframe/alphafine/component/AlphaFinePane.java | 2 -- .../design/mainframe/alphafine/preview/FilePreviewPane.java | 2 +- .../fr/design/mainframe/alphafine/preview/NoResultPane.java | 2 +- 7 files changed, 6 insertions(+), 11 deletions(-) diff --git a/designer/src/com/fr/design/mainframe/alphafine/cell/model/ActionModel.java b/designer/src/com/fr/design/mainframe/alphafine/cell/model/ActionModel.java index cf703d8795..cb2bbc4376 100644 --- a/designer/src/com/fr/design/mainframe/alphafine/cell/model/ActionModel.java +++ b/designer/src/com/fr/design/mainframe/alphafine/cell/model/ActionModel.java @@ -6,8 +6,6 @@ import com.fr.general.FRLogger; import com.fr.json.JSONException; import com.fr.json.JSONObject; -import javax.swing.*; - /** * Created by XiaXiang on 2017/4/20. */ diff --git a/designer/src/com/fr/design/mainframe/alphafine/cell/model/AlphaCellModel.java b/designer/src/com/fr/design/mainframe/alphafine/cell/model/AlphaCellModel.java index ee9a9f55c9..04af821950 100644 --- a/designer/src/com/fr/design/mainframe/alphafine/cell/model/AlphaCellModel.java +++ b/designer/src/com/fr/design/mainframe/alphafine/cell/model/AlphaCellModel.java @@ -27,7 +27,7 @@ public abstract class AlphaCellModel implements Comparable { this.content = content; } - + public CellType getType() { return type; } @@ -68,6 +68,7 @@ public abstract class AlphaCellModel implements Comparable { public boolean isNeedToSendToServer() { return true; } + /** * model转json * @@ -102,7 +103,7 @@ public abstract class AlphaCellModel implements Comparable { @Override public int compareTo(Object o) { - AlphaCellModel cellModel = (AlphaCellModel)o; + AlphaCellModel cellModel = (AlphaCellModel) o; int difference = cellModel.getSearchCount() - this.getSearchCount(); if (difference != 0) { return difference; diff --git a/designer/src/com/fr/design/mainframe/alphafine/cell/render/ContentCellRender.java b/designer/src/com/fr/design/mainframe/alphafine/cell/render/ContentCellRender.java index a99aecf3a2..d8cd66d97e 100644 --- a/designer/src/com/fr/design/mainframe/alphafine/cell/render/ContentCellRender.java +++ b/designer/src/com/fr/design/mainframe/alphafine/cell/render/ContentCellRender.java @@ -5,7 +5,6 @@ import com.fr.design.gui.ilable.UILabel; import com.fr.design.mainframe.alphafine.AlphaFineConstants; import com.fr.design.mainframe.alphafine.cell.model.AlphaCellModel; import com.fr.design.mainframe.alphafine.cell.model.MoreModel; -import com.fr.general.IOUtils; import com.fr.stable.StringUtils; import javax.swing.*; @@ -55,7 +54,7 @@ public class ContentCellRender implements ListCellRenderer { detailLabel.setForeground(AlphaFineConstants.LIGHT_GRAY); panel.add(detailLabel, BorderLayout.CENTER); int width = (int) (titleLabel.getPreferredSize().getWidth() + detailLabel.getPreferredSize().getWidth()); - if ( width > AlphaFineConstants.LEFT_WIDTH - OFFSET) { + if (width > AlphaFineConstants.LEFT_WIDTH - OFFSET) { int nameWidth = (int) (AlphaFineConstants.LEFT_WIDTH - detailLabel.getPreferredSize().getWidth() - OFFSET); titleLabel.setPreferredSize(new Dimension(nameWidth, AlphaFineConstants.CELL_HEIGHT)); } diff --git a/designer/src/com/fr/design/mainframe/alphafine/cell/render/TitleCellRender.java b/designer/src/com/fr/design/mainframe/alphafine/cell/render/TitleCellRender.java index 97f68cbf75..8d1d5a5f9b 100644 --- a/designer/src/com/fr/design/mainframe/alphafine/cell/render/TitleCellRender.java +++ b/designer/src/com/fr/design/mainframe/alphafine/cell/render/TitleCellRender.java @@ -3,7 +3,6 @@ package com.fr.design.mainframe.alphafine.cell.render; import com.fr.design.gui.ilable.UILabel; import com.fr.design.mainframe.alphafine.AlphaFineConstants; import com.fr.design.mainframe.alphafine.cell.model.MoreModel; -import com.fr.general.IOUtils; import javax.swing.*; import java.awt.*; diff --git a/designer/src/com/fr/design/mainframe/alphafine/component/AlphaFinePane.java b/designer/src/com/fr/design/mainframe/alphafine/component/AlphaFinePane.java index 0034e5c606..d4ab8326d6 100644 --- a/designer/src/com/fr/design/mainframe/alphafine/component/AlphaFinePane.java +++ b/designer/src/com/fr/design/mainframe/alphafine/component/AlphaFinePane.java @@ -8,10 +8,8 @@ import com.fr.design.dialog.BasicPane; import com.fr.design.gui.ibutton.UIButton; import com.fr.design.mainframe.alphafine.AlphaFineHelper; import com.fr.design.utils.ThemeUtils; -import com.fr.general.IOUtils; import com.fr.general.Inter; -import javax.swing.*; import java.awt.*; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; diff --git a/designer/src/com/fr/design/mainframe/alphafine/preview/FilePreviewPane.java b/designer/src/com/fr/design/mainframe/alphafine/preview/FilePreviewPane.java index 15b69aab27..1ba7a5b915 100644 --- a/designer/src/com/fr/design/mainframe/alphafine/preview/FilePreviewPane.java +++ b/designer/src/com/fr/design/mainframe/alphafine/preview/FilePreviewPane.java @@ -18,7 +18,7 @@ public class FilePreviewPane extends JPanel { float widthScale = (AlphaFineConstants.RIGHT_WIDTH) / (float) image.getWidth(); float heightScale = (AlphaFineConstants.CONTENT_HEIGHT) / (float) image.getHeight(); Image showImage; - showImage = widthScale > heightScale? image.getScaledInstance((int) (image.getWidth() * heightScale), AlphaFineConstants.CONTENT_HEIGHT, Image.SCALE_SMOOTH) : image.getScaledInstance(AlphaFineConstants.RIGHT_WIDTH, (int) (image.getWidth() * widthScale), Image.SCALE_SMOOTH); + showImage = widthScale > heightScale ? image.getScaledInstance((int) (image.getWidth() * heightScale), AlphaFineConstants.CONTENT_HEIGHT, Image.SCALE_SMOOTH) : image.getScaledInstance(AlphaFineConstants.RIGHT_WIDTH, (int) (image.getWidth() * widthScale), Image.SCALE_SMOOTH); label.setIcon(new ImageIcon(showImage)); add(label); } diff --git a/designer/src/com/fr/design/mainframe/alphafine/preview/NoResultPane.java b/designer/src/com/fr/design/mainframe/alphafine/preview/NoResultPane.java index 6b80aae8be..738ecf4efd 100644 --- a/designer/src/com/fr/design/mainframe/alphafine/preview/NoResultPane.java +++ b/designer/src/com/fr/design/mainframe/alphafine/preview/NoResultPane.java @@ -20,7 +20,7 @@ public class NoResultPane extends JPanel { image.setPreferredSize(new Dimension(150, 111)); image.setHorizontalAlignment(SwingConstants.CENTER); image.setIcon(IconLoader.getIcon(iconUrl)); - image.setBorder(BorderFactory.createEmptyBorder(100,0,0,0)); + image.setBorder(BorderFactory.createEmptyBorder(100, 0, 0, 0)); UILabel description = new UILabel(title); description.setForeground(AlphaFineConstants.MEDIUM_GRAY); description.setFont(FRFont.getInstance("SimSun", Font.PLAIN, 14)); From 7e6c990c72ef50bd70425629a4e3b54d8b82f41e Mon Sep 17 00:00:00 2001 From: mengao <283296419@qq.com> Date: Mon, 25 Sep 2017 09:05:33 +0800 Subject: [PATCH 064/125] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=BB=84=E5=90=88?= =?UTF-8?q?=E5=9B=BE=E6=8A=A5=E9=94=99=E9=97=AE=E9=A2=98=EF=BC=8C=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=E6=95=B0=E6=8D=AE=E7=82=B9=E6=8F=90=E7=A4=BA=EF=BC=8C?= =?UTF-8?q?=E8=BD=AE=E6=92=AD=E8=AE=BE=E7=BD=AE=E9=9D=A2=E6=9D=BF=E5=9C=A8?= =?UTF-8?q?=E5=9B=BE=E8=A1=A8=E8=B6=85=E9=93=BE=E4=B8=AD=E7=9A=84=E5=BC=B9?= =?UTF-8?q?=E5=87=BA=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mainframe/chart/gui/ChartTypeButtonPane.java | 10 ++++++++-- .../plugin/chart/designer/other/AutoRefreshPane.java | 3 ++- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/designer_chart/src/com/fr/design/mainframe/chart/gui/ChartTypeButtonPane.java b/designer_chart/src/com/fr/design/mainframe/chart/gui/ChartTypeButtonPane.java index 3710dcd524..dfd06f08b1 100644 --- a/designer_chart/src/com/fr/design/mainframe/chart/gui/ChartTypeButtonPane.java +++ b/designer_chart/src/com/fr/design/mainframe/chart/gui/ChartTypeButtonPane.java @@ -23,7 +23,13 @@ import com.fr.stable.StringUtils; import javax.swing.*; import java.awt.*; -import java.awt.event.*; +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; +import java.awt.event.FocusEvent; +import java.awt.event.FocusListener; +import java.awt.event.MouseAdapter; +import java.awt.event.MouseEvent; +import java.awt.event.MouseListener; import java.awt.geom.Rectangle2D; import java.awt.image.BufferedImage; import java.util.ArrayList; @@ -150,7 +156,7 @@ public class ChartTypeButtonPane extends BasicBeanPane implemen UIMenuNameableCreator ui = configCreator.clone(); final BasicBeanPane pane = ui.getPane(); pane.populateBean(editingCollection); - UIDialog dialog = pane.showUnsizedWindow(SwingUtilities.getWindowAncestor(new JPanel()), new DialogActionListener() { + UIDialog dialog = pane.showUnsizedWindow(SwingUtilities.getWindowAncestor(parent), new DialogActionListener() { @Override public void doOk() { pane.updateBean(editingCollection); diff --git a/designer_chart/src/com/fr/plugin/chart/designer/other/AutoRefreshPane.java b/designer_chart/src/com/fr/plugin/chart/designer/other/AutoRefreshPane.java index d625b95c85..386a35378c 100644 --- a/designer_chart/src/com/fr/plugin/chart/designer/other/AutoRefreshPane.java +++ b/designer_chart/src/com/fr/plugin/chart/designer/other/AutoRefreshPane.java @@ -126,7 +126,7 @@ public class AutoRefreshPane extends BasicBeanPane { final VanChartPlotTooltipPane pane = PlotFactory.createPlotRefreshTooltipPane(chart.getPlot()); pane.populate(chart.getRefreshMoreLabel().getAttrTooltip()); - UIDialog dialog = pane.showUnsizedWindow(SwingUtilities.getWindowAncestor(new JPanel()), new DialogActionListener() { + UIDialog dialog = pane.showUnsizedWindow(SwingUtilities.getWindowAncestor(contentPane), new DialogActionListener() { @Override public void doOk() { @@ -138,6 +138,7 @@ public class AutoRefreshPane extends BasicBeanPane { } }); + dialog.setModal(true); dialog.setVisible(true); } }); From 86d64f9addfbca4e755e2d0b9e0b52c131081454 Mon Sep 17 00:00:00 2001 From: neil <459208047@qq.com> Date: Mon, 25 Sep 2017 11:39:44 +0800 Subject: [PATCH 065/125] 1 --- .../design/data/DesignTableDataManager.java | 55 +---- .../fr/design/designer/TargetComponent.java | 10 +- designer_base/src/com/fr/env/RemoteEnv.java | 219 ++++-------------- .../src/com/fr/design/mainframe/JForm.java | 24 +- 4 files changed, 84 insertions(+), 224 deletions(-) diff --git a/designer_base/src/com/fr/design/data/DesignTableDataManager.java b/designer_base/src/com/fr/design/data/DesignTableDataManager.java index 17afec4717..621e303b1b 100644 --- a/designer_base/src/com/fr/design/data/DesignTableDataManager.java +++ b/designer_base/src/com/fr/design/data/DesignTableDataManager.java @@ -6,24 +6,19 @@ import com.fr.base.StoreProcedureParameter; import com.fr.base.TableData; import com.fr.data.TableDataSource; import com.fr.data.core.DataCoreXmlUtils; +import com.fr.design.data.datapane.preview.PreviewTablePane; import com.fr.data.impl.EmbeddedTableData; import com.fr.data.impl.storeproc.ProcedureDataModel; import com.fr.data.impl.storeproc.StoreProcedure; import com.fr.data.impl.storeproc.StoreProcedureConstants; +import com.fr.design.data.tabledata.wrapper.*; import com.fr.design.DesignModelAdapter; -import com.fr.design.data.datapane.preview.PreviewTablePane; -import com.fr.design.data.tabledata.wrapper.ServerTableDataWrapper; -import com.fr.design.data.tabledata.wrapper.StoreProcedureDataWrapper; -import com.fr.design.data.tabledata.wrapper.StoreProcedureNameWrapper; -import com.fr.design.data.tabledata.wrapper.TableDataFactory; -import com.fr.design.data.tabledata.wrapper.TableDataWrapper; -import com.fr.design.data.tabledata.wrapper.TemplateTableDataWrapper; -import com.fr.design.dialog.DialogActionAdapter; import com.fr.design.file.HistoryTemplateListPane; import com.fr.design.gui.iprogressbar.AutoProgressBar; import com.fr.design.mainframe.DesignerContext; import com.fr.design.mainframe.JTemplate; import com.fr.design.parameter.ParameterInputPane; +import com.fr.design.dialog.DialogActionAdapter; import com.fr.file.DatasourceManager; import com.fr.file.DatasourceManagerProvider; import com.fr.general.ComparatorUtils; @@ -39,16 +34,8 @@ import javax.swing.event.ChangeEvent; import javax.swing.event.ChangeListener; import java.io.ByteArrayOutputStream; import java.text.Collator; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Iterator; -import java.util.LinkedHashMap; -import java.util.List; -import java.util.Map; +import java.util.*; import java.util.Map.Entry; -import java.util.Timer; -import java.util.TimerTask; /** * 设计器管理操作数据集的类: @@ -364,20 +351,7 @@ public abstract class DesignTableDataManager { * @throws Exception 异常 */ public static EmbeddedTableData previewTableDataNeedInputParameters(TableData tabledata, int rowCount, boolean needLoadingBar) throws Exception { - return previewTableData(null, tabledata, rowCount, true, needLoadingBar); - } - - /** - * 预览需要参数的数据集 - * - * @param tabledata 数据集 - * @param rowCount 需要预览的行数 - * @param needLoadingBar 是否需要加载进度条 - * @return 数据集 - * @throws Exception 异常 - */ - public static EmbeddedTableData previewTableDataNeedInputParameters(TableDataSource tableDataSource, TableData tabledata, int rowCount, boolean needLoadingBar) throws Exception { - return previewTableData(tableDataSource, tabledata, rowCount, true, needLoadingBar); + return previewTableData(tabledata, rowCount, true, needLoadingBar); } /** @@ -390,20 +364,7 @@ public abstract class DesignTableDataManager { * @throws Exception 异常 */ public static EmbeddedTableData previewTableDataNotNeedInputParameters(TableData tabledata, int rowCount, boolean needLoadingBar) throws Exception { - return previewTableData(null, tabledata, rowCount, false, needLoadingBar); - } - - /** - * 预览不需要参数的数据集 - * - * @param tabledata 数据集 - * @param rowCount 需要预览的行数 - * @param needLoadingBar 是否需要加载进度条 - * @return 数据集 - * @throws Exception 异常 - */ - public static EmbeddedTableData previewTableDataNotNeedInputParameters(TableDataSource tableDataSource, TableData tabledata, int rowCount, boolean needLoadingBar) throws Exception { - return previewTableData(tableDataSource, tabledata, rowCount, false, needLoadingBar); + return previewTableData(tabledata, rowCount, false, needLoadingBar); } /** @@ -415,7 +376,7 @@ public abstract class DesignTableDataManager { * 而获取数据集的字段名字时,则没必要 * @return */ - private static EmbeddedTableData previewTableData(TableDataSource tableDataSource, TableData tabledata, int rowCount, boolean isMustInputParameters, boolean needLoadingBar) throws Exception { + private static EmbeddedTableData previewTableData(TableData tabledata, int rowCount, boolean isMustInputParameters, boolean needLoadingBar) throws Exception { final AutoProgressBar loadingBar = PreviewTablePane.getInstance().getProgressBar(); Env currentEnv = FRContext.getCurrentEnv(); ParameterProvider[] parameters = currentEnv.getTableDataParameters(tabledata); @@ -445,7 +406,7 @@ public abstract class DesignTableDataManager { parameter.setValue(parameterMap.get(parameter.getName())); } } - return currentEnv.previewTableData(tableDataSource, tabledata, parameterMap, rowCount); + return currentEnv.previewTableData(tabledata, parameterMap, rowCount); } catch (TableDataException e) { throw new TableDataException(e.getMessage(), e); } finally { diff --git a/designer_base/src/com/fr/design/designer/TargetComponent.java b/designer_base/src/com/fr/design/designer/TargetComponent.java index 4eedfa0129..ef5369b659 100644 --- a/designer_base/src/com/fr/design/designer/TargetComponent.java +++ b/designer_base/src/com/fr/design/designer/TargetComponent.java @@ -1,16 +1,16 @@ package com.fr.design.designer; -import javax.swing.*; - +import com.fr.design.DesignState; import com.fr.design.event.TargetModifiedEvent; import com.fr.design.event.TargetModifiedListener; +import com.fr.design.mainframe.AuthorityEditPane; import com.fr.design.mainframe.toolbar.ToolBarMenuDockPlus; -import com.fr.design.DesignState; import com.fr.design.menu.MenuDef; import com.fr.design.menu.ShortCut; import com.fr.design.menu.ToolBarDef; import com.fr.stable.StringUtils; -import com.fr.design.mainframe.*; + +import javax.swing.*; /** * 模板设计界面 @@ -31,7 +31,7 @@ public abstract class TargetComponent extends JComponent { public abstract void stopEditing(); - public final T getTarget() { + public T getTarget() { return target; } diff --git a/designer_base/src/com/fr/env/RemoteEnv.java b/designer_base/src/com/fr/env/RemoteEnv.java index 72a20cf939..2188b322b0 100644 --- a/designer_base/src/com/fr/env/RemoteEnv.java +++ b/designer_base/src/com/fr/env/RemoteEnv.java @@ -1,16 +1,7 @@ package com.fr.env; -import com.fr.base.AbstractEnv; -import com.fr.base.EnvException; -import com.fr.base.FRContext; -import com.fr.base.FRCoreContext; -import com.fr.base.ModifiedTable; -import com.fr.base.Parameter; -import com.fr.base.StoreProcedureParameter; -import com.fr.base.TableData; -import com.fr.base.Utils; +import com.fr.base.*; import com.fr.base.remote.RemoteDeziConstants; -import com.fr.data.TableDataSource; import com.fr.data.core.DataCoreUtils; import com.fr.data.core.db.TableProcedure; import com.fr.data.impl.Connection; @@ -26,34 +17,17 @@ import com.fr.design.file.HistoryTemplateListPane; import com.fr.design.fun.DesignerEnvProcessor; import com.fr.design.mainframe.DesignerContext; import com.fr.design.mainframe.DesignerFrameFileDealerPane; -import com.fr.design.mainframe.loghandler.DesignerLogHandler; import com.fr.file.CacheManager; import com.fr.file.DatasourceManager; import com.fr.file.DatasourceManagerProvider; import com.fr.file.filetree.FileNode; -import com.fr.general.ComparatorUtils; -import com.fr.general.FRLogger; -import com.fr.general.IOUtils; -import com.fr.general.Inter; -import com.fr.general.LogRecordTime; -import com.fr.general.VT4FR; +import com.fr.general.*; import com.fr.general.http.HttpClient; import com.fr.json.JSONArray; import com.fr.json.JSONException; import com.fr.json.JSONObject; -import com.fr.plugin.Plugin; -import com.fr.plugin.PluginLicense; -import com.fr.plugin.PluginLicenseManager; -import com.fr.plugin.PluginLoader; import com.fr.share.ShareConstants; -import com.fr.stable.ArrayUtils; -import com.fr.stable.EncodeConstants; -import com.fr.stable.JavaCompileInfo; -import com.fr.stable.LicUtils; -import com.fr.stable.ProductConstants; -import com.fr.stable.StableUtils; -import com.fr.stable.StringUtils; -import com.fr.stable.SvgProvider; +import com.fr.stable.*; import com.fr.stable.file.XMLFileManagerProvider; import com.fr.stable.project.ProjectConstants; import com.fr.stable.xml.XMLPrintWriter; @@ -62,38 +36,17 @@ import com.fr.stable.xml.XMLableReader; import com.fr.web.ResourceConstants; import javax.swing.*; -import javax.xml.transform.Source; -import javax.xml.transform.Transformer; -import javax.xml.transform.TransformerConfigurationException; -import javax.xml.transform.TransformerException; -import javax.xml.transform.TransformerFactory; +import javax.xml.transform.*; import javax.xml.transform.dom.DOMSource; import javax.xml.transform.stream.StreamResult; import java.awt.*; -import java.io.BufferedReader; -import java.io.ByteArrayInputStream; -import java.io.ByteArrayOutputStream; -import java.io.File; -import java.io.FileInputStream; -import java.io.FileOutputStream; -import java.io.FilenameFilter; -import java.io.IOException; -import java.io.InputStream; -import java.io.InputStreamReader; -import java.io.OutputStream; -import java.io.OutputStreamWriter; -import java.io.UnsupportedEncodingException; +import java.io.*; import java.net.HttpURLConnection; import java.net.NoRouteToHostException; import java.net.Socket; -import java.net.URLEncoder; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.Iterator; +import java.util.*; import java.util.List; -import java.util.Map; import java.util.Timer; -import java.util.TimerTask; import java.util.logging.Level; import java.util.regex.Pattern; @@ -159,15 +112,6 @@ public class RemoteEnv extends AbstractEnv { return password; } - // 修复密码中包含特殊字符,无法登录的问题 - private String getEncodedPassword() { - try { - return URLEncoder.encode(password, "UTF-8"); - } catch (UnsupportedEncodingException e) { - return password; - } - } - public void setPassword(String password) { this.password = password; clearUserID(); @@ -231,12 +175,8 @@ public class RemoteEnv extends AbstractEnv { * 根据nameValuePairs,也就是参数对,生成PostMethod,不同之处在于,参数拼在path后面,不是method.addParameters */ private HttpClient createHttpMethod2(HashMap para) throws EnvException { - StringBuilder sb = new StringBuilder(path); - - sb.append('?'); - sb.append("id=").append(createUserID()); - - return new HttpClient(sb.toString(), para, true); + String methodPath = path + '?' + "id=" + createUserID(); + return new HttpClient(methodPath, para, true); } @@ -393,7 +333,7 @@ public class RemoteEnv extends AbstractEnv { para.put("op", "fr_remote_design"); para.put("cmd", "test_server_connection"); para.put("user", user); - para.put("password", getEncodedPassword()); + para.put("password", password); if (path.startsWith("https") && (!DesignerEnvManager.getEnvManager().isHttps())) { return false; @@ -418,7 +358,7 @@ public class RemoteEnv extends AbstractEnv { Inter.getLocText(new String[]{"Datasource-Connection_failed", "Registration-User_Name", "Password", "Error"}, new String[]{",", "", "", "!"}) , Inter.getLocText("FR-Server-All_Error"), JOptionPane.ERROR_MESSAGE); return false; - } else if (res.indexOf("RegistEditionException") != -1) { + } else if (res.contains("RegistEditionException")) { if (needMessage) { JOptionPane.showMessageDialog(parentComponent, Inter.getLocText(new String[]{"Datasource-Connection_failed", "Version-does-not-support"}, new String[]{",", "!"})); } else { @@ -439,7 +379,6 @@ public class RemoteEnv extends AbstractEnv { private void extraChangeEnvPara() { //在env连接之前, 加载一下不依赖env的插件. 看看需不需要改变参数. - PluginLoader.init(); DesignerEnvProcessor envProcessor = ExtraDesignClassManager.getInstance().getSingle(DesignerEnvProcessor.XML_TAG); if (envProcessor != null) { this.path = envProcessor.changeEnvPathBeforeConnect(user, password, path); @@ -472,9 +411,8 @@ public class RemoteEnv extends AbstractEnv { para.put("op", "fr_remote_design"); para.put("cmd", "heart_beat"); para.put("user", user); - para.put("userid", userID); - HttpClient client = createHttpMethod(para, true); + HttpClient client = createHttpMethod(para); execute4InputStream(client); //这做法不好, 30秒刷一次, 刷新的时候会重新构建树, 构建完会把子节点都收缩起来, 效果太差. @@ -516,7 +454,7 @@ public class RemoteEnv extends AbstractEnv { para.put("op", "fr_remote_design"); para.put("cmd", "r_sign_in"); para.put("user", user); - para.put("password", getEncodedPassword()); + para.put("password", password); simulaRPC(para, true); @@ -609,7 +547,7 @@ public class RemoteEnv extends AbstractEnv { if (resJSON == null) { return false; } - if (resJSON.indexOf("RegistEditionException") != -1) { + if (resJSON.contains("RegistEditionException")) { JOptionPane.showMessageDialog(null, Inter.getLocText("FR-Lic_does_not_Support_Remote")); return false; } @@ -1264,11 +1202,6 @@ public class RemoteEnv extends AbstractEnv { return DavXMLUtils.readXMLParameters(input); } - @Override - public EmbeddedTableData previewTableData(Object tableData, Map parameterMap, int rowCount) throws Exception { - return previewTableData(null, tableData, parameterMap, rowCount); - } - /** * 根据指定的参数生成一个实际可预览的数据集 * @@ -1278,7 +1211,7 @@ public class RemoteEnv extends AbstractEnv { * @return 实际的二维数据集 * @throws Exception 如果生成数据失败则抛出此异常 */ - public EmbeddedTableData previewTableData(TableDataSource dataSource, Object tableData, java.util.Map parameterMap, int rowCount) throws Exception { + public EmbeddedTableData previewTableData(Object tableData, java.util.Map parameterMap, int rowCount) throws Exception { ByteArrayOutputStream out = new ByteArrayOutputStream(); // 把tableData写成xml文件到out @@ -1317,11 +1250,6 @@ public class RemoteEnv extends AbstractEnv { return previewTableData(tableData, parameterMap, -1); } - @Override - public Object previewTableData(TableDataSource dataSource, Object tableData, Map parameterMap, int start, int end, String[] cols, int[] colIdx) throws Exception { - return previewTableData(dataSource, tableData, parameterMap, -1); - } - /** * nameValuePairs,这个参数要接着this.path,拼成一个URL,否则服务器端req.getParameter是无法得到的 * @@ -1448,17 +1376,13 @@ public class RemoteEnv extends AbstractEnv { return; } SignIn.signIn(remoteEnv); - resetLicenseBytes(); + FRCoreContext.resetBytes(); HistoryTemplateListPane.getInstance().getCurrentEditingTemplate().refreshToolArea(); } catch (Exception em) { FRContext.getLogger().error(em.getMessage(), em); } } - private void resetLicenseBytes() { - FRCoreContext.retryLicLock(); - } - /** * 停止连接 */ @@ -1858,8 +1782,7 @@ public class RemoteEnv extends AbstractEnv { } LogRecordTime[] records = DavXMLUtils.readXMLLogRecords(input); for (LogRecordTime logRecordTime : records) { - DesignerLogHandler.getInstance().printRemoteLog(logRecordTime); - + //TODO } } @@ -2011,7 +1934,7 @@ public class RemoteEnv extends AbstractEnv { para.put("op", "fr_remote_design"); para.put("cmd", "design_get_designer_version"); para.put("user", user); - para.put("password", getEncodedPassword()); + para.put("password", password); HttpClient client = createHttpMethod(para, true); try { @@ -2058,7 +1981,8 @@ public class RemoteEnv extends AbstractEnv { public void setLicName(String licName) { //do nth } - + + /** * 获取当前env的build文件路径 */ @@ -2094,74 +2018,8 @@ public class RemoteEnv extends AbstractEnv { info.parseJSON(jo); return info; } - - /** - * 将文件拷贝到插件目录 - * - * @param dir 要拷贝的文件 - * @param plugin 插件 - */ - public void copyFilesToPluginAndLibFolder(File dir, Plugin plugin) throws Exception { - - } - - /** - * 将文件添加到指定目录或者删除指定目录的文件 - * - * @param file 解压插件的临时目录 - * @param plugin 当前处理的插件 - */ - public void movePluginEmbFile(File file, Plugin plugin) throws Exception { - - } - - /** - * 将文件从插件目录删除 - * - * @param plugin 要删除插件 - * @return 同上 - */ - public String[] deleteFileFromPluginAndLibFolder(Plugin plugin) { - return new String[0]; - } - - /** - * 保存插件的配置文件 - * - * @param plugin 插件 - */ - public void writePlugin(Plugin plugin) throws Exception { - - } - - - /** - * 获取插件的配置目录 - * - * @param plugin - */ - public String getPluginFilePath(Plugin plugin) { - - return StringUtils.EMPTY; - } - - public void readPluginLicenses() throws Exception { - ByteArrayOutputStream out = new ByteArrayOutputStream(); - HashMap para = new HashMap(); - para.put("op", "fr_remote_design"); - para.put("cmd", "design_plugin_licenses"); - - InputStream inputStream = postBytes2ServerB(out.toByteArray(), para); - String pluginsLicensesStr = IOUtils.inputStream2String(inputStream, EncodeConstants.ENCODING_UTF_8); - if (StringUtils.isNotBlank(pluginsLicensesStr) && pluginsLicensesStr.startsWith("[")) { - JSONArray jsonArray = new JSONArray(pluginsLicensesStr); - for (int i = 0; i < jsonArray.length(); i++) { - PluginLicense pluginLicense = new PluginLicense(); - pluginLicense.parseJSON(jsonArray.getJSONObject(i)); - PluginLicenseManager.getInstance().addRemotePluginLicense(pluginLicense); - } - } - } + + @Override public String pluginServiceAction(String serviceID, String req) throws Exception { @@ -2182,12 +2040,6 @@ public class RemoteEnv extends AbstractEnv { @Override public void pluginServiceStart(String serviceID){ } - - @Override - public void checkAndRegisterLic(FileNode node, Plugin plugin) throws Exception { - - } - @Override public File[] loadREUFile() throws Exception { File target = new File(CacheManager.getProviderInstance().getCacheDirectory(), @@ -2303,9 +2155,34 @@ public class RemoteEnv extends AbstractEnv { return StringUtils.EMPTY; } } - + @Override - public void doWhenServerShutDown() { + public boolean isLocalEnv() { + + return false; + } + + @Override + public boolean hasPluginServiceStarted(String key) { + return true; + } + + @Override + public JSONArray getPluginStatus() { + + try { + HashMap para = new HashMap(); + para.put("op", "plugin"); + para.put("cmd", "get_status"); + para.put("current_uid", this.createUserID()); + para.put("currentUsername", this.getUser()); + + HttpClient client = createHttpMethod(para); + InputStream input = execute4InputStream(client); + return new JSONArray(stream2String(input)); + } catch (Exception e) { + return JSONArray.create(); + } } } \ No newline at end of file diff --git a/designer_form/src/com/fr/design/mainframe/JForm.java b/designer_form/src/com/fr/design/mainframe/JForm.java index 0a4aa98944..0d7f93c088 100644 --- a/designer_form/src/com/fr/design/mainframe/JForm.java +++ b/designer_form/src/com/fr/design/mainframe/JForm.java @@ -12,7 +12,11 @@ import com.fr.design.designer.beans.actions.FormDeleteAction; import com.fr.design.designer.beans.actions.PasteAction; import com.fr.design.designer.beans.events.DesignerEditListener; import com.fr.design.designer.beans.events.DesignerEvent; -import com.fr.design.designer.creator.*; +import com.fr.design.designer.creator.XComponent; +import com.fr.design.designer.creator.XCreator; +import com.fr.design.designer.creator.XCreatorUtils; +import com.fr.design.designer.creator.XLayoutContainer; +import com.fr.design.designer.creator.XWAbsoluteBodyLayout; import com.fr.design.designer.properties.FormWidgetAuthorityEditPane; import com.fr.design.event.TargetModifiedEvent; import com.fr.design.event.TargetModifiedListener; @@ -499,6 +503,24 @@ public class JForm extends JTemplate implements BaseJForm { } + @Override + public void setTarget(Form form) { + if (this.formDesign == null) { + super.setTarget(form); + return; + } + this.formDesign.setTarget(form); + } + + @Override + public Form getTarget() { + if (this.formDesign == null) { + return super.getTarget(); + } + + return this.formDesign.getTarget(); + } + @Override protected FormModelAdapter createDesignModel() { return new FormModelAdapter(this); From 3502bdbe13935d2715050901728c0fc49040201a Mon Sep 17 00:00:00 2001 From: neil <459208047@qq.com> Date: Mon, 25 Sep 2017 11:40:04 +0800 Subject: [PATCH 066/125] 1 --- .../src/com/fr/design/data/DesignTableDataManager.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/designer_base/src/com/fr/design/data/DesignTableDataManager.java b/designer_base/src/com/fr/design/data/DesignTableDataManager.java index 621e303b1b..aa5304b5f9 100644 --- a/designer_base/src/com/fr/design/data/DesignTableDataManager.java +++ b/designer_base/src/com/fr/design/data/DesignTableDataManager.java @@ -49,7 +49,7 @@ import java.util.Map.Entry; * * @author zhou */ -public abstract class DesignTableDataManager { +public abstract class Desig nTableDataManager { /** * 其实globalDsCache没有绝对的必要,只是为了操作方便。如果没有它,那么每次清空服务器数据集或者存储过程的时候,还要去遍历找一下, * 这个操作可能比较复杂 。 从减少代码复杂度的角度看,还是很有必要的 From ef960a7526eb043f639fed717b4acec301980a92 Mon Sep 17 00:00:00 2001 From: neil <459208047@qq.com> Date: Mon, 25 Sep 2017 11:40:14 +0800 Subject: [PATCH 067/125] 1 --- .../src/com/fr/design/data/DesignTableDataManager.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/designer_base/src/com/fr/design/data/DesignTableDataManager.java b/designer_base/src/com/fr/design/data/DesignTableDataManager.java index aa5304b5f9..621e303b1b 100644 --- a/designer_base/src/com/fr/design/data/DesignTableDataManager.java +++ b/designer_base/src/com/fr/design/data/DesignTableDataManager.java @@ -49,7 +49,7 @@ import java.util.Map.Entry; * * @author zhou */ -public abstract class Desig nTableDataManager { +public abstract class DesignTableDataManager { /** * 其实globalDsCache没有绝对的必要,只是为了操作方便。如果没有它,那么每次清空服务器数据集或者存储过程的时候,还要去遍历找一下, * 这个操作可能比较复杂 。 从减少代码复杂度的角度看,还是很有必要的 From 56ac47162525077be9ac552151875ed74674c0f6 Mon Sep 17 00:00:00 2001 From: neil <459208047@qq.com> Date: Mon, 25 Sep 2017 12:36:28 +0800 Subject: [PATCH 068/125] =?UTF-8?q?=E6=97=A0JIRA=E4=BB=BB=E5=8A=A1?= =?UTF-8?q?=EF=BC=8C=20=E4=BF=AE=E5=A4=8D=E5=86=B2=E7=AA=81.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../design/data/DesignTableDataManager.java | 55 ++++++++++-- designer_base/src/com/fr/env/RemoteEnv.java | 90 ++++++++++++++++--- 2 files changed, 125 insertions(+), 20 deletions(-) diff --git a/designer_base/src/com/fr/design/data/DesignTableDataManager.java b/designer_base/src/com/fr/design/data/DesignTableDataManager.java index 621e303b1b..17afec4717 100644 --- a/designer_base/src/com/fr/design/data/DesignTableDataManager.java +++ b/designer_base/src/com/fr/design/data/DesignTableDataManager.java @@ -6,19 +6,24 @@ import com.fr.base.StoreProcedureParameter; import com.fr.base.TableData; import com.fr.data.TableDataSource; import com.fr.data.core.DataCoreXmlUtils; -import com.fr.design.data.datapane.preview.PreviewTablePane; import com.fr.data.impl.EmbeddedTableData; import com.fr.data.impl.storeproc.ProcedureDataModel; import com.fr.data.impl.storeproc.StoreProcedure; import com.fr.data.impl.storeproc.StoreProcedureConstants; -import com.fr.design.data.tabledata.wrapper.*; import com.fr.design.DesignModelAdapter; +import com.fr.design.data.datapane.preview.PreviewTablePane; +import com.fr.design.data.tabledata.wrapper.ServerTableDataWrapper; +import com.fr.design.data.tabledata.wrapper.StoreProcedureDataWrapper; +import com.fr.design.data.tabledata.wrapper.StoreProcedureNameWrapper; +import com.fr.design.data.tabledata.wrapper.TableDataFactory; +import com.fr.design.data.tabledata.wrapper.TableDataWrapper; +import com.fr.design.data.tabledata.wrapper.TemplateTableDataWrapper; +import com.fr.design.dialog.DialogActionAdapter; import com.fr.design.file.HistoryTemplateListPane; import com.fr.design.gui.iprogressbar.AutoProgressBar; import com.fr.design.mainframe.DesignerContext; import com.fr.design.mainframe.JTemplate; import com.fr.design.parameter.ParameterInputPane; -import com.fr.design.dialog.DialogActionAdapter; import com.fr.file.DatasourceManager; import com.fr.file.DatasourceManagerProvider; import com.fr.general.ComparatorUtils; @@ -34,8 +39,16 @@ import javax.swing.event.ChangeEvent; import javax.swing.event.ChangeListener; import java.io.ByteArrayOutputStream; import java.text.Collator; -import java.util.*; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Iterator; +import java.util.LinkedHashMap; +import java.util.List; +import java.util.Map; import java.util.Map.Entry; +import java.util.Timer; +import java.util.TimerTask; /** * 设计器管理操作数据集的类: @@ -351,7 +364,20 @@ public abstract class DesignTableDataManager { * @throws Exception 异常 */ public static EmbeddedTableData previewTableDataNeedInputParameters(TableData tabledata, int rowCount, boolean needLoadingBar) throws Exception { - return previewTableData(tabledata, rowCount, true, needLoadingBar); + return previewTableData(null, tabledata, rowCount, true, needLoadingBar); + } + + /** + * 预览需要参数的数据集 + * + * @param tabledata 数据集 + * @param rowCount 需要预览的行数 + * @param needLoadingBar 是否需要加载进度条 + * @return 数据集 + * @throws Exception 异常 + */ + public static EmbeddedTableData previewTableDataNeedInputParameters(TableDataSource tableDataSource, TableData tabledata, int rowCount, boolean needLoadingBar) throws Exception { + return previewTableData(tableDataSource, tabledata, rowCount, true, needLoadingBar); } /** @@ -364,7 +390,20 @@ public abstract class DesignTableDataManager { * @throws Exception 异常 */ public static EmbeddedTableData previewTableDataNotNeedInputParameters(TableData tabledata, int rowCount, boolean needLoadingBar) throws Exception { - return previewTableData(tabledata, rowCount, false, needLoadingBar); + return previewTableData(null, tabledata, rowCount, false, needLoadingBar); + } + + /** + * 预览不需要参数的数据集 + * + * @param tabledata 数据集 + * @param rowCount 需要预览的行数 + * @param needLoadingBar 是否需要加载进度条 + * @return 数据集 + * @throws Exception 异常 + */ + public static EmbeddedTableData previewTableDataNotNeedInputParameters(TableDataSource tableDataSource, TableData tabledata, int rowCount, boolean needLoadingBar) throws Exception { + return previewTableData(tableDataSource, tabledata, rowCount, false, needLoadingBar); } /** @@ -376,7 +415,7 @@ public abstract class DesignTableDataManager { * 而获取数据集的字段名字时,则没必要 * @return */ - private static EmbeddedTableData previewTableData(TableData tabledata, int rowCount, boolean isMustInputParameters, boolean needLoadingBar) throws Exception { + private static EmbeddedTableData previewTableData(TableDataSource tableDataSource, TableData tabledata, int rowCount, boolean isMustInputParameters, boolean needLoadingBar) throws Exception { final AutoProgressBar loadingBar = PreviewTablePane.getInstance().getProgressBar(); Env currentEnv = FRContext.getCurrentEnv(); ParameterProvider[] parameters = currentEnv.getTableDataParameters(tabledata); @@ -406,7 +445,7 @@ public abstract class DesignTableDataManager { parameter.setValue(parameterMap.get(parameter.getName())); } } - return currentEnv.previewTableData(tabledata, parameterMap, rowCount); + return currentEnv.previewTableData(tableDataSource, tabledata, parameterMap, rowCount); } catch (TableDataException e) { throw new TableDataException(e.getMessage(), e); } finally { diff --git a/designer_base/src/com/fr/env/RemoteEnv.java b/designer_base/src/com/fr/env/RemoteEnv.java index 2188b322b0..165ed3468a 100644 --- a/designer_base/src/com/fr/env/RemoteEnv.java +++ b/designer_base/src/com/fr/env/RemoteEnv.java @@ -1,7 +1,16 @@ package com.fr.env; -import com.fr.base.*; +import com.fr.base.AbstractEnv; +import com.fr.base.EnvException; +import com.fr.base.FRContext; +import com.fr.base.FRCoreContext; +import com.fr.base.ModifiedTable; +import com.fr.base.Parameter; +import com.fr.base.StoreProcedureParameter; +import com.fr.base.TableData; +import com.fr.base.Utils; import com.fr.base.remote.RemoteDeziConstants; +import com.fr.data.TableDataSource; import com.fr.data.core.DataCoreUtils; import com.fr.data.core.db.TableProcedure; import com.fr.data.impl.Connection; @@ -21,13 +30,25 @@ import com.fr.file.CacheManager; import com.fr.file.DatasourceManager; import com.fr.file.DatasourceManagerProvider; import com.fr.file.filetree.FileNode; -import com.fr.general.*; +import com.fr.general.ComparatorUtils; +import com.fr.general.FRLogger; +import com.fr.general.IOUtils; +import com.fr.general.Inter; +import com.fr.general.LogRecordTime; +import com.fr.general.VT4FR; import com.fr.general.http.HttpClient; import com.fr.json.JSONArray; import com.fr.json.JSONException; import com.fr.json.JSONObject; import com.fr.share.ShareConstants; -import com.fr.stable.*; +import com.fr.stable.ArrayUtils; +import com.fr.stable.EncodeConstants; +import com.fr.stable.JavaCompileInfo; +import com.fr.stable.LicUtils; +import com.fr.stable.ProductConstants; +import com.fr.stable.StableUtils; +import com.fr.stable.StringUtils; +import com.fr.stable.SvgProvider; import com.fr.stable.file.XMLFileManagerProvider; import com.fr.stable.project.ProjectConstants; import com.fr.stable.xml.XMLPrintWriter; @@ -35,18 +56,40 @@ import com.fr.stable.xml.XMLTools; import com.fr.stable.xml.XMLableReader; import com.fr.web.ResourceConstants; -import javax.swing.*; -import javax.xml.transform.*; +import javax.swing.JOptionPane; +import javax.swing.UIManager; +import javax.xml.transform.Source; +import javax.xml.transform.Transformer; +import javax.xml.transform.TransformerConfigurationException; +import javax.xml.transform.TransformerException; +import javax.xml.transform.TransformerFactory; import javax.xml.transform.dom.DOMSource; import javax.xml.transform.stream.StreamResult; -import java.awt.*; -import java.io.*; +import java.awt.Component; +import java.io.BufferedReader; +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.File; +import java.io.FileInputStream; +import java.io.FileOutputStream; +import java.io.FilenameFilter; +import java.io.IOException; +import java.io.InputStream; +import java.io.InputStreamReader; +import java.io.OutputStream; +import java.io.OutputStreamWriter; +import java.io.UnsupportedEncodingException; import java.net.HttpURLConnection; import java.net.NoRouteToHostException; import java.net.Socket; -import java.util.*; +import java.net.URLEncoder; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.Iterator; import java.util.List; +import java.util.Map; import java.util.Timer; +import java.util.TimerTask; import java.util.logging.Level; import java.util.regex.Pattern; @@ -112,6 +155,15 @@ public class RemoteEnv extends AbstractEnv { return password; } + // 修复密码中包含特殊字符,无法登录的问题 + private String getEncodedPassword() { + try { + return URLEncoder.encode(password, "UTF-8"); + } catch (UnsupportedEncodingException e) { + return password; + } + } + public void setPassword(String password) { this.password = password; clearUserID(); @@ -333,7 +385,7 @@ public class RemoteEnv extends AbstractEnv { para.put("op", "fr_remote_design"); para.put("cmd", "test_server_connection"); para.put("user", user); - para.put("password", password); + para.put("password", getEncodedPassword()); if (path.startsWith("https") && (!DesignerEnvManager.getEnvManager().isHttps())) { return false; @@ -454,7 +506,7 @@ public class RemoteEnv extends AbstractEnv { para.put("op", "fr_remote_design"); para.put("cmd", "r_sign_in"); para.put("user", user); - para.put("password", password); + para.put("password", getEncodedPassword()); simulaRPC(para, true); @@ -1202,6 +1254,11 @@ public class RemoteEnv extends AbstractEnv { return DavXMLUtils.readXMLParameters(input); } + @Override + public EmbeddedTableData previewTableData(Object tableData, Map parameterMap, int rowCount) throws Exception { + return previewTableData(null, tableData, parameterMap, rowCount); + } + /** * 根据指定的参数生成一个实际可预览的数据集 * @@ -1211,7 +1268,7 @@ public class RemoteEnv extends AbstractEnv { * @return 实际的二维数据集 * @throws Exception 如果生成数据失败则抛出此异常 */ - public EmbeddedTableData previewTableData(Object tableData, java.util.Map parameterMap, int rowCount) throws Exception { + public EmbeddedTableData previewTableData(TableDataSource dataSource, Object tableData, java.util.Map parameterMap, int rowCount) throws Exception { ByteArrayOutputStream out = new ByteArrayOutputStream(); // 把tableData写成xml文件到out @@ -1250,6 +1307,11 @@ public class RemoteEnv extends AbstractEnv { return previewTableData(tableData, parameterMap, -1); } + @Override + public Object previewTableData(TableDataSource dataSource, Object tableData, Map parameterMap, int start, int end, String[] cols, int[] colIdx) throws Exception { + return previewTableData(dataSource, tableData, parameterMap, -1); + } + /** * nameValuePairs,这个参数要接着this.path,拼成一个URL,否则服务器端req.getParameter是无法得到的 * @@ -1934,7 +1996,7 @@ public class RemoteEnv extends AbstractEnv { para.put("op", "fr_remote_design"); para.put("cmd", "design_get_designer_version"); para.put("user", user); - para.put("password", password); + para.put("password", getEncodedPassword()); HttpClient client = createHttpMethod(para, true); try { @@ -2155,6 +2217,10 @@ public class RemoteEnv extends AbstractEnv { return StringUtils.EMPTY; } } + + public void doWhenServerShutDown() { + + } @Override public boolean isLocalEnv() { From 5c86706a6013c9fb623b7a2e7e3acda07f198b96 Mon Sep 17 00:00:00 2001 From: plough Date: Mon, 25 Sep 2017 13:10:31 +0800 Subject: [PATCH 069/125] =?UTF-8?q?REPORT-4372=20=E6=97=A5=E6=9C=9F?= =?UTF-8?q?=E6=8E=A7=E4=BB=B6=E9=97=AE=E9=A2=98=3D>=E8=87=AA=E5=AE=9A?= =?UTF-8?q?=E4=B9=89=E6=97=A5=E6=9C=9F=E6=A0=BC=E5=BC=8F=E6=8F=90=E7=A4=BA?= =?UTF-8?q?=E6=98=BE=E7=A4=BA=E4=B8=8D=E5=85=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ui/designer/DateEditorDefinePane.java | 22 ++++++++++++++----- 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/designer_form/src/com/fr/design/widget/ui/designer/DateEditorDefinePane.java b/designer_form/src/com/fr/design/widget/ui/designer/DateEditorDefinePane.java index 5931cf7742..5a4ee9ac30 100644 --- a/designer_form/src/com/fr/design/widget/ui/designer/DateEditorDefinePane.java +++ b/designer_form/src/com/fr/design/widget/ui/designer/DateEditorDefinePane.java @@ -25,10 +25,7 @@ import javax.swing.JPanel; import javax.swing.SwingConstants; import javax.swing.event.ChangeEvent; import javax.swing.event.ChangeListener; -import java.awt.BorderLayout; -import java.awt.CardLayout; -import java.awt.Color; -import java.awt.Component; +import java.awt.*; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.text.SimpleDateFormat; @@ -43,6 +40,7 @@ public class DateEditorDefinePane extends DirectWriteEditorDefinePane可以自动换行 + super.setText("" + text + ""); + } + }; sampleLabel.setHorizontalAlignment(SwingConstants.CENTER); sampleLabel.setFont(FRContext.getDefaultValues().getFRFont()); return sampleLabel; From f42e92abf88262eb2cc7b237db8c6cbbc978a668 Mon Sep 17 00:00:00 2001 From: kerry Date: Mon, 25 Sep 2017 13:23:49 +0800 Subject: [PATCH 070/125] =?UTF-8?q?REPORT-4796=20=E8=A1=A8=E5=8D=95?= =?UTF-8?q?=E6=8A=A5=E8=A1=A8=E5=9D=97=E8=83=8C=E6=99=AF=E6=97=A0=E6=B3=95?= =?UTF-8?q?=E4=BF=9D=E5=AD=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../accessibles/BaseAccessibleEditor.java | 7 ------ .../AccessibleElementCaseToolBarEditor.java | 25 ++++++------------- 2 files changed, 7 insertions(+), 25 deletions(-) diff --git a/designer_base/src/com/fr/design/mainframe/widget/accessibles/BaseAccessibleEditor.java b/designer_base/src/com/fr/design/mainframe/widget/accessibles/BaseAccessibleEditor.java index e0d134ad6c..c2a1893d32 100644 --- a/designer_base/src/com/fr/design/mainframe/widget/accessibles/BaseAccessibleEditor.java +++ b/designer_base/src/com/fr/design/mainframe/widget/accessibles/BaseAccessibleEditor.java @@ -12,7 +12,6 @@ import java.util.ArrayList; import javax.swing.AbstractButton; import javax.swing.BorderFactory; import com.fr.design.constants.UIConstants; -import com.fr.design.event.UIObserverListener; import com.fr.design.gui.ibutton.UIButton; import javax.swing.JComponent; import javax.swing.JOptionPane; @@ -85,12 +84,6 @@ public class BaseAccessibleEditor extends BasicPane implements AccessibleEditor if (showButton) { btPopup = new UIButton(){ - public void registerChangeListener(UIObserverListener listener) { - return; - } - public boolean shouldResponseChangeListener() { - return false; - } @Override public ButtonUI getUI() { return new UIButtonUI() { diff --git a/designer_form/src/com/fr/design/mainframe/widget/accessibles/AccessibleElementCaseToolBarEditor.java b/designer_form/src/com/fr/design/mainframe/widget/accessibles/AccessibleElementCaseToolBarEditor.java index ec675fe7ed..4321ab1dc8 100644 --- a/designer_form/src/com/fr/design/mainframe/widget/accessibles/AccessibleElementCaseToolBarEditor.java +++ b/designer_form/src/com/fr/design/mainframe/widget/accessibles/AccessibleElementCaseToolBarEditor.java @@ -2,6 +2,7 @@ package com.fr.design.mainframe.widget.accessibles; import com.fr.design.dialog.BasicDialog; import com.fr.design.dialog.DialogActionAdapter; +import com.fr.design.event.UIObserverListener; import com.fr.design.gui.core.WidgetOption; import com.fr.design.mainframe.FormWebWidgetConstants; import com.fr.design.mainframe.widget.editors.ElementCaseToolBarPane; @@ -13,8 +14,6 @@ import com.fr.general.Inter; import com.fr.stable.ArrayUtils; import javax.swing.SwingUtilities; -import javax.swing.event.DocumentEvent; -import javax.swing.event.DocumentListener; import java.util.ArrayList; import java.util.Arrays; import java.util.List; @@ -61,23 +60,13 @@ public class AccessibleElementCaseToolBarEditor extends UneditableAccessibleEdit } protected ITextComponent createTextField() { - TextField textField = new TextField(){ - protected void initListener() { - if (shouldResponseChangeListener()) { - getDocument().addDocumentListener(new DocumentListener() { - @Override - public void insertUpdate(DocumentEvent e) { - } - @Override - public void removeUpdate(DocumentEvent e) { - attributeChange(); - } - @Override - public void changedUpdate(DocumentEvent e) { + TextField textField = new TextField() { + public void registerChangeListener(UIObserverListener listener) { + return; + } - } - }); - } + public boolean shouldResponseChangeListener() { + return false; } }; textField.setGlobalName(Inter.getLocText("Form-EC_toolbar")); From d36e7d661770c3992796a3cfe38e410093685575 Mon Sep 17 00:00:00 2001 From: kerry Date: Mon, 25 Sep 2017 14:01:12 +0800 Subject: [PATCH 071/125] =?UTF-8?q?REPORT-4372=20=E6=97=A5=E6=9C=9F?= =?UTF-8?q?=E6=8E=A7=E4=BB=B6=E9=97=AE=E9=A2=98=3D>=E8=87=AA=E5=AE=9A?= =?UTF-8?q?=E4=B9=89=E6=97=A5=E6=9C=9F=E6=A0=BC=E5=BC=8F=E6=8F=90=E7=A4=BA?= =?UTF-8?q?=E6=98=BE=E7=A4=BA=E4=B8=8D=E5=85=A8(=E6=BC=8F=E4=BA=86?= =?UTF-8?q?=E4=B8=80=E4=B8=AA)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../design/widget/ui/DateEditorDefinePane.java | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/designer/src/com/fr/design/widget/ui/DateEditorDefinePane.java b/designer/src/com/fr/design/widget/ui/DateEditorDefinePane.java index 101bce139a..a0622c253b 100644 --- a/designer/src/com/fr/design/widget/ui/DateEditorDefinePane.java +++ b/designer/src/com/fr/design/widget/ui/DateEditorDefinePane.java @@ -36,7 +36,7 @@ public class DateEditorDefinePane extends DirectWriteEditorDefinePane可以自动换行 + super.setText("" + text + ""); + } + }; sampleLabel.setHorizontalAlignment(SwingConstants.CENTER); sampleLabel.setFont(FRContext.getDefaultValues().getFRFont()); return sampleLabel; From 3fc91a5eaba80077725be9a465de0a39a8a26b1a Mon Sep 17 00:00:00 2001 From: neil <459208047@qq.com> Date: Mon, 25 Sep 2017 15:11:20 +0800 Subject: [PATCH 072/125] =?UTF-8?q?=E6=97=A0JIRA=E4=BB=BB=E5=8A=A1?= =?UTF-8?q?=EF=BC=8C=20build=20failed?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/com/fr/design/mainframe/JForm.java | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/designer_form/src/com/fr/design/mainframe/JForm.java b/designer_form/src/com/fr/design/mainframe/JForm.java index dfa3784233..79b4ccc960 100644 --- a/designer_form/src/com/fr/design/mainframe/JForm.java +++ b/designer_form/src/com/fr/design/mainframe/JForm.java @@ -18,6 +18,7 @@ import com.fr.design.designer.creator.XCreator; import com.fr.design.designer.creator.XCreatorUtils; import com.fr.design.designer.creator.XLayoutContainer; import com.fr.design.designer.creator.XWAbsoluteBodyLayout; +import com.fr.design.designer.creator.XWParameterLayout; import com.fr.design.designer.properties.FormWidgetAuthorityEditPane; import com.fr.design.event.TargetModifiedEvent; import com.fr.design.event.TargetModifiedListener; @@ -58,8 +59,17 @@ import com.fr.stable.ArrayUtils; import com.fr.stable.Constants; import com.fr.stable.bridge.StableFactory; -import javax.swing.*; -import java.awt.*; +import javax.swing.BorderFactory; +import javax.swing.Icon; +import javax.swing.JComponent; +import javax.swing.JPanel; +import javax.swing.SwingConstants; +import java.awt.BorderLayout; +import java.awt.CardLayout; +import java.awt.Color; +import java.awt.Component; +import java.awt.Dimension; +import java.awt.Font; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.awt.image.BufferedImage; From 5a27503c24012aa6c2f25daca99fa97e787d02ed Mon Sep 17 00:00:00 2001 From: neil <459208047@qq.com> Date: Mon, 25 Sep 2017 15:12:12 +0800 Subject: [PATCH 073/125] 1 --- .../mainframe/errorinfo/ErrorInfoUploader.java | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/designer/src/com/fr/design/mainframe/errorinfo/ErrorInfoUploader.java b/designer/src/com/fr/design/mainframe/errorinfo/ErrorInfoUploader.java index 10ff2779b4..07aadbe915 100644 --- a/designer/src/com/fr/design/mainframe/errorinfo/ErrorInfoUploader.java +++ b/designer/src/com/fr/design/mainframe/errorinfo/ErrorInfoUploader.java @@ -29,6 +29,8 @@ public class ErrorInfoUploader { private static ErrorInfoUploader collector; private static boolean licSupport = true; + // 在一台不能上网的电脑里发现了10w个errorinfo... + private static final int MAX_ERROR_SIZE = 2000; static { GeneralContext.addEnvChangedListener(new EnvChangedListener() { @@ -123,6 +125,11 @@ public class ErrorInfoUploader { } File[] files = folder.listFiles(); + if (files.length > MAX_ERROR_SIZE) { + StableUtils.deleteFile(folder); + return; + } + try { for (File file : files) { String filePath = file.getPath(); @@ -131,6 +138,11 @@ public class ErrorInfoUploader { if (suffix.endsWith(SUFFIX)) { Thread.sleep(1000L); String content = IOUtils.inputStream2String(new FileInputStream(file)); + if (content.length() > MAX_ERROR_SIZE) { + file.delete(); + continue; + } + String url = SiteCenter.getInstance().acquireUrlByKind("design.error"); if (sendErroInfo(url, content)) { file.delete(); From 140a08fb4ea18e7946cd96b94f7dc3f8c37d6dd8 Mon Sep 17 00:00:00 2001 From: vito Date: Mon, 25 Sep 2017 15:39:50 +0800 Subject: [PATCH 074/125] =?UTF-8?q?REPORT-3350=20=E5=A4=8D=E5=88=B6?= =?UTF-8?q?=E5=89=8D=E4=B8=80=E7=89=88=E6=9C=AC=E7=BC=93=E5=AD=98=E7=9A=84?= =?UTF-8?q?=E6=97=B6=E5=80=99=E6=B8=85=E7=90=86=E5=85=B6=E4=B8=AD=E7=9A=84?= =?UTF-8?q?=E5=B7=A5=E4=BD=9C=E7=9B=AE=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/com/fr/design/DesignerEnvManager.java | 149 +++++++++++------- .../src/com/fr/start/BaseDesigner.java | 13 +- 2 files changed, 101 insertions(+), 61 deletions(-) diff --git a/designer_base/src/com/fr/design/DesignerEnvManager.java b/designer_base/src/com/fr/design/DesignerEnvManager.java index 4a40979411..293041ce97 100644 --- a/designer_base/src/com/fr/design/DesignerEnvManager.java +++ b/designer_base/src/com/fr/design/DesignerEnvManager.java @@ -13,22 +13,47 @@ import com.fr.design.constants.UIConstants; import com.fr.env.RemoteEnv; import com.fr.env.SignIn; import com.fr.file.FILEFactory; -import com.fr.general.*; -import com.fr.stable.*; +import com.fr.general.ComparatorUtils; +import com.fr.general.FRLevel; +import com.fr.general.FRLogFormatter; +import com.fr.general.FRLogger; +import com.fr.general.GeneralContext; +import com.fr.general.IOUtils; +import com.fr.general.Inter; +import com.fr.stable.Constants; +import com.fr.stable.EnvChangedListener; +import com.fr.stable.ListMap; +import com.fr.stable.ProductConstants; +import com.fr.stable.StableUtils; +import com.fr.stable.StringUtils; import com.fr.stable.core.UUID; import com.fr.stable.project.ProjectConstants; -import com.fr.stable.xml.*; +import com.fr.stable.xml.XMLPrintWriter; +import com.fr.stable.xml.XMLReadable; +import com.fr.stable.xml.XMLTools; +import com.fr.stable.xml.XMLWriter; +import com.fr.stable.xml.XMLableReader; +import org.apache.log4j.Level; import javax.swing.*; import javax.swing.SwingWorker.StateValue; import java.awt.*; -import java.io.*; -import java.util.*; +import java.io.File; +import java.io.FileOutputStream; +import java.io.FileReader; +import java.io.FileWriter; +import java.io.IOException; +import java.io.OutputStream; +import java.io.StringReader; +import java.util.ArrayList; +import java.util.Calendar; +import java.util.GregorianCalendar; +import java.util.Iterator; import java.util.List; +import java.util.Map; import java.util.Map.Entry; import java.util.logging.FileHandler; import java.util.logging.Handler; -import org.apache.log4j.Level; /** * The manager of Designer GUI. @@ -145,19 +170,19 @@ public class DesignerEnvManager implements XMLReadable, XMLWriter { designerEnvManager.setCurEnvName(name); } } - + GeneralContext.addEnvChangedListener(new EnvChangedListener() { @Override public void envChanged() { - + designerEnvManager.setCurrentDirectoryPrefix(FILEFactory.ENV_PREFIX); designerEnvManager.setDialogCurrentDirectory(ProjectConstants.REPORTLETS_NAME); } }); - + } - + return designerEnvManager; } @@ -219,9 +244,7 @@ public class DesignerEnvManager implements XMLReadable, XMLWriter { calender.setTimeInMillis(System.currentTimeMillis()); String today = calender.get(Calendar.YEAR) + "-" + (calender.get(Calendar.MONTH) + 1) + "-" + calender.get(Calendar.DAY_OF_MONTH); - String fileName = StableUtils.pathJoin(new String[]{ - logLocation, "fr_" + today + "_%g.log" - }); + String fileName = StableUtils.pathJoin(logLocation, "fr_" + today + "_%g.log"); if (!new java.io.File(fileName).exists()) { StableUtils.makesureFileExist(new java.io.File(fileName)); } @@ -253,11 +276,14 @@ public class DesignerEnvManager implements XMLReadable, XMLWriter { try { FileWriter fileWriter = new FileWriter(envFile); File oldEnvFile = new File(ProductConstants.getEnvHome() + File.separator + ProductConstants.APP_NAME + "6-1" + "Env.xml"); + File oldEnvFile80 = new File(ProductConstants.getEnvHome() + File.separator + ProductConstants.APP_NAME + "Env" + ProductConstants.OLD_VERSION_8_0 + ".xml"); if (oldEnvFile.exists()) { // marks:兼容DesignerEnv6-1.xml FileReader fileReader = new FileReader(oldEnvFile); Utils.copyCharTo(fileReader, fileWriter); fileReader.close(); + } else if (oldEnvFile80.exists()) { + compatibilityPrevVersion(oldEnvFile80); } else { // marks:生成一个新的xml文件 StringReader stringReader = new StringReader(""); @@ -270,6 +296,23 @@ public class DesignerEnvManager implements XMLReadable, XMLWriter { } } + private void compatibilityPrevVersion(File prevEnvFile) { + try { + XMLTools.readFileXML(designerEnvManager, prevEnvFile); + } catch (Exception e) { + FRContext.getLogger().error(e.getMessage(), e); + } + // 清空前一个版本中的工作目录和最近打开 + nameEnvMap = new ListMap(); + recentOpenedFilePathList = new ArrayList(); + curEnvName = null; + designerEnvManager.saveXMLFile(); + boolean delete = prevEnvFile.delete(); + if (!delete) { + prevEnvFile.deleteOnExit(); + } + } + public static void setEnvFile(File envFile) { DesignerEnvManager.envFile = envFile; } @@ -285,6 +328,7 @@ public class DesignerEnvManager implements XMLReadable, XMLWriter { /** * 是否启用了https + * * @return 同上 */ public boolean isHttps() { @@ -311,7 +355,7 @@ public class DesignerEnvManager implements XMLReadable, XMLWriter { return certificatePass; } - public void setCertificatePass(String certificatePass){ + public void setCertificatePass(String certificatePass) { this.certificatePass = certificatePass; } @@ -531,13 +575,13 @@ public class DesignerEnvManager implements XMLReadable, XMLWriter { this.reportLengthUnit = reportLengthUnit; } - private void writeTempFile(File tempFile){ - try{ + private void writeTempFile(File tempFile) { + try { OutputStream fout = new FileOutputStream(tempFile); XMLTools.writeOutputStreamXML(this, fout); fout.flush(); fout.close(); - }catch (Exception e) { + } catch (Exception e) { FRContext.getLogger().error(e.getMessage()); } } @@ -546,9 +590,7 @@ public class DesignerEnvManager implements XMLReadable, XMLWriter { * 保存设计器的配置文件, 该文件不在env的resource目录下 * 而是在Consts.getEnvHome() + File.separator + Consts.APP_NAME * - * * @date 2014-9-29-上午11:04:23 - * */ public void saveXMLFile() { File xmlFile = this.getDesignerEnvFile(); @@ -577,7 +619,6 @@ public class DesignerEnvManager implements XMLReadable, XMLWriter { * 是否加入产品改良 * * @return 是否加入产品改良 - * */ public boolean isJoinProductImprove() { return joinProductImprove; @@ -585,7 +626,6 @@ public class DesignerEnvManager implements XMLReadable, XMLWriter { /** * 设置加入产品改良 - * */ public void setJoinProductImprove(boolean joinProductImprove) { this.joinProductImprove = joinProductImprove; @@ -1155,63 +1195,63 @@ public class DesignerEnvManager implements XMLReadable, XMLWriter { this.lastShowBBSNewsTime = lastShowBBSNewsTime; } - private void readXMLVersion(XMLableReader reader){ + private void readXMLVersion(XMLableReader reader) { String tmpVal; if ((tmpVal = reader.getElementValue()) != null) { reader.setXmlVersionByString(tmpVal); } } - private void readActiveKey(XMLableReader reader){ + private void readActiveKey(XMLableReader reader) { String tmpVal; if ((tmpVal = reader.getElementValue()) != null) { this.setActivationKey(tmpVal); } } - private void readLogLocation(XMLableReader reader){ + private void readLogLocation(XMLableReader reader) { String tmpVal; if ((tmpVal = reader.getElementValue()) != null) { this.setLogLocation(tmpVal); } } - private void readLanguage(XMLableReader reader){ + private void readLanguage(XMLableReader reader) { String tmpVal; if ((tmpVal = reader.getElementValue()) != null) { this.setLanguage(Integer.parseInt(tmpVal)); } } - private void readJettyPort(XMLableReader reader){ + private void readJettyPort(XMLableReader reader) { String tmpVal; if ((tmpVal = reader.getElementValue()) != null) { this.setJettyServerPort(Integer.parseInt(tmpVal)); } } - private void readPageLengthUnit(XMLableReader reader){ + private void readPageLengthUnit(XMLableReader reader) { String tmpVal; if (StringUtils.isNotBlank(tmpVal = reader.getElementValue())) { this.pageLengthUnit = Short.parseShort(tmpVal); } } - private void readReportLengthUnit(XMLableReader reader){ + private void readReportLengthUnit(XMLableReader reader) { String tmpVal; if (StringUtils.isNotBlank(tmpVal = reader.getElementValue())) { this.reportLengthUnit = Short.parseShort(tmpVal); } } - private void readLastOpenFile(XMLableReader reader){ + private void readLastOpenFile(XMLableReader reader) { String tmpVal; if (StringUtils.isNotBlank(tmpVal = reader.getElementValue())) { this.lastOpenFilePath = tmpVal; } } - private void readEncrytionKey(XMLableReader reader){ + private void readEncrytionKey(XMLableReader reader) { String tmpVal; if (StringUtils.isNotBlank(tmpVal = reader.getElementValue())) { this.encryptionKey = tmpVal; @@ -1219,15 +1259,14 @@ public class DesignerEnvManager implements XMLReadable, XMLWriter { } - - private void readLastBBSTime(XMLableReader reader){ + private void readLastBBSTime(XMLableReader reader) { String tmpVal; if (StringUtils.isNotBlank(tmpVal = reader.getElementValue())) { this.lastShowBBSTime = tmpVal; } } - private void readLastBBSNewsTime(XMLableReader reader){ + private void readLastBBSNewsTime(XMLableReader reader) { String tmpVal; if (StringUtils.isNotBlank(tmpVal = reader.getElementValue())) { this.lastShowBBSNewsTime = tmpVal; @@ -1275,15 +1314,15 @@ public class DesignerEnvManager implements XMLReadable, XMLWriter { readEncrytionKey(reader); } else if ("jdkHome".equals(name)) { this.jdkHome = reader.getElementValue(); - }else if ("lastBBSTime".equals(name)){ + } else if ("lastBBSTime".equals(name)) { readLastBBSTime(reader); - } else if ("lastBBSNewsTime".equals(name)){ + } else if ("lastBBSNewsTime".equals(name)) { readLastBBSNewsTime(reader); - }else if ("uuid".equals(name)){ + } else if ("uuid".equals(name)) { readUUID(reader); - } else if ("status".equals(name)){ + } else if ("status".equals(name)) { readActiveStatus(reader); - } else if (ComparatorUtils.equals(CAS_PARAS,name)){ + } else if (ComparatorUtils.equals(CAS_PARAS, name)) { readHttpsParas(reader); } else if (name.equals("AlphaFineConfigManager")) { readAlphaFineAttr(reader); @@ -1297,12 +1336,12 @@ public class DesignerEnvManager implements XMLReadable, XMLWriter { reader.readXMLObject(this.alphaFineConfigManager = new AlphaFineConfigManager()); } - private void readHttpsParas(XMLableReader reader){ + private void readHttpsParas(XMLableReader reader) { String tempVal; - if((tempVal = reader.getAttrAsString(CAS_CERTIFICATE_PATH, null)) != null){ + if ((tempVal = reader.getAttrAsString(CAS_CERTIFICATE_PATH, null)) != null) { this.setCertificatePath(tempVal); } - if((tempVal = reader.getAttrAsString(CAS_CERTIFICATE_PASSWORD, null)) != null){ + if ((tempVal = reader.getAttrAsString(CAS_CERTIFICATE_PASSWORD, null)) != null) { this.setCertificatePass(tempVal); } @@ -1519,14 +1558,14 @@ public class DesignerEnvManager implements XMLReadable, XMLWriter { } //写入uuid - private void writeUUID(XMLPrintWriter writer){ + private void writeUUID(XMLPrintWriter writer) { writer.startTAG("uuid"); writer.textNode(getUUID()); writer.end(); } //读取uuid - private void readUUID(XMLableReader reader){ + private void readUUID(XMLableReader reader) { String tmpVal; if (StringUtils.isNotBlank(tmpVal = reader.getElementValue())) { this.uuid = tmpVal; @@ -1534,8 +1573,8 @@ public class DesignerEnvManager implements XMLReadable, XMLWriter { } //写入激活状态 - private void writeActiveStatus(XMLPrintWriter writer){ - if (this.activeKeyStatus == 0){ + private void writeActiveStatus(XMLPrintWriter writer) { + if (this.activeKeyStatus == 0) { writer.startTAG("status"); writer.textNode(this.activeKeyStatus + ""); writer.end(); @@ -1543,7 +1582,7 @@ public class DesignerEnvManager implements XMLReadable, XMLWriter { } //读取激活状态 - private void readActiveStatus(XMLableReader reader){ + private void readActiveStatus(XMLableReader reader) { String tmpVal; if (StringUtils.isNotBlank(tmpVal = reader.getElementValue())) { this.activeKeyStatus = Integer.parseInt(tmpVal); @@ -1596,7 +1635,7 @@ public class DesignerEnvManager implements XMLReadable, XMLWriter { if (!this.isOracleSystemSpace()) { writer.attr("useOracleSystemSpace", this.isOracleSystemSpace()); } - if (!this.isJoinProductImprove()){ + if (!this.isJoinProductImprove()) { writer.attr("joinProductImprove", this.isJoinProductImprove()); } if (!this.isAutoBackUp()) { @@ -1681,29 +1720,29 @@ public class DesignerEnvManager implements XMLReadable, XMLWriter { } //写论坛相关的两个属性 - private void writeBBSRelated(XMLPrintWriter writer){ - if (StringUtils.isNotEmpty(this.lastShowBBSTime)){ + private void writeBBSRelated(XMLPrintWriter writer) { + if (StringUtils.isNotEmpty(this.lastShowBBSTime)) { writer.startTAG("lastBBSTime"); writer.textNode(lastShowBBSTime); writer.end(); } - if (StringUtils.isNotEmpty(this.lastShowBBSNewsTime)){ + if (StringUtils.isNotEmpty(this.lastShowBBSNewsTime)) { writer.startTAG("lastBBSNewsTime"); writer.textNode(lastShowBBSNewsTime); writer.end(); } } - private void writeHttpsParas(XMLPrintWriter writer){ + private void writeHttpsParas(XMLPrintWriter writer) { writer.startTAG(CAS_PARAS); - if(StringUtils.isNotBlank(certificatePath)){ + if (StringUtils.isNotBlank(certificatePath)) { writer.attr(CAS_CERTIFICATE_PATH, certificatePath); } - if(StringUtils.isNotBlank(certificatePass)){ + if (StringUtils.isNotBlank(certificatePass)) { writer.attr(CAS_CERTIFICATE_PASSWORD, certificatePass); } - if(isHttps){ + if (isHttps) { writer.attr("enable", true); } writer.end(); @@ -1736,7 +1775,7 @@ public class DesignerEnvManager implements XMLReadable, XMLWriter { if (env == null) { return; } - + writer.startTAG("Env"); writer.classAttr(env.getClass()); writer.attr("name", name); diff --git a/designer_base/src/com/fr/start/BaseDesigner.java b/designer_base/src/com/fr/start/BaseDesigner.java index a3d278f8ab..3f24b645a5 100644 --- a/designer_base/src/com/fr/start/BaseDesigner.java +++ b/designer_base/src/com/fr/start/BaseDesigner.java @@ -59,11 +59,7 @@ public abstract class BaseDesigner extends ToolBarMenuDock { private Timer timer; public BaseDesigner(String[] args) { - BuildContext.setBuildFilePath(buildPropertiesPath()); - if (isDebug()) { - setDebugEnv(); - } RestartHelper.deleteRecordFilesWhenStart(); //初始化插件引擎 PluginStartup.start(); @@ -71,7 +67,12 @@ public abstract class BaseDesigner extends ToolBarMenuDock { PluginConversionModule.getInstance().markDesignerStart(); SiteCenter.getInstance(); - DesignUtils.setPort(getStartPort()); + BuildContext.setBuildFilePath(buildPropertiesPath()); + if (isDebug()) { + setDebugEnv(); + } else { + DesignUtils.setPort(getStartPort()); + } // 如果端口被占用了 说明程序已经运行了一次,也就是说,已经建立一个监听服务器,现在只要给服务器发送命令就好了 if (DesignUtils.isStarted()) { DesignUtils.clientSend(args); @@ -99,7 +100,7 @@ public abstract class BaseDesigner extends ToolBarMenuDock { DesignUtils.initLookAndFeel(); DesignUtils.creatListeningServer(getStartPort(), startFileSuffix()); - + // 初始化Log Handler DesignerEnvManager.loadLogSetting(); DesignerFrame df = createDesignerFrame(); From 471e4bb3371db5c5b6721cce1fef3785c474c9d1 Mon Sep 17 00:00:00 2001 From: hzzz Date: Mon, 25 Sep 2017 18:31:42 +0800 Subject: [PATCH 075/125] =?UTF-8?q?=E5=9B=BE=E6=A0=87=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../actions/server/PlatformManagerAction.java | 2 +- .../images/data/source/dataDictionary.png | Bin 216 -> 167 bytes .../com/fr/design/images/expand/cellAttr.gif | Bin 254 -> 207 bytes .../src/com/fr/design/images/m_edit/redo.png | Bin 318 -> 421 bytes .../src/com/fr/design/images/m_edit/undo.png | Bin 343 -> 450 bytes .../src/com/fr/design/images/m_file/excel.png | Bin 372 -> 339 bytes .../src/com/fr/design/images/m_file/export.png | Bin 287 -> 362 bytes .../com/fr/design/images/m_file/pageSetup.png | Bin 203 -> 204 bytes .../src/com/fr/design/images/m_file/save.png | Bin 218 -> 228 bytes .../com/fr/design/images/m_format/cellAttr.png | Bin 1101 -> 453 bytes .../fr/design/images/m_format/highlight.png | Bin 399 -> 352 bytes .../com/fr/design/images/m_insert/float.png | Bin 186 -> 143 bytes .../fr/design/images/m_insert/hyperLink.png | Bin 686 -> 740 bytes .../fr/design/images/m_insert/insertRow.png | Bin 303 -> 276 bytes .../images/m_report/allow_authority_edit.png | Bin 334 -> 370 bytes .../fr/design/images/m_report/exportAttr.png | Bin 287 -> 362 bytes .../src/com/fr/design/images/m_report/p.png | Bin 3132 -> 303 bytes .../images/m_report/reportEngineAttr.png | Bin 452 -> 413 bytes .../com/fr/design/images/m_web/datasource.png | Bin 335 -> 440 bytes .../src/com/fr/design/images/m_web/edit.png | Bin 503 -> 372 bytes .../com/fr/design/images/m_web/function.png | Bin 256 -> 191 bytes .../src/com/fr/design/images/m_web/style.png | Bin 374 -> 477 bytes .../mainframe/actions/NewFormAction.java | 2 +- 23 files changed, 2 insertions(+), 2 deletions(-) diff --git a/designer_base/src/com/fr/design/actions/server/PlatformManagerAction.java b/designer_base/src/com/fr/design/actions/server/PlatformManagerAction.java index 4448c10249..f8f1cd655e 100644 --- a/designer_base/src/com/fr/design/actions/server/PlatformManagerAction.java +++ b/designer_base/src/com/fr/design/actions/server/PlatformManagerAction.java @@ -15,7 +15,7 @@ public class PlatformManagerAction extends UpdateAction { this.setMenuKeySet(PLATEFORM_MANAGER); this.setName(getMenuKeySet().getMenuKeySetName()); this.setMnemonic(getMenuKeySet().getMnemonic()); - this.setSmallIcon(BaseUtils.readIcon("/com/fr/web/images/platform/platform_16_16.png")); + this.setSmallIcon(BaseUtils.readIcon("/com/fr/design/images/server/platform_16_16.png")); } /** diff --git a/designer_base/src/com/fr/design/images/data/source/dataDictionary.png b/designer_base/src/com/fr/design/images/data/source/dataDictionary.png index 2f0fc8c87092a57518bebbbf2d323999de404157..516d368b276fa5559696bf9ac6571194120aaff2 100644 GIT binary patch delta 139 zcmV;60CfM@0jB|wB!2;OQb$4nuFf3k0001CNkl0nY)DB!2;OQb$4nuFf3k0001qNklV!(9NfiCb8g;B)~gE`ebdY_?%@ z2}}$JZuKD;FJ7&G88VxY`&Tin?+18+pyV43}7P0nRo#yp^i-)XCM;m62<|~ cjQ{}#0OSbEqow(^b07*qoM6N<$f)V&t3IG5A diff --git a/designer_base/src/com/fr/design/images/m_edit/redo.png b/designer_base/src/com/fr/design/images/m_edit/redo.png index d9225f68b3cead6344e9d12f1a044cc22e570d59..f6b77b4f471dadeb9f02f9d29d26b20f0caf3e9b 100644 GIT binary patch delta 395 zcmV;60d)Sp0;L0xB!2;OQb$4nuFf3k0004BNkl@BhVB^Mh36br%%5Ci7~?@V01%61JmcvUyB$RzH9($j(-G-8^h$Fv?K!qW3a5O z?6#**pT0wJ0mRnl8-RXxMbm_hyY=kZGd}Pz0NKpQNStP%H?|843x$JBg?r)4moFti zn=_ED0xEn0^zT-nm@Yz`aRDzcchug!dw+t&z+NymcHw7a{P+kMSbRWDe}D!}V`XLT zKXKy31CSzPV}FzXAR4H={p{J(RS-6WWC05^eu{-^J`J=n@ywaiSCJI~+5Z?Bnexw^ zIW+}MoB?dW|Ns9yfHvP`Wo7X=e*E}5bVZDe%;9IwoLqx04(FSgm|iwBGgE{MkjgMN pHmxO94@^BY8d+Au1n5o!0MIOLH#UbIng9R*07*qoL(2xlz20(2+ z0L1)6dTSxjkOU^EW(5*8!vQQ17m%pA5o9~q3&7}c0Mh%hDB1`Lc_?0w6o>^t%?n_P zSU>_;G=da8Knh%#W(T171!Tn_100a}iO8lSfs0VhA28AZ&T53B!2;OQb$4nuFf3k0004eNklH^6lHVzCL^Q>=;N4>;)uA z24iE>Hef7Nf`7!$o;?GWx3I8K`2G8DA<)1qU^szd?jr+(fc)9Bdp^RQ0yE_7+0#{w zj7+&eK0L5aoH+3SD4q{AzyRo?(?B_XM#fLEAUzlcfCSH+IW>imkvSa1Mh2%(pT5e< z%HjbuVwi)xcL3;O1-Jn~(-MGmBZ-DAz!r!ggC-yaVjvJ3 zK(Rj-gB*dDA7DgINYH3J05Sw9$%rJb05u%hpp8H^0VrVr4IGf-i)i8xK#GCPL?mGc z6fY19pkAF1H8q%#)K~y%0tMhga-$Ij3UFp7VlglQHh^eGO0zRSfB^t&2CDA*qaqgo O0000og1ZeCkl*2LWpxFWbQ)@5V)8(jPVj7?296jfPZb98-!Tky6zOP=8Z%Y zMVV!p3sFQ82*dDEC4-_UuYfgg1mGHZ{>&I-GsaK=8NEsO@6t5EVg;X@k^r*rx6!fjoa5!Fn9WcfgvfO-h8@Q4&1?-XqOmbvg`wsLOgQ%|f~Y9LNj0ux&~a z;4ZqbQ=od=@-Z(57-J0tx=!ZtwgYL1{NC-NKK>El&(c@?E%ychWpi}Pzfmaw0000< KMNUMnLSTX*e1u5= delta 345 zcmV-f0jB=b0`vlqB!3BTNLh0L01FcU01FcV0GgZ_0000PbVXQnQ*UN;cVTj606}DL zVr3vnZDD6+Qe|Oed2z{QJOBUz0ZBwbRCwBAG+8-y0Rsa=JOcsn`|0z$7YdtI(8ZZx zn&UML8K&C%!6kC^EE(D@-QoOy-@Ypw^w-|OW&jv0ym6j^mw%0&Ay7$+K~qo^Ot+ss zfT9?iAxy}e_A>{-HdmTBfHi;m^%KJ@=!T#eaQ*#jh8sZ42Xx7v$9Hjt2eKh7$Pyr@ zOY`u7Z3cN^{k>~&Id)YgbaRw33~0A98!u rfp-B5wtyi8fV{Affjj`#2M}NY9{7inXV6Eh00000NkvXXu0mjfB-4*> diff --git a/designer_base/src/com/fr/design/images/m_file/export.png b/designer_base/src/com/fr/design/images/m_file/export.png index f0908eae2ad49535b833edb03acd5c9174ca7dbd..c56ee44199cf5c740f354e30d33c76f5e3c928cc 100644 GIT binary patch delta 335 zcmV-V0kHm`0_p;gB!2;OQb$4nuFf3k0003bNkl-#@cKT%0bz<|>#N zBLm|{24?0|yapT$SPO|`m@Xg<@)jc_!%twy1%R9nk|NCujKE-IVv0ZDyXJt2iCF{5 z1~4-+dLQszy%MDH|NnpWAQ~P9u#^Q71Oa$5g>b>-KEE~Fk+@(c*b6{^H83(VUghHA z6vL(wT@x}NY)HVFGiQLQ>i_ER-+%14va%9GRzQdi4@8(DzkdDRM@SR0JVsQRn3&W9 hQ(FVFB3x{ccL5C8TUy$~7JvW%002ovPDHLkV1gV%k@5fl delta 259 zcmV+e0sQ{z0-pkqB!3BTNLh0L01FcU01FcV0GgZ_0000PbVXQnQ*UN;cVTj606}DL zVr3vnZDD6+Qe|Oed2z{QJOBUytVu*cRCwBA{Qv(y!>n1e{xgsP($dlxSzsJjcQ=wW z@7}o!OfxZ12q-oH?gd4814rTTL5g9nKxZS_j6D{x#WRYNk)jX70AQ9TD-9?!og9KAf z&IE)MBFJ8MQ6|VB!IYCT0U?D5YJMscv;=C23Ep0i$xVMAWtHw11+1 zg3fepoj190!4fhU>wKwR)4D%BPQkhDMKAU>k~NS zfOqCk0AjIte`JD1#elI%lphp{V#3H=e$1$YpxR85WD2f=4=l^FO$K`+lW5|_#|T+5 zk~Y@}_$!RZ*>NR5i8L^0>qZ|8FSgtWKNYnchM|uGa3GXy?#CNEa z?6{ZkJy1%$a*-|yF-T^3tPXrLTv%(HYd9}}$-;y|9WO`3J#96QHT4k#SDr%f{t7PH g;ZOfeF8|N?0oLAu9puL7Yxh@5WukMjLvzW=t55y$B>F!Nl#K7SQ!|Pv>Z!k;85UUY+y)AO!)CzzVk4H zfP=yx_EYI>f((o-*A5+FaS{LtiSqnEz`?}8#No;Mc>jC{GY5u7)_;GQm5u?8XLe;^ z>R?^;M*i~u|8IEeXVh>7}GW|96ta5%>Vk$#tbY1 w+;`5taS*;KDFHN7k>L>|qXR=?1)stJhU;x|Hk~uJfeH%-Pgg&ebxsLQ0GGvg%m4rY diff --git a/designer_base/src/com/fr/design/images/m_format/highlight.png b/designer_base/src/com/fr/design/images/m_format/highlight.png index 7491cb9c23367c4cf94630bd83651bcc83d17318..14ff765e43e622ca8e13d6d9b3db141625ea1942 100644 GIT binary patch literal 352 zcmV-m0iXVfP)Px$8c9S!R5%f1V4xCUB*z?MW3y03#{bR#|NrM?U|>!?d-mimCQ=P@aB$#YWc-&3 zG(;V!SB`<Px$Nl8ROR5%f(lD|vCP!PxOUeZ+54tDD3>_1SQq?4fFRzYwHTJ#?hT8cOb4t5h1 z#6ocrXF(lx>r{tUsjo@SyMz~rrm?|;fUbyW0T3U02hOVcs{(;XG`aCTyz_h-Sqirh@q@V)VKWU3%o*1J zXo>Z=#)S9hVlcIZBrH-B_-@&>-gS$Qa*|rXbeJ`&gvu1Ip#U_L!PC{xWt~$(695s>E{^~J literal 186 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`oCO|{#S9GG!XV7ZFl&wkP*AeO zHKHUqKdq!Zu_%?nF(p4KRlzeiF+DXXH8G{K@MNkDP?5W*i(^Q|t)w6S|Jxs47rXmk zb4HMX55IE9K?lYJmYJKXzrXvhrnXEa)28^DN%QK}+RDPrtqE5e0-4#`8Aa07*t|9y cJ2WsdRQ@TrcvryY9MDJxPgg&ebxsLQ06z3OU;qFB diff --git a/designer_base/src/com/fr/design/images/m_insert/hyperLink.png b/designer_base/src/com/fr/design/images/m_insert/hyperLink.png index a23db4f76a59e4552679c6f46e238d66fd772532..b81a666d5ace4362ea458964dba1c0d33ac12747 100644 GIT binary patch literal 740 zcmVPx%o=HSOR5%f>Q%!3VQ51b|Vq$2GA~wMgOxxh5h;A~$l7hPm+HMqL7eYa-KS1b4 zcl`&taiP(LU;}1b4cI_~hz&_*rB+w@C>XRLhS*>}=XuT~8ER=)`pBJo-o59(oOkDr z5dUe(gU*RWBIlG6OR&pAs9>KXx1|(sVDWrD|7m}nV{af9i@8QdMjtAro=GVuQFKB| zZ3TD(_$s(l$Snr~0pHBbOnPf;t2eB-74eW_v7ACd6iU819CFb#)rvQGS150yz)t3361| zsMTs0s@3XiV4?BR?}=IfOrZEXdXP3v5s^}DGS5ZK7<1$xvWjaiu-3}+5e`Ql;Gd2F zj)CMtPkt(8-hc;J9kqy3wtx}RUc#RQzlHb@Sf^0P-?bEBGYdNd!ZjX#5onPDSP8=#PA;l{kw%Yikw|J?y4ddOmr6`-te#QtqR?5-j zA!y)6C^R`YoZ5p<;+Ie=m6kCTY{{&ph(spfdc|U?=J6c!W14rvVcotOIeV936ePYk zPqW#o0^7Z`Il3N6V_NSG4z}a_0rR@9-v@u4Ia|??7>!2959$#W>{IwxkB0UC?Ee7f Wx-kBTvz>e?1vK=^hfiN$0)-@C3fb9M8H}}57(|5l zEH>{ybUFT zCiv>z$E!&Gytwno*;1J8Y(VF)+kN!!lNWC;{`w8JhvD6a&nX}pZou}#XY8K6ddu+g z?T0Tve*Io6Cn@#=CU@iBV+Ji{Ic7#iM*XKR-+;x01bEM&7yz;j! zUtJ$4{1G|$KY#tkaO(0ch9l>|jy(V~U?Z|27jNAEC@jGLhLx2iFFwHK1ur)j12YrT za}h!QwII!J-hX1adH*RqL4gdIfELdIY^*F-Knxx(4s~BgvzdSY{nOfY^qkP=uiv48 zD779vA%Roj)tCPmR$cz{@8=(c*Fd1dgY99(j$iU<7J;ZDKZx?`^=fsV0jb+Kq4RskU=m7ATexwkT?in7yxqxjD{$K7y@G> z(-;Pj>Ha5gT+`opi` zQeXo>E?{6N2MZ!g!c`Gsz|sLa4NDs^adbXLIsjP&3w;<3vmBid6Q?*9Fbsg%1fyX# yq4QzlCK9~YRG$Tj>Ffb^~jf8B$Cl3JHp`wkd634Ir0000M*H+f pnk*aHZtu5dv(KK)TN^~^eFI!WfU?6onFIg;002ovPDHLkV1k#JsA&KI delta 307 zcmV-30nGmL0?q=EB!3BTNLh0L01FcU01FcV0GgZ_0000PbVXQnQ*UN;cVTj606}DL zVr3vnZDD6+Qe|Oed2z{QJOBUy+et)0RCwBA3=R%nz`(!|&p;kn$N)6pKM*h=V^YMJ z7$^h-ZvZ36ACwrt0wUI|S;L4d7!nflA11~dw=Mukfntguh<`r~Kx!E9qw|5TQXs{EkLY}$7akBDi0_!i8P2oWG5ldio+yWrh2Z@6WInC~T5y+eXbj1RYIu=|u12yByBOt@(1LYmuVJ<)icUW~9h{#~^ zAaz&`c*decR4gI_sRJ3X5abtRiSJxdL>cg%k(&V^zyQG!Z)6Q^wk`kw002ovPDHLk FV1m+Bbfy3R diff --git a/designer_base/src/com/fr/design/images/m_report/exportAttr.png b/designer_base/src/com/fr/design/images/m_report/exportAttr.png index f0908eae2ad49535b833edb03acd5c9174ca7dbd..c56ee44199cf5c740f354e30d33c76f5e3c928cc 100644 GIT binary patch delta 335 zcmV-V0kHm`0_p;gB!2;OQb$4nuFf3k0003bNkl-#@cKT%0bz<|>#N zBLm|{24?0|yapT$SPO|`m@Xg<@)jc_!%twy1%R9nk|NCujKE-IVv0ZDyXJt2iCF{5 z1~4-+dLQszy%MDH|NnpWAQ~P9u#^Q71Oa$5g>b>-KEE~Fk+@(c*b6{^H83(VUghHA z6vL(wT@x}NY)HVFGiQLQ>i_ER-+%14va%9GRzQdi4@8(DzkdDRM@SR0JVsQRn3&W9 hQ(FVFB3x{ccL5C8TUy$~7JvW%002ovPDHLkV1gV%k@5fl delta 259 zcmV+e0sQ{z0-pkqB!3BTNLh0L01FcU01FcV0GgZ_0000PbVXQnQ*UN;cVTj606}DL zVr3vnZDD6+Qe|Oed2z{QJOBUytVu*cRCwBA{Qv(y!>n1e{xgsP($dlxSzsJjcQ=wW z@7}o!OfxZ12q-oH?gd4814rTTL5g9nKxZS_j6D{x#WRYNk)jX70AQ9TDJ92o^pUd;=@1-lkhQLJ77rg3*vWw?281CUZ5Zq>Aq a0RaAIJ4=DeT@9B20000f59&ghTmgWD0l;*TI7}*0BAb^tj|`8MF3bZ02F3R#5n-i zEdVe{S7t~6u(trf&JYW-00;~KFj0twDF6g}0AR=?BX|IWnE(_<@>e|ZE3OddDgXd@ znX){&BsoQaTL>+22Uk}v9w^R97b_GtVFF>AKrX_0nSU8Ffiw@`^UMGMppg|3;Dhu1 zc+L*4&dxTDwhmt{>c0m6B4T3W{^ifBa6kY6;dFk{{wy!E8h|?nfNlPwCGG@hUJIag z_lst-4?wj5py}FI^KkfnJUm6Akh$5}<>chpO2k52Vaiv1{%68pz*qfj`F=e7_x0eu z;v|7GU4MZ`1o+^>%=Ap99M6&ogks$0k4OBs3;+Bb(;~!4V!2o<6ys46agIcqjPo+3 zB8fthDa9qy|77CdEc*jK-!%ZRYCZvbku9iQV*~a}ClFY4z~c7+0P?$U!PF=S1Au6Q z;m>#f??3%Vpd|o+W=WE9003S@Bra6Svp>fO0Dk~Ppn)o|K^yeJ7%adB9Ki+L!3+Fg zHiSYX#KJ-lLJDMn9CBbOtb#%)hRv`YDqt_vKpix|QD}yfa1JiQRk#j4a1Z)n2%fLC6RbVIkUx0b+_+BaR3cnT7Zv!AJxWizFb)h!jyGOOZ85F;a?DAXP{m@;!0_ zIe&*-M!JzZ$N(~e{D!NlT@zqLtGcXcuVrX|L#Xx)I%#9!{6gSJKPrN9dR61N3(c z4Tcqi$B1Vr8Jidf7-t!G7_XR2rWw%BIv?Wdily+ylO`+*KY$4Vz$Cr4+G&IO(4Q`uA9rwXSQO+7mGt}d!;r5mBU zM0dY#r|y`ZzFvTyOmC;&dA;ZQ9DOhSRQ+xGr}ak+SO&8UBnI0I&KNw!HF0k|9WTe* z@liuv!$3o&VU=N*;e?U7(SJOn)kcj*4~%KXT;n9;ZN_cJqb3F>Atp;r>P_yNQcbz0 zDW*G2J50yT%*~?B)|oY%Ju%lZ=bPu7*PGwBU|M)uEVih&xMfMQu79>|wtZn|Vi#w( z#jeBdlf9FDx_yoPJqHbk*$%56S{;6Kv~mM9!g3B(KJ}#RZ#@)!h;8Eq#KMS9gFl*neeosSBfoHYnBQIkwkyowPu(zdm zs`p{<7e4kra-ZWq<2*OsGTvEV%s0Td$hXT+!*8Bnh2KMeBmZRodjHV?r+_5^X9J0W zL4jKW`}lf%A-|44I@@LTvf1rHjG(ze6+w@Jt%Bvjts!X0?0=B0A@}E)&XLY(4uw#D z=+@8&Vdi0r!+s1Wg@=V#hChyQh*%oYF_$%W(cD9G-$eREmPFp0XE9GXuPsV7Dn6<% zYCPIEx-_~!#x7=A%+*+(SV?S4962s3t~PFLzTf=q^M~S{;tS(@7nm=|U2u7!&cgJC zrxvL$5-d8FKz~e#PB@hCK@cja7K|nG6L%$!3VFgE!e=5c(KgYD*h5?@9!~N|DouKl z?2)`Rc_hU%r7Y#SgeR$xyi5&D-J3d|7MgY-Z8AMNy)lE5k&tmhsv%92wrA>R=4N)w ztYw9={>5&Kw=W)*2gz%*kgNq+Eef_mrsz~!DAy_nvVUh~S7yJ>iOM;atDY;(?aZ^v z+mJV$@1Ote62cPUlD4IWOIIx&SmwQ~YB{nzae3Pc;}r!fhE@iwJh+OsDs9zItL;~p zu715HdQEGAUct(O!LkCy1<%NCg+}G`0PgpNm-?d@-hMgNe6^V+j6x$b<6@S<$ z+<4_1hktL%znR>Ww5hAaxn$2~(q`%A-YuS64wkBy=9dm`4cXeX4c}I@?e+FW+b@^R zDBHV(wnMq2zdX3SWv9u`%{xC-q*U}&`cyXV(%rRT*Z6MH?i+i&_B8C(+grT%{XWUQ z+f@NoP1R=AW&26{v-dx)iK^-Nmiuj8txj!m?SIDu(gXbmBM!FLxzyDi(mhmCkJc;e zM-ImyzW$x>cP$Mz4ONYt#^NJzM0w=t_X*$k9t}F$c8q(h;Rn+nb{%IOFKR-X@|s4Q zQ=0o*Vq3aT%s$c9>fU<%N829{oHRUHc}nwC$!Xf@g42^{^3RN&m7RTlF8SPG+oHC6 z=YM0)-)awU@466l;nGF_i|0GMJI-A4xODQe+vO8ixL2C5I$v$-bm~0*lhaSfyPUh4 zuDM)mx$b(swR>jw=^LIm&fWCAdGQwi*43UlJ>9+YdT;l|_x0Zv-F|W>{m#p~*>@-I zt-MdXU-UrjLD@syht)q@{@mE_+<$7ocYmPs(cDM(28Dyq{*m>M4?_iynUBkc4TkHU zI6gT!;y-fz>HMcd&t%Ugo)`Y2{>!cx7B7DI)$7;J(U{Spm-3gBzioV_{p!H$8L!*M z!p0uH$#^p{Ui4P`?ZJ24cOCDe-w#jZd?0@)|7iKK^;6KN`;!@ylm7$*nDhK&Gk-1H z0000WV@Og>004R=004l4008;_004mL004C`008P>0026e000+nl3&F}0004JNkl8+_5XXPBYXUNr+e_!h(nYf567dd{6g(hEJOvdmKn0S^OGz0eft^V~cC{8n zxs@!h$2i2Hk-{qepn)Mw||fC<#PF40GJu8)#}gN+XvzV2Z$3yy;1!UDr{TC4Jws-|z9>^Y`Ut0OImQRZTWjm8NNE+kck%e2$rM zKA*w3uR*RLe~!l^)9IAH?=dr~s!EA>7GhFV0dP1RaLzHAOqk7PG);r)F97*kEEZH% zh4(()$mnSx`c{MJUsVYqq^rw&A`-m6e-65Fpx|=30N}m9OH4#Vkv9Ml!OSR%0uiCE zYwEgAaaBzgcm(iM4IcH#Z7?7nC>W2&i7B6fycUlpGbvcF*RTIO#`(Xm0RV;k#I)s_ R4fg;5002ovPDHLkV1i{l+jjr} diff --git a/designer_base/src/com/fr/design/images/m_report/reportEngineAttr.png b/designer_base/src/com/fr/design/images/m_report/reportEngineAttr.png index 4ffcaba050a9ffb98f67b73bf872ac043a1b4367..7d1389bfd79aa35ea62c55bc107d784a0211104a 100644 GIT binary patch delta 386 zcmV-|0e$|&1DykqB!2;OQb$4nuFf3k00043NklJ!fXa%mgg$@-^c0D8zGDabh)=OB6i$j}Z*FJy5t-

PyrrrS|;bU;)*5CzA+Uw&z= zPge|zqBzvr+_C!`(DUXa7Hg%-52Esg1${QTSBeI{-`jzKGXhthK%D2(eIPnfs<+8` z5N{EQ>k4UB^LwrVw>>t-?8R~N3d9&y+caSDjg-?dkWGd)?-~R_@a%bF#0dqEckqOn z`OY1f^C(ItK)%mvez`m@WQHt1!88t!Q`Ss8e);is6GZn9j7wEE|&j7 gmSvwElD|KF1LahZj;F;a@c;k-07*qoM6N<$g5(Ud1ONa4 delta 426 zcmV;b0agB;1H=Q6B!3BTNLh0L01FcU01FcV0GgZ_0000PbVXQnQ*UN;cVTj606}DL zVr3vnZDD6+Qe|Oed2z{QJOBUzQAtEWRCwBAoHTXTe+Du^ZdNKI3y9(6=}fZbZQJ*P zX%=(=VgRy*EZ77|0bm1^6qU%(ispq?Yc_!Cu#f;a8y5hn!GG`qvS6_GZw4k&ZH8Yf zJi&ani0usjUSDNk)(pk&1!Nb1H2>LK!tkGgiGdL+_j83eko}M0^qF%Ek2uZoxZvj} zhQD{WF)%O!HUIwyR|L|`z{Jd8?itHqA){~mF;m^Ku1_r2RR+nBd27`Zp z!CpcSA0}iMIDgpN5Da@{=c5<^=15zB0}SL`5cs{P7>ps3%nU5%MGSwAcQE{%BF~`q z|02VWDe?&{=r({t8{}NDAs`y68N~kg`6{&@|3C4$86)IpAf*Asa)Bpeg diff --git a/designer_base/src/com/fr/design/images/m_web/datasource.png b/designer_base/src/com/fr/design/images/m_web/datasource.png index 4b8bd89ab45653fe064a8db8ee557d70bab59247..2ff090e33d2f2058ce87bf88e02bf54843fcfe6d 100644 GIT binary patch delta 414 zcmV;P0b%~n0=NT^B!2;OQb$4nuFf3k0004UNklRO zU`CS##ezW~Nf=X;`x_7l#IXDoBqV5pAwywG)q<#G0)@a~+IxJj?cK`QMlvqBzSr-4 z@5g<;68&?jYJM1oJJ!-E5qE%ZU^mM62keAMjkKoQD2iT7oPT_QRx7+ziq4tYxZpgi zl**WC7{}3t#PyWKgTIo6TX1;b@_YfU)fvFC3oNnYlABWkN5oitV{|9W%sNrJK!adp zO!jUqUnB2Paw{6_G2TCM#s|PpO7R48jwB*BV4)ug)x&@sh|7@zu>emXf?_G3 z>VcR@Mi?Z*b1fq@D=R>q?tmv_U4$m43Ba5PN=ys@0R{l`R66HBZ08aH0000G9wvZ8 z4~npfi7AlJ_#Q4uie{K5n4W0i$8AQBqRS1IB$HNHa)`k&$6JBjf+MAU4zs3|nE*0un?9 zjEqb*_wGIX1X2`3(#%){G_VjTR!-30pj2mKVs;Z4$SOd?<|``7r>$PS`Y+59f(DqF rSXeVK{0V1bVw!U5)TvuAjW8Mj3m$bkMa$X200000NkvXXu0mjfpmUK* delta 477 zcmV<30V4kN0`~)uB!3BTNLh0L01FcU01FcV0GgZ_0000PbVXQnQ*UN;cVTj606}DL zVr3vnZDD6+Qe|Oed2z{QJOBUzgh@m}RCwBA{Qv(y10{eFn*l4%UvU6ZFl-MK|NH0f zdk}c@=ABYQR1hObj0K+t5cu-t>%F&c-U_|};-5c$3Ic@$k$>e`p!9xh&O3JG1c*|? z=LIGP3IWLmNPT>3!17t5SoIQP>;pfkvU^Y8DJA<*QAyxwtZ*O4`{Ph{c zJODJr0d4>;4KN_h`Hmq~aUa8mzjh2E7k4vo{QbobGK44>fHdc+>|o$z{>2b!aFSs; zgDXSKxvd|8Qhx>DbO4OT|F~iSSu+fL|I5a}>9CIxB@FJ|y36qD)oUEAc7*xj$<^;TY?lbgJ-WhV4MlxFzDAj!we z@bBl#e=6@An1F^PGT0tjfHi(W2B6~rAD_QRjvTpm`_7#S@6R@PVN(Oc009O7%xlu- TL6mvo00000NkvXXu0mjfvq08} diff --git a/designer_base/src/com/fr/design/images/m_web/function.png b/designer_base/src/com/fr/design/images/m_web/function.png index 5b85a0c7a51f831551aa212db8d3fc14244a0608..5f8119e09dd4bd2efa35f03cf120da55925fa2ae 100644 GIT binary patch delta 163 zcmV;U09^lo0>1%}B!2;OQb$4nuFf3k0001aNklVES=;1 z2!N`9E%g9esJ0fFpZ)_IS^zD82*sPi)PO4h7!a@OM*vjS1swH{8))G7{s10QFcYvK RGJ603002ovPDHLkV1gwCMFs!> delta 228 zcmVs;v2(@ouBq|JqGF>+^V55l+#COyE8L-hr z0Z>AMVLL0!|HynO#t95cUjJw0$ykds3_ec}V#F7S@K^vUWZ=zQhe5*>;mr#~xPZ2q eiDCl)0t^5}!D~PUK!d3O0000iA^b`Cx3*TFPFiQA^F3_Sj5iFqQ4m+2S}y{6Nt z@oKf|1qlEcN?7F?s@cGs^;XL%DrKz_d6x{1$77jhv*~`>LNp5xRco)pHk6z(&HNp@ zPlTBMfZf3mLq{kPdIUepxpx3a*#q&%%OOev zBpCqI>;R2YAx~(D@gj;qnpc zwE`fnhe`(m4OG~`f=4qfP(gqnh~HxghYd`4qPT%T8Zy9^4v=k^hxr}o)CMHE|HuX~ tVbLsr7V_w6;2@Ni2dQNo@Z1OxU;uRtT|77&0DS-e002ovPDHLkV1j5(gvkH^ diff --git a/designer_form/src/com/fr/design/mainframe/actions/NewFormAction.java b/designer_form/src/com/fr/design/mainframe/actions/NewFormAction.java index 78b17d4b3d..dfcc8805c2 100644 --- a/designer_form/src/com/fr/design/mainframe/actions/NewFormAction.java +++ b/designer_form/src/com/fr/design/mainframe/actions/NewFormAction.java @@ -22,7 +22,7 @@ public class NewFormAction extends UpdateAction { this.setMenuKeySet(NEW_FORM); this.setName(getMenuKeySet().getMenuKeySetName()); this.setMnemonic(getMenuKeySet().getMnemonic()); - this.setSmallIcon(BaseUtils.readIcon("/com/fr/web/images/form/new_form3.png")); + this.setSmallIcon(BaseUtils.readIcon("/com/fr/design/images/buttonicon/new_form3.png")); this.setAccelerator(getMenuKeySet().getKeyStroke()); } From 8fb56a41f9221c802a1a9c16eddb7fa08812ff31 Mon Sep 17 00:00:00 2001 From: hzzz Date: Mon, 25 Sep 2017 18:32:01 +0800 Subject: [PATCH 076/125] =?UTF-8?q?=E5=9B=BE=E6=A0=87=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/fr/design/images/buttonicon/new_form3.png | Bin 0 -> 278 bytes .../fr/design/images/server/platform_16_16.png | Bin 0 -> 605 bytes 2 files changed, 0 insertions(+), 0 deletions(-) create mode 100644 designer_base/src/com/fr/design/images/buttonicon/new_form3.png create mode 100644 designer_base/src/com/fr/design/images/server/platform_16_16.png diff --git a/designer_base/src/com/fr/design/images/buttonicon/new_form3.png b/designer_base/src/com/fr/design/images/buttonicon/new_form3.png new file mode 100644 index 0000000000000000000000000000000000000000..cbf9e82c6d970f0a96a47ba7d03060f337072472 GIT binary patch literal 278 zcmV+x0qOpUP)Px#&`Cr=R5%f>Qp*v-AP`*~52gVd30}Bage6EDVjHmpd$0m>vzmB7miTrU91%0- zvj6wqE>ZOQ`d$b4HLDak@BR6$rv-p}wBFsd)+Ye0;I!JV+w6(d0U)Y{nZa3l2;|1m zD`U)dnjSZza7_T5tSP9GG_PRoF>$aGCIsmk%wXXHe6FF0roG^e~OoY@QnPz cO8{8m6L9@dd*XEcLjV8(07*qoM6N<$g3>m3MF0Q* literal 0 HcmV?d00001 diff --git a/designer_base/src/com/fr/design/images/server/platform_16_16.png b/designer_base/src/com/fr/design/images/server/platform_16_16.png new file mode 100644 index 0000000000000000000000000000000000000000..3c3c808339b2e1da5461478305e1027eed3112a4 GIT binary patch literal 605 zcmV-j0;2tiP)Px%7fD1xR5%fBQbA}FK@^=ot04q)@FJRuvIh^^OC?!h4Pp)o8t|e-@E~F z<$Rh?dH{q%5QN_$m=Z$FBv`R{B}cUSSta)U#Ro}Tokj;?7@bFKQx_|e@6T?blV?bL zS^2u{(;dd*qad!Cv0V?Pbqa(l`=KSQb4tW3%l+*21_z0@#~_*nJ{knuqllN{ znAI7xuI(g%_$t765P!&I_K$m>_e-ym+-tR()$Mj)!#^e^)j4PDR;5zOV*hj4@oGMQ zpweo!HWGn;CSnx2p%P#wo)C*KdB4AP5C2?{(z?}bHUnLh+*4wPVsC8w_!EU=P&@lw z@cmB6v`Q9z%eH|1x%vt8QcCZR(!RpP2~Bg roMGlT?pYL=$18o&>2$u~Ef}=FP|nkczO03M00000NkvXXu0mjf_h=Ty literal 0 HcmV?d00001 From ed6eba7e55fa13dd5a68e3957a4d695f4eba69d1 Mon Sep 17 00:00:00 2001 From: mengao <283296419@qq.com> Date: Mon, 25 Sep 2017 20:05:10 +0800 Subject: [PATCH 077/125] =?UTF-8?q?=E4=BF=AE=E6=94=B99.0=E6=96=B0=E8=80=81?= =?UTF-8?q?=E5=9B=BE=E8=A1=A8bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/fr/plugin/chart/map/server/ChartMapEditorAction.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/designer_chart/src/com/fr/plugin/chart/map/server/ChartMapEditorAction.java b/designer_chart/src/com/fr/plugin/chart/map/server/ChartMapEditorAction.java index 0140e04068..b22b3f5be6 100644 --- a/designer_chart/src/com/fr/plugin/chart/map/server/ChartMapEditorAction.java +++ b/designer_chart/src/com/fr/plugin/chart/map/server/ChartMapEditorAction.java @@ -1,6 +1,8 @@ package com.fr.plugin.chart.map.server; import com.fr.base.ConfigManager; +import com.fr.base.Env; +import com.fr.base.FRContext; import com.fr.design.DesignerEnvManager; import com.fr.design.actions.UpdateAction; import com.fr.general.GeneralContext; @@ -24,7 +26,8 @@ public class ChartMapEditorAction extends UpdateAction { int port = DesignerEnvManager.getEnvManager().getJettyServerPort(); String web = GeneralContext.getCurrentAppNameOfEnv(); String serverlet = ConfigManager.getProviderInstance().getServletMapping(); - StartServer.browserURLWithLocalEnv(String.format("http://localhost:%d/%s/%s?op=map", port, web, serverlet)); + Env env = FRContext.getCurrentEnv(); + StartServer.browserURLWithLocalEnv(env.isLocalEnv() ? String.format("http://localhost:%d/%s/%s?op=map", port, web, serverlet) : env.getPath() + "?op=map"); } } From 239be4dbde143bd06409bb37854087502ad2c472 Mon Sep 17 00:00:00 2001 From: hzzz Date: Mon, 25 Sep 2017 20:14:09 +0800 Subject: [PATCH 078/125] =?UTF-8?q?=E5=9B=BE=E6=A0=87=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../gui/controlpane/JListControlPane.java | 2 +- .../gui/controlpane/UIListControlPane.java | 2 +- .../com/fr/design/gui/core/WidgetOption.java | 30 +++++++++--------- .../design/images/buttonicon/list_pressed.png | Bin 1046 -> 296 bytes .../com/fr/design/images/control/sortAsc.png | Bin 404 -> 345 bytes .../fr/design/images/gui/color/foreground.png | Bin 2970 -> 14799 bytes .../fr/design/images/lookandfeel/FileIcon.png | Bin 3014 -> 232 bytes .../com/fr/design/images/m_insert/chart.png | Bin 151 -> 135 bytes .../fr/design/images/m_insert/floatPop.png | Bin 222 -> 236 bytes .../fr/design/images/m_insert/subReport.png | Bin 279 -> 279 bytes .../com/fr/design/form/images/delete icon.png | Bin 232 -> 167 bytes .../fr/design/form/images/download icon.png | Bin 706 -> 336 bytes .../fr/design/form/images/install icon.png | Bin 705 -> 453 bytes .../src/com/fr/design/form/images/refresh.png | Bin 474 -> 606 bytes .../fr/design/gui/core/FormWidgetOption.java | 2 +- 15 files changed, 18 insertions(+), 18 deletions(-) diff --git a/designer_base/src/com/fr/design/gui/controlpane/JListControlPane.java b/designer_base/src/com/fr/design/gui/controlpane/JListControlPane.java index 83cf7a50d3..bccff1ad78 100644 --- a/designer_base/src/com/fr/design/gui/controlpane/JListControlPane.java +++ b/designer_base/src/com/fr/design/gui/controlpane/JListControlPane.java @@ -451,7 +451,7 @@ public abstract class JListControlPane extends JControlPane { this.setName(Inter.getLocText("FR-Action_Copy")); this.setMnemonic('C'); this.setSmallIcon(BaseUtils - .readIcon("/com/fr/base/images/cell/control/copy.png")); + .readIcon("/com/fr/design/images/m_edit/copy.png")); } @Override diff --git a/designer_base/src/com/fr/design/gui/controlpane/UIListControlPane.java b/designer_base/src/com/fr/design/gui/controlpane/UIListControlPane.java index f1cd5f8740..c5e12fa69c 100644 --- a/designer_base/src/com/fr/design/gui/controlpane/UIListControlPane.java +++ b/designer_base/src/com/fr/design/gui/controlpane/UIListControlPane.java @@ -601,7 +601,7 @@ public abstract class UIListControlPane extends UIControlPane { this.setName(Inter.getLocText("FR-Action_Copy")); this.setMnemonic('C'); this.setSmallIcon(BaseUtils - .readIcon("/com/fr/base/images/cell/control/copy.png")); + .readIcon("/com/fr/design/images/m_edit/copy.png")); } @Override diff --git a/designer_base/src/com/fr/design/gui/core/WidgetOption.java b/designer_base/src/com/fr/design/gui/core/WidgetOption.java index e6326aa252..c7cff45afa 100644 --- a/designer_base/src/com/fr/design/gui/core/WidgetOption.java +++ b/designer_base/src/com/fr/design/gui/core/WidgetOption.java @@ -127,27 +127,27 @@ public abstract class WidgetOption implements Serializable { } public static final WidgetOption DATEEDITOR = WidgetOptionFactory.createByWidgetClass(Inter.getLocText(new String[]{"Date", "Widget"}), - BaseUtils.readIcon("/com/fr/web/images/form/resources/date_16.png"), + BaseUtils.readIcon("/com/fr/design/images/buttonicon/widget/date_16.png"), DateEditor.class); public static final WidgetOption TREE = WidgetOptionFactory.createByWidgetClass(Inter.getLocText("Form-View_Tree"), - BaseUtils.readIcon("/com/fr/web/images/form/resources/tree_16.png"), TreeEditor.class); + BaseUtils.readIcon("/com/fr/design/images/buttonicon/widget/tree_16.png"), TreeEditor.class); - public static final WidgetOption TREECOMBOBOX = WidgetOptionFactory.createByWidgetClass(Inter.getLocText("FR-Designer_Tree-ComboBox"), BaseUtils.readIcon("/com/fr/web/images/form/resources/comboboxtree.png"), + public static final WidgetOption TREECOMBOBOX = WidgetOptionFactory.createByWidgetClass(Inter.getLocText("FR-Designer_Tree-ComboBox"), BaseUtils.readIcon("/com/fr/design/images/buttonicon/widget/comboboxtree.png"), TreeComboBoxEditor.class); public static final WidgetOption CHECKBOXGROUP = WidgetOptionFactory.createByWidgetClass( - Inter.getLocText(new String[]{"Form-CheckBoxGroup", "Widget"}), BaseUtils.readIcon("/com/fr/web/images/form/resources/checkbox_group_16.png"), CheckBoxGroup.class); + Inter.getLocText(new String[]{"Form-CheckBoxGroup", "Widget"}), BaseUtils.readIcon("/com/fr/design/images/buttonicon/widget/checkbox_group_16.png"), CheckBoxGroup.class); public static final WidgetOption RADIOGROUP = WidgetOptionFactory.createByWidgetClass( - Inter.getLocText(new String[]{"Form-RadioGroup", "Widget"}), BaseUtils.readIcon("/com/fr/web/images/form/resources/button_group_16.png"), + Inter.getLocText(new String[]{"Form-RadioGroup", "Widget"}), BaseUtils.readIcon("/com/fr/design/images/buttonicon/widget/button_group_16.png"), RadioGroup.class); public static final WidgetOption NUMBEREDITOR = WidgetOptionFactory.createByWidgetClass( - Inter.getLocText(new String[]{"Number", "Widget"}), BaseUtils.readIcon("/com/fr/web/images/form/resources/number_field_16.png"), NumberEditor.class); + Inter.getLocText(new String[]{"Number", "Widget"}), BaseUtils.readIcon("/com/fr/design/images/buttonicon/widget/number_field_16.png"), NumberEditor.class); public static final WidgetOption LABEL = WidgetOptionFactory.createByWidgetClass( - Inter.getLocText(new String[]{"Label", "Widget"}), BaseUtils.readIcon("/com/fr/web/images/form/resources/label_16.png"), + Inter.getLocText(new String[]{"Label", "Widget"}), BaseUtils.readIcon("/com/fr/design/images/buttonicon/widget/label_16.png"), Label.class); public static final WidgetOption BUTTON = WidgetOptionFactory.createByWidgetClass( @@ -155,23 +155,23 @@ public abstract class WidgetOption implements Serializable { Button.class); public static final WidgetOption FREEBUTTON = WidgetOptionFactory.createByWidgetClass( - Inter.getLocText(new String[]{"Form-Button", "Widget"}), BaseUtils.readIcon("/com/fr/web/images/form/resources/button_16.png"), + Inter.getLocText(new String[]{"Form-Button", "Widget"}), BaseUtils.readIcon("/com/fr/design/images/buttonicon/widget/button_16.png"), FreeButton.class); public static final WidgetOption MULTI_FILEEDITOR = WidgetOptionFactory.createByWidgetClass( - Inter.getLocText(new String[]{"File", "Widget"}), BaseUtils.readIcon("/com/fr/web/images/form/resources/files_up.png"), + Inter.getLocText(new String[]{"File", "Widget"}), BaseUtils.readIcon("/com/fr/design/images/buttonicon/widget/files_up.png"), MultiFileEditor.class); public static final WidgetOption COMBOBOX = WidgetOptionFactory.createByWidgetClass( - Inter.getLocText(new String[]{"Form-ComboBox", "Widget"}), BaseUtils.readIcon("/com/fr/web/images/form/resources/combo_box_16.png"), + Inter.getLocText(new String[]{"Form-ComboBox", "Widget"}), BaseUtils.readIcon("/com/fr/design/images/buttonicon/widget/combo_box_16.png"), ComboBox.class); public static final WidgetOption COMBOCHECKBOX = WidgetOptionFactory.createByWidgetClass( - Inter.getLocText(new String[]{"Form-ComboCheckBox", "Widget"}), BaseUtils.readIcon("/com/fr/web/images/form/resources/combo_check_16.png"), + Inter.getLocText(new String[]{"Form-ComboCheckBox", "Widget"}), BaseUtils.readIcon("/com/fr/design/images/buttonicon/widget/combo_check_16.png"), ComboCheckBox.class); public static final WidgetOption CHECKBOX = WidgetOptionFactory.createByWidgetClass( - Inter.getLocText(new String[]{"Form-CheckBox", "Widget"}), BaseUtils.readIcon("/com/fr/web/images/form/resources/check_box_16.png"), + Inter.getLocText(new String[]{"Form-CheckBox", "Widget"}), BaseUtils.readIcon("/com/fr/design/images/buttonicon/widget/check_box_16.png"), CheckBox.class); public static final WidgetOption LIST = WidgetOptionFactory.createByWidgetClass( @@ -183,16 +183,16 @@ public abstract class WidgetOption implements Serializable { TableTree.class); public static final WidgetOption TEXTEDITOR = WidgetOptionFactory.createByWidgetClass(Inter.getLocText(new String[]{"Text", "Widget"}) - , BaseUtils.readIcon("/com/fr/web/images/form/resources/text_field_16.png"), + , BaseUtils.readIcon("/com/fr/design/images/buttonicon/widget/text_field_16.png"), TextEditor.class); public static final WidgetOption TEXTAREA = WidgetOptionFactory.createByWidgetClass( - Inter.getLocText(new String[]{"Form-TextArea", "Widget"}), BaseUtils.readIcon("/com/fr/web/images/form/resources/text_area_16.png"), + Inter.getLocText(new String[]{"Form-TextArea", "Widget"}), BaseUtils.readIcon("/com/fr/design/images/buttonicon/widget/text_area_16.png"), TextArea.class); public static final WidgetOption PASSWORD = WidgetOptionFactory.createByWidgetClass( Inter.getLocText(new String[]{"Form-Password", "Widget"}), - BaseUtils.readIcon("/com/fr/web/images/form/resources/password_field_16.png"), Password.class); + BaseUtils.readIcon("/com/fr/design/images/buttonicon/widget/password_field_16.png"), Password.class); public static final WidgetOption IFRAMEDITOR = WidgetOptionFactory.createByWidgetClass(Inter.getLocText("FR-Designer_Form-Iframe"), BaseUtils.readIcon("/com/fr/web/images/form/resources/iframe_16.png"), IframeEditor.class); diff --git a/designer_base/src/com/fr/design/images/buttonicon/list_pressed.png b/designer_base/src/com/fr/design/images/buttonicon/list_pressed.png index de264df1ed26145e40c2ac9f68064b3992dad397..9914c24d3fdf432574893871922530a18958fddb 100644 GIT binary patch literal 296 zcmV+@0oVSCP)Px#;z>k7R5%gEQ#lU8Fc6Fn38XX>q~bGq2rX}*;RE~wev>?d0xFs`#9re;OcYrO zkTh7bc0D^Yu~%7DmgTZ(nw4`-XA_pSR`NW*o1!SzQ^oj>h$!#Ieq1HNkU0Ed5#2LRD ufEfSzGX-hXn5q=~^$e}XNX{|gI6nco@?Z1ZHsb350000E7#>>9uoZ-Yv^ zWrRT`LQ;4BfbgO#v7iejsH>m|^fI~$in{8y&aAs@7i|M)&Up{-^SocrSsER=(9wRp zogj#g?68o-`%!ltI*9)dmri!zts4y%(3mlWDv||>lwuSi$ZFCw%t1++yZ#o&3BuE> z<_oAGUgBj#qa@ddax@d82_in=n36mL5h%iGRZoyVUcM%QswBwqu*isJ2A0&}c?*us zkL2a~8JSbaf%72l@R&e@NCJ*FtJ}PjAgjDQKD*a6392q=CPD5cRS-u(#;_m=QxU(+ z1VSLnQGswI%0Q-qf-E6q@-$tkRH#aj zGOTGjz;PVSur$m1v4`KD(~;!(b=y~G5TGqvs)s=fz8OX3ph6ys6YS%!oD9NhsUY@Cv?c#h44+00NV9f_m^ zfx%EL6bo{=Who}cG0{+@jui~KtU(>svC2L++!X5yLNjq>0b1$}s0>+#2C9YgYV%y! zrhGN5(ma=7Q!I^>q22NRHSYQq){uK_h!-0T`9mFR-ooNu>Hn~RAI4%D)1D2lZ|B~YPYR|kUcPqw l81RfGy?tH3j^Ahu%5np=MQ}TM(qFq diff --git a/designer_base/src/com/fr/design/images/control/sortAsc.png b/designer_base/src/com/fr/design/images/control/sortAsc.png index a5be47df3be57c1fb3a9fbcd7dea8e7b54755fbf..9fcdee421e6f728c57468c2c2fcc5a89640bff80 100644 GIT binary patch delta 319 zcmV-F0l@y01K9$QBYyw^b5ch_0Itp)=>Px$6G=otR5%f1G%+#pWME*N#Q+BX)6SeZ zvmL^QkjBO)|B?A1_Sv&%7-3>85Y0^K|NsAIWMpIj86*pnB!*@pMiD+WKo|T^V_^6< z3urqKfY_t~7O0;|ayGIRlzV|tEFjy4jXexv0iL3e{by`!T7LtK(q?2aY-~nGrW$5! z63?GMJ0v9~tpJoWz$On8118(~XU?21VFJa1iHYfB2nOW~2vAZ|NC7I^1mh#qAaO-S zg;bCjFdcw05-2Y)W*{;Z1H)SA}A_~r3j+P4PE^^ zF5=L!5a=%m7DorM9UKaFtss?xpddsC7nkDTP};ov98zM^B*lUs9LIa_zVE&7xFZ^a zn>R6@n}k#_ke4=s`_$mlA>6!)X{YeW)rwDa^Cq}j`MZd`zJCJmZ-aN%yj9!;9~U7X z?tKy4w&6GqY&*uDyRs1K$kht?U>AH;@N+^4wA*b6AwmKwZ>{3_{f##6njZP2gpadR znpYJ11n6Z>!TL9pr0Lc4lj9ZZoQS}m`cQFGQp?H0QRvNu}DzhznI^?I-@D{>DZSX+t66A#h4F> zB$D+SVVs<8Xq-qGAw@*Ae7hw1l}Ii87IIx(@?-d~#6dC28r(rYwy4f%^mX1(d;|Z2 YA4QU+X0V%4m;e9(07*qoM6N<$g8X{1lK=n! diff --git a/designer_base/src/com/fr/design/images/gui/color/foreground.png b/designer_base/src/com/fr/design/images/gui/color/foreground.png index 1803c11179d9c1c0d0d229328b73d0ccaee7b0bb..faac2e1ace4baa0aeb3d436f7c62a76c65828a2f 100644 GIT binary patch literal 14799 zcmeI3eQXnD9LJx@ATmTpFuI`8vp|GMdv|?Xd$xtqZm!0{7$tNBh1>P%c3FE@dbhQ! z{;>#}5bz~4z63V?LkR>0Uy>yzWXg=FU?Pc%2}*X;jw4?8O<9+)q^!ebW2@!qGPPTSv0L+=&v zTJH#Pp`;&n%dOcIT$^1Lma;vPJ8D|)tMg<8lpq0hk;x?DiY8>drd(bD#YQu0Vsa9_ z$7^ab3Nn#U8{=0~ka1X?W{J1Cm`1mSceq_v`!dGL@lKX=v%KBR@dD=-IG!oIOujl4 zc~a4s&>mmq7~R7ifl$qvb=?3tC^xw(Ua^=#dAZ8 zN-T`S1XOel`S_~7WVfoTTDLk)$zu1kh0&aZLdDuu$D2r0Ev@OzeF#ATX;r5d?oUFt z9cpTCN`lRO=u#F|yLw%Yl_sYwlhHHn*kMMV#%A>7ZMmh8pCJ#rR>7ZwqOPXGsv7s@ zS6SO6LdNemR#hXjBqU0*VsKsRVJl6g887970a1rO!)xZ;W~(F2y9I|$usI*$Tmr{o zN%G2y93eF-$NH<~a0xamo&!@>=0H0rD(d15Wx=&ro~R_m)Ko&$eR4wVf^1Uh^01{w zOj%r4f?tiRDKsqTvw7HR&6q2<)`Xy<>7pXRV8DkOEV3LGL>Dhfoi2x&bBIy1-RkDe zBJYfuosAB=-Q{*U-A-2yVkm^$r=$+3Qm?UJ3aO(vnHsZCNxeEHqq9zoV;W=hH(R1g znkl7PWeu&+er)BU^_x4**1|32t&<&bId>{0#gqn(J?Aw|Zo1+zRy?H)Pj2rDqGX(B zKFQb;FzR8;T1&$!Itw=W|4v{&KW3l4M!Fj+*V|C}R5{i3Ni;R4r^OU(>OyPc#&&x? zZ@ICufQL2y0pfD`RODOBXJ~TGPMuMYaj*$!HK37+xmn;n?3A`r<-9&(%xb(hr*E`! z=*9BJXTgehS6Vx+Z^gSSttIC=Mb>@RLbZx!%w?Ru`Ga9Cx>0~Wr^8`$c-YG3N=KWV zf$>N{MmtzD)+O&Ocq%)p8at*lVjTrzeyXs)^xRD5ThR>zx>sR~H!J0nT-*w`I4E7w zEl!N5qeXBU#F*kDBEkg}7fyp1Q(QzuxPaoqX%J(Ii--spP+T|-VoY%n5#a)g3#UPh zDJ~)+TtIQ*G>9?9MMQ)PC@!1^F{ZePh;RYLh0`F$6c-T@E}*z@8pN35A|k>C6cL`1lN;=*YVV~UH22p3RX zI1OTaU0ijg$N!*$p7~3ohx^v8IA=!>1~O7>dkBE+VgLrV0`SiS`u+`oUJiiYHv=HN z0l>ZL;HD!j0MtAb3^au^KmIZJ;o~!!>YtxDIcHYw*cT1;TSuO|$9?K-{k$FFdA0A) zK07*a*Oth&+kF1RpINiRFEICCt#A6%R5NyL>rbamhq5bQoSzsM#aQ33Qmk*=qM^XK z@2-pw+rHhn;p)hV4f4amzb{;P^39cd8eSbbe>9qPT|BXI;D_uh@2Kx)cQ=PFO9T8b z-|u1Z|2UHqcw*epsj9w$7|jlXU6Wd z?4SAarqMyy#lG=JR|w9J4vhS~zqYpNgWA9LU0(MzxDq^gD6;16HH(?!mn5(Qoax_x zI&O)7Jmag;;jfuH{KwDRKY4w1StO&>uS)ve<0AYj>5y@A0LT~suv4>S3ILP<0Bm`DLLvaF4FK%)Nj?Pt*r}7;7Xa9z9H|HZ zjR63eC`Tj$K!3XcU{!%qECRs70HCZuA}$2Lt^t5qwlYTofV~9(c8*w(4?ti5fSE!p z%m5%b0suoE6U_r4Oaq`W(!b!TUvP!ENC5!A%azTSOVTqGxRuZvck=My;vwR~Y_URN z7by^C3FIQ2mzyIKNaq7g&I|wm8u`(|{y0C7=jP<$=6`1AZ142NqW){}Zz4V+@!$Tu zi~3=fuAC~28EsPoqkpK{9G%|Vj005J}`Hw&=0RYXHq~ibpyyzHQ zsFW8>#s~laM4*8xut5h5!4#~(4xGUqyucR%VSffhKnx_nJP<+#?5=i zx(HVZgM=}{CnA%mPqZa^68XeSVKGG0roJ=O`kZsA{w~!BzPm=q|!{oOVI>m_MObMbS zQlyj;N;PFaO^>2$gY-Gd%Qm(Z8eYv>2*=jns=cMJ`N4THx>VkjAF8G9M07`GWOnM|ey z)0dgZR4~^v8<}UA514ONSSt1^d=-((5|uiYR+WC0=c-gyb5%dpd8!Lkt5pxHURHgk zMpd&=yOjAR1s%ETak!GFdam@h^#)@rS0t$wXH+Irf)+G6c;?H29p+V6F6oj{!|o%K3xI)C?d3A#4A zQM!e?+jY>uuIoY)~6ln+%&eo6EMSt(&dHcAIVA6yg+*DbgwR zQ*PQZ?ELHs?3(Nb?K$>g_9gah_Rk&691wl!-G{dRHsl(}4 zXB%gsbDi@w7p6;)%MzD%mlsoQr;4X;pL)xc%+^yMd)ZNTI#eJ*$ zO)i@o$z8)e??LqN_gLa_%;TM>o2SC_kmoO6c3xRt`@J4dvz#WL)-Y|z+r(Soy~}%G zIzByR`p)SCKE^%*pMQFvhrXu1BHul}BYxI?nSKZSp8Grc%l(h|zu|fE7V%C6U;)7a z8@mESk|3$_Skm zS{wQ>%qC18))9_|&j{ZTes8AvOzF(F2#DZEY>2oYX&IRp`G0*BDJn9mF6vRVQ*?23 z_bk?|G6C?@kiR8rC z#65}Qa{}jVnlqf_npBo_W3J`gqPZ95>CVfZcRX1&S&)1zB2~Schd65~Cxg+yU zRz%j`tk2nT*)2JgoRplSQVnUAv@6#zwiHuJf`1l#y^yd_xUjR>xOiFd;3B_8 zyA~shQx|tGF!j;$ ztoK>JuYXFtYC+Y|hVTuo8}W_h8((co-gKdQYW0rIw9U%R12tha?OV*YtlRRTHly}> zoqt`+R{gE3x4zjX+Sb3_cYE^=gB=w+-tUy`ytONMS8KgRef4hA?t0jufM;t32jm~jej0UI&kHifN$EH?V5MBa9S!3!a?Q1 zC*P)gd*e{(q0YnH!_D8Bf4B7r>qvPk(mKC&tSzH$pgp0z@92!9ogH2sN4~fJe(y2k zV|B+hk5`_cohUu=`Q(C=R&z?UQbnZ;IU-!xL z-hbzhUGThc^dk3S+apRi!(|`JEz}0it z_}4C7pLxCS#_SunZYJFvxFx#v_;&W~7k3KoOx#_1k9e>AzS{lj2l@}{f3*IwWx#FV z_+Y?b&%;>{?+yuvp8k~o(}&^GN6bgnBY#FCjgOrl9~%uCz4Bzvli{bbrxVZ0epdf^ z>vOB;-~HnIOV3#R*zgPai_gEVd8zYq@2jb=I>#f&AH2?aJ@Kaet(_`g8%^e|C4?= z8h-%CNklq1X_UG&K@a2OVARu1Y3|2poDnII?TEV zj5q(x&L)?ipPw(PN(v&r1a3f~>Uw67F^?wt(}Pk9MEo9jSUZ}Eaf^Z)=&asZzitH) zp97_;Yk_`3xY~mXI9nZ5xg$rubai%m+U{cXdBOC*?*8xo zp2Sac=E(H%@boNv(Uu^=aJj)x-md0{skHQJ;a!S4FSrUnI^O&7^Ru{5l=KOPcJ@HF zIkweoayJx&Cmilxz_{Q;LnQa2nGsV1c$BSpCh$6@^-CQ%&>+bDVquR=!i^gmYzoKq e&5oJ~GBX^^*Z-8IGA$11S_V&7KbLh*2~7Z$vsJ|a literal 3014 zcmV;%3pwf6Xi@@54ZTQ_E-Enz z5K6$103tR-RB%L5k){YTDBysjLy@r}iiH7DvFijGMAUI`6dRUFWUU$Bym{}eS9UO(Z2>7`&z9wUX zbV-Il#&6`Y8GKGQ04S2&F6MJnWNa;Ck|;8QE#r9r;7G||@X{|>%+C|c55>;RS}qbK zr-&IQTvLXPlM{>K&(BTgi^a?^4mXV>;xX8n8Ce|RasXz}{8imI52H3 zZN4bfe_i~WlJ|C&UW9+{8AKoW!}eExnGFE2re(F+`iE_46#!l90Z_aBhs|Iw0E)7{ zbq;-T9=d#9QpDmcXDh4R++0fmpKB>E=%L zdZt9g$j;($`3&Zthxi`{{&gM}5&R^+h%b~yM9Zd3AWW9ETgVfL1(`yIK=_}U_z%PW zq}jQaiQ4!P(3V&Nr6C$XejWfQDiI(Fdt@un?|lo#M+5oIi_w{wo%_#%{(V=tO#a9g zB!7-$M?^BX5>d|Vn*3S!?g~$*U zQipUPL&zMmg;!4Do9IA%up=Rh?=qPj=x&RGBx1dpI z68aT-2O}^EromdU5o`ssU{5#*j)WJ%$?!5bA1;Eoz?EiTr=n?cd`V|I) zp<|3Oju?MT93~aB0<#&j8`F+Cg&D?-VWzQItUA^l>xvDRIYI4MQ`g1<+DyrL=EogS06Xii({|v`U^zjmmKqDIK93 z(F5q|^fLNk`gQs{RV`IdRle#b)i%{Ds;|}NsClUI)k@Ub)kf6bsWa4l)YH_rsduU0 z(?DsMX@qO!YV6TCtMPOWZH~(v?wpc2hv(eZgf-1HBQ#fN?$aF5oYvCT^3%%Fs?s{6 z^;Da#?V+8jy+iwi_M{F~$4y6|vqR^k&SQoO!;_KDsATjprgSxR{dFa}^}2()GkV5) zQF?`X?Rxk03HmJkB>f%wz4}uIItC#I1qQ7Kw+-=zEW;GTU55RJuZ@h2VvIHzbs0S} zRx=JT&Npr~zH34@aW`3J(qMAU6l2OVO*7qXdf5y%vo}jIt1%lghs_<#1?IcWhb_<+ zP8LFo28$a^64R5J!)#@aTGB0pEekEXET35!SjAgyv+B3{Xl-wuZrx~o$A)4PXj5p@ zWAm%6nJw40#`fA=@?77!tLJvleQsxN$G6*KchjC~A7a13zSsVPgQJ7Uq0M2^(ZDg$ zvDWbhi^d9LZDyT!LOXdmt#&%*^w!zIS?qk+`4<X~g?%562@eae34a)26HyS+ zzks@6$%2*zuOhu7%OdYYnM6sVdZQJi6QY}=U&naIl*dS8tzuWkUW(I*6U24LW8oFzvR(TOpMEs5_rp_~TJ^wNN( zwM(bCZ0;`Z6P^ce2XB(^$}i_nB)KM)Cp}7bP2Qe7nc|*Ok@8f)7E}wKr~0SXrM^xJ zP1~RLDLp2=Jp-4Km~m7{5vB?IGPN`FGKaIwvx>8%%bb_(Ts9>N5;bK**^9Ef#WdN^ z)PTf9vR*Qp{o-l7TcBI8wqSIn=gRt3 z(5j`YdRObOE?Pal#&6AmwS={4Ykw%TE-Wv6xh`g1Pmxy9nxe7we(PI{6^cd0H#WFz zsN0CzDA+i-Y3`<~O&?2mB^OJrODjs>Z{}{k_?699m0x|@lC)*8%%N=0R?Jr6*6Z8c zw;d=~F3&F?+a9vLa|dHb$&Qyhm+ZVyVOLSNi?B z>BD~Ee(8aT1AWbo&CM;EEoH56tE6@EV8X%6-*|u1-NtOIZ>P7H9s-9XhaP{M`0e$> zL5F*fu#U8SXZT%h2eqT56Y5;vIn|ZYCGC#u9zGg)w718lr{jCe@An_mJyvsE<#^c% z!il02pHAkVoIaIx>gnm^(__6$dheWxJ#(!uyl?Pq(Ao3ne9xWf_v}A;-u3*k3(gmg zUSwVDy5w-FbHIL};|Kd6ItCpEJBJ*Hx-UCj?irppeBz4xmD5+fub#UWaP88_{E^}7 zQP*$YNVp-r$-DXJR{E{yw{vdK+*xxMeYfPE(!GlNn)e%iH2tw%>L5Kn>ODH}V8Mes zW8ASPKV|>)e!S=*`C-L`&P4Mg+egPHeJ3wJUif(YN!F8@r^P=j|6Kdbc>FRj z6+1QlT=e|YubW?}zu5oM?q%OHLSA#VH1P~L5kd)M7kQD#QASw2RK~nTHgQUnO21((M zU~v!tDh6u;u>k^z32xN?|CksGfQn)Ce}DkOuHhdD|6^eIc9V4}O2umno(}-{qKmdU? zoH=s_Nb)k^1&_{vDS!ZCIe-2<0|*lf00M~dKa%^10RRC809{kKa3Jn+FaQ7m07*qo IM6N<$f~c#TrT_o{ diff --git a/designer_base/src/com/fr/design/images/m_insert/chart.png b/designer_base/src/com/fr/design/images/m_insert/chart.png index 504ca9484729be763d7f3445dd5d47ca7d0904a0..c6de0fe5e05a697ee5ae011930c47bd18ea5ecfc 100644 GIT binary patch delta 93 zcmbQv*v>e?FwD`@#WBP}Fgam?fWf0n`8heC@+hAuj*` delta 109 zcmV-z0FwWQ0ha-gF=kOoL_t(I5o2JW5HRA>|I}3PKeC+k=}TDEG9fD>hs{EYChgV} zD6YC%ZNW&f3kKc*a2V8`_CfJmlj#<$A&xD)2Hp#!E?{7wI1I2wElFYkRTm5(_DYKr P00000NkvXXu0mjf6h$lg diff --git a/designer_base/src/com/fr/design/images/m_insert/floatPop.png b/designer_base/src/com/fr/design/images/m_insert/floatPop.png index 91600bd0ff169e903f3267d0c64ecb173160c238..46dca4f87187786c8d8ed09a0c38776c734b3b4e 100644 GIT binary patch delta 208 zcmV;>05AXE0qg;gB!2;OQb$4nuFf3k0001{NklntPldboSYJlkRAYaY%i7rx&O`p0000< KMNUMnLSTZEnobb_ delta 194 zcmaFEc#m;{N%I zXV0Exm^EuATrXJh%$c+P6AM6UVK%V97%bJ9 zl<&cG=kLG&7+9H^z!IGN@@4 zF~f_GpBYx4xxjGp?gNH*U%xVJJa?G^B!><#0&(xPTMXwPK0#N<@bK+B29O+st2&At zh5_gDK?+b6q3A&4U>GoP(Fn;PXzs(o1*xSP001^ydc<4m00#g7002ovPDHLkV1fW3 BZjk^0 delta 251 zcmVu7BDa{#4`{N7W(-3B!F2U z12%8o{GSv6RS(w7#6TfnLFNFxLQn(H>9`F*mmI<_02x%i2XwoJP8SB!U9k7sEe3Hu zUIrZ*N#b1q1GitkW;pxcF#{hb2Vnz{HC}o0oZ-xaM+_go{Q&bneg6R#V_=XZ&ILzq z-vetx1|TuK1|YlOW2^NLO9u;qwv&{dVGMu(0|0eefKFN`%%=bV002ovPDHLkV1k># BTjKx# 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 index 398c5db5c5ca1ab9896faaf3163fdd416b8ed7b1..6fb2baac51ead86742e20545aa0a62413be50b12 100644 GIT binary patch literal 167 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|5K|k5|2~(;g&RwlQDDH z6mGYiaof(gobd%$;YW8~2X4ulg}lLC>)IYUq%_XtS$r|Kq4RPN8^beAv5Lrm+Yvy^ O7(8A5T-G@yGywp$2|2L< 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$3Q0skR5%f1U>MZE#Kd$S2;*}k3qHyJ{~7e~$%EvW2q_>WPhA5{fxyJX!Wx&Y zAUTj4WO)=90R3FV!0`8=iHTVpvLX;0BKG$nL=8fg8Np;=P*PIb_xtx>M+S!fInvTn zZx|RD4MFliHtYZY|7QXDr+9g}BOg3?@B^lg5ypVg4h{}HpFe-y2sFeADE1R7&JNVP z52)Gyz<~o_U}`}$h5;Z!pdlPzzI>wK4-a=3P&3?SkT?inH2@?5G=$~L zmoNPwHV+R^AyD%l5E~u94KOw~&17W!Z;Y-08~^`*#Px%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 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 index 37877a62c3e90719bd70714eb6c569e06d317dd1..5cd5db7165593c7364dcbeb533fafad91b8525b3 100644 GIT binary patch literal 453 zcmV;$0XqJPP)Px$e@R3^R5%f(Q$0@tK@gqYg=?)$B%X4J)*^3!3VuG9X_whmE~X@ z$MsgL6(c6)`zb>mKkE}Xl4J_5 zf)6aqvP}kiB9mz1#m5L)F_Jdd2>2_E$K%BATq<1Uib0WEa0-Bih2hpko>P~XI0*?M zZYvell~P`Ee4j%N#F@#%aC@Ux+nvwnvp3U&C^~#%=1X(9cxN;ky`ZGsZimZdHiKWX zX_`JX{1r;XuUy;2pogc@n$BG3vrJ#{&gW2r|EVe_Qc_>*>NR5i8L^0>qZ|8FSgtWK zNYnchM|uGa3GXy?#CNEa?6{ZkJy1%$a*-|yF-T^3tPXrLTv%(HYd9}}$-;y|9Y@4H vZ8eWI^$`PCoPx%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*&Px%7)eAyR5%f>Q_pJ?Q4oH!$)={RloV0$X0-|mrTBJ}<{((~U_iYHLGYr7RzX3p z`VZKH2TS$ht>>KdpooW!f+m``R*&LO@FKNF4@xoF-SL}E(^QEf*nzh@KfZ6?%)IxM z`cI+X`K3~6U~%#DMIt`V%)1az6VZF6=ni~yjYi`G{8TQN?MkK6`Xxa=pLe5(=au3; zk{HCd(3hCiZkR)`mx(5A0tW~Hs;BF39c2bj}9vJ@fyfeT|X+Iqyo!Y zm;!kmyU+F`3xViUek~cUCGjT-(9qA4X>t4o1dw}D%(C+D4t+p)jPx$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 diff --git a/designer_form/src/com/fr/design/gui/core/FormWidgetOption.java b/designer_form/src/com/fr/design/gui/core/FormWidgetOption.java index b3fa73a26d..18fe7a83e1 100644 --- a/designer_form/src/com/fr/design/gui/core/FormWidgetOption.java +++ b/designer_form/src/com/fr/design/gui/core/FormWidgetOption.java @@ -1 +1 @@ -package com.fr.design.gui.core; import javax.swing.Icon; import com.fr.base.BaseUtils; import com.fr.form.ui.ElementCaseEditor; import com.fr.form.ui.Widget; import com.fr.form.ui.container.WAbsoluteLayout; import com.fr.form.ui.container.WBorderLayout; import com.fr.form.ui.container.WCardLayout; import com.fr.form.ui.container.WFitLayout; import com.fr.form.ui.container.WHorizontalBoxLayout; import com.fr.form.ui.container.WParameterLayout; import com.fr.form.ui.container.WVerticalBoxLayout; import com.fr.general.Inter; /** * Author : Shockway * Date: 13-6-17 * Time: 上午10:40 */ public class FormWidgetOption extends WidgetOption { /** * 返回名字 * @return 名字 */ @Override public String optionName() { return null; } /** * 返回图标 * @return 图标 */ @Override public Icon optionIcon() { return null; } /** * 组件类 * @return 类 */ @Override public Class widgetClass() { return null; } /** * 返回组件 * @return 控件 */ @Override public Widget createWidget() { return null; } /* * 表单容器 */ public static WidgetOption[] getFormContainerInstance() { return new WidgetOption[] { ABSOLUTELAYOUTCONTAINER, BORDERLAYOUTCONTAINER, HORIZONTALBOXLAYOUTCONTAINER, VERTICALBOXLAYOUTCONTAINER, CARDLAYOUTCONTAINER, FITLAYOUTCONTAINER }; } /** * 表单工具栏上的布局 * @return 控件 */ public static WidgetOption[] getFormLayoutInstance() { return new WidgetOption[] {CARDLAYOUTCONTAINER, ABSOLUTELAYOUTCONTAINER}; } public static final WidgetOption ABSOLUTELAYOUTCONTAINER = WidgetOptionFactory.createByWidgetClass(Inter .getLocText("FR-Designer_Layout_Block_Absolute"), BaseUtils.readIcon("/com/fr/web/images/form/resources/layout_absolute_new.png"), WAbsoluteLayout.class); public static final WidgetOption BORDERLAYOUTCONTAINER = WidgetOptionFactory.createByWidgetClass(Inter .getLocText("FR-Designer_BorderLayout"), BaseUtils.readIcon("/com/fr/web/images/form/resources/layout_border.png"), WBorderLayout.class); public static final WidgetOption CARDLAYOUTCONTAINER = WidgetOptionFactory.createByWidgetClass(Inter .getLocText("FR-Designer_Layout_Block_Tab"), BaseUtils.readIcon("/com/fr/web/images/form/resources/card_layout_16.png"), WCardLayout.class); public static final WidgetOption HORIZONTALBOXLAYOUTCONTAINER = WidgetOptionFactory.createByWidgetClass(Inter .getLocText("FR-Designer_Layout-HBox"), BaseUtils.readIcon("/com/fr/web/images/form/resources/boxlayout_h_16.png"), WHorizontalBoxLayout.class); public static final WidgetOption VERTICALBOXLAYOUTCONTAINER = WidgetOptionFactory.createByWidgetClass(Inter .getLocText("FR-Designer_VerticalBoxLayout"), BaseUtils.readIcon("/com/fr/web/images/form/resources/boxlayout_v_16.png"), WVerticalBoxLayout.class); public static final WidgetOption FITLAYOUTCONTAINER = WidgetOptionFactory.createByWidgetClass(Inter.getLocText("FR-Designer-Layout_Adaptive_Layout"), BaseUtils.readIcon("/com/fr/web/images/form/resources/boxlayout_v_16.png"), WFitLayout.class); public static final WidgetOption PARAMETERCONTAINER = WidgetOptionFactory.createByWidgetClass(Inter .getLocText("FR-Designer_Para-Body"), BaseUtils.readIcon("/com/fr/web/images/form/resources/layout_parameter.png"), WParameterLayout.class); public static final WidgetOption ELEMENTCASE = WidgetOptionFactory.createByWidgetClass(Inter .getLocText("FR-Designer_Form-Report"), BaseUtils.readIcon("/com/fr/web/images/form/resources/report_16.png"), ElementCaseEditor.class); } \ No newline at end of file +package com.fr.design.gui.core; import javax.swing.Icon; import com.fr.base.BaseUtils; import com.fr.form.ui.ElementCaseEditor; import com.fr.form.ui.Widget; import com.fr.form.ui.container.WAbsoluteLayout; import com.fr.form.ui.container.WBorderLayout; import com.fr.form.ui.container.WCardLayout; import com.fr.form.ui.container.WFitLayout; import com.fr.form.ui.container.WHorizontalBoxLayout; import com.fr.form.ui.container.WParameterLayout; import com.fr.form.ui.container.WVerticalBoxLayout; import com.fr.general.Inter; /** * Author : Shockway * Date: 13-6-17 * Time: 上午10:40 */ public class FormWidgetOption extends WidgetOption { /** * 返回名字 * @return 名字 */ @Override public String optionName() { return null; } /** * 返回图标 * @return 图标 */ @Override public Icon optionIcon() { return null; } /** * 组件类 * @return 类 */ @Override public Class widgetClass() { return null; } /** * 返回组件 * @return 控件 */ @Override public Widget createWidget() { return null; } /* * 表单容器 */ public static WidgetOption[] getFormContainerInstance() { return new WidgetOption[] { ABSOLUTELAYOUTCONTAINER, BORDERLAYOUTCONTAINER, HORIZONTALBOXLAYOUTCONTAINER, VERTICALBOXLAYOUTCONTAINER, CARDLAYOUTCONTAINER, FITLAYOUTCONTAINER }; } /** * 表单工具栏上的布局 * @return 控件 */ public static WidgetOption[] getFormLayoutInstance() { return new WidgetOption[] {CARDLAYOUTCONTAINER, ABSOLUTELAYOUTCONTAINER}; } public static final WidgetOption ABSOLUTELAYOUTCONTAINER = WidgetOptionFactory.createByWidgetClass(Inter .getLocText("FR-Designer_Layout_Block_Absolute"), BaseUtils.readIcon("/com/fr/design/images/buttonicon/layout_absolute_new.png"), WAbsoluteLayout.class); public static final WidgetOption BORDERLAYOUTCONTAINER = WidgetOptionFactory.createByWidgetClass(Inter .getLocText("FR-Designer_BorderLayout"), BaseUtils.readIcon("/com/fr/web/images/form/resources/layout_border.png"), WBorderLayout.class); public static final WidgetOption CARDLAYOUTCONTAINER = WidgetOptionFactory.createByWidgetClass(Inter .getLocText("FR-Designer_Layout_Block_Tab"), BaseUtils.readIcon("/com/fr/design/images/buttonicon/card_layout_16.png"), WCardLayout.class); public static final WidgetOption HORIZONTALBOXLAYOUTCONTAINER = WidgetOptionFactory.createByWidgetClass(Inter .getLocText("FR-Designer_Layout-HBox"), BaseUtils.readIcon("/com/fr/web/images/form/resources/boxlayout_h_16.png"), WHorizontalBoxLayout.class); public static final WidgetOption VERTICALBOXLAYOUTCONTAINER = WidgetOptionFactory.createByWidgetClass(Inter .getLocText("FR-Designer_VerticalBoxLayout"), BaseUtils.readIcon("/com/fr/web/images/form/resources/boxlayout_v_16.png"), WVerticalBoxLayout.class); public static final WidgetOption FITLAYOUTCONTAINER = WidgetOptionFactory.createByWidgetClass(Inter.getLocText("FR-Designer-Layout_Adaptive_Layout"), BaseUtils.readIcon("/com/fr/web/images/form/resources/boxlayout_v_16.png"), WFitLayout.class); public static final WidgetOption PARAMETERCONTAINER = WidgetOptionFactory.createByWidgetClass(Inter .getLocText("FR-Designer_Para-Body"), BaseUtils.readIcon("/com/fr/web/images/form/resources/layout_parameter.png"), WParameterLayout.class); public static final WidgetOption ELEMENTCASE = WidgetOptionFactory.createByWidgetClass(Inter .getLocText("FR-Designer_Form-Report"), BaseUtils.readIcon("/com/fr/design/images/buttonicon/report_16.png"), ElementCaseEditor.class); } \ No newline at end of file From 301a3436e80287bad087a6a69168c70aea9fd9ec Mon Sep 17 00:00:00 2001 From: hzzz Date: Mon, 25 Sep 2017 20:14:22 +0800 Subject: [PATCH 079/125] =?UTF-8?q?=E5=9B=BE=E6=A0=87=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/com/fr/design/images/.DS_Store | Bin 0 -> 12292 bytes .../com/fr/design/images/buttonicon/.DS_Store | Bin 0 -> 12292 bytes .../design/images/buttonicon/card_layout_16.png | Bin 0 -> 148 bytes .../images/buttonicon/layout_absolute_new.png | Bin 0 -> 138 bytes .../fr/design/images/buttonicon/report_16.png | Bin 0 -> 155 bytes .../design/images/buttonicon/widget/.DS_Store | Bin 0 -> 6148 bytes .../images/buttonicon/widget/button_16.png | Bin 0 -> 121 bytes .../buttonicon/widget/button_group_16.png | Bin 0 -> 280 bytes .../images/buttonicon/widget/check_box_16.png | Bin 0 -> 264 bytes .../buttonicon/widget/checkbox_group_16.png | Bin 0 -> 263 bytes .../images/buttonicon/widget/combo_box_16.png | Bin 0 -> 211 bytes .../images/buttonicon/widget/combo_check_16.png | Bin 0 -> 212 bytes .../images/buttonicon/widget/comboboxtree.png | Bin 0 -> 204 bytes .../design/images/buttonicon/widget/date_16.png | Bin 0 -> 191 bytes .../images/buttonicon/widget/files_up.png | Bin 0 -> 709 bytes .../images/buttonicon/widget/label_16.png | Bin 0 -> 359 bytes .../buttonicon/widget/number_field_16.png | Bin 0 -> 401 bytes .../buttonicon/widget/password_field_16.png | Bin 0 -> 306 bytes .../images/buttonicon/widget/text_area_16.png | Bin 0 -> 365 bytes .../images/buttonicon/widget/text_field_16.png | Bin 0 -> 113 bytes .../design/images/buttonicon/widget/tree_16.png | Bin 0 -> 225 bytes .../src/com/fr/design/images/control/.DS_Store | Bin 0 -> 10244 bytes .../src/com/fr/design/images/gui/.DS_Store | Bin 0 -> 8196 bytes .../com/fr/design/images/gui/color/.DS_Store | Bin 0 -> 6148 bytes .../fr/design/images/gui/color/foreground2.png | Bin 0 -> 2970 bytes .../com/fr/design/images/lookandfeel/.DS_Store | Bin 0 -> 8196 bytes .../src/com/fr/design/images/m_insert/.DS_Store | Bin 0 -> 10244 bytes .../src/com/fr/design/images/form/.DS_Store | Bin 0 -> 6148 bytes designer_form/src/com/fr/design/form/.DS_Store | Bin 0 -> 6148 bytes .../src/com/fr/design/form/images/.DS_Store | Bin 0 -> 6148 bytes 30 files changed, 0 insertions(+), 0 deletions(-) create mode 100644 designer_base/src/com/fr/design/images/.DS_Store create mode 100644 designer_base/src/com/fr/design/images/buttonicon/.DS_Store create mode 100644 designer_base/src/com/fr/design/images/buttonicon/card_layout_16.png create mode 100644 designer_base/src/com/fr/design/images/buttonicon/layout_absolute_new.png create mode 100644 designer_base/src/com/fr/design/images/buttonicon/report_16.png create mode 100644 designer_base/src/com/fr/design/images/buttonicon/widget/.DS_Store create mode 100644 designer_base/src/com/fr/design/images/buttonicon/widget/button_16.png create mode 100644 designer_base/src/com/fr/design/images/buttonicon/widget/button_group_16.png create mode 100644 designer_base/src/com/fr/design/images/buttonicon/widget/check_box_16.png create mode 100644 designer_base/src/com/fr/design/images/buttonicon/widget/checkbox_group_16.png create mode 100644 designer_base/src/com/fr/design/images/buttonicon/widget/combo_box_16.png create mode 100644 designer_base/src/com/fr/design/images/buttonicon/widget/combo_check_16.png create mode 100644 designer_base/src/com/fr/design/images/buttonicon/widget/comboboxtree.png create mode 100644 designer_base/src/com/fr/design/images/buttonicon/widget/date_16.png create mode 100644 designer_base/src/com/fr/design/images/buttonicon/widget/files_up.png create mode 100644 designer_base/src/com/fr/design/images/buttonicon/widget/label_16.png create mode 100644 designer_base/src/com/fr/design/images/buttonicon/widget/number_field_16.png create mode 100644 designer_base/src/com/fr/design/images/buttonicon/widget/password_field_16.png create mode 100644 designer_base/src/com/fr/design/images/buttonicon/widget/text_area_16.png create mode 100644 designer_base/src/com/fr/design/images/buttonicon/widget/text_field_16.png create mode 100644 designer_base/src/com/fr/design/images/buttonicon/widget/tree_16.png create mode 100644 designer_base/src/com/fr/design/images/control/.DS_Store create mode 100644 designer_base/src/com/fr/design/images/gui/.DS_Store create mode 100644 designer_base/src/com/fr/design/images/gui/color/.DS_Store create mode 100644 designer_base/src/com/fr/design/images/gui/color/foreground2.png create mode 100644 designer_base/src/com/fr/design/images/lookandfeel/.DS_Store create mode 100644 designer_base/src/com/fr/design/images/m_insert/.DS_Store create mode 100644 designer_chart/src/com/fr/design/images/form/.DS_Store create mode 100644 designer_form/src/com/fr/design/form/.DS_Store create mode 100644 designer_form/src/com/fr/design/form/images/.DS_Store diff --git a/designer_base/src/com/fr/design/images/.DS_Store b/designer_base/src/com/fr/design/images/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..68d64fbc869d2a67ff99202c17c07f37940271f5 GIT binary patch literal 12292 zcmeHNYit}>6+S1iotd#ykJ~tov)RVf4NaT4^<(42#ckGhOyefOCU#;w4?D9v*Y=R{ z%ywpWH;)FnMIb<^sDOk-6M@QGMd}Y!34sI>&{BzthlqGd1tk9Qhl)Q?As*-6JG&mw z+9HG!)#+Yo=DyCEo%!~jd(R61a4>In0qh05#3sH+221gZ$Uoe@xhOSMJCAp2rZy}el-3-8nnM}^M{GhY* z*SKM0O>NyKMb+w)!|&A&&+2y;ELI%N1(xghCzpEi|W!=R^<^=wXNz_LTKN!t1hnc5&cgSOOHz#~zKVcgg zW>1{A9CNZD-*>_>7TFn2c+54eIg6Rsx3+9+-JZ~rCy0z)I8n6BU}4(uv&=CqXMVC^ z`Buhe`lcq_t15zeXInC? z&*G=>)A$*@hR@>{<$G=5>x`EXS(Wbi4LAws;SxLx*Wg9?4!jDl!=K?z+(hqm54}qY zAHjoo7~hY_>G%0>pO(DkC-T!LQqZK11{uiHSrmvhZOOG=82238b>?ZFzfEk#XNrEf z;^D8AD_*T{P#YQ>&W_X49uJHl?++T@Y2F(%f`yFX&FVYGEt64ek}sDD<_z1cz?@O< zC@n2XI^nuD5eT*kBXg2uV^-fXoRs_Of6D zEd3P%1sYRg=e;DW-m3^y5qL)m^x>J%nyth2ZmCg%E|>WCw_`wy;iz z^^&XwEAa?cswFFiCI(7&8gJv|RHwswN!F4bP_hGtzl@=Ug5uYSuT78xre$5dR}rWp zP>Dbb4aGE}n4VNedgKMtBn`3-%!rosxAmhXCCXY-cW3Xin$)|mYZW!=6$w&VO=^mP z_9N=Az$AuOJ=mmmx}?<##9)r_V_>g$HPDG+SO<$ROQ@M(L9pJD z>)zkBjNHE7)J-C{0+Utonj^GqU=h4tE6M1u%CjWM~qCghH_vbBw$R%LC$Zk9mwa;(4QUb3O~EBJFAJs>^z=ZI8LW#eI0wXN2o6 zV2dNpoV%ubZw1fPwBdP%GtUMuo)zA;QD@K%0(Y_Ov#az7wjX>$3U_<@NU0I}vvg=L z$-ScEgyTAlyjx>(OeG^>4-CMuh|}onE1X993a8NsIjzRXb#zLymt96XNovGatu3n4y_FhVrQ%lB>26Ge zYfnGjFIHYzm0Q;3R#D}u@xNkdh2N6+U)-_99bYk5pzRli!Zd)-mV_dj29OweTsyj^ zo$!B619+jKIeE{!_jK-i_~4=IG9y6KPEq*O33wFWTPtiY0_HrRu3q0P1O17$NT>1{ z>xsM-T-4hslCR&$q903zt*Qv4nQeMK@Rq7k19Oppq%a?hX)cvJoO-!`yjq~YEmnbg(5`2%;uGiqF@H5IE_$~Ya{se!4zr#P^pOizOpo;a_ zAR_kdcrSKhALS18Q{;Y-46vj4J{+ak{aKvBb7)ZBKn|ZkpYjHt6!`)l!;e$8z*Wi? z_&k0AU&L?W_wfh#Lwp&3g1^A)^5iO;ZpUQ5bjR0kBuc*Qg{s>B+_%7e0fZnw`>E{a z@&Dnq^Zx`<^;SioioorO0M;BDKQu_+7RJ^qzLLk<+vqw+7cZP{N!EgeZeciH%!yDu zjdc= literal 0 HcmV?d00001 diff --git a/designer_base/src/com/fr/design/images/buttonicon/.DS_Store b/designer_base/src/com/fr/design/images/buttonicon/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..50298defdf58b7c2149d659efdedba5a310d494a GIT binary patch literal 12292 zcmeHN&u<$=6rM@a){f)EBq`yC1V&Y%hk}x{swz-Llm=B15{>Grv}%j%ADhI&-nG{2 z{AdV@gervi1IhtToDdiO2#`1+^@KRVvEqOb5*KdpeY5Li#+h-;g#+D_iLnGKR_|#gH)^&x?uNLQ?L<4-K0oFsF zZO4BE{3lvgo)sp*>6PwuESXFIp2}jN4w?JOf{GUsZ zHSCH+u09ZNfF=4~N(NTiu;{8Ec99I0&Og{%>gXD*H^a!m@-A+tbq!3sCmv4d&YVvC4yFr9qulkdP!>^rLmB=~B`k3zEthI?R)qkqUV12bV@ z$P13Bmct?#ZlH4t9jSiB4z3+VRvM@&pva^M^;{PvoU!*W!aL6RL{1u7@{rvIFFo{H z6&eDx-0CNC(m+mV$Qo>hs1IvkMU$5XTDMzA|IlA{Bp7NSb-Uzs7xiXuS<#BA-)np; zXtnOm0A1iK4m{bXh0xQgAjf0WQioVbaY0I z73cU@OxESI7%7Y{jMUcpDIVGpZ9777PDf;*osryOK`~92KdMK}OIKEAyPb${O-95! z(8Kvl2t&qa8*`MUl@W_#)$1>S$CY#UPF0BWf zrKl2hJByX@rux;Wd)4IrY7jK{?<>`74R5ntn7$bJQKjK~p(cLo-G*NeHW!1gU+*YA zE0t&+SY@bOcz$Q+)w#20&Ydovot@h~UEE22%+2raW->D;=PoSYX>H%#`C#|M&(UTa zGD-6AR>(ZQz)z!{joL=iPI<4_&R_Q1Ihq^Gk53eynwXrJnwmcT^vp9e<-%08QhR?b zWNj}7%^+NCcD4OJK-KEg; ze5LR5>T1V}u50%O%;Z@{aU+fgI%JJ-ChgYrft3@iScx43<~S*d!> z%l={zMM3L&qZasattONb{9Fk=Dmd}xAF-ECEWF*j;rl!s1#u$2!7g7xUiB+2FMDEP zC4QDg%6$@{;){T)rS*lrPDbQ z=((QyxRiLMXm(I@ZLU-cT5V0v=)hL6v{dg#H6ecd{r+!Cs_*~xf&Xu>57xg?3jJo_ zuR$~GoYMy#Lc28>sIaaN)iIzLpcu{vEMU3pFv8TRhI80rC?7tr4dY{&xVW^l){F~Y zLt1lddYgLS-+O@Z;TYx{z8SYtjx)EB`;8^iWz6?+-fG2>ss^tA{rkW@1_PN(EDp?x zxkfNhllv%U7I8LR#yXU_%C^0&TsIgxMxleb-GD*Qm4kuFBpAmK=DNX<&q97+?#Pvc zfuJXQh+fua?E?lf14&Qzkjy;oD1Ih9`?~IfZEb~t1zMx{Nj?X_f(-3E5M(gb<3z9uS{(54|&O1)shL0w# zS{MtsGPnAGoHuGRrgS{APt{(O-h!<16PFu~T!M@>EFBmoP!S^FLah%HG@)nW>$M=6qD7~Z}NImfX^ne^$DlILdZN03%znOg3Uc`9^XYYWl z634~(2mrs;t9X>jW`Po1AP&#=;u3c_{_~Fj()k|~g>rpX&CTijuYFbiWX=Eo0Mm1^ ACjbBd literal 0 HcmV?d00001 diff --git a/designer_base/src/com/fr/design/images/buttonicon/card_layout_16.png b/designer_base/src/com/fr/design/images/buttonicon/card_layout_16.png new file mode 100644 index 0000000000000000000000000000000000000000..1b9a5df8fa8e6522db8084bee730eee8c30889eb GIT binary patch literal 148 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|{5)M8Lo5W7 z6BY;fD}d&7i;gasCg k8xNdmYSrrTH;W3Eoa(0l`kupD%c5cQm}l}Xx{M1 zfu&m7R_wyh8;97Ir9C*DaD|nJ=ZYu$jYl&h3>lV9l6bn?NMIGv0tQc4KbLh*2~7Z6 CayDlG literal 0 HcmV?d00001 diff --git a/designer_base/src/com/fr/design/images/buttonicon/widget/.DS_Store b/designer_base/src/com/fr/design/images/buttonicon/widget/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..91dc347ec85f31a94b7fdad753b39c905c453a5f GIT binary patch literal 6148 zcmeHKJx>Bb5PgdjC=GU&`wP6#SYHTshQ`o}!r?&-A2|+9tnT0V?<}o-GrJ+;sg*Ir z%v^Tf?(EDC`}T6f0&u-;)&)8MT5N)iW2!Gi=B3r75iNpF*BGIT3!Gz(WzE|Rhsc1O zT^l6|O!<5~zkFSeueO`ApvMh{*l@m}PB6o>J_-7?ZScVO70*1uJ?1=l@tbnIB9^pf z>NQ8sx&4uNjxffZuAWdAn9yg!*oCfFe2PezVL|^~*Gw3@We&-|i6PX*D~1cPx#(n&-?R5%gsQ#%gAFbuUVBs$Oozz$*$zm=J5uyO#lo&m(hHCSN>vLo2x0Bxnx zp(alqI#gAMO0Zxla{TOP%Z|h3#F)u~Sp!uaGV@K918dI*`07MJCdziqwD$c@7aDes z*U^atl|^{zs?NhOdO^bmUQZ`tV@4q=gX{<$cOuVg_mbrOwD#&7GrkjPznqL8)?NlJ z^c=_W%;nm;z!kG>(lng{2MIxCa)Ag2mSwsZp<_M+J;4TEgjL@dt|qTgo%&mz#x498 e$^C_&FVY92v9gy2e^}W70000tF@ literal 0 HcmV?d00001 diff --git a/designer_base/src/com/fr/design/images/buttonicon/widget/check_box_16.png b/designer_base/src/com/fr/design/images/buttonicon/widget/check_box_16.png new file mode 100644 index 0000000000000000000000000000000000000000..1c505d3a5f5ac96952768611708348215b369433 GIT binary patch literal 264 zcmV+j0r&oiP)Px#!bwCyR5%f1U>F4yhXA9AiOJUg{~5f{O=4tZ*mma38E^^A=Fg^|Vau~|Tp#>SSqKqqtl`0*=+k&$ud znKLI27#o{_^%)zR-eO?*uZn31ujP)Px#!AV3xR5%f1G%+#R`u{(J7Xun#WMtTO=FAyyG+_)b3rO?Xvu7A#GC%_j|Nm$G z^Z)>gftuy5&(u`cQMi{JV*cl N002ovPDHLkV1lwuZI1u| literal 0 HcmV?d00001 diff --git a/designer_base/src/com/fr/design/images/buttonicon/widget/combo_box_16.png b/designer_base/src/com/fr/design/images/buttonicon/widget/combo_box_16.png new file mode 100644 index 0000000000000000000000000000000000000000..4554959ff389dc9b52865dfd2fa967dc8fd67bc5 GIT binary patch literal 211 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|dOcknLo5W7 z6C^%0T)c7PiM{K-1xFYr#Hn@VuxF(yrZjYRo_zBEzhu#btA<8KK9ynAHfadw8+;p&?h=W-qZI*h^7)z4*} HQ$iB}kW@+W literal 0 HcmV?d00001 diff --git a/designer_base/src/com/fr/design/images/buttonicon/widget/combo_check_16.png b/designer_base/src/com/fr/design/images/buttonicon/widget/combo_check_16.png new file mode 100644 index 0000000000000000000000000000000000000000..71380190ab2d111330a7ebd5e2c2c53d821dbbcb GIT binary patch literal 212 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|`aE46Lo5WB zPP)k3pupp@^5gZ)1A9x@*e~qWFiz}iS>mCh`gFPPi@n+0Pijw`E7D=e2wz*t@$kgW zyDQX-)Q#;=TxH`vWZ3^tPpcP-hQ+c^ zh`q8XFlS!jHQ5Jj3U{||$YWW%q3#v1%eBwdKl;H*g+`l(=nhi}hBw!5yYJrjEwV$2 zXX%5t^BC9c*w!oig=2#fx884_fZ4wu^W3rj$ntlSc~QnOkM%$oF?hQAxvXv?{f$St!_3gI_V@q)^@?t8$I8>s%@JekJjh^Xx#8)Q9SlpRPZVN4 zux{}Yh6!BuJCTB)#1aE_45bDP46hOx7_4S6Fo+k-*%fF5l$a3U z6XFV_2NgK1*r5z`kbX&!Uob<*ncW#oDxnc?l$EBfWO+Jk&a2kdY>(L=HYC+lNf=MK z+b1U4+{pS;werE9a>iTVmR3&$YGq9Fc6VXuV3qX%aySb-B8!1Ei0#4Pb~4)z$Y}C( zaSV~TTzc-NP?G_V!^H#^7lDl@)ReS#BsBi}e}CeX!c*Meb(gUao|8m2{o!8~afns$vuZ)+CN|ZgaOSJMt9h=Jze{|uGT($P z>hI6%x2AnR{_*)frIZFg{iE}b$R$WTwOJ&?US-0V{gZdyy#-uiK-Z|2xJHzuB$lLF zB^RXvDF!10LvvjNOI;(=5F-OCLjx-#6Kw+vD+2?Y9SieOH00)|WTsW(*5Lb8@-k3E z6v&3+vUIDY#Nt%l(xOa;w9K4TD}8OyG{TA literal 0 HcmV?d00001 diff --git a/designer_base/src/com/fr/design/images/buttonicon/widget/label_16.png b/designer_base/src/com/fr/design/images/buttonicon/widget/label_16.png new file mode 100644 index 0000000000000000000000000000000000000000..023406cd8ca85659dfb51263a4ee4b2f9cfa5be7 GIT binary patch literal 359 zcmV-t0hs=YP)Px$AxT6*R5%f1U>Nd%(b(AJKSjQP8DMOj#%gJ4$%)M{Tyh}2OfU_Mj29h#{rZ~+ z<0I3|%om(~|NfnWECyqI3b>>vU(0PZ4?Udj^^x-CPG4*+XhW<#L-pp5_k002ovPDHLk FV1i>`oMHd~ literal 0 HcmV?d00001 diff --git a/designer_base/src/com/fr/design/images/buttonicon/widget/number_field_16.png b/designer_base/src/com/fr/design/images/buttonicon/widget/number_field_16.png new file mode 100644 index 0000000000000000000000000000000000000000..19b688df4330dcc31e4770867310ba7b2114eb07 GIT binary patch literal 401 zcmV;C0dD?@P)Px$OG!jQR5%gUQZY-zP!N9ilEyl85J7Zw)HO+k(7(_QLfjq1NkLr|vI*kk=Hy_1 zfKZ)WIs^)70v~veiYf-IwYhq$ z)mqB)$ra-2ewOvVf*@EaisA+lCPcs1>&|f;$Dh96yh9WvfLOFFd8kw=Bpc*;u}8#K zqw!(xj^n%|u7z1P+$Q>k%sK#owVJ)l7#Vbx(jC?sL7FBPLg1JIj()$Nb0>Tz-3BGY z4F-cZ&ubo0v9@i?F7svtKKvD~>z|PEXh<>Rr4$cZL>A^HHKkm@rI%(GM%%w`j5md&UbtRY4VN&9wf5S00000NkvXXu0mjf|L?Ml literal 0 HcmV?d00001 diff --git a/designer_base/src/com/fr/design/images/buttonicon/widget/password_field_16.png b/designer_base/src/com/fr/design/images/buttonicon/widget/password_field_16.png new file mode 100644 index 0000000000000000000000000000000000000000..e6bc2977238df6450955058b3312794dbd4340dd GIT binary patch literal 306 zcmV-20nPr2P)Px#>`6pHR5%gUlCcWHFc60Ca@_>cStmDVrRX5^VI15Dq2uh*N`KO96&_O&%LjL^s<&K2t?}J;dwifE52*Blds#*eW?NO2 z^W}0nKx3IZ9iJu`K{F1=7A~+v#!E0JVsH}#C}Y~Wq?aT5S;J# zM;+%A=r!ilVx_zVRTf16p28sR769{=NHYvck_3|dYA(n5a)1c$na$J~p2M|41)zIZ z5i^3e7LjEf$4~fgD7_Ew&hyO70qEziQ2Zn1ef;(G0@W*JdPx$CrLy>R5%f1G%+#R`u{(J7Xul9k&$5=gR!y6e=_ufwSe?8!898in>L!5SXjgO z=(LH6={#d&8##1w7MK9gIe!2D|1k!7>EQqWj9(ZTneLo9b8@$diCHTH!@uP~Z`v?0 z{Oktucbz$NYA#G4+yy`dn;02c+RvOh(=9A4xQKz_Zxzt6Dn`ctPk~}rfEFBKU|=sr z)(kQPZUD?g5WQ>HuCG9;SwKV6xw*M#A>CWhKVI@IMmh zjoQzjzqUg({eQ;9^b;(PYzW){CMJe8|Nb%9-Mja&8qRB literal 0 HcmV?d00001 diff --git a/designer_base/src/com/fr/design/images/buttonicon/widget/text_field_16.png b/designer_base/src/com/fr/design/images/buttonicon/widget/text_field_16.png new file mode 100644 index 0000000000000000000000000000000000000000..553a9084607ab9ba3b44805fc60fb4246c2815cb GIT binary patch literal 113 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|v^`xMLo5W7 z6C^%0T)c7PiM{K-1xFYr#Hn@VuxH7cCK$9ZKIQDZRATVq7h}*Pw$j_umH|L*44$rj JF6*2UngD19A{PJv literal 0 HcmV?d00001 diff --git a/designer_base/src/com/fr/design/images/buttonicon/widget/tree_16.png b/designer_base/src/com/fr/design/images/buttonicon/widget/tree_16.png new file mode 100644 index 0000000000000000000000000000000000000000..5e442d2d826a27075c1b85344ab59736ef324fc2 GIT binary patch literal 225 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|W_!9ghFAzL z4R+*fP~c&H-2X)MUwFJ?{-KZ{W430N9aHkM!#%$!wrH!C@9KQKclX`G7L$d4RW7`n z79n-~M@4qtW~mk5TdtJyrf_kY%woIacg3mbas#unj@(AkouQLgaxv#j_AQV&G0QCG zU(5Z5b1r%B6|43$cJy%dEzX`L&Q?@C?Ya2_*@&|ttd_ProTF7F&Y0h}t~=Q(a-Dnc XL)$yzfnjPuXEJ!Y`njxgN@xNAj5Aag literal 0 HcmV?d00001 diff --git a/designer_base/src/com/fr/design/images/control/.DS_Store b/designer_base/src/com/fr/design/images/control/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..1fa5734c3947354792e29bc699c56a3fbba46045 GIT binary patch literal 10244 zcmeHM%We}f6uoXDI(bkbSRi(@EDI2@MW9fX1v?}@AS8W@G*h){DZ6YCzrZgbK8BBB z!w$~5VfGJ=K{EG_Unaz?7%4kPZz!WeARtj)_$Wa+bJ}%3sQwI*Z z1VHTKvKE|U9iW`t$B~cAGAb2qma7Nnsm?DkTuI00IpK&SAD3k;>EcSdIG@@16^hgB z;N=PzH!7nYO#xG&sQ}mRLz&1fUau?b_qiOrniV_KSuq8M!|EyO=1(m+6WIXo6t6Uve#$)hBHp^tLrr|rbLyfHKUjHmSB}uv zaqrPfan>A~C;HaWQE}D@I4M`r5g{uBlJ}NSOx+OTH&*yD#@?YaQ@QBiD)$iV8OGlj zz1r&j4&4-TZz9)kF8BQCq^O$eppcm%)1K_7zG0UR3h~1gzLiHWxh(L~V8v_cH99K6 zYUwrls>0%TDxl%JxCWe^YWQPyQlh8mr3!wa4%*k_8I+GIy#_B;SbfDa6X&Ej2cD>K zdf*(%0dllBu)-Jyj25Nopd_zFYx<|c+X(Vqaj*1Jg*(8Q=LlZN3!Lr5HIe6F{Ro`Y z0e&LW+Ov?(xeQQ!?0e6z@Bw`ja&D~l%9~F>dM3p76x%j$(KSs*OP{D?nv9m-;8U=Y zBg3r2-vEix&-to?$KbYN3YY?>fGJ=Km;%?TK&Q-}bN~Nk`v3oHy+=!K3YY?aRsq-D zezU!W9DZ-Tk&S!pIqF+f7UGs=R0*tAh`)Ta1w|+ZQ9%*>=P&V>B0kRSY(gH*4?#509hf;Y z=P@(;&3AWlHUNMvX}uPp1OOzeT&j80+@Nqfuggl7ugM{a6c3O}Oga+@(@re&4HN+a z0RjO60RjO60RpQ70lKq!kyg0(g*9jc1OfzZN(A`(AwreQs4r)P^j;m*cqsr$o&tD< z`jiKFF%e%zeK{kf7fN%A>;e5y^ivEJ;bf0+cal+G&Il>O0Yx~VzcTt63VN$kT*Pw+ zj0zdF0RjO6%Msu|pIk_S4JOrv`TMVl3Da=gnwqaMD?2B5&00y8^YZ2Vg8UQRWAj zFD^$!$qRKHQaa;mQHGwQYr-{b%jsn)hh$tWa0r@?q-`BdF>dcm+Gcv(a^h-XQZtij zlR#-U&2Hln=JdO4%H_R5$4Hu)lZJHK&JkPZGwPltR2Hg`q~l!Qnqt%n zwNe?{Caanhb7Q z#|!u}zJjmfJNQ0+gdgK4_$hvYU*fFTU)CI9kNErb1%5}J#f0@g!DS8Kh_K=IdzFL# z4`IK_=PWHOx~+KK#`4PQx;;(J^9Q-)>=x3tCicpn^NyWLSj{D(3Tu6XqNq8|6rRR2#KOn% z349ixBPPB;OuUG%E#Y0q65d^2%)3l?$}(+hl(ch9T^taMRv7}>Vm~E3|8HOU`~NE2 zb+DZPfdGMj69LR=>uzhI8CQC5^ISVZb%ZJ}+;2umFN7K|9Vh9f<0R+*VMzT5x$>B( bFK2`#4VC}=Lje749NhoG{qK?QCT{))k%0Ba literal 0 HcmV?d00001 diff --git a/designer_base/src/com/fr/design/images/gui/color/.DS_Store b/designer_base/src/com/fr/design/images/gui/color/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..5008ddfcf53c02e82d7eee2e57c38e5672ef89f6 GIT binary patch literal 6148 zcmeH~Jr2S!425mzP>H1@V-^m;4Wg<&0T*E43hX&L&p$$qDprKhvt+--jT7}7np#A3 zem<@ulZcFPQ@L2!n>{z**++&mCkOWA81W14cNZlEfg7;MkzE(HCqgga^y>{tEnwC%0;vJ&^%eQ zLs35+`xjp>T0KLZ*U+5Lu!Sk^o_Z5E4Meg@_7P6crJiNL9pw)e1;Xm069{HJUZAPk55R%$-RIA z6-eL&AQ0xu!e<4=008gy@A0LT~suv4>S3ILP<0Bm`DLLvaF4FK%)Nj?Pt*r}7;7Xa9z9H|HZjR63e zC`Tj$K)V27Re@400>HumpsYY5E(E}?0f1SyGDiY{y#)Yvj#!WnKwtoXnL;eg03bL5 z07D)V%>y7z1E4U{zu>7~aD})?0RX_umCct+(lZpemCzb@^6=o|A>zVpu|i=NDG+7} zl4`aK{0#b-!z=TL9Wt0BGO&T{GJWpjryhdijfaIQ&2!o}p04JRKYg3k&Tf zVxhe-O!X z{f;To;xw^bEES6JSc$k$B2CA6xl)ltA<32E66t?3@gJ7`36pmX0IY^jz)rRYwaaY4 ze(nJRiw;=Qb^t(r^DT@T3y}a2XEZW-_W%Hszxj_qD**t_m!#tW0KDiJT&R>6OvVTR z07RgHDzHHZ48atvzz&?j9lXF70$~P3Knx_nJP<+#`N z#-MZ2bTkiLfR>_b(HgWKJ%F~Nr_oF3b#wrIijHG|(J>BYjM-sajE6;FiC7vY#};Gd zST$CUHDeuEH+B^pz@B062qXfFfD`NpUW5?BY=V%GM_5c)L#QR}BeW8_2v-S%gfYS= zB9o|3v?Y2H`NVi)In3rTB8+ej^> zQ=~r95NVuDChL%G$=>7$vVg20myx%S50Foi`^m%Pw-h?Xh~i8Mq9jtJloCocWk2Nv zrJpiFnV_ms&8eQ$2&#xWpIS+6pmtC%Q-`S&GF4Q#^mhymh7E(qNMa}%YZ-ePrx>>xFPTiH1=E+A$W$=bG8>s^ zm=Bn5Rah$aDtr}@$`X}2l~$F0mFKEdRdZE8)p@E5RI61Ft6o-prbbn>P~)iy)E2AN zsU20jsWz_8Qg>31P|s0cqrPALg8E|(vWA65poU1JRAaZs8I2(p#xiB`SVGovRs-uS zYnV-9TeA7=Om+qP8+I>yOjAR1s%ETak!GFdam@h^# z)@rS0t$wXH+Irf)+G6c;?H29p+V6F6oj{!|o%K3xI`?%6x;DB|x`n#ibhIR?(H}Q3Gzd138Ei2)WAMz7W9Vy`X}HnwgyEn!VS)>mv$8&{hQn>w4zwy3R}t;BYlZQm5)6pty=DfLrs+A-|>>;~;Q z_F?uV_HFjh9n2gO9o9Q^JA86v({H5aB!kjoO6 zc9$1ZZKsN-Zl8L~mE{`ly3)1N^`o1+o7}D0ZPeY&J;i;i`%NyJ8_8Y6J?}yE@b_5a zam?eLr<8@mESk|3$_SkmS{wQ>%qC18))9_|&j{ZT zes8AvOzF(F2#DZEY>2oYX&IRp`F#{ADl)1r>QS^)ba8a|EY_^#S^HO&t^Rgqwv=MZThqqEWH8 zxJo>d=ABlR_Bh=;eM9Tw|Ih34~oTE|= zX_mAr*D$vzw@+p(E0Yc6dFE}(8oqt`+R{gE3x4zjX+Sb3_cYE^= zgB=w+-tUy`ytONMS8KgRef4hA?t0j zufM;t32jm~jUGrkaOInTZ`zyfns>EuS}G30LFK_G-==(f<51|K&cocp&EJ`SxAh3? zNO>#LI=^+SEu(FqJ)ynt=!~PC9bO$rzPJB=?=j6w@a-(u02P7 zaQ)#(uUl{HW%tYNS3ItC^iAtK(eKlL`f9+{bJzISE?u8_z3;~C8@FyI-5j_jy7l;W z_U#vU3hqqYU3!mrul&B+{ptt$59)uk{;_4iZQ%G|z+lhASr6|H35TBkl>gI*;nGLU zN7W-nBaM%pA0HbH8olyl&XeJ%vZoWz%6?Y=dFykl=imL}`%BMQ{Mhgd`HRoLu6e2R za__6DuR6yg#~-}Tc|Gx_{H@O0eebyMy5GmWADJlpK>kqk(fVV@r_fLLKIeS?{4e)} z^ZO;zpECde03c&XQcVB=dL;k=fP(-4`Tqa_faw4Lbua(`>RI+y?e7jKeZ#YO-C z0LMv0K~#9!+>*f&fHZQVK-;9(Y(gnu>9Yf*R-C`naV;SJ&!_yxqr z@G*PogOiR+7pPKateNZBbIzSPbI0y=0hrG5@IKH2u)!)exx!{mk^53tO3hul zMQex$-eQ4w=wXhdmEQ3}R3Iu46^IH%1)>5MK>@zArEHw?-nVyS8x@EOTuKGx`H-@T zZ97|7tB(#gngY-^cv%b2nFlB)b++wnVXZ>RX|o68pvI*b#=?0&mF~1{XA5gB9LB<7 zoM+=Q6r703P|q0i9TjH#OSa5{T`;6V6->R2mNv0XFu6mUs><| z)WS2Mi5=w3`TJ};tncxN?EuI82C$aFY?l}k$1o*kfs7;BBR;3^_4rREd=p)ceMaPf z_?%}SDj0s07_MQLsF`AezH7Y_a*MM)#F)OjtP6hmkYDq#|JwHw%he@I&^tczv3AGP zK3U@S>32^5L45sT$?qodW6pZYqe8R#w-PqNW6pMlArJ9=6!zV?UBcfWUg9R>7;=tc z$g_%-Z+tFsY|-ZgZ*<+{tJ8ubk+=z}fCpsx;;DF3S#0D@$TH@LX0$T4Fq7;BpQ(wb z#GIUcM!FY#hHV_Esu^do_~*Emo#C@3c+NeQX=I#186*3`$G7m3N@P6zHQLdbne*x} ztdH)NYQATTKACSdpX?i-FIkRnpXeSVA-G-||31FC#6Mx=O!S!*W{_RrGyECB0acM_ zUJ$Rlz{g+5D_!r2`X5!GCH{Rhf5s9OIJW|Ii)=~$zkB-k|8w(4U{oL~aPbu|jqZzX zhvRg)^~#7P*G^eqvr3VEg|!M{qv<%UrsK5Be;D#SWmmzpoh_{86_)@0A;8aFe*b+F N-~YN6vAH}7`~om-wRr#l literal 0 HcmV?d00001 diff --git a/designer_base/src/com/fr/design/images/m_insert/.DS_Store b/designer_base/src/com/fr/design/images/m_insert/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..9e5b4ec081f94259acef48314f98934719c1d6a0 GIT binary patch literal 10244 zcmeHM&ubGw6n>NBuwj!>@E}Emy$D4?6ugNTVm$~RO6|=d4;U0B>V6wut3%j&dpy<<952k>cqQo#3j^8tOhiw;jX|08m zv2Zd)WK&cqMxq0ki94CLwR%+sl!40(aP6K_mkx2{Uj06JHp~wXhWPT z?)aIH+M{FC{zK{)^?!)}9N<$rKo1j%+bctv>j5eO>KM3bJc>CB{2SswrXD>(j3ExY zI}v1OegwFdgUf-M(+GPSQEa6fVC%pRk>i-&05L$mM?RO8uK|L&$Z;@xjElypJ_=9? zxLff~)h~g6df~r=SSRr)waoxk2kNzq)cMX%z+LSl5ND1unlh#%M948ttco&Cu%Pz|0Y)gd5S7i)sP0 z05d$wt|ntDVO_b{I-(8ncARBYA(h+sB5yi;HXOtX9xLAwY3kro;BqiIl6ULIqlv!U z{94dDvp>iCUBSMn%*8gLv3J1r(Zh3S#?BqyM-0?feTk3zHz(IRyhq?BIYq8O2)jBDQD;G2bH6499O> zM^wX#^RNvtdMpun9xh6?1GRa$I_56VdmfXh+Jx7I^L95K#6Dt9aqtRYSE)Yk_7R=4 zVf7En=O(X@UM?+Q&vV%aj`dNJ6|a&jusK-lqKD`kv7$ZfH81W2F%O0RmD#hly4*Dzh z)-UzUd+iy{S2($`-_lxv;3C`cu(BPGKX^NS3n%;DW6KTq?ZPgt#S^rD{?7oeAGQAX S_IG&~)2mvw{wMm6>;GR782=9d literal 0 HcmV?d00001 diff --git a/designer_chart/src/com/fr/design/images/form/.DS_Store b/designer_chart/src/com/fr/design/images/form/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..83d87b9ad453939c71a644c41d18346140232455 GIT binary patch literal 6148 zcmeHK%}T>S5Z%_oBMr~^{a7DO&{ z_{?Le-)Wxt@qjlOej@|;?nYV01Y9wD^ZtYnGtd5695u70r6*n(Dh`i~8m2i`GE3v7 zL$@J1ZsujJX4OmgakTAa4c|-a)~p)^A@ug5AZygZWFrpSVX~EOdReGkYeK}}Aj4{& zzZ->}x;42blFW;eFqOGgj)T1@2}GwVT1n89{yMo~%sJt)q|`Lbx;4}7E|ym+s|)tZ za;3LmclDsW-0PXf^n7LK==A*J^6L8L_U`^c#xV|Gt&|CkeRzb<2Ugl{n#3YGfth|( z-wpG-A922jhyr~)OCZ`B z9gVp{m;vD`6i|h7eZ=4@9PGCCb2R1(RXF2vWyqsf=K6%f%hZdt+hdqK~c~zSNIwN9a)OO7fbOJ bs1&f<*a37j<_f_ALO%kM25N|bA7$VL2@GQ& literal 0 HcmV?d00001 diff --git a/designer_form/src/com/fr/design/form/.DS_Store b/designer_form/src/com/fr/design/form/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..b39c40f4bde105eef0cba316a14a2cf79b544a6f GIT binary patch literal 6148 zcmeHK%}*0S6rX_#U8r^oR6#jx>_HPS;Va$@Yk??1(@GmC@=>diMF6>Bx|WQ^=fW`1wqy!U43H`#eR2qB!Tmc|j%5kg^T z978?O{X+OSZ*9_{ES-Q@s+Y9fRsNK={Oy9}=Jnx>T_T_@+a-TH zOX!?KYJ{fT8P*A0nw)&p_3y0o^hQpeit4ex{@6e)9*>_s6CWHpJCxV^ z3s!Nb?DE&2VGeVXPL-^dUAvU2SVfzbb3VE2XY75F*ZY2QT_mNABU5&-0zLyr29fTX zO9&PDQd?Ud@pC`uD|tQY6A#aJe9$;Hc zZpCt4i(6 z1FM;_x}jh(JLETnJHn>Kpbr=b7-(gH|NDdJy#CMq{{AnVf-YbnVBr5`0EcEXvq@N+ zs;zCS8^*Hs~j7 zqqRX5PzC;)0{rdn(E|L@UW%%yB?AjQN zj{^I!#O~1;+&9FT(HY_-5^d^_Wmbq)oXJ5YR*G0Ndd6xJe}vk#CqhO`%sv5^RoJo~ zbBYL`h4r++DM#??5S&ypx3SWc=FpI5n{3M)9D%qR=8Zz87G}wBX^D&@%z5GGg_BCQ7DlGqXBoa%cz9IXi2^vY+3LIpsHp;~ zfGSW_fcJ+8&KNt)Ey~t`LaqS75Y1w!^PdLhL=IzzxkdEAjHLoC)wnB$v2?UYZd~jz zw`l2PBs1c;%*NeNjATc9B*V$X7PV9bRDrSrfqiWA`G2$d{$D2PlPaJJ{3``a*uCp^ zuq1c3t}Tww+6aCRXXA0XMWLW@$FWrSC_aXZp)cYJFm{+*L<>y+2#5??r~*4x;1@Y> BxD5aR literal 0 HcmV?d00001 From ba21d74d573b80fe4571261ffb8c15334847edc8 Mon Sep 17 00:00:00 2001 From: hzzz Date: Mon, 25 Sep 2017 20:14:38 +0800 Subject: [PATCH 080/125] =?UTF-8?q?=E5=9B=BE=E6=A0=87=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/com/fr/design/images/.DS_Store | Bin 12292 -> 0 bytes .../com/fr/design/images/buttonicon/.DS_Store | Bin 12292 -> 0 bytes .../design/images/buttonicon/widget/.DS_Store | Bin 6148 -> 0 bytes .../src/com/fr/design/images/control/.DS_Store | Bin 10244 -> 0 bytes .../src/com/fr/design/images/gui/.DS_Store | Bin 8196 -> 0 bytes .../com/fr/design/images/gui/color/.DS_Store | Bin 6148 -> 0 bytes .../com/fr/design/images/lookandfeel/.DS_Store | Bin 8196 -> 0 bytes .../src/com/fr/design/images/m_insert/.DS_Store | Bin 10244 -> 0 bytes .../src/com/fr/design/images/form/.DS_Store | Bin 6148 -> 0 bytes designer_form/src/com/fr/design/form/.DS_Store | Bin 6148 -> 0 bytes .../src/com/fr/design/form/images/.DS_Store | Bin 6148 -> 0 bytes 11 files changed, 0 insertions(+), 0 deletions(-) delete mode 100644 designer_base/src/com/fr/design/images/.DS_Store delete mode 100644 designer_base/src/com/fr/design/images/buttonicon/.DS_Store delete mode 100644 designer_base/src/com/fr/design/images/buttonicon/widget/.DS_Store delete mode 100644 designer_base/src/com/fr/design/images/control/.DS_Store delete mode 100644 designer_base/src/com/fr/design/images/gui/.DS_Store delete mode 100644 designer_base/src/com/fr/design/images/gui/color/.DS_Store delete mode 100644 designer_base/src/com/fr/design/images/lookandfeel/.DS_Store delete mode 100644 designer_base/src/com/fr/design/images/m_insert/.DS_Store delete mode 100644 designer_chart/src/com/fr/design/images/form/.DS_Store delete mode 100644 designer_form/src/com/fr/design/form/.DS_Store delete mode 100644 designer_form/src/com/fr/design/form/images/.DS_Store diff --git a/designer_base/src/com/fr/design/images/.DS_Store b/designer_base/src/com/fr/design/images/.DS_Store deleted file mode 100644 index 68d64fbc869d2a67ff99202c17c07f37940271f5..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 12292 zcmeHNYit}>6+S1iotd#ykJ~tov)RVf4NaT4^<(42#ckGhOyefOCU#;w4?D9v*Y=R{ z%ywpWH;)FnMIb<^sDOk-6M@QGMd}Y!34sI>&{BzthlqGd1tk9Qhl)Q?As*-6JG&mw z+9HG!)#+Yo=DyCEo%!~jd(R61a4>In0qh05#3sH+221gZ$Uoe@xhOSMJCAp2rZy}el-3-8nnM}^M{GhY* z*SKM0O>NyKMb+w)!|&A&&+2y;ELI%N1(xghCzpEi|W!=R^<^=wXNz_LTKN!t1hnc5&cgSOOHz#~zKVcgg zW>1{A9CNZD-*>_>7TFn2c+54eIg6Rsx3+9+-JZ~rCy0z)I8n6BU}4(uv&=CqXMVC^ z`Buhe`lcq_t15zeXInC? z&*G=>)A$*@hR@>{<$G=5>x`EXS(Wbi4LAws;SxLx*Wg9?4!jDl!=K?z+(hqm54}qY zAHjoo7~hY_>G%0>pO(DkC-T!LQqZK11{uiHSrmvhZOOG=82238b>?ZFzfEk#XNrEf z;^D8AD_*T{P#YQ>&W_X49uJHl?++T@Y2F(%f`yFX&FVYGEt64ek}sDD<_z1cz?@O< zC@n2XI^nuD5eT*kBXg2uV^-fXoRs_Of6D zEd3P%1sYRg=e;DW-m3^y5qL)m^x>J%nyth2ZmCg%E|>WCw_`wy;iz z^^&XwEAa?cswFFiCI(7&8gJv|RHwswN!F4bP_hGtzl@=Ug5uYSuT78xre$5dR}rWp zP>Dbb4aGE}n4VNedgKMtBn`3-%!rosxAmhXCCXY-cW3Xin$)|mYZW!=6$w&VO=^mP z_9N=Az$AuOJ=mmmx}?<##9)r_V_>g$HPDG+SO<$ROQ@M(L9pJD z>)zkBjNHE7)J-C{0+Utonj^GqU=h4tE6M1u%CjWM~qCghH_vbBw$R%LC$Zk9mwa;(4QUb3O~EBJFAJs>^z=ZI8LW#eI0wXN2o6 zV2dNpoV%ubZw1fPwBdP%GtUMuo)zA;QD@K%0(Y_Ov#az7wjX>$3U_<@NU0I}vvg=L z$-ScEgyTAlyjx>(OeG^>4-CMuh|}onE1X993a8NsIjzRXb#zLymt96XNovGatu3n4y_FhVrQ%lB>26Ge zYfnGjFIHYzm0Q;3R#D}u@xNkdh2N6+U)-_99bYk5pzRli!Zd)-mV_dj29OweTsyj^ zo$!B619+jKIeE{!_jK-i_~4=IG9y6KPEq*O33wFWTPtiY0_HrRu3q0P1O17$NT>1{ z>xsM-T-4hslCR&$q903zt*Qv4nQeMK@Rq7k19Oppq%a?hX)cvJoO-!`yjq~YEmnbg(5`2%;uGiqF@H5IE_$~Ya{se!4zr#P^pOizOpo;a_ zAR_kdcrSKhALS18Q{;Y-46vj4J{+ak{aKvBb7)ZBKn|ZkpYjHt6!`)l!;e$8z*Wi? z_&k0AU&L?W_wfh#Lwp&3g1^A)^5iO;ZpUQ5bjR0kBuc*Qg{s>B+_%7e0fZnw`>E{a z@&Dnq^Zx`<^;SioioorO0M;BDKQu_+7RJ^qzLLk<+vqw+7cZP{N!EgeZeciH%!yDu zjdc= diff --git a/designer_base/src/com/fr/design/images/buttonicon/.DS_Store b/designer_base/src/com/fr/design/images/buttonicon/.DS_Store deleted file mode 100644 index 50298defdf58b7c2149d659efdedba5a310d494a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 12292 zcmeHN&u<$=6rM@a){f)EBq`yC1V&Y%hk}x{swz-Llm=B15{>Grv}%j%ADhI&-nG{2 z{AdV@gervi1IhtToDdiO2#`1+^@KRVvEqOb5*KdpeY5Li#+h-;g#+D_iLnGKR_|#gH)^&x?uNLQ?L<4-K0oFsF zZO4BE{3lvgo)sp*>6PwuESXFIp2}jN4w?JOf{GUsZ zHSCH+u09ZNfF=4~N(NTiu;{8Ec99I0&Og{%>gXD*H^a!m@-A+tbq!3sCmv4d&YVvC4yFr9qulkdP!>^rLmB=~B`k3zEthI?R)qkqUV12bV@ z$P13Bmct?#ZlH4t9jSiB4z3+VRvM@&pva^M^;{PvoU!*W!aL6RL{1u7@{rvIFFo{H z6&eDx-0CNC(m+mV$Qo>hs1IvkMU$5XTDMzA|IlA{Bp7NSb-Uzs7xiXuS<#BA-)np; zXtnOm0A1iK4m{bXh0xQgAjf0WQioVbaY0I z73cU@OxESI7%7Y{jMUcpDIVGpZ9777PDf;*osryOK`~92KdMK}OIKEAyPb${O-95! z(8Kvl2t&qa8*`MUl@W_#)$1>S$CY#UPF0BWf zrKl2hJByX@rux;Wd)4IrY7jK{?<>`74R5ntn7$bJQKjK~p(cLo-G*NeHW!1gU+*YA zE0t&+SY@bOcz$Q+)w#20&Ydovot@h~UEE22%+2raW->D;=PoSYX>H%#`C#|M&(UTa zGD-6AR>(ZQz)z!{joL=iPI<4_&R_Q1Ihq^Gk53eynwXrJnwmcT^vp9e<-%08QhR?b zWNj}7%^+NCcD4OJK-KEg; ze5LR5>T1V}u50%O%;Z@{aU+fgI%JJ-ChgYrft3@iScx43<~S*d!> z%l={zMM3L&qZasattONb{9Fk=Dmd}xAF-ECEWF*j;rl!s1#u$2!7g7xUiB+2FMDEP zC4QDg%6$@{;){T)rS*lrPDbQ z=((QyxRiLMXm(I@ZLU-cT5V0v=)hL6v{dg#H6ecd{r+!Cs_*~xf&Xu>57xg?3jJo_ zuR$~GoYMy#Lc28>sIaaN)iIzLpcu{vEMU3pFv8TRhI80rC?7tr4dY{&xVW^l){F~Y zLt1lddYgLS-+O@Z;TYx{z8SYtjx)EB`;8^iWz6?+-fG2>ss^tA{rkW@1_PN(EDp?x zxkfNhllv%U7I8LR#yXU_%C^0&TsIgxMxleb-GD*Qm4kuFBpAmK=DNX<&q97+?#Pvc zfuJXQh+fua?E?lf14&Qzkjy;oD1Ih9`?~IfZEb~t1zMx{Nj?X_f(-3E5M(gb<3z9uS{(54|&O1)shL0w# zS{MtsGPnAGoHuGRrgS{APt{(O-h!<16PFu~T!M@>EFBmoP!S^FLah%HG@)nW>$M=6qD7~Z}NImfX^ne^$DlILdZN03%znOg3Uc`9^XYYWl z634~(2mrs;t9X>jW`Po1AP&#=;u3c_{_~Fj()k|~g>rpX&CTijuYFbiWX=Eo0Mm1^ ACjbBd diff --git a/designer_base/src/com/fr/design/images/buttonicon/widget/.DS_Store b/designer_base/src/com/fr/design/images/buttonicon/widget/.DS_Store deleted file mode 100644 index 91dc347ec85f31a94b7fdad753b39c905c453a5f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6148 zcmeHKJx>Bb5PgdjC=GU&`wP6#SYHTshQ`o}!r?&-A2|+9tnT0V?<}o-GrJ+;sg*Ir z%v^Tf?(EDC`}T6f0&u-;)&)8MT5N)iW2!Gi=B3r75iNpF*BGIT3!Gz(WzE|Rhsc1O zT^l6|O!<5~zkFSeueO`ApvMh{*l@m}PB6o>J_-7?ZScVO70*1uJ?1=l@tbnIB9^pf z>NQ8sx&4uNjxffZuAWdAn9yg!*oCfFe2PezVL|^~*Gw3@We&-|i6PX*D~1cfGJ=K{EG_Unaz?7%4kPZz!WeARtj)_$Wa+bJ}%3sQwI*Z z1VHTKvKE|U9iW`t$B~cAGAb2qma7Nnsm?DkTuI00IpK&SAD3k;>EcSdIG@@16^hgB z;N=PzH!7nYO#xG&sQ}mRLz&1fUau?b_qiOrniV_KSuq8M!|EyO=1(m+6WIXo6t6Uve#$)hBHp^tLrr|rbLyfHKUjHmSB}uv zaqrPfan>A~C;HaWQE}D@I4M`r5g{uBlJ}NSOx+OTH&*yD#@?YaQ@QBiD)$iV8OGlj zz1r&j4&4-TZz9)kF8BQCq^O$eppcm%)1K_7zG0UR3h~1gzLiHWxh(L~V8v_cH99K6 zYUwrls>0%TDxl%JxCWe^YWQPyQlh8mr3!wa4%*k_8I+GIy#_B;SbfDa6X&Ej2cD>K zdf*(%0dllBu)-Jyj25Nopd_zFYx<|c+X(Vqaj*1Jg*(8Q=LlZN3!Lr5HIe6F{Ro`Y z0e&LW+Ov?(xeQQ!?0e6z@Bw`ja&D~l%9~F>dM3p76x%j$(KSs*OP{D?nv9m-;8U=Y zBg3r2-vEix&-to?$KbYN3YY?>fGJ=Km;%?TK&Q-}bN~Nk`v3oHy+=!K3YY?aRsq-D zezU!W9DZ-Tk&S!pIqF+f7UGs=R0*tAh`)Ta1w|+ZQ9%*>=P&V>B0kRSY(gH*4?#509hf;Y z=P@(;&3AWlHUNMvX}uPp1OOzeT&j80+@Nqfuggl7ugM{a6c3O}Oga+@(@re&4HN+a z0RjO60RjO60RpQ70lKq!kyg0(g*9jc1OfzZN(A`(AwreQs4r)P^j;m*cqsr$o&tD< z`jiKFF%e%zeK{kf7fN%A>;e5y^ivEJ;bf0+cal+G&Il>O0Yx~VzcTt63VN$kT*Pw+ zj0zdF0RjO6%Msu|pIk_S4JOrv`TMVl3Da=gnwqaMD?2B5&00y8^YZ2Vg8UQRWAj zFD^$!$qRKHQaa;mQHGwQYr-{b%jsn)hh$tWa0r@?q-`BdF>dcm+Gcv(a^h-XQZtij zlR#-U&2Hln=JdO4%H_R5$4Hu)lZJHK&JkPZGwPltR2Hg`q~l!Qnqt%n zwNe?{Caanhb7Q z#|!u}zJjmfJNQ0+gdgK4_$hvYU*fFTU)CI9kNErb1%5}J#f0@g!DS8Kh_K=IdzFL# z4`IK_=PWHOx~+KK#`4PQx;;(J^9Q-)>=x3tCicpn^NyWLSj{D(3Tu6XqNq8|6rRR2#KOn% z349ixBPPB;OuUG%E#Y0q65d^2%)3l?$}(+hl(ch9T^taMRv7}>Vm~E3|8HOU`~NE2 zb+DZPfdGMj69LR=>uzhI8CQC5^ISVZb%ZJ}+;2umFN7K|9Vh9f<0R+*VMzT5x$>B( bFK2`#4VC}=Lje749NhoG{qK?QCT{))k%0Ba diff --git a/designer_base/src/com/fr/design/images/gui/color/.DS_Store b/designer_base/src/com/fr/design/images/gui/color/.DS_Store deleted file mode 100644 index 5008ddfcf53c02e82d7eee2e57c38e5672ef89f6..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6148 zcmeH~Jr2S!425mzP>H1@V-^m;4Wg<&0T*E43hX&L&p$$qDprKhvt+--jT7}7np#A3 zem<@ulZcFPQ@L2!n>{z**++&mCkOWA81W14cNZlEfg7;MkzE(HCqgga^y>{tEnwC%0;vJ&^%eQ zLs35+`xjp>T0-C`naV;SJ&!_yxqr z@G*PogOiR+7pPKateNZBbIzSPbI0y=0hrG5@IKH2u)!)exx!{mk^53tO3hul zMQex$-eQ4w=wXhdmEQ3}R3Iu46^IH%1)>5MK>@zArEHw?-nVyS8x@EOTuKGx`H-@T zZ97|7tB(#gngY-^cv%b2nFlB)b++wnVXZ>RX|o68pvI*b#=?0&mF~1{XA5gB9LB<7 zoM+=Q6r703P|q0i9TjH#OSa5{T`;6V6->R2mNv0XFu6mUs><| z)WS2Mi5=w3`TJ};tncxN?EuI82C$aFY?l}k$1o*kfs7;BBR;3^_4rREd=p)ceMaPf z_?%}SDj0s07_MQLsF`AezH7Y_a*MM)#F)OjtP6hmkYDq#|JwHw%he@I&^tczv3AGP zK3U@S>32^5L45sT$?qodW6pZYqe8R#w-PqNW6pMlArJ9=6!zV?UBcfWUg9R>7;=tc z$g_%-Z+tFsY|-ZgZ*<+{tJ8ubk+=z}fCpsx;;DF3S#0D@$TH@LX0$T4Fq7;BpQ(wb z#GIUcM!FY#hHV_Esu^do_~*Emo#C@3c+NeQX=I#186*3`$G7m3N@P6zHQLdbne*x} ztdH)NYQATTKACSdpX?i-FIkRnpXeSVA-G-||31FC#6Mx=O!S!*W{_RrGyECB0acM_ zUJ$Rlz{g+5D_!r2`X5!GCH{Rhf5s9OIJW|Ii)=~$zkB-k|8w(4U{oL~aPbu|jqZzX zhvRg)^~#7P*G^eqvr3VEg|!M{qv<%UrsK5Be;D#SWmmzpoh_{86_)@0A;8aFe*b+F N-~YN6vAH}7`~om-wRr#l diff --git a/designer_base/src/com/fr/design/images/m_insert/.DS_Store b/designer_base/src/com/fr/design/images/m_insert/.DS_Store deleted file mode 100644 index 9e5b4ec081f94259acef48314f98934719c1d6a0..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 10244 zcmeHM&ubGw6n>NBuwj!>@E}Emy$D4?6ugNTVm$~RO6|=d4;U0B>V6wut3%j&dpy<<952k>cqQo#3j^8tOhiw;jX|08m zv2Zd)WK&cqMxq0ki94CLwR%+sl!40(aP6K_mkx2{Uj06JHp~wXhWPT z?)aIH+M{FC{zK{)^?!)}9N<$rKo1j%+bctv>j5eO>KM3bJc>CB{2SswrXD>(j3ExY zI}v1OegwFdgUf-M(+GPSQEa6fVC%pRk>i-&05L$mM?RO8uK|L&$Z;@xjElypJ_=9? zxLff~)h~g6df~r=SSRr)waoxk2kNzq)cMX%z+LSl5ND1unlh#%M948ttco&Cu%Pz|0Y)gd5S7i)sP0 z05d$wt|ntDVO_b{I-(8ncARBYA(h+sB5yi;HXOtX9xLAwY3kro;BqiIl6ULIqlv!U z{94dDvp>iCUBSMn%*8gLv3J1r(Zh3S#?BqyM-0?feTk3zHz(IRyhq?BIYq8O2)jBDQD;G2bH6499O> zM^wX#^RNvtdMpun9xh6?1GRa$I_56VdmfXh+Jx7I^L95K#6Dt9aqtRYSE)Yk_7R=4 zVf7En=O(X@UM?+Q&vV%aj`dNJ6|a&jusK-lqKD`kv7$ZfH81W2F%O0RmD#hly4*Dzh z)-UzUd+iy{S2($`-_lxv;3C`cu(BPGKX^NS3n%;DW6KTq?ZPgt#S^rD{?7oeAGQAX S_IG&~)2mvw{wMm6>;GR782=9d diff --git a/designer_chart/src/com/fr/design/images/form/.DS_Store b/designer_chart/src/com/fr/design/images/form/.DS_Store deleted file mode 100644 index 83d87b9ad453939c71a644c41d18346140232455..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6148 zcmeHK%}T>S5Z%_oBMr~^{a7DO&{ z_{?Le-)Wxt@qjlOej@|;?nYV01Y9wD^ZtYnGtd5695u70r6*n(Dh`i~8m2i`GE3v7 zL$@J1ZsujJX4OmgakTAa4c|-a)~p)^A@ug5AZygZWFrpSVX~EOdReGkYeK}}Aj4{& zzZ->}x;42blFW;eFqOGgj)T1@2}GwVT1n89{yMo~%sJt)q|`Lbx;4}7E|ym+s|)tZ za;3LmclDsW-0PXf^n7LK==A*J^6L8L_U`^c#xV|Gt&|CkeRzb<2Ugl{n#3YGfth|( z-wpG-A922jhyr~)OCZ`B z9gVp{m;vD`6i|h7eZ=4@9PGCCb2R1(RXF2vWyqsf=K6%f%hZdt+hdqK~c~zSNIwN9a)OO7fbOJ bs1&f<*a37j<_f_ALO%kM25N|bA7$VL2@GQ& diff --git a/designer_form/src/com/fr/design/form/.DS_Store b/designer_form/src/com/fr/design/form/.DS_Store deleted file mode 100644 index b39c40f4bde105eef0cba316a14a2cf79b544a6f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6148 zcmeHK%}*0S6rX_#U8r^oR6#jx>_HPS;Va$@Yk??1(@GmC@=>diMF6>Bx|WQ^=fW`1wqy!U43H`#eR2qB!Tmc|j%5kg^T z978?O{X+OSZ*9_{ES-Q@s+Y9fRsNK={Oy9}=Jnx>T_T_@+a-TH zOX!?KYJ{fT8P*A0nw)&p_3y0o^hQpeit4ex{@6e)9*>_s6CWHpJCxV^ z3s!Nb?DE&2VGeVXPL-^dUAvU2SVfzbb3VE2XY75F*ZY2QT_mNABU5&-0zLyr29fTX zO9&PDQd?Ud@pC`uD|tQY6A#aJe9$;Hc zZpCt4i(6 z1FM;_x}jh(JLETnJHn>Kpbr=b7-(gH|NDdJy#CMq{{AnVf-YbnVBr5`0EcEXvq@N+ zs;zCS8^*Hs~j7 zqqRX5PzC;)0{rdn(E|L@UW%%yB?AjQN zj{^I!#O~1;+&9FT(HY_-5^d^_Wmbq)oXJ5YR*G0Ndd6xJe}vk#CqhO`%sv5^RoJo~ zbBYL`h4r++DM#??5S&ypx3SWc=FpI5n{3M)9D%qR=8Zz87G}wBX^D&@%z5GGg_BCQ7DlGqXBoa%cz9IXi2^vY+3LIpsHp;~ zfGSW_fcJ+8&KNt)Ey~t`LaqS75Y1w!^PdLhL=IzzxkdEAjHLoC)wnB$v2?UYZd~jz zw`l2PBs1c;%*NeNjATc9B*V$X7PV9bRDrSrfqiWA`G2$d{$D2PlPaJJ{3``a*uCp^ zuq1c3t}Tww+6aCRXXA0XMWLW@$FWrSC_aXZp)cYJFm{+*L<>y+2#5??r~*4x;1@Y> BxD5aR From 97bef2cb76c92244fca8d64ece83c8463c0d3046 Mon Sep 17 00:00:00 2001 From: hzzz Date: Tue, 26 Sep 2017 09:20:30 +0800 Subject: [PATCH 081/125] format --- .../fr/design/gui/core/FormWidgetOption.java | 108 +++++++++++++++++- 1 file changed, 107 insertions(+), 1 deletion(-) diff --git a/designer_form/src/com/fr/design/gui/core/FormWidgetOption.java b/designer_form/src/com/fr/design/gui/core/FormWidgetOption.java index 18fe7a83e1..1569700601 100644 --- a/designer_form/src/com/fr/design/gui/core/FormWidgetOption.java +++ b/designer_form/src/com/fr/design/gui/core/FormWidgetOption.java @@ -1 +1,107 @@ -package com.fr.design.gui.core; import javax.swing.Icon; import com.fr.base.BaseUtils; import com.fr.form.ui.ElementCaseEditor; import com.fr.form.ui.Widget; import com.fr.form.ui.container.WAbsoluteLayout; import com.fr.form.ui.container.WBorderLayout; import com.fr.form.ui.container.WCardLayout; import com.fr.form.ui.container.WFitLayout; import com.fr.form.ui.container.WHorizontalBoxLayout; import com.fr.form.ui.container.WParameterLayout; import com.fr.form.ui.container.WVerticalBoxLayout; import com.fr.general.Inter; /** * Author : Shockway * Date: 13-6-17 * Time: 上午10:40 */ public class FormWidgetOption extends WidgetOption { /** * 返回名字 * @return 名字 */ @Override public String optionName() { return null; } /** * 返回图标 * @return 图标 */ @Override public Icon optionIcon() { return null; } /** * 组件类 * @return 类 */ @Override public Class widgetClass() { return null; } /** * 返回组件 * @return 控件 */ @Override public Widget createWidget() { return null; } /* * 表单容器 */ public static WidgetOption[] getFormContainerInstance() { return new WidgetOption[] { ABSOLUTELAYOUTCONTAINER, BORDERLAYOUTCONTAINER, HORIZONTALBOXLAYOUTCONTAINER, VERTICALBOXLAYOUTCONTAINER, CARDLAYOUTCONTAINER, FITLAYOUTCONTAINER }; } /** * 表单工具栏上的布局 * @return 控件 */ public static WidgetOption[] getFormLayoutInstance() { return new WidgetOption[] {CARDLAYOUTCONTAINER, ABSOLUTELAYOUTCONTAINER}; } public static final WidgetOption ABSOLUTELAYOUTCONTAINER = WidgetOptionFactory.createByWidgetClass(Inter .getLocText("FR-Designer_Layout_Block_Absolute"), BaseUtils.readIcon("/com/fr/design/images/buttonicon/layout_absolute_new.png"), WAbsoluteLayout.class); public static final WidgetOption BORDERLAYOUTCONTAINER = WidgetOptionFactory.createByWidgetClass(Inter .getLocText("FR-Designer_BorderLayout"), BaseUtils.readIcon("/com/fr/web/images/form/resources/layout_border.png"), WBorderLayout.class); public static final WidgetOption CARDLAYOUTCONTAINER = WidgetOptionFactory.createByWidgetClass(Inter .getLocText("FR-Designer_Layout_Block_Tab"), BaseUtils.readIcon("/com/fr/design/images/buttonicon/card_layout_16.png"), WCardLayout.class); public static final WidgetOption HORIZONTALBOXLAYOUTCONTAINER = WidgetOptionFactory.createByWidgetClass(Inter .getLocText("FR-Designer_Layout-HBox"), BaseUtils.readIcon("/com/fr/web/images/form/resources/boxlayout_h_16.png"), WHorizontalBoxLayout.class); public static final WidgetOption VERTICALBOXLAYOUTCONTAINER = WidgetOptionFactory.createByWidgetClass(Inter .getLocText("FR-Designer_VerticalBoxLayout"), BaseUtils.readIcon("/com/fr/web/images/form/resources/boxlayout_v_16.png"), WVerticalBoxLayout.class); public static final WidgetOption FITLAYOUTCONTAINER = WidgetOptionFactory.createByWidgetClass(Inter.getLocText("FR-Designer-Layout_Adaptive_Layout"), BaseUtils.readIcon("/com/fr/web/images/form/resources/boxlayout_v_16.png"), WFitLayout.class); public static final WidgetOption PARAMETERCONTAINER = WidgetOptionFactory.createByWidgetClass(Inter .getLocText("FR-Designer_Para-Body"), BaseUtils.readIcon("/com/fr/web/images/form/resources/layout_parameter.png"), WParameterLayout.class); public static final WidgetOption ELEMENTCASE = WidgetOptionFactory.createByWidgetClass(Inter .getLocText("FR-Designer_Form-Report"), BaseUtils.readIcon("/com/fr/design/images/buttonicon/report_16.png"), ElementCaseEditor.class); } \ No newline at end of file +package com.fr.design.gui.core; + +import javax.swing.Icon; + +import com.fr.base.BaseUtils; +import com.fr.form.ui.ElementCaseEditor; +import com.fr.form.ui.Widget; +import com.fr.form.ui.container.WAbsoluteLayout; +import com.fr.form.ui.container.WBorderLayout; +import com.fr.form.ui.container.WCardLayout; +import com.fr.form.ui.container.WFitLayout; +import com.fr.form.ui.container.WHorizontalBoxLayout; +import com.fr.form.ui.container.WParameterLayout; +import com.fr.form.ui.container.WVerticalBoxLayout; +import com.fr.general.Inter; + +/** + * Author : Shockway + * Date: 13-6-17 + * Time: 上午10:40 + */ +public class FormWidgetOption extends WidgetOption { + + /** + * 返回名字 + * @return 名字 + */ + @Override + public String optionName() { + return null; + } + + /** + * 返回图标 + * @return 图标 + */ + @Override + public Icon optionIcon() { + return null; + } + + /** + * 组件类 + * @return 类 + */ + @Override + public Class widgetClass() { + return null; + } + + /** + * 返回组件 + * @return 控件 + */ + @Override + public Widget createWidget() { + return null; + } + + /* + * 表单容器 + */ + public static WidgetOption[] getFormContainerInstance() { + return new WidgetOption[] { ABSOLUTELAYOUTCONTAINER, BORDERLAYOUTCONTAINER, HORIZONTALBOXLAYOUTCONTAINER, VERTICALBOXLAYOUTCONTAINER, + CARDLAYOUTCONTAINER, FITLAYOUTCONTAINER }; + } + + /** + * 表单工具栏上的布局 + * @return 控件 + */ + public static WidgetOption[] getFormLayoutInstance() { + return new WidgetOption[] {CARDLAYOUTCONTAINER, ABSOLUTELAYOUTCONTAINER}; + } + + public static final WidgetOption ABSOLUTELAYOUTCONTAINER = WidgetOptionFactory.createByWidgetClass(Inter + .getLocText("FR-Designer_Layout_Block_Absolute"), BaseUtils.readIcon("/com/fr/design/images/buttonicon/layout_absolute_new.png"), + WAbsoluteLayout.class); + + public static final WidgetOption BORDERLAYOUTCONTAINER = WidgetOptionFactory.createByWidgetClass(Inter + .getLocText("FR-Designer_BorderLayout"), BaseUtils.readIcon("/com/fr/web/images/form/resources/layout_border.png"), + WBorderLayout.class); + + public static final WidgetOption CARDLAYOUTCONTAINER = WidgetOptionFactory.createByWidgetClass(Inter + .getLocText("FR-Designer_Layout_Block_Tab"), BaseUtils.readIcon("/com/fr/design/images/buttonicon/card_layout_16.png"), + WCardLayout.class); + + public static final WidgetOption HORIZONTALBOXLAYOUTCONTAINER = WidgetOptionFactory.createByWidgetClass(Inter + .getLocText("FR-Designer_Layout-HBox"), BaseUtils.readIcon("/com/fr/web/images/form/resources/boxlayout_h_16.png"), + WHorizontalBoxLayout.class); + + public static final WidgetOption VERTICALBOXLAYOUTCONTAINER = WidgetOptionFactory.createByWidgetClass(Inter + .getLocText("FR-Designer_VerticalBoxLayout"), BaseUtils.readIcon("/com/fr/web/images/form/resources/boxlayout_v_16.png"), + WVerticalBoxLayout.class); + + public static final WidgetOption FITLAYOUTCONTAINER = WidgetOptionFactory.createByWidgetClass(Inter.getLocText("FR-Designer-Layout_Adaptive_Layout"), + BaseUtils.readIcon("/com/fr/web/images/form/resources/boxlayout_v_16.png"), + WFitLayout.class); + + public static final WidgetOption PARAMETERCONTAINER = WidgetOptionFactory.createByWidgetClass(Inter + .getLocText("FR-Designer_Para-Body"), BaseUtils.readIcon("/com/fr/web/images/form/resources/layout_parameter.png"), + WParameterLayout.class); + + public static final WidgetOption ELEMENTCASE = WidgetOptionFactory.createByWidgetClass(Inter + .getLocText("FR-Designer_Form-Report"), BaseUtils.readIcon("/com/fr/design/images/buttonicon/report_16.png"), + ElementCaseEditor.class); +} \ No newline at end of file From 34eb7961fb3197b7e0e1c0bfb2f166b9fcea7966 Mon Sep 17 00:00:00 2001 From: vito Date: Tue, 26 Sep 2017 10:05:41 +0800 Subject: [PATCH 082/125] =?UTF-8?q?REPORT-3350=20=E7=BC=93=E5=AD=98?= =?UTF-8?q?=E7=9B=AE=E5=BD=95=E7=9A=84=E5=85=BC=E5=AE=B9=E7=94=B1=E5=90=84?= =?UTF-8?q?=E4=B8=AA=E6=96=87=E4=BB=B6=E8=87=AA=E8=A1=8C=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/com/fr/design/DesignerEnvManager.java | 25 +++++++++++++------ 1 file changed, 18 insertions(+), 7 deletions(-) diff --git a/designer_base/src/com/fr/design/DesignerEnvManager.java b/designer_base/src/com/fr/design/DesignerEnvManager.java index 293041ce97..1640f3de81 100644 --- a/designer_base/src/com/fr/design/DesignerEnvManager.java +++ b/designer_base/src/com/fr/design/DesignerEnvManager.java @@ -61,6 +61,7 @@ import java.util.logging.Handler; public class DesignerEnvManager implements XMLReadable, XMLWriter { private static final int MAX_SHOW_NUM = 10; + private static final String VERSION_80 = "80"; private static DesignerEnvManager designerEnvManager; // gui. private String activationKey = null; @@ -276,14 +277,14 @@ public class DesignerEnvManager implements XMLReadable, XMLWriter { try { FileWriter fileWriter = new FileWriter(envFile); File oldEnvFile = new File(ProductConstants.getEnvHome() + File.separator + ProductConstants.APP_NAME + "6-1" + "Env.xml"); - File oldEnvFile80 = new File(ProductConstants.getEnvHome() + File.separator + ProductConstants.APP_NAME + "Env" + ProductConstants.OLD_VERSION_8_0 + ".xml"); + File envFile80 = new File(getEnvHome(VERSION_80) + File.separator + getEnvFile().getName()); if (oldEnvFile.exists()) { // marks:兼容DesignerEnv6-1.xml FileReader fileReader = new FileReader(oldEnvFile); Utils.copyCharTo(fileReader, fileWriter); fileReader.close(); - } else if (oldEnvFile80.exists()) { - compatibilityPrevVersion(oldEnvFile80); + } else if (envFile80.exists()) { + compatibilityPrevVersion(envFile80); } else { // marks:生成一个新的xml文件 StringReader stringReader = new StringReader(""); @@ -296,6 +297,20 @@ public class DesignerEnvManager implements XMLReadable, XMLWriter { } } + private static String getEnvHome(String version) { + String userHome = System.getProperty("user.home"); + if (userHome == null) { + userHome = System.getProperty("userHome"); + } + + File envHome = new File(userHome + File.separator + "." + ProductConstants.APP_NAME + version); + if (!envHome.exists()) { + StableUtils.mkdirs(envHome); + } + + return envHome.getAbsolutePath(); + } + private void compatibilityPrevVersion(File prevEnvFile) { try { XMLTools.readFileXML(designerEnvManager, prevEnvFile); @@ -307,10 +322,6 @@ public class DesignerEnvManager implements XMLReadable, XMLWriter { recentOpenedFilePathList = new ArrayList(); curEnvName = null; designerEnvManager.saveXMLFile(); - boolean delete = prevEnvFile.delete(); - if (!delete) { - prevEnvFile.deleteOnExit(); - } } public static void setEnvFile(File envFile) { From a40e402b5360edc842ed2de2db5bb23b814b64e3 Mon Sep 17 00:00:00 2001 From: juhaoyu <2335173323@qq.com> Date: Tue, 26 Sep 2017 10:48:36 +0800 Subject: [PATCH 083/125] =?UTF-8?q?PFC-607=20=E6=9B=B4=E6=96=B0=E5=88=A0?= =?UTF-8?q?=E9=99=A4=E6=8F=92=E4=BB=B6=E4=B8=8D=E9=9C=80=E8=A6=81=E9=87=8D?= =?UTF-8?q?=E5=90=AF=20fix?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- designer/src/com/fr/start/Designer.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/designer/src/com/fr/start/Designer.java b/designer/src/com/fr/start/Designer.java index fdd7526af0..071c035ccc 100644 --- a/designer/src/com/fr/start/Designer.java +++ b/designer/src/com/fr/start/Designer.java @@ -365,7 +365,7 @@ public class Designer extends BaseDesigner { */ protected void collectUserInformation() { //定制的就不弹出来了 - if (!ComparatorUtils.equals(ProductConstants.APP_NAME, ProductConstants.DEFAULT_APPNAME)) { + if (!ComparatorUtils.equals(ProductConstants.APP_NAME, ProductConstants.DEFAULT_APP_NAME)) { return; } From 9ba2194628fdbae7bedbfa31e621779e9e1aa632 Mon Sep 17 00:00:00 2001 From: plough Date: Tue, 26 Sep 2017 10:59:37 +0800 Subject: [PATCH 084/125] =?UTF-8?q?REPORT-4769=20=E9=80=89=E4=B8=AD?= =?UTF-8?q?=E4=B8=80=E4=B8=AA=E5=8D=95=E5=85=83=E6=A0=BC=EF=BC=8C=E7=82=B9?= =?UTF-8?q?=E5=87=BB=E5=B7=A6=E5=AF=B9=E9=BD=90=EF=BC=8C=E5=88=87=E6=8D=A2?= =?UTF-8?q?=E5=8F=A6=E4=B8=80=E4=B8=AA=E5=8D=95=E5=85=83=E6=A0=BC=E5=AF=B9?= =?UTF-8?q?=E9=BD=90=E9=AB=98=E4=BA=AE=E6=B2=A1=E6=9C=89=E6=B6=88=E5=A4=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- designer/src/com/fr/design/actions/ButtonGroupAction.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/designer/src/com/fr/design/actions/ButtonGroupAction.java b/designer/src/com/fr/design/actions/ButtonGroupAction.java index ad461c1f0d..e3f20f70bf 100644 --- a/designer/src/com/fr/design/actions/ButtonGroupAction.java +++ b/designer/src/com/fr/design/actions/ButtonGroupAction.java @@ -36,7 +36,7 @@ public abstract class ButtonGroupAction extends ElementCaseAction{ break; } } - if(value == -1 && createToolBarComponent().hasClick()) { + if(createToolBarComponent().hasClick()) { index = getSelectedIndex(); createToolBarComponent().setClickState(false); } From b9b17af01f608d8db3b9755e097f591c6ada30c8 Mon Sep 17 00:00:00 2001 From: plough Date: Tue, 26 Sep 2017 11:31:26 +0800 Subject: [PATCH 085/125] =?UTF-8?q?=E6=97=A0JIRA=E4=BB=BB=E5=8A=A1?= =?UTF-8?q?=EF=BC=8C=E5=8E=BB=E6=8E=89=E5=86=97=E4=BD=99=E4=BB=A3=E7=A0=81?= =?UTF-8?q?=EF=BC=88=E5=8A=9F=E8=83=BD=E9=87=8D=E5=A4=8D=EF=BC=8C=E4=B8=94?= =?UTF-8?q?=E6=B2=A1=E6=9C=89=E5=81=9A=E5=9B=BD=E9=99=85=E5=8C=96=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/com/fr/design/DesignerEnvManager.java | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/designer_base/src/com/fr/design/DesignerEnvManager.java b/designer_base/src/com/fr/design/DesignerEnvManager.java index 1640f3de81..568deb96d8 100644 --- a/designer_base/src/com/fr/design/DesignerEnvManager.java +++ b/designer_base/src/com/fr/design/DesignerEnvManager.java @@ -1479,18 +1479,6 @@ public class DesignerEnvManager implements XMLReadable, XMLWriter { } } }); - - // xml读完之后,看一下nameEnvMap是不是长度为0 - if (nameEnvMap.isEmpty() && StableUtils.getInstallHome() != null) { - String install_home = StableUtils.getInstallHome(); - if (install_home != null && new java.io.File(install_home).exists()) { - nameEnvMap.put("Default", LocalEnv.createEnv(StableUtils.pathJoin(new String[]{ - install_home, ProjectConstants.WEBAPP_NAME, ProjectConstants.WEBINF_NAME - }))); - - curEnvName = "Default"; - } - } } private void readRecentOpenFileList(XMLableReader reader) { From fbc78719587327983d8d530feabf15e622b2903a Mon Sep 17 00:00:00 2001 From: kerry Date: Tue, 26 Sep 2017 15:19:23 +0800 Subject: [PATCH 086/125] =?UTF-8?q?REPORT-4838=208.0=E6=97=A7=E6=A8=A1?= =?UTF-8?q?=E6=9D=BF=E5=9C=A89.0=E5=8F=B3=E4=BE=A7=E5=B1=9E=E6=80=A7?= =?UTF-8?q?=E6=A0=8F=E7=BC=96=E8=BE=91=E4=BA=86=E6=97=A0=E6=B3=95=E8=A7=A6?= =?UTF-8?q?=E5=8F=91=E4=BF=9D=E5=AD=98=E6=8C=89=E9=92=AE(=E4=B9=8B?= =?UTF-8?q?=E5=89=8D=E6=94=B9=E6=97=A0=E6=B3=95=E6=92=A4=E9=94=80=E6=94=B9?= =?UTF-8?q?=E5=9D=8F=E4=BA=86)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../designer/creator/XBorderStyleWidgetCreator.java | 2 +- .../src/com/fr/design/designer/creator/XChartEditor.java | 9 +++++++++ .../src/com/fr/design/designer/creator/XElementCase.java | 9 +++++++++ .../com/fr/design/designer/creator/XLayoutContainer.java | 9 +++++++++ .../fr/design/designer/creator/XWAbsoluteBodyLayout.java | 9 +++++++++ .../fr/design/designer/creator/XWParameterLayout.java | 9 +++++++++ .../design/designer/creator/cardlayout/XWCardLayout.java | 9 +++++++++ 7 files changed, 55 insertions(+), 1 deletion(-) diff --git a/designer_form/src/com/fr/design/designer/creator/XBorderStyleWidgetCreator.java b/designer_form/src/com/fr/design/designer/creator/XBorderStyleWidgetCreator.java index 7dd2a0bc04..f4a0ce89a4 100644 --- a/designer_form/src/com/fr/design/designer/creator/XBorderStyleWidgetCreator.java +++ b/designer_form/src/com/fr/design/designer/creator/XBorderStyleWidgetCreator.java @@ -154,7 +154,7 @@ public class XBorderStyleWidgetCreator extends XWidgetCreator{ * */ public void firePropertyChange(){ - initStyle(); + } } \ No newline at end of file diff --git a/designer_form/src/com/fr/design/designer/creator/XChartEditor.java b/designer_form/src/com/fr/design/designer/creator/XChartEditor.java index 2ac2c12e35..8e108ec945 100644 --- a/designer_form/src/com/fr/design/designer/creator/XChartEditor.java +++ b/designer_form/src/com/fr/design/designer/creator/XChartEditor.java @@ -263,4 +263,13 @@ public class XChartEditor extends XBorderStyleWidgetCreator { public JComponent getCoverPane(){ return coverPanel; } + + /** + * data属性改变触发其他操作 + * + */ + public void firePropertyChange(){ + initStyle(); + } + } \ No newline at end of file diff --git a/designer_form/src/com/fr/design/designer/creator/XElementCase.java b/designer_form/src/com/fr/design/designer/creator/XElementCase.java index c58ba60ef0..f2f1000db2 100644 --- a/designer_form/src/com/fr/design/designer/creator/XElementCase.java +++ b/designer_form/src/com/fr/design/designer/creator/XElementCase.java @@ -318,4 +318,13 @@ public class XElementCase extends XBorderStyleWidgetCreator implements FormEleme public void setXDescrption(String msg) { coverPanel.setHelpMsg(msg); } + + /** + * data属性改变触发其他操作 + * + */ + public void firePropertyChange(){ + initStyle(); + } + } \ No newline at end of file diff --git a/designer_form/src/com/fr/design/designer/creator/XLayoutContainer.java b/designer_form/src/com/fr/design/designer/creator/XLayoutContainer.java index 27288cb62d..f99aca41aa 100644 --- a/designer_form/src/com/fr/design/designer/creator/XLayoutContainer.java +++ b/designer_form/src/com/fr/design/designer/creator/XLayoutContainer.java @@ -527,4 +527,13 @@ public abstract class XLayoutContainer extends XBorderStyleWidgetCreator impleme public void setEditable(boolean isEditable) { this.editable = isEditable; } + + /** + * data属性改变触发其他操作 + * + */ + public void firePropertyChange(){ + initStyle(); + } + } \ No newline at end of file diff --git a/designer_form/src/com/fr/design/designer/creator/XWAbsoluteBodyLayout.java b/designer_form/src/com/fr/design/designer/creator/XWAbsoluteBodyLayout.java index 51ba4ef531..895eaf0310 100644 --- a/designer_form/src/com/fr/design/designer/creator/XWAbsoluteBodyLayout.java +++ b/designer_form/src/com/fr/design/designer/creator/XWAbsoluteBodyLayout.java @@ -99,4 +99,13 @@ public class XWAbsoluteBodyLayout extends XWAbsoluteLayout { initBorderStyle(); } + /** + * data属性改变触发其他操作 + * + */ + public void firePropertyChange(){ + initStyle(); + } + + } diff --git a/designer_form/src/com/fr/design/designer/creator/XWParameterLayout.java b/designer_form/src/com/fr/design/designer/creator/XWParameterLayout.java index 979d9bf082..084ab77947 100644 --- a/designer_form/src/com/fr/design/designer/creator/XWParameterLayout.java +++ b/designer_form/src/com/fr/design/designer/creator/XWParameterLayout.java @@ -210,4 +210,13 @@ public class XWParameterLayout extends XWAbsoluteLayout { protected String getIconName() { return "layout_absolute.png"; } + + /** + * data属性改变触发其他操作 + * + */ + public void firePropertyChange(){ + + } + } \ No newline at end of file diff --git a/designer_form/src/com/fr/design/designer/creator/cardlayout/XWCardLayout.java b/designer_form/src/com/fr/design/designer/creator/cardlayout/XWCardLayout.java index 8a7db60597..2156478774 100644 --- a/designer_form/src/com/fr/design/designer/creator/cardlayout/XWCardLayout.java +++ b/designer_form/src/com/fr/design/designer/creator/cardlayout/XWCardLayout.java @@ -443,4 +443,13 @@ public class XWCardLayout extends XLayoutContainer { public boolean supportRenameInWidgetTree() { return false; } + + /** + * data属性改变触发其他操作 + * + */ + public void firePropertyChange(){ + initStyle(); + } + } \ No newline at end of file From d4fd82d1e49563622382192aa3c390d0b0b9e8a9 Mon Sep 17 00:00:00 2001 From: "yaoh.wu" Date: Tue, 26 Sep 2017 15:54:40 +0800 Subject: [PATCH 087/125] =?UTF-8?q?=E5=8D=95=E5=85=83=E6=A0=BC=E5=85=83?= =?UTF-8?q?=E7=B4=A0=E6=95=B0=E6=8D=AE=E5=88=97=E6=95=B0=E6=8D=AE=E8=AE=BE?= =?UTF-8?q?=E7=BD=AE=E5=88=97=E8=A1=A8=E6=98=BE=E7=A4=BA=E5=A4=9A=E5=87=BA?= =?UTF-8?q?=E7=A9=BA=E7=99=BD=E5=8C=BA=E5=9F=9F=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fr/design/dscolumn/ResultSetGroupDockingPane.java | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/designer/src/com/fr/design/dscolumn/ResultSetGroupDockingPane.java b/designer/src/com/fr/design/dscolumn/ResultSetGroupDockingPane.java index da32086d9f..4889d250c1 100644 --- a/designer/src/com/fr/design/dscolumn/ResultSetGroupDockingPane.java +++ b/designer/src/com/fr/design/dscolumn/ResultSetGroupDockingPane.java @@ -70,7 +70,6 @@ public class ResultSetGroupDockingPane extends ResultSetGroupPane { cardLayout.show(cardPane, "groupPane"); cardPane.setPreferredSize(new Dimension(158, 20)); TableLayoutHelper.modifyTableLayoutIndexVGap(contentPane, 2, 10); - checkButtonEnabled(); } else if (i == BIND_SELECTED) { cardLayout.show(cardPane, "listPane"); cardPane.setPreferredSize(new Dimension(0, 0)); @@ -81,8 +80,8 @@ public class ResultSetGroupDockingPane extends ResultSetGroupPane { TableLayoutHelper.modifyTableLayoutIndexVGap(contentPane, 2, 10); CellExpandAttr cellExpandAttr = cellElement.getCellExpandAttr(); cellExpandAttr.setDirection(Constants.NONE); - checkButtonEnabled(); } + checkButtonEnabled(); } }); @@ -194,11 +193,17 @@ public class ResultSetGroupDockingPane extends ResultSetGroupPane { cardPane.setPreferredSize(new Dimension(158, 50)); cardPane.revalidate(); cardPane.repaint(); - } else { + return; + } + if (groupComboBox.isEnabled() || functionComboBox.isEnabled()) { cardPane.setPreferredSize(new Dimension(158, 20)); cardPane.revalidate(); cardPane.repaint(); + return; } + cardPane.setPreferredSize(new Dimension(158, 0)); + cardPane.revalidate(); + cardPane.repaint(); } public void addListener(ItemListener listener) { From 046a7e7f9530a48145118288a3e99262cba4a474 Mon Sep 17 00:00:00 2001 From: "yaoh.wu" Date: Tue, 26 Sep 2017 17:25:28 +0800 Subject: [PATCH 088/125] =?UTF-8?q?REPORT-4840=20=E5=8D=95=E5=85=83?= =?UTF-8?q?=E6=A0=BC=E5=85=83=E7=B4=A0=E6=95=B0=E6=8D=AE=E5=88=97=20?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E6=B1=87=E6=80=BB=E6=96=B9=E6=B3=95=E8=AE=BE?= =?UTF-8?q?=E7=BD=AE=E4=B8=8D=E8=83=BD=E4=BF=9D=E5=AD=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dscolumn/ResultSetGroupDockingPane.java | 37 +++++++++++++------ .../cellquick/CellDSColumnEditor.java | 2 +- 2 files changed, 26 insertions(+), 13 deletions(-) diff --git a/designer/src/com/fr/design/dscolumn/ResultSetGroupDockingPane.java b/designer/src/com/fr/design/dscolumn/ResultSetGroupDockingPane.java index 4889d250c1..61ac3bd361 100644 --- a/designer/src/com/fr/design/dscolumn/ResultSetGroupDockingPane.java +++ b/designer/src/com/fr/design/dscolumn/ResultSetGroupDockingPane.java @@ -23,7 +23,7 @@ import java.awt.event.ItemListener; * 这个pane是选中数据列后,在上方QuickRegion处显示的pane * * @author zhou, yaoh.wu - * @version 2017年8月2日14点55分 + * @version 2017年9月26日17点22分 * @since 8.0 */ public class ResultSetGroupDockingPane extends ResultSetGroupPane { @@ -115,13 +115,13 @@ public class ResultSetGroupDockingPane extends ResultSetGroupPane { @Override public void populate(TemplateCellElement cellElement) { + //更新面板信息时可能会触发绑定在组件上的事件,先移除这些事件 + this.removeListener(); this.cellElement = cellElement; - - if (isNPE(cellElement)) return; + if (isNPE(cellElement)) { + return; + } DSColumn dSColumn = (DSColumn) cellElement.getValue(); - - // populate groupPane - // RecordGrouper recordGrouper = dSColumn.getGrouper(); if (recordGrouper instanceof FunctionGrouper && !((FunctionGrouper) recordGrouper).isCustom()) { int mode = recordGrouper.getDivideMode(); @@ -153,13 +153,16 @@ public class ResultSetGroupDockingPane extends ResultSetGroupPane { this.groupComboBox.setSelectedIndex(ADVANCED); } checkButtonEnabled(); + //加上面板组件的交互事件监听 + this.addListener(); } @Override public void update() { - if (isNPE(cellElement)) return; + if (isNPE(cellElement)) { + return; + } DSColumn dSColumn = (DSColumn) cellElement.getValue(); - if (this.goBox.getSelectedIndex() == BIND_GROUP) { recordGrouper = updateGroupCombox(); } else if (this.goBox.getSelectedIndex() == BIND_SELECTED) { @@ -206,10 +209,8 @@ public class ResultSetGroupDockingPane extends ResultSetGroupPane { cardPane.repaint(); } - public void addListener(ItemListener listener) { - goBox.addItemListener(listener); - groupComboBox.addItemListener(listener); - functionComboBox.addItemListener(listener); + + public void setListener(ItemListener listener) { this.listener = listener; } @@ -221,4 +222,16 @@ public class ResultSetGroupDockingPane extends ResultSetGroupPane { public void setRecordGrouper(RecordGrouper recordGrouper) { this.recordGrouper = recordGrouper; } + + private void addListener() { + goBox.addItemListener(this.listener); + groupComboBox.addItemListener(this.listener); + functionComboBox.addItemListener(this.listener); + } + + private void removeListener() { + goBox.removeItemListener(this.listener); + groupComboBox.removeItemListener(this.listener); + functionComboBox.removeItemListener(this.listener); + } } \ No newline at end of file diff --git a/designer/src/com/fr/quickeditor/cellquick/CellDSColumnEditor.java b/designer/src/com/fr/quickeditor/cellquick/CellDSColumnEditor.java index 1399ad2eb6..e7ccd77108 100644 --- a/designer/src/com/fr/quickeditor/cellquick/CellDSColumnEditor.java +++ b/designer/src/com/fr/quickeditor/cellquick/CellDSColumnEditor.java @@ -219,7 +219,7 @@ public class CellDSColumnEditor extends CellQuickEditor { dataPane = new SelectedDataColumnPane(true, true, tc, cellElement); groupPane = new ResultSetGroupDockingPane(); dataPane.addListener(dataListener); - groupPane.addListener(groupListener); + groupPane.setListener(groupListener); double[] rowSize = {P}, columnSize = {P, F}; UILabel uiLabel = new UILabel(Inter.getLocText("FR-Designer_Filter_Conditions")); From 55180c48ff57fd860bc97e0221c29da3bc738c6a Mon Sep 17 00:00:00 2001 From: mengao <283296419@qq.com> Date: Tue, 26 Sep 2017 19:11:28 +0800 Subject: [PATCH 089/125] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=B6=85=E9=93=BE?= =?UTF-8?q?=EF=BC=8C=E6=9D=A1=E4=BB=B6=E5=B1=9E=E6=80=A7=E7=AD=89=E9=9D=A2?= =?UTF-8?q?=E6=9D=BF=E4=BF=AE=E6=94=B9=E5=B1=9E=E6=80=A7=E5=93=8D=E5=BA=94?= =?UTF-8?q?=E6=96=B9=E5=BC=8F=E3=80=82=20=E4=BF=AE=E6=94=B9=E6=AD=A3?= =?UTF-8?q?=E5=9C=A8=E5=8A=A0=E8=BD=BD=E4=B8=AD=E5=9B=BE=E7=89=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../bubble/VanChartBubbleInteractivePane.java | 11 --- .../component/VanChartUIListControlPane.java | 67 +++++++++++++++++-- .../other/VanChartInteractivePane.java | 7 +- ...StructureIndependentVanChartInterface.java | 10 --- ...WordCloudIndependentVanChartInterface.java | 8 --- 5 files changed, 64 insertions(+), 39 deletions(-) diff --git a/designer_chart/src/com/fr/plugin/chart/bubble/VanChartBubbleInteractivePane.java b/designer_chart/src/com/fr/plugin/chart/bubble/VanChartBubbleInteractivePane.java index 4e4c9edab8..706c0f3b05 100644 --- a/designer_chart/src/com/fr/plugin/chart/bubble/VanChartBubbleInteractivePane.java +++ b/designer_chart/src/com/fr/plugin/chart/bubble/VanChartBubbleInteractivePane.java @@ -1,14 +1,10 @@ package com.fr.plugin.chart.bubble; import com.fr.chart.chartattr.Plot; -import com.fr.design.gui.ibutton.UIButtonGroup; import com.fr.general.Inter; import com.fr.plugin.chart.base.VanChartConstants; -import com.fr.plugin.chart.designer.TableLayout4VanChartHelper; import com.fr.plugin.chart.designer.other.VanChartInteractivePaneWithOutSort; -import javax.swing.*; - /** * Created by Mitisky on 16/3/31. */ @@ -29,11 +25,4 @@ public class VanChartBubbleInteractivePane extends VanChartInteractivePaneWithOu return super.getValueArray(); } - @Override - protected JPanel getzoomTypePane(UIButtonGroup zoomType) { - if (((VanChartBubblePlot)chart.getPlot()).isForceBubble()) { - return TableLayout4VanChartHelper.createGapTableLayoutPane(Inter.getLocText("Plugin-ChartF_ZoomType"), zoomType); - } - return super.getzoomTypePane(zoomType); - } } diff --git a/designer_chart/src/com/fr/plugin/chart/designer/component/VanChartUIListControlPane.java b/designer_chart/src/com/fr/plugin/chart/designer/component/VanChartUIListControlPane.java index af9e13b35c..00bd52a381 100644 --- a/designer_chart/src/com/fr/plugin/chart/designer/component/VanChartUIListControlPane.java +++ b/designer_chart/src/com/fr/plugin/chart/designer/component/VanChartUIListControlPane.java @@ -2,6 +2,8 @@ package com.fr.plugin.chart.designer.component; import com.fr.base.chart.BasePlot; import com.fr.chart.chartattr.Plot; +import com.fr.design.event.UIObserver; +import com.fr.design.event.UIObserverListener; import com.fr.design.gui.controlpane.UIListControlPane; import com.fr.design.gui.ibutton.UIButton; import com.fr.design.gui.ilable.UILabel; @@ -16,6 +18,8 @@ import com.fr.plugin.chart.designer.TableLayout4VanChartHelper; import com.fr.stable.Nameable; import javax.swing.*; +import javax.swing.event.ChangeEvent; +import javax.swing.event.ChangeListener; import java.awt.*; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; @@ -24,20 +28,71 @@ import java.awt.event.ActionListener; * Created by mengao on 2017/9/8. * 新图表UIListControlPane,基础面板。 */ -public abstract class VanChartUIListControlPane extends UIListControlPane { +public abstract class VanChartUIListControlPane extends UIListControlPane implements UIObserver { + private UIObserverListener uiObserverListener; + public VanChartUIListControlPane() { super(); this.setBorder(null); + iniListener(); } public VanChartUIListControlPane(BasePlot plot) { super(plot); this.setBorder(null); + iniListener(); + } + + /** + * 注册观察者监听事件 + * @param listener 观察者监听事件 + */ + @Override + public void registerChangeListener(UIObserverListener listener) { + uiObserverListener = listener; + } + + @Override + public boolean shouldResponseChangeListener() { + return true; + } + + private void iniListener() { + if (shouldResponseChangeListener()) { + this.addChangeListener(new ChangeListener() { + @Override + public void stateChanged(ChangeEvent e) { + if (uiObserverListener == null) { + return; + } + uiObserverListener.doChange(); + } + }); + } + } + + protected void fireChanged() { + Object[] listeners = listenerList.getListenerList(); + + for (int i = listeners.length - 2; i >= 0; i -= 2) { + if (listeners[i] == ChangeListener.class) { + ((ChangeListener) listeners[i + 1]).stateChanged(new ChangeEvent(this)); + } + } + + } + + /** + * 增加监听事件 + * @param l 监听的对象 + */ + public void addChangeListener(ChangeListener l) { + this.listenerList.add(ChangeListener.class, l); } @Override - protected JPanel getLeftTopPane (UIToolbar topToolBar) { + protected JPanel getLeftTopPane(UIToolbar topToolBar) { double p = TableLayout.PREFERRED; double f = TableLayout.FILL; double e = TableLayout4VanChartHelper.EDIT_AREA_WIDTH; @@ -46,7 +101,7 @@ public abstract class VanChartUIListControlPane extends UIListControlPane { Component[][] components = new Component[][]{ new Component[]{new UILabel(getAddItemText()), topToolBar}, }; - return TableLayoutHelper.createTableLayoutPane(components,rowSize,columnSize); + return TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize); } @Override @@ -55,7 +110,7 @@ public abstract class VanChartUIListControlPane extends UIListControlPane { return; } update((Plot) plot); - DesignerContext.getDesignerFrame().getSelectedJTemplate().fireTargetModified(); + fireChanged();//图表属性改变,响应事件 } protected abstract void update(Plot plot); @@ -63,7 +118,7 @@ public abstract class VanChartUIListControlPane extends UIListControlPane { //-------------------连续弹窗问题 start-------------------// - public void populate (Nameable[] nameableArray) { + public void populate(Nameable[] nameableArray) { //特殊处理,使用instanceof判断,弹出不同的面板 if (SwingUtilities.getWindowAncestor(this) instanceof JDialog) { popupEditDialog = new HyperDialog(cardPane); @@ -113,7 +168,7 @@ public abstract class VanChartUIListControlPane extends UIListControlPane { //取消 addCancelButton(buttonsPane); - controlPane.setBorder(BorderFactory.createEmptyBorder(10,0,10,0)); + controlPane.setBorder(BorderFactory.createEmptyBorder(10, 0, 10, 0)); return controlPane; } diff --git a/designer_chart/src/com/fr/plugin/chart/designer/other/VanChartInteractivePane.java b/designer_chart/src/com/fr/plugin/chart/designer/other/VanChartInteractivePane.java index 9c5b07d511..5e2b1fd9b0 100644 --- a/designer_chart/src/com/fr/plugin/chart/designer/other/VanChartInteractivePane.java +++ b/designer_chart/src/com/fr/plugin/chart/designer/other/VanChartInteractivePane.java @@ -142,10 +142,9 @@ public class VanChartInteractivePane extends AbstractVanChartScrollPane { return TableLayout4VanChartHelper.createExpandablePaneWithTitle(Inter.getLocText("Chart-Use_Zoom"), panel); } + protected JPanel getzoomTypePane(UIButtonGroup zoomType) { - JPanel panel = TableLayout4VanChartHelper.createGapTableLayoutPane(Inter.getLocText("Plugin-ChartF_ZoomType"), zoomType, TableLayout4VanChartHelper.SECOND_EDIT_AREA_WIDTH); - panel.setBorder(BorderFactory.createEmptyBorder(0,12,0,0)); - return panel; + return TableLayout4VanChartHelper.createGapTableLayoutPane(Inter.getLocText("Plugin-ChartF_ZoomType"), zoomType); } protected JPanel createZoomPaneContent(JPanel zoomWidgetPane, JPanel zoomGesturePane, JPanel changeEnablePane, JPanel zoomTypePane, VanChartPlot plot) { @@ -245,7 +244,7 @@ public class VanChartInteractivePane extends AbstractVanChartScrollPane { private void checkZoomPane() { boolean zoomWidgetEnabled = zoomWidget.getSelectedIndex() == 0; changeEnablePane.setVisible(zoomWidgetEnabled); - zoomTypePane.setVisible(!zoomWidgetEnabled); + zoomType.setEnabled(!zoomWidgetEnabled); } @Override diff --git a/designer_chart/src/com/fr/plugin/chart/structure/desinger/StructureIndependentVanChartInterface.java b/designer_chart/src/com/fr/plugin/chart/structure/desinger/StructureIndependentVanChartInterface.java index 65725cf532..52eeda2ed9 100644 --- a/designer_chart/src/com/fr/plugin/chart/structure/desinger/StructureIndependentVanChartInterface.java +++ b/designer_chart/src/com/fr/plugin/chart/structure/desinger/StructureIndependentVanChartInterface.java @@ -5,7 +5,6 @@ import com.fr.chart.chartattr.Plot; import com.fr.design.beans.BasicBeanPane; import com.fr.design.condition.ConditionAttributesPane; import com.fr.design.gui.frpane.AttributeChangeListener; -import com.fr.design.gui.ibutton.UIButtonGroup; import com.fr.design.mainframe.chart.AbstractChartAttrPane; import com.fr.design.mainframe.chart.gui.ChartDataPane; import com.fr.design.mainframe.chart.gui.ChartStylePane; @@ -14,7 +13,6 @@ import com.fr.design.mainframe.chart.gui.data.table.AbstractTableDataContentPane import com.fr.design.mainframe.chart.gui.type.AbstractChartTypePane; import com.fr.general.Inter; import com.fr.plugin.chart.base.VanChartConstants; -import com.fr.plugin.chart.designer.TableLayout4VanChartHelper; import com.fr.plugin.chart.designer.other.VanChartInteractivePaneWithOutSort; import com.fr.plugin.chart.designer.other.VanChartOtherPane; import com.fr.plugin.chart.designer.style.VanChartStylePane; @@ -25,8 +23,6 @@ import com.fr.plugin.chart.structure.desinger.style.VanChartStructureSeriesPane; import com.fr.plugin.chart.structure.desinger.type.VanChartStructureTypePane; import com.fr.plugin.chart.vanchart.AbstractIndependentVanChartUI; -import javax.swing.*; - /** * Created by shine on 2017/2/15. */ @@ -64,12 +60,6 @@ public class StructureIndependentVanChartInterface extends AbstractIndependentVa protected BasicBeanPane createInteractivePane() { return new VanChartInteractivePaneWithOutSort(){ - @Override - protected JPanel getzoomTypePane(UIButtonGroup zoomType) { - JPanel panel = TableLayout4VanChartHelper.createGapTableLayoutPane(Inter.getLocText("Plugin-ChartF_ZoomType"), zoomType); - return panel; - } - @Override protected String[] getNameArray() { return new String[]{Inter.getLocText("Plugin-ChartF_XYAxis"), Inter.getLocText("Chart-Use_None")}; diff --git a/designer_chart/src/com/fr/plugin/chart/wordcloud/designer/WordCloudIndependentVanChartInterface.java b/designer_chart/src/com/fr/plugin/chart/wordcloud/designer/WordCloudIndependentVanChartInterface.java index 5f7566081f..2b5ad405a2 100644 --- a/designer_chart/src/com/fr/plugin/chart/wordcloud/designer/WordCloudIndependentVanChartInterface.java +++ b/designer_chart/src/com/fr/plugin/chart/wordcloud/designer/WordCloudIndependentVanChartInterface.java @@ -6,7 +6,6 @@ import com.fr.design.beans.BasicBeanPane; import com.fr.design.condition.ConditionAttributesPane; import com.fr.design.dialog.BasicPane; import com.fr.design.gui.frpane.AttributeChangeListener; -import com.fr.design.gui.ibutton.UIButtonGroup; import com.fr.design.mainframe.chart.AbstractChartAttrPane; import com.fr.design.mainframe.chart.gui.ChartDataPane; import com.fr.design.mainframe.chart.gui.ChartStylePane; @@ -15,7 +14,6 @@ import com.fr.design.mainframe.chart.gui.data.table.AbstractTableDataContentPane import com.fr.design.mainframe.chart.gui.type.AbstractChartTypePane; import com.fr.general.Inter; import com.fr.plugin.chart.base.VanChartConstants; -import com.fr.plugin.chart.designer.TableLayout4VanChartHelper; import com.fr.plugin.chart.designer.other.VanChartInteractivePaneWithOutSort; import com.fr.plugin.chart.designer.other.VanChartOtherPane; import com.fr.plugin.chart.designer.style.VanChartStylePane; @@ -26,7 +24,6 @@ import com.fr.plugin.chart.wordcloud.designer.other.VanChartWordCloudConditionPa import com.fr.plugin.chart.wordcloud.designer.style.VanChartWordCloudSeriesPane; import com.fr.plugin.chart.wordcloud.designer.type.VanChartWordCloudTypePane; -import javax.swing.*; import java.util.List; /** @@ -87,11 +84,6 @@ public class WordCloudIndependentVanChartInterface extends AbstractIndependentVa @Override protected BasicBeanPane createInteractivePane() { return new VanChartInteractivePaneWithOutSort(){ - @Override - protected JPanel getzoomTypePane(UIButtonGroup zoomType) { - JPanel panel = TableLayout4VanChartHelper.createGapTableLayoutPane(Inter.getLocText("Plugin-ChartF_ZoomType"), zoomType); - return panel; - } @Override protected String[] getNameArray() { From b16fc8bffd86ec412a06c60c62d05d0891780d55 Mon Sep 17 00:00:00 2001 From: plough Date: Wed, 27 Sep 2017 11:32:21 +0800 Subject: [PATCH 090/125] =?UTF-8?q?REPORT-4868=20=E8=AE=BE=E8=AE=A1?= =?UTF-8?q?=E5=99=A8=E8=A7=86=E8=A7=89bug=E4=BF=AE=E6=94=B9=EF=BC=88?= =?UTF-8?q?=E4=BA=8C=EF=BC=89=E9=83=A8=E5=88=86=3D>10=20=E4=B8=8B=E6=8B=89?= =?UTF-8?q?=E6=A1=86=E9=A3=8E=E6=A0=BC=E7=BB=9F=E4=B8=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/com/fr/design/editor/ValueEditorPane.java | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/designer_base/src/com/fr/design/editor/ValueEditorPane.java b/designer_base/src/com/fr/design/editor/ValueEditorPane.java index 6b2a7fd30d..2b46f94fad 100644 --- a/designer_base/src/com/fr/design/editor/ValueEditorPane.java +++ b/designer_base/src/com/fr/design/editor/ValueEditorPane.java @@ -2,16 +2,17 @@ package com.fr.design.editor; import com.fr.base.Formula; import com.fr.design.DesignerEnvManager; +import com.fr.design.dialog.BasicPane; import com.fr.design.editor.editor.*; import com.fr.design.event.GlobalNameListener; import com.fr.design.event.GlobalNameObserver; import com.fr.design.event.UIObserver; import com.fr.design.event.UIObserverListener; import com.fr.design.gui.ibutton.UIButton; -import com.fr.design.gui.imenu.UIMenuItem; +import com.fr.design.gui.imenu.UIMenuEastAttrItem; +import com.fr.design.gui.imenu.UIPopupEastAttrMenu; import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.mainframe.DesignerContext; -import com.fr.design.dialog.BasicPane; import com.fr.general.ComparatorUtils; import com.fr.general.Inter; import com.fr.stable.StringUtils; @@ -136,14 +137,14 @@ public class ValueEditorPane extends BasicPane implements UIObserver, GlobalName private JPopupMenu createPopMenu() { - JPopupMenu scate = new JPopupMenu(); + JPopupMenu scate = new UIPopupEastAttrMenu(); if (this.cards == null) { return scate; } for (int i = 0; i < this.cards.length; i++) { - UIMenuItem item = new UIMenuItem(cards[i].getName()); + JMenuItem item = new UIMenuEastAttrItem(cards[i].getName()); final int j = i; item.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { @@ -162,9 +163,6 @@ public class ValueEditorPane extends BasicPane implements UIObserver, GlobalName } }); scate.add(item); - if (i < cards.length - 1) { - scate.addSeparator(); - } } return scate; } From 3a05ce6e5d968e38bf8bb8be4cccc56d6a1d230e Mon Sep 17 00:00:00 2001 From: plough Date: Wed, 27 Sep 2017 12:36:09 +0800 Subject: [PATCH 091/125] =?UTF-8?q?REPORT-4868=20=E8=AE=BE=E8=AE=A1?= =?UTF-8?q?=E5=99=A8=E8=A7=86=E8=A7=89bug=E4=BF=AE=E6=94=B9=EF=BC=88?= =?UTF-8?q?=E4=BA=8C=EF=BC=89=E9=83=A8=E5=88=86=3D>5(=E6=BB=9A=E5=8A=A8?= =?UTF-8?q?=E6=9D=A1)Mac=E4=B8=8B=E5=90=91=E5=8F=B3=E6=BB=91=E5=8A=A8?= =?UTF-8?q?=E7=9A=84=E6=AE=8B=E5=BD=B1=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- designer_base/src/com/fr/design/mainframe/JSliderPane.java | 3 --- 1 file changed, 3 deletions(-) diff --git a/designer_base/src/com/fr/design/mainframe/JSliderPane.java b/designer_base/src/com/fr/design/mainframe/JSliderPane.java index bccf3c8f86..9a36022fd0 100644 --- a/designer_base/src/com/fr/design/mainframe/JSliderPane.java +++ b/designer_base/src/com/fr/design/mainframe/JSliderPane.java @@ -455,10 +455,7 @@ class JSliderPaneUI extends BasicSliderUI { Graphics2D g2d = (Graphics2D) g; g2d.translate(knobBounds.x, knobBounds.y); -// g2d.setColor(slider.getBackground()); -// g2d.fillRect(0, FOUR, FOUR, 9); g2d.setColor(new Color(51, 51, 52)); - g2d.drawRoundRect(0, SIX, FOUR, 9, 2, 2); g2d.fillRoundRect(0, SIX, FOUR, 9, 2, 2); } From 3c65d4b846b8f97f83d1f4e6938418549eb88552 Mon Sep 17 00:00:00 2001 From: plough Date: Wed, 27 Sep 2017 14:49:24 +0800 Subject: [PATCH 092/125] =?UTF-8?q?REPORT-4868=20=E8=AE=BE=E8=AE=A1?= =?UTF-8?q?=E5=99=A8=E8=A7=86=E8=A7=89bug=E4=BF=AE=E6=94=B9=EF=BC=88?= =?UTF-8?q?=E4=BA=8C=EF=BC=89=E9=83=A8=E5=88=86=3D>12=EF=BC=88=E8=BE=B9?= =?UTF-8?q?=E6=A1=86=E7=BA=BF=EF=BC=89=E8=A7=86=E8=A7=89=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- designer_base/src/com/fr/design/constants/UIConstants.java | 1 + .../src/com/fr/design/gui/controlpane/UIControlPane.java | 3 ++- .../fr/design/gui/controlpane/UINameableListCellRenderer.java | 4 ++-- designer_base/src/com/fr/design/utils/ThemeUtils.java | 2 +- 4 files changed, 6 insertions(+), 4 deletions(-) diff --git a/designer_base/src/com/fr/design/constants/UIConstants.java b/designer_base/src/com/fr/design/constants/UIConstants.java index cbd831735d..e2e4e7e4b2 100644 --- a/designer_base/src/com/fr/design/constants/UIConstants.java +++ b/designer_base/src/com/fr/design/constants/UIConstants.java @@ -115,6 +115,7 @@ public interface UIConstants { public static final Color TAB_BUTTON_PRESS = new Color(228, 227, 232); public static final Color TAB_BUTTON_PRESS_SELECTED = new Color(236, 236, 238); public static final Color POPUP_TITLE_BACKGROUND = new Color(0xd8f2fd); + public static final Color LIST_ITEM_SPLIT_LINE = new Color(0xf0f0f3); diff --git a/designer_base/src/com/fr/design/gui/controlpane/UIControlPane.java b/designer_base/src/com/fr/design/gui/controlpane/UIControlPane.java index e855cf54f1..68b3675b6e 100644 --- a/designer_base/src/com/fr/design/gui/controlpane/UIControlPane.java +++ b/designer_base/src/com/fr/design/gui/controlpane/UIControlPane.java @@ -178,7 +178,8 @@ public abstract class UIControlPane extends BasicPane implements UnrepeatedNameH // 封装一层,加边框 JPanel toolBarPane = new JPanel(new BorderLayout()); toolBarPane.add(toolBar, BorderLayout.CENTER); - toolBarPane.setBorder(BorderFactory.createMatteBorder(1, 1, 0, 1, new Color(201, 198, 184))); + toolBarPane.setBorder(BorderFactory.createMatteBorder(1, 1, 0, 1, UIConstants.RULER_LINE_COLOR)); + leftContentPane.add(toolBarPane, BorderLayout.NORTH); // 顶部标签及add按钮 diff --git a/designer_base/src/com/fr/design/gui/controlpane/UINameableListCellRenderer.java b/designer_base/src/com/fr/design/gui/controlpane/UINameableListCellRenderer.java index 9f39e3071b..13b44cf987 100644 --- a/designer_base/src/com/fr/design/gui/controlpane/UINameableListCellRenderer.java +++ b/designer_base/src/com/fr/design/gui/controlpane/UINameableListCellRenderer.java @@ -51,7 +51,7 @@ public class UINameableListCellRenderer extends } }; editButton.setIcon(listControlPane.isNewStyle() ? UIConstants.LIST_EDIT_ICON : UIConstants.CPT_ICON); - editButton.setBorder(BorderFactory.createMatteBorder(0, 0, 0, 1, BORDER_COLOR)); + editButton.setBorder(BorderFactory.createMatteBorder(0, 0, 0, 1, UIConstants.LIST_ITEM_SPLIT_LINE)); editButton.setHorizontalAlignment(SwingConstants.CENTER); label = new UILabel(); label.setBorder(BorderFactory.createEmptyBorder(0, 10, 0, 0)); @@ -62,7 +62,7 @@ public class UINameableListCellRenderer extends } private Border getNoFocusBorder() { - return BorderFactory.createMatteBorder(0, 0, 1, 0, BORDER_COLOR); + return BorderFactory.createMatteBorder(0, 0, 1, 0, UIConstants.LIST_ITEM_SPLIT_LINE); } private void setText(String t) { diff --git a/designer_base/src/com/fr/design/utils/ThemeUtils.java b/designer_base/src/com/fr/design/utils/ThemeUtils.java index 8fc965c274..9f012f2ee2 100644 --- a/designer_base/src/com/fr/design/utils/ThemeUtils.java +++ b/designer_base/src/com/fr/design/utils/ThemeUtils.java @@ -145,7 +145,7 @@ public class ThemeUtils { public static final boolean MENU_ROLLOVER = true; - public static final ColorUIResource SCROLL_PANE_BORDER_COLOR = new ColorUIResource(201, 198, 184); + public static final ColorUIResource SCROLL_PANE_BORDER_COLOR = new ColorUIResource(0xD9DADD); public static final ColorUIResource TABLE_BORDER_LIGHT_COLOR = new ColorUIResource(210, 210, 210); public static final ColorUIResource TABLE_BORDER_DARK_COLOR = new ColorUIResource(210, 210, 210); From 7050a543f7a8847606ccae516a52f9cf4b5788f9 Mon Sep 17 00:00:00 2001 From: plough Date: Wed, 27 Sep 2017 14:51:35 +0800 Subject: [PATCH 093/125] =?UTF-8?q?=E6=97=A0JIRA=E4=BB=BB=E5=8A=A1?= =?UTF-8?q?=EF=BC=8C=E8=AE=BE=E8=AE=A1=E5=99=A8=E8=A7=86=E8=A7=89=E8=B0=83?= =?UTF-8?q?=E6=95=B4=3D=E3=80=8B=E9=80=89=E4=B8=AD=E5=88=97=E8=A1=A8?= =?UTF-8?q?=E9=A1=B9=E5=8F=91=E7=94=9F=E8=BD=BB=E5=BE=AE=E7=A7=BB=E5=8A=A8?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../gui/controlpane/UINameableListCellRenderer.java | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/designer_base/src/com/fr/design/gui/controlpane/UINameableListCellRenderer.java b/designer_base/src/com/fr/design/gui/controlpane/UINameableListCellRenderer.java index 13b44cf987..b66ee1ef23 100644 --- a/designer_base/src/com/fr/design/gui/controlpane/UINameableListCellRenderer.java +++ b/designer_base/src/com/fr/design/gui/controlpane/UINameableListCellRenderer.java @@ -110,19 +110,6 @@ public class UINameableListCellRenderer extends setEnabled(list.isEnabled()); setFont(list.getFont()); - Border border = null; - if (cellHasFocus) { - if (isSelected) { - border = DefaultLookup.getBorder(this, ui, "List.focusSelectedCellHighlightBorder"); - } - if (border == null) { - border = DefaultLookup.getBorder(this, ui, "List.focusCellHighlightBorder"); - } - } else { - border = getNoFocusBorder(); - } - setBorder(border); - if (value instanceof ListModelElement) { Nameable wrappee = ((ListModelElement) value).wrapper; this.setText(((ListModelElement) value).wrapper.getName()); From 2e09b9c40fd3dcb5a12f0b847409fa20b4bb5551 Mon Sep 17 00:00:00 2001 From: fr_shine Date: Wed, 27 Sep 2017 16:39:18 +0800 Subject: [PATCH 094/125] =?UTF-8?q?=E5=AE=89=E8=A3=85=E4=BD=8D=E5=9B=BE?= =?UTF-8?q?=E5=9C=B0=E5=9B=BE=E6=8F=92=E4=BB=B6=20=E6=8F=92=E5=85=A5?= =?UTF-8?q?=E5=9B=BE=E8=A1=A8=E6=8A=9B=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fr/design/ChartTypeInterfaceManager.java | 26 ++++++++++--------- 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/designer_chart/src/com/fr/design/ChartTypeInterfaceManager.java b/designer_chart/src/com/fr/design/ChartTypeInterfaceManager.java index adc29477fd..e53d7849c9 100644 --- a/designer_chart/src/com/fr/design/ChartTypeInterfaceManager.java +++ b/designer_chart/src/com/fr/design/ChartTypeInterfaceManager.java @@ -96,6 +96,8 @@ import java.util.LinkedHashMap; import java.util.List; import java.util.Map; +import static com.fr.chart.charttypes.ChartTypeManager.CHART_PRIORITY; + /** * Created by eason on 14/12/29. */ @@ -215,7 +217,7 @@ public class ChartTypeInterfaceManager implements ExtraChartDesignClassManagerPr private static void readDefault() { - if (chartTypeInterfaces.containsKey(ChartTypeManager.CHART_PRIORITY)) { + if (chartTypeInterfaces.containsKey(CHART_PRIORITY)) { return; } CloseableContainedMap chartUIList = @@ -238,7 +240,7 @@ public class ChartTypeInterfaceManager implements ExtraChartDesignClassManagerPr chartUIList.put(ChartConstants.GIS_CHAER, new GisMapIndependentChartInterface()); chartUIList.put(ChartConstants.FUNNEL_CHART, new FunnelIndependentChartInterface()); - chartTypeInterfaces.put(ChartTypeManager.CHART_PRIORITY, chartUIList); + chartTypeInterfaces.put(CHART_PRIORITY, chartUIList); } @@ -406,7 +408,7 @@ public class ChartTypeInterfaceManager implements ExtraChartDesignClassManagerPr return getChartDataPane(priority, plotID, listener); } } - return getChartDataPane(ChartTypeManager.CHART_PRIORITY, plotID, listener); + return getChartDataPane(CHART_PRIORITY, plotID, listener); } private ChartDataPane getChartDataPane(String priority, String plotID, AttributeChangeListener listener) { @@ -436,7 +438,7 @@ public class ChartTypeInterfaceManager implements ExtraChartDesignClassManagerPr return getAttrPaneArray(priority, plotID, listener); } } - return getAttrPaneArray(ChartTypeManager.CHART_PRIORITY, plotID, listener); + return getAttrPaneArray(CHART_PRIORITY, plotID, listener); } private AbstractChartAttrPane[] getAttrPaneArray(String priority, String plotID, AttributeChangeListener listener) { @@ -454,7 +456,7 @@ public class ChartTypeInterfaceManager implements ExtraChartDesignClassManagerPr return getTableDataSourcePane(priority, plot, parent); } } - return getTableDataSourcePane(ChartTypeManager.CHART_PRIORITY, plot, parent); + return getTableDataSourcePane(CHART_PRIORITY, plot, parent); } private AbstractTableDataContentPane getTableDataSourcePane(String priority, Plot plot, ChartDataPane parent) { @@ -474,7 +476,7 @@ public class ChartTypeInterfaceManager implements ExtraChartDesignClassManagerPr return getReportDataSourcePane(priority, plot, parent); } } - return getReportDataSourcePane(ChartTypeManager.CHART_PRIORITY, plot, parent); + return getReportDataSourcePane(CHART_PRIORITY, plot, parent); } private boolean plotInChart(String plotID, String priority) { @@ -500,7 +502,7 @@ public class ChartTypeInterfaceManager implements ExtraChartDesignClassManagerPr return getPlotConditionPane(priority, plot); } } - return getPlotConditionPane(ChartTypeManager.CHART_PRIORITY, plot); + return getPlotConditionPane(CHART_PRIORITY, plot); } private ConditionAttributesPane getPlotConditionPane(String priority, Plot plot) { @@ -519,7 +521,7 @@ public class ChartTypeInterfaceManager implements ExtraChartDesignClassManagerPr return getPlotSeriesPane(priority, parent, plot); } } - return getPlotSeriesPane(ChartTypeManager.CHART_PRIORITY, parent, plot); + return getPlotSeriesPane(CHART_PRIORITY, parent, plot); } private BasicBeanPane getPlotSeriesPane(String priority, ChartStylePane parent, Plot plot) { @@ -557,7 +559,7 @@ public class ChartTypeInterfaceManager implements ExtraChartDesignClassManagerPr public void mount(PluginSingleInjection injection) { if (isIndependentChartUIProvider(injection)) { - String priority = injection.getAttribute("priority"); + String priority = injection.getAttribute("priority", CHART_PRIORITY); String plotID = injection.getAttribute("plotID"); IndependentChartUIProvider instance = (IndependentChartUIProvider) injection.getObject(); addChartTypeInterface(instance, priority, plotID); @@ -569,7 +571,7 @@ public class ChartTypeInterfaceManager implements ExtraChartDesignClassManagerPr public void demount(PluginSingleInjection injection) { if (isIndependentChartUIProvider(injection)) { - String priority = injection.getAttribute("priority"); + String priority = injection.getAttribute("priority", CHART_PRIORITY); String plotID = injection.getAttribute("plotID"); removeChartTypeInterface(priority, plotID); } @@ -602,7 +604,7 @@ public class ChartTypeInterfaceManager implements ExtraChartDesignClassManagerPr return getChartEditPane(priority, plotID); } } - return getChartEditPane(ChartTypeManager.CHART_PRIORITY, plotID); + return getChartEditPane(CHART_PRIORITY, plotID); } private ChartEditPane getChartEditPane(String priority, String plotID) { @@ -618,7 +620,7 @@ public class ChartTypeInterfaceManager implements ExtraChartDesignClassManagerPr return getChartConfigPane(priority, plotID); } } - return getChartConfigPane(ChartTypeManager.CHART_PRIORITY, plotID); + return getChartConfigPane(CHART_PRIORITY, plotID); } private ChartsConfigPane getChartConfigPane(String priority, String plotID) { From a06510c08ba6e425ea19715a8ec5157a90ffa43e Mon Sep 17 00:00:00 2001 From: plough Date: Wed, 27 Sep 2017 16:52:19 +0800 Subject: [PATCH 095/125] =?UTF-8?q?REPORT-4868=20=E8=AE=BE=E8=AE=A1?= =?UTF-8?q?=E5=99=A8=E8=A7=86=E8=A7=89bug=E4=BF=AE=E6=94=B9=EF=BC=88?= =?UTF-8?q?=E4=BA=8C=EF=BC=89=E9=83=A8=E5=88=86=3D>19=20=E4=B8=8B=E6=8B=89?= =?UTF-8?q?=E6=A1=86=E6=A0=B7=E5=BC=8F=E7=BB=9F=E4=B8=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fr/design/mainframe/widget/UITreeComboBox.java | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/designer_form/src/com/fr/design/mainframe/widget/UITreeComboBox.java b/designer_form/src/com/fr/design/mainframe/widget/UITreeComboBox.java index 7979e7ae34..83877f2a9b 100644 --- a/designer_form/src/com/fr/design/mainframe/widget/UITreeComboBox.java +++ b/designer_form/src/com/fr/design/mainframe/widget/UITreeComboBox.java @@ -16,6 +16,8 @@ import com.fr.design.designer.beans.*; import com.fr.design.designer.beans.events.DesignerEditListener; import com.fr.design.designer.beans.events.DesignerEvent; import com.fr.design.designer.creator.XCreator; +import com.fr.design.gui.icombobox.UIComboBox; +import com.fr.design.gui.icombobox.UIComboBoxUI; import com.fr.design.gui.icontainer.UIScrollPane; import com.fr.design.mainframe.ComponentTree; import com.sun.java.swing.plaf.motif.*; @@ -24,7 +26,7 @@ import com.sun.java.swing.plaf.windows.*; /** * 控件树下拉列表框 */ -public class UITreeComboBox extends JComboBox{ +public class UITreeComboBox extends UIComboBox { /** * 显示用的树 */ @@ -76,7 +78,7 @@ public class UITreeComboBox extends JComboBox{ } else if(cui instanceof MotifComboBoxUI){ cui = new MotifJTreeComboBoxUI(); } else { - cui = new WindowsJTreeComboBoxUI(); + cui = new UIJTreeComboBoxUI(); } setUI(cui); } @@ -107,6 +109,12 @@ public class UITreeComboBox extends JComboBox{ } } + class UIJTreeComboBoxUI extends UIComboBoxUI { + protected ComboPopup createPopup() { + return new TreePopup(comboBox); + } + } + class MotifJTreeComboBoxUI extends MotifComboBoxUI{ protected ComboPopup createPopup() { return new TreePopup(comboBox); From 3672488555b5d1bb7897e5befcd86c14be0c6836 Mon Sep 17 00:00:00 2001 From: mengao <283296419@qq.com> Date: Wed, 27 Sep 2017 19:02:11 +0800 Subject: [PATCH 096/125] =?UTF-8?q?=E7=94=98=E7=89=B9=E5=9B=BE=E9=80=9A?= =?UTF-8?q?=E8=BF=87=E6=BB=91=E8=BD=AE=E8=AE=BE=E7=BD=AE=E6=97=A0=E6=B3=95?= =?UTF-8?q?=E4=BF=9D=E5=AD=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../desinger/style/VanChartStructureSeriesPane.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/designer_chart/src/com/fr/plugin/chart/structure/desinger/style/VanChartStructureSeriesPane.java b/designer_chart/src/com/fr/plugin/chart/structure/desinger/style/VanChartStructureSeriesPane.java index ec85e3e30a..8227fc4df6 100644 --- a/designer_chart/src/com/fr/plugin/chart/structure/desinger/style/VanChartStructureSeriesPane.java +++ b/designer_chart/src/com/fr/plugin/chart/structure/desinger/style/VanChartStructureSeriesPane.java @@ -135,8 +135,10 @@ public class VanChartStructureSeriesPane extends VanChartAbstractPlotSeriesPane protected void updateCondition(ConditionAttr defaultAttr){ if(nodeStylePane != null){ AttrNode attrNode =defaultAttr.getExisted(AttrNode.class); - defaultAttr.remove(attrNode); - defaultAttr.addDataSeriesCondition(nodeStylePane.updateBean()); + if (attrNode != null) { + defaultAttr.remove(attrNode); + defaultAttr.addDataSeriesCondition(nodeStylePane.updateBean()); + } } } } From aa505b76ad42e85b89febd69b4a8896167181fba Mon Sep 17 00:00:00 2001 From: hzzz Date: Thu, 28 Sep 2017 11:20:58 +0800 Subject: [PATCH 097/125] =?UTF-8?q?toolbar=E8=83=8C=E6=99=AF=E8=89=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fr/design/gui/itoolbar/UIToolBarUI.java | 27 +++++-------------- 1 file changed, 6 insertions(+), 21 deletions(-) diff --git a/designer_base/src/com/fr/design/gui/itoolbar/UIToolBarUI.java b/designer_base/src/com/fr/design/gui/itoolbar/UIToolBarUI.java index 8d3a66d459..431a5508bd 100644 --- a/designer_base/src/com/fr/design/gui/itoolbar/UIToolBarUI.java +++ b/designer_base/src/com/fr/design/gui/itoolbar/UIToolBarUI.java @@ -1,31 +1,16 @@ package com.fr.design.gui.itoolbar; -import java.awt.Component; -import java.awt.Dialog; -import java.awt.Frame; -import java.awt.Graphics; -import java.awt.Graphics2D; -import java.awt.Window; -import java.awt.event.WindowListener; +import com.fr.design.gui.ibutton.UIToolButtonBorder; +import com.fr.design.gui.icheckbox.UICheckBox; -import javax.swing.AbstractButton; -import javax.swing.JComponent; -import javax.swing.JDialog; -import javax.swing.JRadioButton; -import javax.swing.JToolBar; -import javax.swing.RootPaneContainer; -import javax.swing.SwingUtilities; +import javax.swing.*; import javax.swing.border.Border; import javax.swing.plaf.ComponentUI; import javax.swing.plaf.UIResource; import javax.swing.plaf.metal.MetalToolBarUI; - -import com.fr.design.constants.UIConstants; -import com.fr.design.gui.ibutton.UIToolButtonBorder; -import com.fr.design.gui.icheckbox.UICheckBox; - -import static com.fr.design.utils.ThemeUtils.BACK_COLOR; +import java.awt.*; +import java.awt.event.WindowListener; public class UIToolBarUI extends MetalToolBarUI { public static final String IS_TOOL_BAR_BUTTON_KEY = "JToolBar.isToolbarButton"; @@ -91,7 +76,7 @@ public class UIToolBarUI extends MetalToolBarUI { */ public void paint(Graphics g, JComponent c) { Graphics2D g2 = (Graphics2D) g; - g2.setColor(BACK_COLOR); + g2.setColor(Color.WHITE); g2.fillRect(0, 0, c.getWidth(), c.getHeight()); } From ada421c6a8872850527c211d6c70a1dadc79a126 Mon Sep 17 00:00:00 2001 From: hzzz Date: Thu, 28 Sep 2017 11:38:40 +0800 Subject: [PATCH 098/125] =?UTF-8?q?=E9=A2=84=E8=A7=88=E6=8C=89=E9=92=AE?= =?UTF-8?q?=E8=83=8C=E6=99=AF=E8=89=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- designer/src/com/fr/start/Designer.java | 195 ++++++++++++------------ 1 file changed, 97 insertions(+), 98 deletions(-) diff --git a/designer/src/com/fr/start/Designer.java b/designer/src/com/fr/start/Designer.java index 071c035ccc..eca4af14c4 100644 --- a/designer/src/com/fr/start/Designer.java +++ b/designer/src/com/fr/start/Designer.java @@ -51,17 +51,17 @@ public class Designer extends BaseDesigner { private static final int TOOLBARPANEVGAP = -4; private static final int PREVIEW_DOWN_X_GAP = 92; private static final int GAP = 7; - + private static final String OLD_ENV_FOLDER_71 = ".FineReport71"; private static final String OLD_ENV_FOLDER_70 = ".FineReport70"; private UserInfoPane userInfoPane; - + private UIButton saveButton; private UIButton undo; private UIButton redo; private UIPreviewButton run; - + /** * 设计器启动的Main方法 @@ -135,30 +135,31 @@ public class Designer extends BaseDesigner { public UILargeToolbar createLargeToolbar() { UILargeToolbar largeToolbar = super.createLargeToolbar(); largeToolbar.setLayout(new FlowLayout(FlowLayout.CENTER, 0, 4)); - largeToolbar.add(new JPanel() { - public Dimension getPreferredSize() { - Dimension dim = super.getPreferredSize(); - dim.width = 1; - return dim; - } - }); + largeToolbar.add(generateEmptyGap(1)); createRunButton(largeToolbar); largeToolbar.add(run); - run.setBackground(UIConstants.TREE_BACKGROUND); - largeToolbar.add(new JPanel() { + run.setBackground(Color.WHITE); + largeToolbar.add(generateEmptyGap(GAP)); + largeToolbar.addSeparator(new Dimension(2, 42)); + largeToolbar.setBorder(new MatteBorder(new Insets(0, 0, 1, 0), UIConstants.LINE_COLOR)); + return largeToolbar; + } + + private JPanel generateEmptyGap(int width) { + JPanel panel = new JPanel() { public Dimension getPreferredSize() { Dimension dim = super.getPreferredSize(); - dim.width = GAP; + dim.width = width; return dim; } - }); - largeToolbar.addSeparator(new Dimension(2, 42)); - largeToolbar.setBorder(new MatteBorder(new Insets(0, 0, 1, 0), UIConstants.LINE_COLOR)); - return largeToolbar; + }; + panel.setBackground(Color.WHITE); + return panel; } /** * 创建上面一排的工具栏按钮 + * * @return 按钮 */ public UIButton[] createUp() { @@ -181,7 +182,7 @@ public class Designer extends BaseDesigner { }); return saveButton; } - + private UIButton createUndoButton() { undo = new UIButton(BaseUtils.readIcon("/com/fr/design/images/buttonicon/undo.png")); undo.setToolTipText(KeySetUtils.UNDO.getMenuKeySetName()); @@ -290,9 +291,10 @@ public class Designer extends BaseDesigner { /** * 生成工具栏 + * * @param toolbarComponent 工具栏 * @param plus 对象 - * @return 更新后的toolbar + * @return 更新后的toolbar */ public JComponent resetToolBar(JComponent toolbarComponent, ToolBarMenuDockPlus plus) { //如果是处于权限编辑状态 @@ -331,16 +333,15 @@ public class Designer extends BaseDesigner { public JTemplate createNewTemplate() { return new JWorkBook(); } - + /** - * 创建论坛登录面板, chart那边不需要 - * - * @return 面板组件 - * - */ - public Component createBBSLoginPane(){ - if (userInfoPane == null){ - userInfoPane = new UserInfoPane(); + * 创建论坛登录面板, chart那边不需要 + * + * @return 面板组件 + */ + public Component createBBSLoginPane() { + if (userInfoPane == null) { + userInfoPane = new UserInfoPane(); } return userInfoPane; } @@ -358,68 +359,67 @@ public class Designer extends BaseDesigner { protected SplashPane createSplashPane() { return new ReportSplashPane(); } - + /** - * 收集用户信息吗 - * - */ + * 收集用户信息吗 + */ protected void collectUserInformation() { - //定制的就不弹出来了 - if (!ComparatorUtils.equals(ProductConstants.APP_NAME, ProductConstants.DEFAULT_APP_NAME)) { - return; - } - - DesignerEnvManager envManager = DesignerEnvManager.getEnvManager(); - final String key = envManager.getActivationKey(); - //本地验证通过 - if(ActiveKeyGenerator.localVerify(key)){ - onLineVerify(envManager, key); - UserInfoLabel.showBBSDialog(); - return; - } - - if(StableUtils.checkDesignerActive(readOldKey())){ - //只要有老的key, 就不弹窗, 下次启动的时候, 在线验证下就行. - String newKey = ActiveKeyGenerator.generateActiveKey(); - envManager.setActivationKey(newKey); - UserInfoLabel.showBBSDialog(); - return; - } - + //定制的就不弹出来了 + if (!ComparatorUtils.equals(ProductConstants.APP_NAME, ProductConstants.DEFAULT_APP_NAME)) { + return; + } + + DesignerEnvManager envManager = DesignerEnvManager.getEnvManager(); + final String key = envManager.getActivationKey(); + //本地验证通过 + if (ActiveKeyGenerator.localVerify(key)) { + onLineVerify(envManager, key); + UserInfoLabel.showBBSDialog(); + return; + } + + if (StableUtils.checkDesignerActive(readOldKey())) { + //只要有老的key, 就不弹窗, 下次启动的时候, 在线验证下就行. + String newKey = ActiveKeyGenerator.generateActiveKey(); + envManager.setActivationKey(newKey); + UserInfoLabel.showBBSDialog(); + return; + } + CollectUserInformationDialog activeDialog = new CollectUserInformationDialog( - DesignerContext.getDesignerFrame()); + DesignerContext.getDesignerFrame()); activeDialog.setVisible(true); } - - private void onLineVerify(DesignerEnvManager envManager, final String key){ - int status = envManager.getActiveKeyStatus(); - //没有联网验证过 - if (status != 0) { - Thread authThread = new Thread(new Runnable() { - - @Override - public void run() { - ActiveKeyGenerator.onLineVerify(key); - } - }); - authThread.start(); - } + + private void onLineVerify(DesignerEnvManager envManager, final String key) { + int status = envManager.getActiveKeyStatus(); + //没有联网验证过 + if (status != 0) { + Thread authThread = new Thread(new Runnable() { + + @Override + public void run() { + ActiveKeyGenerator.onLineVerify(key); + } + }); + authThread.start(); + } } - - private File getOldEnvFile(String folderName){ - String userHome = System.getProperty("user.home"); - if (userHome == null) { - userHome = System.getProperty("userHome"); - } - String filePath = StableUtils.pathJoin(userHome, folderName, ProductConstants.APP_NAME + "Env.xml"); + + private File getOldEnvFile(String folderName) { + String userHome = System.getProperty("user.home"); + if (userHome == null) { + userHome = System.getProperty("userHome"); + } + String filePath = StableUtils.pathJoin(userHome, folderName, ProductConstants.APP_NAME + "Env.xml"); return new File(filePath); } - - private String getOldActiveKeyFromFile(File envFile){ + + private String getOldActiveKeyFromFile(File envFile) { if (!envFile.exists()) { - return StringUtils.EMPTY; - } - + return StringUtils.EMPTY; + } + DesignerEnvManager temp = new DesignerEnvManager(); try { XMLTools.readFileXML(temp, envFile); @@ -428,26 +428,25 @@ public class Designer extends BaseDesigner { } return temp.getActivationKey(); } - + //默认只从7.0和711的设计器里读取key - private String readOldKey(){ - File file71 = getOldEnvFile(OLD_ENV_FOLDER_71); - if (!file71.exists()) { - File file70 = getOldEnvFile(OLD_ENV_FOLDER_70); - return getOldActiveKeyFromFile(file70); - } - - return getOldActiveKeyFromFile(file71); + private String readOldKey() { + File file71 = getOldEnvFile(OLD_ENV_FOLDER_71); + if (!file71.exists()) { + File file70 = getOldEnvFile(OLD_ENV_FOLDER_70); + return getOldActiveKeyFromFile(file70); + } + + return getOldActiveKeyFromFile(file71); } - + /** - * 设计器退出时, 做的一些操作. - * - */ - public void shutDown(){ - InformationCollector collector = InformationCollector.getInstance(); - collector.collectStopTime(); - collector.saveXMLFile(); + * 设计器退出时, 做的一些操作. + */ + public void shutDown() { + InformationCollector collector = InformationCollector.getInstance(); + collector.collectStopTime(); + collector.saveXMLFile(); ServletContext.fireServletStopListener(); } From 47193ffb5802520ffc765590ed7c6d9ff18dcd54 Mon Sep 17 00:00:00 2001 From: hzzz Date: Thu, 28 Sep 2017 12:01:40 +0800 Subject: [PATCH 099/125] =?UTF-8?q?=E6=95=B0=E6=8D=AE=E9=9B=86=E5=B7=A5?= =?UTF-8?q?=E5=85=B7=E6=A0=8F=E5=9B=BE=E6=A0=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/fr/design/icon/IconPathConstants.java | 2 +- .../src/com/fr/design/images/control/edit.png | Bin 399 -> 352 bytes 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/designer_base/src/com/fr/design/icon/IconPathConstants.java b/designer_base/src/com/fr/design/icon/IconPathConstants.java index 4a86bcf6f1..ec5fcded3f 100644 --- a/designer_base/src/com/fr/design/icon/IconPathConstants.java +++ b/designer_base/src/com/fr/design/icon/IconPathConstants.java @@ -1 +1 @@ -package com.fr.design.icon; /** * Created by IntelliJ IDEA. * Author : Richer * Version: 6.5.6 * Date: 12-12-18 * Time: 上午9:42 * 用于保存所有图标路径的类 */ public class IconPathConstants { private IconPathConstants() { } public static final String ADD_POPMENU_ICON_PATH = "/com/fr/design/images/control/addPopup.png"; public static final String DS_ICON_PATH = "/com/fr/design/images/data/datasource.png"; public static final String CLASS_TD_ICON_PATH = "/com/fr/design/images/data/source/classTableData.png"; public static final String EMB_TD_ICON_PATH = "/com/fr/design/images/data/dataTable.png"; public static final String DS_RELATION_TD_ICON_PATH = "/com/fr/design/images/data/multi.png"; public static final String FILE_TD_ICON_PATH = "/com/fr/design/images/data/file.png"; public static final String DS_TREE_TD_ICON_PATH = "/com/fr/design/images/data/tree.png"; public static final String DS_QUERY_ICON_PATH = "/com/fr/design/images/data/database.png"; public static final String PREVIEW_ICON_PATH = "/com/fr/design/images/m_file/preview.png"; public static final String TD_EDIT_ICON_PATH = "/com/fr/design/images/control/edit.png"; public static final String TD_EL_SHARE_HELP_ICON_PATH = "/com/fr/design/images/control/help_open.png"; public static final String TD_EL_SHARE_CLOSE_ICON_PATH = "/com/fr/design/images/control/help_close.png"; public static final String TD_REMOVE_ICON_PATH = "/com/fr/base/images/cell/control/remove.png"; public static final String TD_CONNECTION_ICON_PATH = "/com/fr/design/images/m_web/connection.png"; public static final String SP_SHOW_ICON_PATH = "/com/fr/design/images/data/store_procedure.png"; public static final String STD_SHOW_ICON_PATH = "/com/fr/design/images/data/dock/serverdatabase.png"; public static final String XMLA_ICON_PATH = "/com/fr/design/images/data/cube.png"; public static final String FORBID_ICON_PATH ="/com/fr/web/images/form/forbid.png"; } \ No newline at end of file +package com.fr.design.icon; /** * Created by IntelliJ IDEA. * Author : Richer * Version: 6.5.6 * Date: 12-12-18 * Time: 上午9:42 * 用于保存所有图标路径的类 */ public class IconPathConstants { private IconPathConstants() { } public static final String ADD_POPMENU_ICON_PATH = "/com/fr/design/images/control/addPopup.png"; public static final String DS_ICON_PATH = "/com/fr/design/images/data/datasource.png"; public static final String CLASS_TD_ICON_PATH = "/com/fr/design/images/data/source/classTableData.png"; public static final String EMB_TD_ICON_PATH = "/com/fr/design/images/data/dataTable.png"; public static final String DS_RELATION_TD_ICON_PATH = "/com/fr/design/images/data/multi.png"; public static final String FILE_TD_ICON_PATH = "/com/fr/design/images/data/file.png"; public static final String DS_TREE_TD_ICON_PATH = "/com/fr/design/images/data/tree.png"; public static final String DS_QUERY_ICON_PATH = "/com/fr/design/images/data/database.png"; public static final String PREVIEW_ICON_PATH = "/com/fr/design/images/m_file/preview.png"; public static final String TD_EDIT_ICON_PATH = "/com/fr/design/images/control/edit.png"; public static final String TD_EL_SHARE_HELP_ICON_PATH = "/com/fr/design/images/control/help_open.png"; public static final String TD_EL_SHARE_CLOSE_ICON_PATH = "/com/fr/design/images/control/help_close.png"; public static final String TD_REMOVE_ICON_PATH = "/com/fr/design/images/control/tab/remove.png"; public static final String TD_CONNECTION_ICON_PATH = "/com/fr/design/images/m_web/connection.png"; public static final String SP_SHOW_ICON_PATH = "/com/fr/design/images/data/store_procedure.png"; public static final String STD_SHOW_ICON_PATH = "/com/fr/design/images/data/dock/serverdatabase.png"; public static final String XMLA_ICON_PATH = "/com/fr/design/images/data/cube.png"; public static final String FORBID_ICON_PATH = "/com/fr/web/images/form/forbid.png"; } \ No newline at end of file diff --git a/designer_base/src/com/fr/design/images/control/edit.png b/designer_base/src/com/fr/design/images/control/edit.png index 7491cb9c23367c4cf94630bd83651bcc83d17318..14ff765e43e622ca8e13d6d9b3db141625ea1942 100644 GIT binary patch literal 352 zcmV-m0iXVfP)Px$8c9S!R5%f1V4xCUB*z?MW3y03#{bR#|NrM?U|>!?d-mimCQ=P@aB$#YWc-&3 zG(;V!SB`<Px$Nl8ROR5%f(lD|vCP!PxOUeZ+54tDD3>_1SQq?4fFRzYwHTJ#?hT8cOb4t5h1 z#6ocrXF(lx>r{tUsjo@SyMz~rrm?|;fUbyW0T3U02hOVcs{(;XG`aCTyz_h-Sqirh@q@V)VKWU3%o*1J zXo>Z=#)S9hVlcIZBrH-B_-@&>-gS$Qa*|rXbeJ`&g Date: Thu, 28 Sep 2017 12:01:50 +0800 Subject: [PATCH 100/125] =?UTF-8?q?=E6=95=B0=E6=8D=AE=E9=9B=86=E5=B7=A5?= =?UTF-8?q?=E5=85=B7=E6=A0=8F=E5=9B=BE=E6=A0=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/fr/design/images/control/tab/remove.png | Bin 0 -> 167 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 designer_base/src/com/fr/design/images/control/tab/remove.png diff --git a/designer_base/src/com/fr/design/images/control/tab/remove.png b/designer_base/src/com/fr/design/images/control/tab/remove.png new file mode 100644 index 0000000000000000000000000000000000000000..6fb2baac51ead86742e20545aa0a62413be50b12 GIT binary patch literal 167 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|5K|k5|2~(;g&RwlQDDH z6mGYiaof(gobd%$;YW8~2X4ulg}lLC>)IYUq%_XtS$r|Kq4RPN8^beAv5Lrm+Yvy^ O7(8A5T-G@yGywp$2|2L< literal 0 HcmV?d00001 From f531c05c9d43d657d29261cfe849aff373c688b2 Mon Sep 17 00:00:00 2001 From: plough Date: Thu, 28 Sep 2017 13:40:29 +0800 Subject: [PATCH 101/125] =?UTF-8?q?REPORT-4868=20=E8=AE=BE=E8=AE=A1?= =?UTF-8?q?=E5=99=A8=E8=A7=86=E8=A7=89bug=E4=BF=AE=E6=94=B9=EF=BC=88?= =?UTF-8?q?=E4=BA=8C=EF=BC=89=E9=83=A8=E5=88=86=3D>19=20=E4=BF=AE=E5=A4=8D?= =?UTF-8?q?=E6=94=B9=E5=87=BA=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/fr/design/mainframe/widget/UITreeComboBox.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/designer_form/src/com/fr/design/mainframe/widget/UITreeComboBox.java b/designer_form/src/com/fr/design/mainframe/widget/UITreeComboBox.java index 83877f2a9b..31be76569b 100644 --- a/designer_form/src/com/fr/design/mainframe/widget/UITreeComboBox.java +++ b/designer_form/src/com/fr/design/mainframe/widget/UITreeComboBox.java @@ -55,6 +55,14 @@ public class UITreeComboBox extends UIComboBox { this.updateUI(); } + @Override + public void setRenderer(ListCellRenderer aRenderer) { + ListCellRenderer oldRenderer = renderer; + renderer = aRenderer; + firePropertyChange( "renderer", oldRenderer, renderer ); + invalidate(); + } + /** * 取得树 * @return JTree From 8ede0a4dc55fcd74c04860ee1bdaa7afa2f14654 Mon Sep 17 00:00:00 2001 From: plough Date: Thu, 28 Sep 2017 14:45:25 +0800 Subject: [PATCH 102/125] =?UTF-8?q?REPORT-4868=20=E8=AE=BE=E8=AE=A1?= =?UTF-8?q?=E5=99=A8=E8=A7=86=E8=A7=89bug=E4=BF=AE=E6=94=B9=EF=BC=88?= =?UTF-8?q?=E4=BA=8C=EF=BC=89=E9=83=A8=E5=88=86=3D>19=20=E4=B8=89=E7=82=B9?= =?UTF-8?q?=E5=B1=85=E4=B8=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/com/fr/design/constants/UIConstants.java | 1 + .../widget/accessibles/BaseAccessibleEditor.java | 9 ++++----- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/designer_base/src/com/fr/design/constants/UIConstants.java b/designer_base/src/com/fr/design/constants/UIConstants.java index e2e4e7e4b2..5552b09bc7 100644 --- a/designer_base/src/com/fr/design/constants/UIConstants.java +++ b/designer_base/src/com/fr/design/constants/UIConstants.java @@ -131,6 +131,7 @@ public interface UIConstants { public static final BufferedImage DRAG_LEFT_NORMAL = BaseUtils.readImage("com/fr/design/images/control/leftnor.png"); public static final BufferedImage DRAG_LEFT_PRESS = BaseUtils.readImage("com/fr/design/images/control/leftpre.png"); public static final BufferedImage DRAG_DOT = BaseUtils.readImage("com/fr/design/images/control/dot.png"); + public static final BufferedImage ACCESSIBLE_EDITOR_DOT = BaseUtils.readImage("com/fr/design/images/control/dot.png"); public static final BufferedImage DRAG_DOT_VERTICAL = BaseUtils.readImage("com/fr/design/images/control/dotv.png"); public static final BufferedImage POP_BUTTON_DOWN = BaseUtils.readImage("com/fr/design/images/buttonicon/popdownarrow.png"); public static final BufferedImage POP_BUTTON_UP = BaseUtils.readImage("com/fr/design/images/buttonicon/popuparrow.png"); diff --git a/designer_base/src/com/fr/design/mainframe/widget/accessibles/BaseAccessibleEditor.java b/designer_base/src/com/fr/design/mainframe/widget/accessibles/BaseAccessibleEditor.java index c2a1893d32..7e017e2a7e 100644 --- a/designer_base/src/com/fr/design/mainframe/widget/accessibles/BaseAccessibleEditor.java +++ b/designer_base/src/com/fr/design/mainframe/widget/accessibles/BaseAccessibleEditor.java @@ -9,12 +9,11 @@ import java.awt.Insets; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.util.ArrayList; -import javax.swing.AbstractButton; -import javax.swing.BorderFactory; +import javax.swing.*; + import com.fr.design.constants.UIConstants; import com.fr.design.gui.ibutton.UIButton; -import javax.swing.JComponent; -import javax.swing.JOptionPane; + import javax.swing.event.ChangeEvent; import javax.swing.event.ChangeListener; import javax.swing.plaf.ButtonUI; @@ -128,7 +127,7 @@ public class BaseAccessibleEditor extends BasicPane implements AccessibleEditor protected void initPopupButton() { if (!isComboButton()) { - btPopup.setText("..."); + btPopup.setIcon(new ImageIcon(UIConstants.ACCESSIBLE_EDITOR_DOT)); btPopup.setPreferredSize(new Dimension(20, 20)); } else { btPopup.setRolloverEnabled(true); From 419aa4419527ea4a66402062e0c6cad7c719ca43 Mon Sep 17 00:00:00 2001 From: kerry Date: Thu, 28 Sep 2017 14:53:23 +0800 Subject: [PATCH 103/125] =?UTF-8?q?REPORT-4850=20[9.0=E6=8F=92=E4=BB=B6]?= =?UTF-8?q?=E6=8E=A7=E4=BB=B6=E7=B1=BB=E5=9E=8B=E7=9A=84=E6=8F=92=E4=BB=B6?= =?UTF-8?q?=EF=BC=8C=E6=8E=A7=E4=BB=B6=E5=B1=9E=E6=80=A7=E9=9D=A2=E6=9D=BF?= =?UTF-8?q?=E6=B2=A1=E6=9C=89=E9=80=82=E9=85=8D=E6=96=B0=E7=89=88=E8=AE=BE?= =?UTF-8?q?=E8=AE=A1=E5=99=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../creator/CRPropertyDescriptor.java | 38 +++++---- .../accessibles/BaseAccessibleEditor.java | 11 ++- .../designer/beans/ComponentAdapter.java | 7 ++ .../component/CompositeComponentAdapter.java | 45 +++++++++-- .../creator/CRPropertyDescriptorPane.java | 78 +++++++++++++++---- .../designer/creator/PropertyGroupPane.java | 54 +++++++++---- .../designer/creator/XWidgetCreator.java | 2 +- .../widget/ui/FormWidgetCardPane.java | 6 +- .../FormWidgetDefinePaneFactoryBase.java | 10 +-- .../ui/designer/AbstractDataModify.java | 12 +++ .../widget/ui/designer/WidgetDefinePane.java | 72 +++++++++++++++++ 11 files changed, 273 insertions(+), 62 deletions(-) create mode 100644 designer_form/src/com/fr/design/widget/ui/designer/WidgetDefinePane.java diff --git a/designer_base/src/com/fr/design/designer/creator/CRPropertyDescriptor.java b/designer_base/src/com/fr/design/designer/creator/CRPropertyDescriptor.java index 3155653243..e4729f0709 100644 --- a/designer_base/src/com/fr/design/designer/creator/CRPropertyDescriptor.java +++ b/designer_base/src/com/fr/design/designer/creator/CRPropertyDescriptor.java @@ -15,14 +15,15 @@ import java.beans.PropertyDescriptor; */ public final class CRPropertyDescriptor extends PropertyDescriptor { public static final String RENDERER = "renderer"; - - private PropertyChangeAdapter l; - + private boolean isSubProperty = false; + + private PropertyChangeAdapter l; + public CRPropertyDescriptor(String name, Class beanClass) throws IntrospectionException { super(name, beanClass); } - public CRPropertyDescriptor(String name, Class beanClass, String readMethod, String writeMethod) throws IntrospectionException{ + public CRPropertyDescriptor(String name, Class beanClass, String readMethod, String writeMethod) throws IntrospectionException { super(name, beanClass, readMethod, writeMethod); } @@ -33,17 +34,17 @@ public final class CRPropertyDescriptor extends PropertyDescriptor { } return this; } - - public CRPropertyDescriptor setPropertyChangeListener(PropertyChangeAdapter l) { - this.l = l; - return this; - } - public void firePropertyChanged() { - if (l != null) { - l.propertyChange(); - } - } + public CRPropertyDescriptor setPropertyChangeListener(PropertyChangeAdapter l) { + this.l = l; + return this; + } + + public void firePropertyChanged() { + if (l != null) { + l.propertyChange(); + } + } public CRPropertyDescriptor setEditorClass(Class clazz) { this.setPropertyEditorClass(clazz); @@ -59,4 +60,13 @@ public final class CRPropertyDescriptor extends PropertyDescriptor { this.setDisplayName(displayName); return this; } + + public CRPropertyDescriptor setSubLevel(boolean isSubProperty) { + this.isSubProperty = isSubProperty; + return this; + } + + public boolean isSubLevel() { + return isSubProperty; + } } \ No newline at end of file diff --git a/designer_base/src/com/fr/design/mainframe/widget/accessibles/BaseAccessibleEditor.java b/designer_base/src/com/fr/design/mainframe/widget/accessibles/BaseAccessibleEditor.java index c2a1893d32..5343b20f1c 100644 --- a/designer_base/src/com/fr/design/mainframe/widget/accessibles/BaseAccessibleEditor.java +++ b/designer_base/src/com/fr/design/mainframe/widget/accessibles/BaseAccessibleEditor.java @@ -12,6 +12,7 @@ import java.util.ArrayList; import javax.swing.AbstractButton; import javax.swing.BorderFactory; import com.fr.design.constants.UIConstants; +import com.fr.design.event.UIObserverListener; import com.fr.design.gui.ibutton.UIButton; import javax.swing.JComponent; import javax.swing.JOptionPane; @@ -64,7 +65,15 @@ public class BaseAccessibleEditor extends BasicPane implements AccessibleEditor } protected ITextComponent createTextField() { - return new TextField(); + return new TextField() { + public void registerChangeListener(UIObserverListener listener) { + return; + } + + public boolean shouldResponseChangeListener() { + return false; + } + }; } private void initComponents() { diff --git a/designer_form/src/com/fr/design/designer/beans/ComponentAdapter.java b/designer_form/src/com/fr/design/designer/beans/ComponentAdapter.java index 58a5206c2b..3caffb33a0 100644 --- a/designer_form/src/com/fr/design/designer/beans/ComponentAdapter.java +++ b/designer_form/src/com/fr/design/designer/beans/ComponentAdapter.java @@ -9,6 +9,7 @@ import javax.swing.JPopupMenu; import com.fr.design.beans.GroupModel; import com.fr.design.designer.beans.events.DesignerEditor; +import com.fr.design.designer.creator.PropertyGroupPane; /** * 组件适配器接口 @@ -40,6 +41,12 @@ public interface ComponentAdapter { */ ArrayList getXCreatorPropertyModel(); + /** + * 为当前组件创建描述各属性pane, 分组返回 + * @return ArrayList + */ + ArrayList getXCreatorPropertyPane(); + /** * 提供双击设计器的编辑器 * @param bean 鼠标双击的被设计组件 diff --git a/designer_form/src/com/fr/design/designer/beans/adapters/component/CompositeComponentAdapter.java b/designer_form/src/com/fr/design/designer/beans/adapters/component/CompositeComponentAdapter.java index 12bd2515f8..9ddad66409 100644 --- a/designer_form/src/com/fr/design/designer/beans/adapters/component/CompositeComponentAdapter.java +++ b/designer_form/src/com/fr/design/designer/beans/adapters/component/CompositeComponentAdapter.java @@ -7,6 +7,7 @@ import com.fr.design.designer.beans.ComponentAdapter; import com.fr.design.designer.beans.actions.ChangeNameAction; import com.fr.design.designer.beans.events.DesignerEditor; import com.fr.design.designer.creator.CRPropertyDescriptor; +import com.fr.design.designer.creator.PropertyGroupPane; import com.fr.design.designer.creator.XButton; import com.fr.design.designer.creator.XCreator; import com.fr.design.form.util.XCreatorConstants; @@ -90,6 +91,30 @@ public class CompositeComponentAdapter implements ComponentAdapter { private ArrayList createPropertyGroupModels(CRPropertyDescriptor[] properties) { HashMap> maps = new HashMap>(); + ArrayList groupNames = getGroupNames(properties, maps); + ArrayList groups = new ArrayList(); + for (String groupName : groupNames) { + ArrayList groupProperties = maps.get(groupName); + PropertyGroupModel groupModel = new PropertyGroupModel(groupName, xCreator, groupProperties + .toArray(new CRPropertyDescriptor[0]), designer); + groups.add(groupModel); + } + return groups; + } + + private ArrayList createPropertyGroupPanes(CRPropertyDescriptor[] properties) { + HashMap> maps = new HashMap>(); + ArrayList groupNames = getGroupNames(properties, maps); + ArrayList groups = new ArrayList(); + for (String groupName : groupNames) { + ArrayList groupProperties = maps.get(groupName); + PropertyGroupPane propertyGroupPane = new PropertyGroupPane(groupProperties.toArray(new CRPropertyDescriptor[0]), xCreator, groupName); + groups.add(propertyGroupPane); + } + return groups; + } + + private ArrayList getGroupNames(CRPropertyDescriptor[] properties, HashMap> maps ){ ArrayList groupNames = new ArrayList(); for (CRPropertyDescriptor property : properties) { String groupName = (String) property.getValue(XCreatorConstants.PROPERTY_CATEGORY); @@ -108,14 +133,7 @@ public class CompositeComponentAdapter implements ComponentAdapter { groupProperties.add(property); } adjustGroupNamesPosition(groupNames); - ArrayList groups = new ArrayList(); - for (String groupName : groupNames) { - ArrayList groupProperties = maps.get(groupName); - PropertyGroupModel groupModel = new PropertyGroupModel(groupName, xCreator, groupProperties - .toArray(new CRPropertyDescriptor[0]), designer); - groups.add(groupModel); - } - return groups; + return groupNames; } public void adjustGroupNamesPosition(ArrayList groupNames){ @@ -138,6 +156,17 @@ public class CompositeComponentAdapter implements ComponentAdapter { return groupModels; } + @Override + public ArrayList getXCreatorPropertyPane() { + ArrayList groupModels = new ArrayList(); + CRPropertyDescriptor[] properties; + properties = getCalculateCreatorProperties(); + ArrayList groups = createPropertyGroupPanes(properties); +// Collections.sort(groups); + groupModels.addAll(groups); + return groupModels; + } + /** * 自适应布局中放置文本框等用的scaleLayout和报表块、图表块支持的标题控件用的titleLayout时 * 控件树处只显示父容器,但是控件属性还是为自身的 diff --git a/designer_form/src/com/fr/design/designer/creator/CRPropertyDescriptorPane.java b/designer_form/src/com/fr/design/designer/creator/CRPropertyDescriptorPane.java index 5940291b45..b3d7983100 100644 --- a/designer_form/src/com/fr/design/designer/creator/CRPropertyDescriptorPane.java +++ b/designer_form/src/com/fr/design/designer/creator/CRPropertyDescriptorPane.java @@ -1,13 +1,19 @@ package com.fr.design.designer.creator; import com.fr.base.FRContext; +import com.fr.design.designer.IntervalConstants; +import com.fr.design.gui.icheckbox.UICheckBox; import com.fr.design.gui.ilable.UILabel; import com.fr.design.gui.xtable.TableUtils; +import com.fr.design.layout.TableLayoutHelper; +import com.fr.design.mainframe.WidgetPropertyPane; import com.fr.design.mainframe.widget.editors.ExtendedPropertyEditor; import com.fr.design.mainframe.widget.editors.StringEditor; import com.fr.form.ui.Widget; - -import java.awt.*; +import com.fr.general.ComparatorUtils; +import javax.swing.BorderFactory; +import javax.swing.JPanel; +import java.awt.Component; import java.beans.PropertyChangeEvent; import java.beans.PropertyChangeListener; import java.beans.PropertyEditor; @@ -20,6 +26,7 @@ public class CRPropertyDescriptorPane { private CRPropertyDescriptor crPropertyDescriptor; private XCreator xCreator; private PropertyEditor propertyEditor; + private boolean isPopulate = true; public CRPropertyDescriptorPane(CRPropertyDescriptor crPropertyDescriptor, XCreator xCreator) { this.crPropertyDescriptor = crPropertyDescriptor; @@ -27,7 +34,19 @@ public class CRPropertyDescriptorPane { } public Component[] createTableLayoutComponent() { - return new Component[]{new UILabel(crPropertyDescriptor.getDisplayName()), initEditorComponent(crPropertyDescriptor, xCreator)}; + Component component = initEditorComponent(crPropertyDescriptor, xCreator); + if (component instanceof UICheckBox) { + ((UICheckBox) component).setText(crPropertyDescriptor.getDisplayName()); + return new Component[]{component, null}; + } + if (crPropertyDescriptor.isSubLevel()) { + JPanel subPanel = TableLayoutHelper.createGapTableLayoutPane( + new Component[][]{new Component[]{new UILabel(crPropertyDescriptor.getDisplayName()), component}}, TableLayoutHelper.FILL_LASTCOLUMN, IntervalConstants.INTERVAL_L2, IntervalConstants.INTERVAL_L1); + subPanel.setBorder(BorderFactory.createEmptyBorder(0, IntervalConstants.INTERVAL_L5, 0, 0)); + return new Component[]{subPanel, null}; + } + return new Component[]{new UILabel(crPropertyDescriptor.getDisplayName()), component}; + } private Component initEditorComponent(CRPropertyDescriptor crPropertyDescriptor, final XCreator xCreator) { @@ -35,22 +54,40 @@ public class CRPropertyDescriptorPane { try { // 如果已有的编辑器就生成对应的component Class editorClass = crPropertyDescriptor.getPropertyEditorClass(); + ExtendedPropertyEditor editor = null; if (editorClass != null) { - propertyEditor = initExtendEditor(crPropertyDescriptor, xCreator); - component = propertyEditor.getCustomEditor(); + editor = (ExtendedPropertyEditor) crPropertyDescriptor.createPropertyEditor(xCreator.toData()); + if (editor == null) { + Class propType = crPropertyDescriptor.getPropertyType(); + editor = TableUtils.getPropertyEditorClass(propType).newInstance(); + } + } else { Class propType = crPropertyDescriptor.getPropertyType(); - Class defaultEditorClass = TableUtils.getPropertyEditorClass(propType); + Class defaultEditorClass = TableUtils.getPropertyEditorClass(propType); if (defaultEditorClass == null) { defaultEditorClass = StringEditor.class; } - propertyEditor = defaultEditorClass.newInstance(); - component = propertyEditor.getCustomEditor(); + editor = defaultEditorClass.newInstance(); } - propertyEditor.addPropertyChangeListener(new PropertyChangeListener() { + propertyEditor = editor; + component = propertyEditor.getCustomEditor(); + final ExtendedPropertyEditor extendEditor = editor; + + extendEditor.addPropertyChangeListener(new PropertyChangeListener() { @Override public void propertyChange(PropertyChangeEvent evt) { + if (isPopulate) { + return; + } + if (ComparatorUtils.equals(extendEditor.getValue(), getValue(xCreator.toData()))) { + return; + } update(xCreator.toData()); + if (extendEditor.refreshInTime()) { + WidgetPropertyPane.getInstance().refreshDockingView(); + } + } }); } catch (Exception e) { @@ -71,19 +108,34 @@ public class CRPropertyDescriptorPane { public void populate(Widget widget) { try { - Method m = crPropertyDescriptor.getReadMethod(); - Object value = m.invoke(widget); + isPopulate = true; + Object value = getValue(widget); propertyEditor.setValue(value); + isPopulate = false; } catch (Exception e) { - + FRContext.getLogger().error(e.getMessage(), e); } } + public Object getValue(Widget widget) { + try { + Method m = crPropertyDescriptor.getReadMethod(); + Object value = m.invoke(widget); + return value; + } catch (Exception e) { + FRContext.getLogger().error(e.getMessage(), e); + return null; + } + } + public void update(Widget widget) { try { + Object value = propertyEditor.getValue(); Method m = crPropertyDescriptor.getWriteMethod(); - m.invoke(widget, propertyEditor.getValue()); + m.invoke(widget, value); + + crPropertyDescriptor.firePropertyChanged(); } catch (Exception e) { } diff --git a/designer_form/src/com/fr/design/designer/creator/PropertyGroupPane.java b/designer_form/src/com/fr/design/designer/creator/PropertyGroupPane.java index 9033426959..890595ffec 100644 --- a/designer_form/src/com/fr/design/designer/creator/PropertyGroupPane.java +++ b/designer_form/src/com/fr/design/designer/creator/PropertyGroupPane.java @@ -8,8 +8,12 @@ import com.fr.design.layout.TableLayoutHelper; import com.fr.form.ui.FreeButton; import com.fr.form.ui.Widget; -import javax.swing.*; -import java.awt.*; +import javax.swing.BorderFactory; +import javax.swing.JFrame; +import javax.swing.JPanel; +import java.awt.BorderLayout; +import java.awt.Component; +import java.awt.Dimension; /** * Created by kerry on 2017/9/7. @@ -18,6 +22,16 @@ public class PropertyGroupPane extends BasicPane { private CRPropertyDescriptor[] crPropertyDescriptors; private CRPropertyDescriptorPane[] crPropertyDescriptorPanes; private XCreator xCreator; + private String groupName; + + public String getGroupName() { + return groupName; + } + + public void setGroupName(String groupName) { + this.groupName = groupName; + } + public PropertyGroupPane(CRPropertyDescriptor[] crPropertyDescriptors, XCreator xCreator) { this.crPropertyDescriptors = crPropertyDescriptors; @@ -26,6 +40,12 @@ public class PropertyGroupPane extends BasicPane { initComponent(); } + + public PropertyGroupPane(CRPropertyDescriptor[] crPropertyDescriptors, XCreator xCreator, String groupName) { + this(crPropertyDescriptors, xCreator); + this.groupName = groupName; + } + public void initComponent() { int count = crPropertyDescriptors.length; crPropertyDescriptorPanes = new CRPropertyDescriptorPane[count]; @@ -40,8 +60,8 @@ public class PropertyGroupPane extends BasicPane { this.add(panel, BorderLayout.CENTER); } - public void populate(Widget widget){ - for(int i = 0; i< crPropertyDescriptorPanes.length; i++){ + public void populate(Widget widget) { + for (int i = 0; i < crPropertyDescriptorPanes.length; i++) { crPropertyDescriptorPanes[i].populate(widget); } } @@ -52,19 +72,19 @@ public class PropertyGroupPane extends BasicPane { } public static void main(String[] args) { - try{ - XCreator xCreator = new XButton(new FreeButton(),new Dimension(100, 100)); - PropertyGroupPane propertyGroupPane = new PropertyGroupPane(xCreator.supportedDescriptor(), xCreator); - JFrame jf = new JFrame("jFrame"); - jf.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); - JPanel content = (JPanel) jf.getContentPane(); - content.setLayout(new BorderLayout()); - content.add(propertyGroupPane, BorderLayout.CENTER); - jf.setSize(439, 400); - jf.setVisible(true); - }catch (Exception e){ - FRContext.getLogger().error(e.getMessage()); - } + try { + XCreator xCreator = new XButton(new FreeButton(), new Dimension(100, 100)); + PropertyGroupPane propertyGroupPane = new PropertyGroupPane(xCreator.supportedDescriptor(), xCreator); + JFrame jf = new JFrame("jFrame"); + jf.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); + JPanel content = (JPanel) jf.getContentPane(); + content.setLayout(new BorderLayout()); + content.add(propertyGroupPane, BorderLayout.CENTER); + jf.setSize(439, 400); + jf.setVisible(true); + } catch (Exception e) { + FRContext.getLogger().error(e.getMessage()); + } } diff --git a/designer_form/src/com/fr/design/designer/creator/XWidgetCreator.java b/designer_form/src/com/fr/design/designer/creator/XWidgetCreator.java index 21ff4ed20c..c1d9d950aa 100644 --- a/designer_form/src/com/fr/design/designer/creator/XWidgetCreator.java +++ b/designer_form/src/com/fr/design/designer/creator/XWidgetCreator.java @@ -57,7 +57,7 @@ public abstract class XWidgetCreator extends XCreator { }), new CRPropertyDescriptor("labelName", this.data.getClass(), "getLabelName", "setLabelName") .setI18NName(Inter.getLocText("FR-Designer_Label_Name")) - .putKeyValue(XCreatorConstants.PROPERTY_CATEGORY, "FR-Designer_Advanced") + .putKeyValue(XCreatorConstants.PROPERTY_CATEGORY, "Advanced") }; } diff --git a/designer_form/src/com/fr/design/mainframe/widget/ui/FormWidgetCardPane.java b/designer_form/src/com/fr/design/mainframe/widget/ui/FormWidgetCardPane.java index 0bc744e51c..166ac74e80 100644 --- a/designer_form/src/com/fr/design/mainframe/widget/ui/FormWidgetCardPane.java +++ b/designer_form/src/com/fr/design/mainframe/widget/ui/FormWidgetCardPane.java @@ -156,7 +156,7 @@ public class FormWidgetCardPane extends AbstractAttrNoScrollPane { private void initDefinePane() { currentEditorDefinePane = null; XCreator creator = getXCreatorDedicated(); - FormWidgetDefinePaneFactoryBase.RN rn = FormWidgetDefinePaneFactoryBase.createWidgetDefinePane(creator, creator.toData(), new Operator() { + FormWidgetDefinePaneFactoryBase.RN rn = FormWidgetDefinePaneFactoryBase.createWidgetDefinePane(creator, designer, creator.toData(), new Operator() { @Override public void did(DataCreatorUI ui, String cardName) { //todo @@ -170,7 +170,7 @@ public class FormWidgetCardPane extends AbstractAttrNoScrollPane { currentEditorDefinePane = definePane; } - private XCreator getXCreatorDedicated(){ + private XCreator getXCreatorDedicated() { boolean dedicateLayout = xCreator.acceptType(XWScaleLayout.class) && xCreator.getComponentCount() > 0 && ((XCreator) xCreator.getComponent(0)).shouldScaleCreator() || xCreator.acceptType(XWTitleLayout.class); return dedicateLayout ? (XCreator) xCreator.getComponent(0) : xCreator; } @@ -205,7 +205,7 @@ public class FormWidgetCardPane extends AbstractAttrNoScrollPane { public void updateCreator() { currentEditorDefinePane.setGlobalName(getGlobalName()); Widget widget = currentEditorDefinePane.updateBean(); - if(ComparatorUtils.equals(getGlobalName(), Inter.getLocText("FR-Designer_Widget_Name"))){ + if (ComparatorUtils.equals(getGlobalName(), Inter.getLocText("FR-Designer_Widget_Name"))) { widgetPropertyPane.update(widget); xCreator.resetCreatorName(widget.getWidgetName()); designer.getEditListenerTable().fireCreatorModified(xCreator, DesignerEvent.CREATOR_RENAMED); diff --git a/designer_form/src/com/fr/design/widget/FormWidgetDefinePaneFactoryBase.java b/designer_form/src/com/fr/design/widget/FormWidgetDefinePaneFactoryBase.java index 7c39755491..8fba8220f8 100644 --- a/designer_form/src/com/fr/design/widget/FormWidgetDefinePaneFactoryBase.java +++ b/designer_form/src/com/fr/design/widget/FormWidgetDefinePaneFactoryBase.java @@ -3,6 +3,8 @@ package com.fr.design.widget; import com.fr.base.FRContext; import com.fr.design.designer.creator.XCreator; import com.fr.design.gui.core.WidgetConstants; +import com.fr.design.mainframe.FormDesigner; +import com.fr.design.widget.ui.designer.WidgetDefinePane; import com.fr.design.parameter.RootDesignDefinePane; import com.fr.design.widget.ui.designer.*; import com.fr.design.widget.ui.designer.layout.*; @@ -11,7 +13,6 @@ import com.fr.form.ui.*; import com.fr.form.ui.container.*; import com.fr.form.ui.container.cardlayout.WCardMainBorderLayout; import com.fr.form.ui.container.cardlayout.WTabFitLayout; -import com.fr.general.Inter; import com.fr.stable.bridge.BridgeMark; import com.fr.stable.bridge.StableFactory; @@ -66,8 +67,6 @@ public class FormWidgetDefinePaneFactoryBase { defineMap.put(WCardLayout.class, new Appearance(WCardLayoutDefinePane.class, "wCardLayout")); defineMap.put(Label.class, new Appearance(LabelDefinePane.class, "label")); defineMap.put(WTabFitLayout.class, new Appearance(WTabFitLayoutDefinePane.class, "wTabFitLayout")); - //todo 添加扩展控件接口 -// defineMap.putAll(getOtherWidgetOptionMap()); } @@ -76,10 +75,11 @@ public class FormWidgetDefinePaneFactoryBase { } - public static RN createWidgetDefinePane(XCreator creator, Widget widget, Operator operator) { + public static RN createWidgetDefinePane(XCreator creator, FormDesigner designer, Widget widget, Operator operator) { Appearance dn = defineMap.get(widget.getClass()); if(dn == null){ - dn = new Appearance(DefaultWidgetDefinePane.class, "default"); + WidgetDefinePane widgetDefinePane = new WidgetDefinePane(creator, designer); + return new RN(widgetDefinePane, widgetDefinePane.title4PopupWindow()); } DataModify definePane = null; try { diff --git a/designer_form/src/com/fr/design/widget/ui/designer/AbstractDataModify.java b/designer_form/src/com/fr/design/widget/ui/designer/AbstractDataModify.java index 3aca5f00a7..36c6531c95 100644 --- a/designer_form/src/com/fr/design/widget/ui/designer/AbstractDataModify.java +++ b/designer_form/src/com/fr/design/widget/ui/designer/AbstractDataModify.java @@ -3,6 +3,7 @@ package com.fr.design.widget.ui.designer; import com.fr.design.beans.BasicBeanPane; import com.fr.design.data.DataCreatorUI; import com.fr.design.designer.creator.XCreator; +import com.fr.design.mainframe.FormDesigner; import com.fr.design.widget.DataModify; import javax.swing.JComponent; @@ -13,18 +14,29 @@ import javax.swing.JComponent; */ public abstract class AbstractDataModify extends BasicBeanPane implements DataModify { protected XCreator creator; + protected FormDesigner designer; protected String globalName; public AbstractDataModify(XCreator xCreator){ this.creator = xCreator; } + + public AbstractDataModify(XCreator xCreator, FormDesigner designer){ + this.creator = xCreator; + this.designer = designer; + } @Override public DataCreatorUI dataUI() { return null; } + @Override + public String title4PopupWindow() { + return creator.createDefaultName(); + } + @Override public JComponent toSwingComponent() { return this; diff --git a/designer_form/src/com/fr/design/widget/ui/designer/WidgetDefinePane.java b/designer_form/src/com/fr/design/widget/ui/designer/WidgetDefinePane.java new file mode 100644 index 0000000000..f582fdd323 --- /dev/null +++ b/designer_form/src/com/fr/design/widget/ui/designer/WidgetDefinePane.java @@ -0,0 +1,72 @@ +package com.fr.design.widget.ui.designer; + +import com.fr.design.designer.beans.AdapterBus; +import com.fr.design.designer.beans.ComponentAdapter; +import com.fr.design.designer.creator.PropertyGroupPane; +import com.fr.design.designer.creator.XCreator; +import com.fr.design.foldablepane.UIExpandablePane; +import com.fr.design.layout.FRGUIPaneFactory; +import com.fr.design.mainframe.FormDesigner; +import com.fr.form.ui.Widget; +import com.fr.general.ComparatorUtils; +import com.fr.general.Inter; + +import javax.swing.JPanel; +import java.awt.BorderLayout; +import java.util.ArrayList; + +/** + * Created by kerry on 2017/9/27. + */ +public class WidgetDefinePane extends AbstractDataModify { + private ArrayList groupPanes; + private static final int START_INDEX = 1; + + public WidgetDefinePane(XCreator source, FormDesigner designer) { + super(source, designer); + this.setLayout(FRGUIPaneFactory.createBorderLayout()); + initComponent(source, designer); + } + + public void initComponent(XCreator source, FormDesigner designer) { + ComponentAdapter adapter = AdapterBus.getComponentAdapter(designer, source); + groupPanes = adapter.getXCreatorPropertyPane(); + //todo 留着做兼容,以后删掉 + for (int i = 0; i < groupPanes.size(); i++) { + if (ComparatorUtils.equals(groupPanes.get(i).getGroupName(), "Form-Basic_Properties")) { + groupPanes.remove(i); + } + } + + this.add(createCenterPane(START_INDEX), BorderLayout.CENTER); + } + + private JPanel createCenterPane(int index) { + JPanel jPanel = FRGUIPaneFactory.createBorderLayout_S_Pane(); + if (index != groupPanes.size()) { + jPanel.add(createExpandPane(groupPanes.get(index - 1)), BorderLayout.NORTH); + jPanel.add(createCenterPane(index + 1), BorderLayout.CENTER); + } else { + jPanel.add(createExpandPane(groupPanes.get(index - 1)), BorderLayout.CENTER); + } + return jPanel; + } + + + public JPanel createExpandPane(PropertyGroupPane propertyGroupPane) { + JPanel jPanel = new UIExpandablePane(Inter.getLocText(propertyGroupPane.getGroupName()), 280, 24, propertyGroupPane); + return jPanel; + } + + + public void populateBean(Widget ob) { + for (int i = 0; i < groupPanes.size(); i++) { + groupPanes.get(i).populate(ob); + } + } + + public Widget updateBean() { + return creator.toData(); + } + +} From daea83652112f1829d4791fa2e74a1ae9fcd61f2 Mon Sep 17 00:00:00 2001 From: kerry Date: Thu, 28 Sep 2017 14:54:57 +0800 Subject: [PATCH 104/125] =?UTF-8?q?=E5=88=A0=E9=99=A4=E6=97=A0=E6=95=88?= =?UTF-8?q?=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../designer/creator/CRPropertyDescriptorPane.java | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/designer_form/src/com/fr/design/designer/creator/CRPropertyDescriptorPane.java b/designer_form/src/com/fr/design/designer/creator/CRPropertyDescriptorPane.java index b3d7983100..da0f4d9bcb 100644 --- a/designer_form/src/com/fr/design/designer/creator/CRPropertyDescriptorPane.java +++ b/designer_form/src/com/fr/design/designer/creator/CRPropertyDescriptorPane.java @@ -95,17 +95,7 @@ public class CRPropertyDescriptorPane { } return component; } - - private PropertyEditor initExtendEditor(CRPropertyDescriptor crPropertyDescriptor, XCreator xCreator) throws Exception { - ExtendedPropertyEditor editor = (ExtendedPropertyEditor) crPropertyDescriptor.createPropertyEditor(xCreator.toData()); - if (editor == null) { - Class propType = crPropertyDescriptor.getPropertyType(); - editor = TableUtils.getPropertyEditorClass(propType).newInstance(); - } - - return editor; - } - + public void populate(Widget widget) { try { isPopulate = true; From c919184561d632af068849171ddc53b067196639 Mon Sep 17 00:00:00 2001 From: plough Date: Thu, 28 Sep 2017 14:55:31 +0800 Subject: [PATCH 105/125] =?UTF-8?q?REPORT-4868=20=E8=AE=BE=E8=AE=A1?= =?UTF-8?q?=E5=99=A8=E8=A7=86=E8=A7=89bug=E4=BF=AE=E6=94=B9=EF=BC=88?= =?UTF-8?q?=E4=BA=8C=EF=BC=89=E9=83=A8=E5=88=86=3D>5(=E6=BB=9A=E5=8A=A8?= =?UTF-8?q?=E6=9D=A1)=20=E6=A0=A1=E6=AD=A3=E4=B8=AD=E7=82=B9=E4=BD=8D?= =?UTF-8?q?=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- designer_base/src/com/fr/design/mainframe/JSliderPane.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/designer_base/src/com/fr/design/mainframe/JSliderPane.java b/designer_base/src/com/fr/design/mainframe/JSliderPane.java index 9a36022fd0..d056551399 100644 --- a/designer_base/src/com/fr/design/mainframe/JSliderPane.java +++ b/designer_base/src/com/fr/design/mainframe/JSliderPane.java @@ -438,6 +438,7 @@ class JSliderPaneUI extends BasicSliderUI { private static final int FOUR = 4; private static final int FIVE = 5; private static final int SIX = 6; + private static final int MID_X_SHIFT = 2; // 中点标记的水平位置偏移 public JSliderPaneUI(UISlider b) { super(b); @@ -474,7 +475,7 @@ class JSliderPaneUI extends BasicSliderUI { g2.fillRect(0, -cy, cw + 10, cy * 4); g.setColor(new Color(216, 216, 216)); g.drawLine(0, cy, cw + 3, cy); - g.drawLine(FIVE + cw / 2, cy - FOUR, FIVE + cw / 2, cy + FOUR); + g.drawLine(MID_X_SHIFT + cw / 2, cy - FOUR, MID_X_SHIFT + cw / 2, cy + FOUR); } else { super.paintTrack(g); } From 87a7ff03f3da8fdbd31d0ac28a73222e9c14cb24 Mon Sep 17 00:00:00 2001 From: kerry Date: Thu, 28 Sep 2017 15:28:14 +0800 Subject: [PATCH 106/125] =?UTF-8?q?REPORT-4778=20[9.0=E5=86=85=E6=B5=8B]?= =?UTF-8?q?=20=E4=BB=BB=E6=84=8F=E5=8D=95=E5=85=83=E6=A0=BC=E4=B8=8B?= =?UTF-8?q?=E5=8F=B3=E9=94=AE=EF=BC=9A=E9=80=89=E6=8B=A9=E6=8E=A7=E4=BB=B6?= =?UTF-8?q?=E8=AE=BE=E7=BD=AE=EF=BC=8C=E6=B2=A1=E6=9C=89=E5=BC=B9=E5=87=BA?= =?UTF-8?q?=E9=9A=90=E8=97=8F=E7=9A=84=E6=8E=A7=E4=BB=B6=E7=AA=97=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/com/fr/design/actions/cell/CellWidgetAttrAction.java | 1 + .../com/fr/design/actions/cell/ConditionAttributesAction.java | 1 + designer/src/com/fr/design/actions/edit/HyperlinkAction.java | 1 + 3 files changed, 3 insertions(+) diff --git a/designer/src/com/fr/design/actions/cell/CellWidgetAttrAction.java b/designer/src/com/fr/design/actions/cell/CellWidgetAttrAction.java index 2a231a21f6..7c4ee70875 100644 --- a/designer/src/com/fr/design/actions/cell/CellWidgetAttrAction.java +++ b/designer/src/com/fr/design/actions/cell/CellWidgetAttrAction.java @@ -22,5 +22,6 @@ public class CellWidgetAttrAction extends UpdateAction { @Override public void actionPerformed(ActionEvent e) { EastRegionContainerPane.getInstance().switchTabTo(EastRegionContainerPane.KEY_WIDGET_SETTINGS); + EastRegionContainerPane.getInstance().setWindow2PreferWidth(); } } \ No newline at end of file diff --git a/designer/src/com/fr/design/actions/cell/ConditionAttributesAction.java b/designer/src/com/fr/design/actions/cell/ConditionAttributesAction.java index 15acd796cb..0d5d7202c4 100644 --- a/designer/src/com/fr/design/actions/cell/ConditionAttributesAction.java +++ b/designer/src/com/fr/design/actions/cell/ConditionAttributesAction.java @@ -24,5 +24,6 @@ public class ConditionAttributesAction extends UpdateAction { @Override public void actionPerformed(ActionEvent e) { EastRegionContainerPane.getInstance().switchTabTo(EastRegionContainerPane.KEY_CONDITION_ATTR); + EastRegionContainerPane.getInstance().setWindow2PreferWidth(); } } \ No newline at end of file diff --git a/designer/src/com/fr/design/actions/edit/HyperlinkAction.java b/designer/src/com/fr/design/actions/edit/HyperlinkAction.java index 38fc9bece5..269d509174 100644 --- a/designer/src/com/fr/design/actions/edit/HyperlinkAction.java +++ b/designer/src/com/fr/design/actions/edit/HyperlinkAction.java @@ -25,5 +25,6 @@ public class HyperlinkAction extends UpdateAction { @Override public void actionPerformed(ActionEvent e) { EastRegionContainerPane.getInstance().switchTabTo(EastRegionContainerPane.KEY_HYPERLINK); + EastRegionContainerPane.getInstance().setWindow2PreferWidth(); } } \ No newline at end of file From 4657453bf9a4759e0fe7abdc34131343f1e7fbbd Mon Sep 17 00:00:00 2001 From: hzzz Date: Fri, 29 Sep 2017 09:20:27 +0800 Subject: [PATCH 107/125] jdk8 => 7 --- designer/src/com/fr/start/Designer.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/designer/src/com/fr/start/Designer.java b/designer/src/com/fr/start/Designer.java index eca4af14c4..d844923813 100644 --- a/designer/src/com/fr/start/Designer.java +++ b/designer/src/com/fr/start/Designer.java @@ -145,7 +145,7 @@ public class Designer extends BaseDesigner { return largeToolbar; } - private JPanel generateEmptyGap(int width) { + private JPanel generateEmptyGap(final int width) { JPanel panel = new JPanel() { public Dimension getPreferredSize() { Dimension dim = super.getPreferredSize(); From 5c2e6b26dcd5f7723d92635e09242800d61267a0 Mon Sep 17 00:00:00 2001 From: zhouping Date: Fri, 29 Sep 2017 10:51:53 +0800 Subject: [PATCH 108/125] =?UTF-8?q?REPORT-4718=20[9.0=E5=86=85=E6=B5=8B]?= =?UTF-8?q?=E6=89=93=E5=BC=80=E7=BB=9D=E5=AF=B9=E5=B8=83=E5=B1=80=E5=86=B3?= =?UTF-8?q?=E7=AD=96=E6=8A=A5=E8=A1=A8=EF=BC=8Cbody=E7=BB=84=E4=BB=B6?= =?UTF-8?q?=E4=B8=AD=E6=98=BE=E7=A4=BA=E8=87=AA=E9=80=82=E5=BA=94=E5=B8=83?= =?UTF-8?q?=E5=B1=80=E7=9A=84=E5=B1=9E=E6=80=A7=E5=8F=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fr/design/designer/beans/models/StateModel.java | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/designer_form/src/com/fr/design/designer/beans/models/StateModel.java b/designer_form/src/com/fr/design/designer/beans/models/StateModel.java index ff3fcbedcd..d089e282f6 100644 --- a/designer_form/src/com/fr/design/designer/beans/models/StateModel.java +++ b/designer_form/src/com/fr/design/designer/beans/models/StateModel.java @@ -265,7 +265,15 @@ public class StateModel { Rectangle bounds = createCurrentBounds(x, y); if ((x != currentX) || (y != currentY)) { - selectionModel.setSelectedCreators(getHotspotCreators(bounds, designer.getRootComponent())); + ArrayList creators = getHotspotCreators(bounds, designer.getRootComponent()); + if (creators.isEmpty() && designer.getRootComponent().getXCreatorCount() > 0) { + //当初始化布局是绝对布局的时候特殊处理,画框的时候若没有控件,默认焦点设置在绝对布局上 + XCreator layout = designer.getRootComponent().getXCreator(0); + if (layout.acceptType(XWAbsoluteBodyLayout.class)) { + creators.add(layout); + } + } + selectionModel.setSelectedCreators(creators); } selectionModel.setHotspotBounds(null); } From a5f3f7d73daeb673d244659aa68488a1cfd38c47 Mon Sep 17 00:00:00 2001 From: plough Date: Fri, 29 Sep 2017 11:55:28 +0800 Subject: [PATCH 109/125] =?UTF-8?q?REPORT-4766=20[9.0=E5=86=85=E6=B5=8B]?= =?UTF-8?q?=20=E8=8F=9C=E5=8D=95=E2=80=94=E6=A8=A1=E6=9D=BF-=E7=BA=B8?= =?UTF-8?q?=E5=BC=A0=E8=83=8C=E6=99=AF-=E6=B8=90=E5=8F=98=E8=89=B2?= =?UTF-8?q?=E9=97=AE=E9=A2=98=EF=BC=9A=E5=A4=9A=E4=BD=99=E5=8F=8D=E6=96=9C?= =?UTF-8?q?=E7=BA=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- designer_base/src/com/fr/design/locale/designer.properties | 2 +- .../src/com/fr/design/locale/designer_en_US.properties | 2 +- .../src/com/fr/design/locale/designer_ja_JP.properties | 2 +- .../src/com/fr/design/locale/designer_ko_KR.properties | 2 +- .../src/com/fr/design/locale/designer_zh_CN.properties | 2 +- .../src/com/fr/design/locale/designer_zh_TW.properties | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/designer_base/src/com/fr/design/locale/designer.properties b/designer_base/src/com/fr/design/locale/designer.properties index 26dbee0b67..938f9b1640 100644 --- a/designer_base/src/com/fr/design/locale/designer.properties +++ b/designer_base/src/com/fr/design/locale/designer.properties @@ -548,7 +548,7 @@ FR-Designer_Function_Description_Area_Text=The class must inherit 'com.fr.script FR-Designer_PageSetup_Horizontal=Horizontal FR-Designer_PageSetup_Vertical=Vertical FR-Designer_Gradient_Direction=Gradient Direction -FR-Designer_Drag_To_Select_Gradient=\\ Drag the button below to choose gradient area, click it to choose color +FR-Designer_Drag_To_Select_Gradient=Drag the button below to choose gradient area, click it to choose color FR-Designer_Display_Value=Display Value FR-Designer_Actual_Value=Actual Value FR-Designer_CellWrite_ToolTip=Tool Tip of Cell diff --git a/designer_base/src/com/fr/design/locale/designer_en_US.properties b/designer_base/src/com/fr/design/locale/designer_en_US.properties index bc15eaf28c..53b7873e48 100644 --- a/designer_base/src/com/fr/design/locale/designer_en_US.properties +++ b/designer_base/src/com/fr/design/locale/designer_en_US.properties @@ -550,7 +550,7 @@ FR-Designer_Function_Description_Area_Text=The class must inherit 'com.fr.script FR-Designer_PageSetup_Horizontal=Horizontal FR-Designer_PageSetup_Vertical=Vertical FR-Designer_Gradient_Direction=Gradient Direction -FR-Designer_Drag_To_Select_Gradient=\\ Drag the button below to choose gradient area, click it to choose color +FR-Designer_Drag_To_Select_Gradient=Drag the button below to choose gradient area, click it to choose color FR-Designer_Display_Value=Display Value FR-Designer_Actual_Value=Actual Value FR-Designer_CellWrite_ToolTip=Tool Tip of Cell diff --git a/designer_base/src/com/fr/design/locale/designer_ja_JP.properties b/designer_base/src/com/fr/design/locale/designer_ja_JP.properties index 8a11e4a6d9..57c6eb3bb9 100644 --- a/designer_base/src/com/fr/design/locale/designer_ja_JP.properties +++ b/designer_base/src/com/fr/design/locale/designer_ja_JP.properties @@ -526,7 +526,7 @@ FR-Designer_Function_Description_Area_Text=\u3053\u306E\u30AF\u30E9\u30B9\u306F\ FR-Designer_PageSetup_Horizontal=\u6A2A\u65B9\u5411 FR-Designer_PageSetup_Vertical=\u7E26\u65B9\u5411 FR-Designer_Gradient_Direction=\u65B9\u5411\u3092\u5F90\u3005\u306B\u5909\u5316 -FR-Designer_Drag_To_Select_Gradient=\\ \u4E0B\u65B9\u306E\u30DC\u30BF\u30F3\u3092\u30D7\u30EB\u30C0\u30A6\u30F3\u3057\u3066\u6F38\u6B21\u5909\u5316\u30A8\u30EA\u30A2\u3092\u9078\u629E\u3057\u3001\u30AF\u30EA\u30C3\u30AF\u3057 +FR-Designer_Drag_To_Select_Gradient=\u4E0B\u65B9\u306E\u30DC\u30BF\u30F3\u3092\u30D7\u30EB\u30C0\u30A6\u30F3\u3057\u3066\u6F38\u6B21\u5909\u5316\u30A8\u30EA\u30A2\u3092\u9078\u629E\u3057\u3001\u30AF\u30EA\u30C3\u30AF\u3057 FR-Designer_Display_Value=\u8868\u793A\u5024 FR-Designer_Actual_Value=\u5B9F\u969B\u5024 FR-Designer_CellWrite_ToolTip=\u30BB\u30EB\u30D2\u30F3\u30C8 diff --git a/designer_base/src/com/fr/design/locale/designer_ko_KR.properties b/designer_base/src/com/fr/design/locale/designer_ko_KR.properties index fe99d8df87..37f64cf57b 100644 --- a/designer_base/src/com/fr/design/locale/designer_ko_KR.properties +++ b/designer_base/src/com/fr/design/locale/designer_ko_KR.properties @@ -522,7 +522,7 @@ FR-Designer_Function_Description_Area_Text=\uD574\uB2F9\uD074\uB798\uC2A4\uB294\ FR-Designer_PageSetup_Horizontal=\uAC00\uB85C FR-Designer_PageSetup_Vertical=\uC138\uB85C FR-Designer_Gradient_Direction=\uADF8\uB77C\uB370\uC774\uC158 \uBC29\uD5A5 -FR-Designer_Drag_To_Select_Gradient=\\\uD558\uB2E8\uD0A4\uB97C\uB4DC\uB798\uADF8\uD558\uC5EC\uADF8\uB77C\uB370\uC774\uC158\uC601\uC5ED\uC744\uC120\uD0DD\uD558\uACE0\uD0A4\uB97C\uD074\uB9AD\uD558\uC5EC\uD574\uB2F9\uC0C9\uC120\uD0DD +FR-Designer_Drag_To_Select_Gradient=\uD558\uB2E8\uD0A4\uB97C\uB4DC\uB798\uADF8\uD558\uC5EC\uADF8\uB77C\uB370\uC774\uC158\uC601\uC5ED\uC744\uC120\uD0DD\uD558\uACE0\uD0A4\uB97C\uD074\uB9AD\uD558\uC5EC\uD574\uB2F9\uC0C9\uC120\uD0DD FR-Designer_Display_Value=\uAC12\uBCF4\uC774\uAE30 FR-Designer_Actual_Value=\uC2E4\uC81C\uAC12 FR-Designer_CellWrite_ToolTip=\uB0B4\uC6A9\uC54C\uB9BC diff --git a/designer_base/src/com/fr/design/locale/designer_zh_CN.properties b/designer_base/src/com/fr/design/locale/designer_zh_CN.properties index 99db2255d6..8d9517cddd 100644 --- a/designer_base/src/com/fr/design/locale/designer_zh_CN.properties +++ b/designer_base/src/com/fr/design/locale/designer_zh_CN.properties @@ -556,7 +556,7 @@ FR-Designer_Function_Description_Area_Text=\u8BE5\u7C7B\u5FC5\u987B\u7EE7\u627F" FR-Designer_PageSetup_Horizontal=\u6A2A\u5411 FR-Designer_PageSetup_Vertical=\u7EB5\u5411 FR-Designer_Gradient_Direction=\u6E10\u53D8\u65B9\u5411 -FR-Designer_Drag_To_Select_Gradient=\\ \u62D6\u52A8\u4E0B\u65B9\u6309\u94AE\u9009\u62E9\u6E10\u53D8\u533A\u57DF\uFF0C\u5355\u51FB\u6309\u94AE\u9009\u62E9\u5BF9\u5E94\u989C\u8272 +FR-Designer_Drag_To_Select_Gradient=\u62D6\u52A8\u4E0B\u65B9\u6309\u94AE\u9009\u62E9\u6E10\u53D8\u533A\u57DF\uFF0C\u5355\u51FB\u6309\u94AE\u9009\u62E9\u5BF9\u5E94\u989C\u8272 FR-Designer_Display_Value=\u663E\u793A\u503C FR-Designer_Actual_Value=\u5B9E\u9645\u503C FR-Designer_CellWrite_ToolTip=\u5185\u5BB9\u63D0\u793A diff --git a/designer_base/src/com/fr/design/locale/designer_zh_TW.properties b/designer_base/src/com/fr/design/locale/designer_zh_TW.properties index 9e5d26792e..41cb4bed8c 100644 --- a/designer_base/src/com/fr/design/locale/designer_zh_TW.properties +++ b/designer_base/src/com/fr/design/locale/designer_zh_TW.properties @@ -543,7 +543,7 @@ FR-Designer_Function_Description_Area_Text=\u8A72\u985E\u5FC5\u9808\u7E7C\u627F" FR-Designer_PageSetup_Horizontal=\u6A2A\u5411 FR-Designer_PageSetup_Vertical=\u7E31\u5411 FR-Designer_Gradient_Direction=\u6F38\u8B8A\u65B9\u5411 -FR-Designer_Drag_To_Select_Gradient=\\ \u62D6\u52D5\u4E0B\u767C\u90A3\u500B\u6309\u9215\u61F8\u8457\u5340\u57DF\uFF0C\u55AE\u64CA\u6309\u9215\u9078\u64C7\u984F\u8272 +FR-Designer_Drag_To_Select_Gradient=\u62D6\u52D5\u4E0B\u767C\u90A3\u500B\u6309\u9215\u61F8\u8457\u5340\u57DF\uFF0C\u55AE\u64CA\u6309\u9215\u9078\u64C7\u984F\u8272 FR-Designer_Display_Value=\u986F\u793A\u503C FR-Designer_Actual_Value=\u5BE6\u969B\u503C FR-Designer_CellWrite_ToolTip=\u5167\u5BB9\u63D0\u793A From e1b9bf51978e5758d1430daee67c9270f56bc3c2 Mon Sep 17 00:00:00 2001 From: kerry Date: Fri, 29 Sep 2017 14:49:33 +0800 Subject: [PATCH 110/125] =?UTF-8?q?REPORT-4602=209.0=E8=AE=BE=E8=AE=A1?= =?UTF-8?q?=E5=99=A8=E5=B1=9E=E6=80=A7=E9=9D=A2=E6=9D=BF=E6=96=87=E6=9C=AC?= =?UTF-8?q?=E6=A1=86=E4=B8=8B=E6=8B=89=E6=A1=86=E6=96=87=E5=AD=97=E7=BC=A9?= =?UTF-8?q?=E8=BF=9B=E4=B8=8D=E7=BB=9F=E4=B8=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ui/BasicWidgetPropertySettingPane.java | 16 ++++----- .../design/widget/ui/ButtonGroupDictPane.java | 4 +-- .../design/widget/ui/CheckBoxDefinePane.java | 15 ++++---- .../design/widget/ui/ComboBoxDefinePane.java | 6 ++-- .../widget/ui/ComboCheckBoxDefinePane.java | 3 +- .../widget/ui/DateEditorDefinePane.java | 12 +++---- .../widget/ui/FieldEditorDefinePane.java | 5 ++- .../widget/ui/IframeEditorDefinePane.java | 6 ++-- .../widget/ui/ListEditorDefinePane.java | 10 +++--- .../design/widget/ui/MultiFileEditorPane.java | 5 ++- .../widget/ui/NumberEditorDefinePane.java | 1 - .../widget/ui/TextFieldEditorDefinePane.java | 2 -- .../ui/TreeComboBoxEditorDefinePane.java | 6 ++-- .../widget/ui/TreeEditorDefinePane.java | 6 ++-- .../design/widget/ui/WaterMarkDictPane.java | 5 +-- .../ui/WriteUnableRepeatEditorPane.java | 4 +-- .../ui/btn/DefineAppendColumnRowPane.java | 4 ++- .../ui/btn/DefineDeleteColumnRowPane.java | 3 +- .../fr/design/designer/IntervalConstants.java | 10 ++++-- .../src/com/fr/design/gui/frpane/RegPane.java | 3 +- .../mainframe/widget/BasicPropertyPane.java | 3 +- .../widget/WidgetBoundsPaneFactory.java | 36 ++++++++++++------- .../btn/ButtonWithHotkeysDetailPane.java | 2 +- .../widget/component/BackgroundCompPane.java | 6 ++-- .../widget/component/CheckBoxDictPane.java | 11 +++--- .../ui/FormBasicWidgetPropertyPane.java | 4 ++- .../parameter/RootDesignDefinePane.java | 4 +-- .../widget/ui/designer/ButtonDefinePane.java | 3 +- .../ui/designer/CheckBoxDefinePane.java | 3 +- .../ui/designer/CheckBoxGroupDefinePane.java | 4 +-- .../ui/designer/ComboCheckBoxDefinePane.java | 5 +-- .../CustomWritableRepeatEditorPane.java | 7 +--- .../ui/designer/DateEditorDefinePane.java | 6 ++-- .../designer/DirectWriteEditorDefinePane.java | 8 ++--- .../ui/designer/FieldEditorDefinePane.java | 9 +++-- .../widget/ui/designer/LabelDefinePane.java | 6 +++- .../ui/designer/MultiFileEditorPane.java | 10 +++--- .../ui/designer/NumberEditorDefinePane.java | 4 +-- .../designer/TextFieldEditorDefinePane.java | 4 +-- .../ui/designer/TreeEditorDefinePane.java | 13 +++++-- .../designer/btn/ButtonGroupDefinePane.java | 4 +-- .../designer/component/PaddingBoundPane.java | 30 +++++++++++----- .../component/WidgetAbsoluteBoundPane.java | 2 -- .../layout/BorderStyleWidgetDefinePane.java | 4 ++- .../layout/ElementEditorDefinePane.java | 3 +- .../FRAbsoluteBodyLayoutDefinePane.java | 11 +++--- .../layout/FRAbsoluteLayoutDefinePane.java | 16 ++++----- .../layout/FRFitLayoutDefinePane.java | 10 +++--- .../layout/WCardLayoutDefinePane.java | 7 ++-- .../layout/WTabFitLayoutDefinePane.java | 5 +-- .../layout/WTitleLayoutDefinePane.java | 3 +- 51 files changed, 217 insertions(+), 152 deletions(-) diff --git a/designer/src/com/fr/design/widget/ui/BasicWidgetPropertySettingPane.java b/designer/src/com/fr/design/widget/ui/BasicWidgetPropertySettingPane.java index cedcfc1db7..f6fa3693ae 100644 --- a/designer/src/com/fr/design/widget/ui/BasicWidgetPropertySettingPane.java +++ b/designer/src/com/fr/design/widget/ui/BasicWidgetPropertySettingPane.java @@ -1,6 +1,6 @@ package com.fr.design.widget.ui; -import com.fr.design.constants.LayoutConstants; +import com.fr.design.designer.IntervalConstants; import com.fr.design.gui.icheckbox.UICheckBox; import com.fr.design.gui.ilable.UILabel; import com.fr.design.dialog.BasicPane; @@ -11,8 +11,11 @@ import com.fr.form.ui.Widget; import com.fr.general.Inter; import com.fr.design.utils.gui.GUICoreUtils; -import javax.swing.*; -import java.awt.*; +import javax.swing.BorderFactory; +import javax.swing.JPanel; +import java.awt.BorderLayout; +import java.awt.Component; + public class BasicWidgetPropertySettingPane extends BasicPane { private ParameterTreeComboBox widgetNameComboBox; @@ -28,20 +31,17 @@ public class BasicWidgetPropertySettingPane extends BasicPane { visibleCheckBox.setBorder(BorderFactory.createEmptyBorder(0,0,0,0)); widgetNameComboBox = new ParameterTreeComboBox(); widgetNameComboBox.refreshTree(); - JPanel widgetNamePane = new JPanel(new BorderLayout()); - widgetNamePane.add(widgetNameComboBox, BorderLayout.CENTER); - widgetNamePane.setBorder(BorderFactory.createEmptyBorder(0,20,0,0)); double f = TableLayout.FILL; double p = TableLayout.PREFERRED; Component[][] components = new Component[][]{ - new Component[]{new UILabel(Inter.getLocText("FR-Designer_Form-Widget_Name")), widgetNamePane}, + new Component[]{new UILabel(Inter.getLocText("FR-Designer_Form-Widget_Name")), widgetNameComboBox}, new Component[]{enableCheckBox, null}, new Component[]{visibleCheckBox, null}, }; double[] rowSize = {p, p, p}; double[] columnSize = {p, f}; int[][] rowCount = {{1, 1},{1, 1},{1, 1},{1, 1}}; - JPanel pane = TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, rowCount, LayoutConstants.VGAP_LARGE, LayoutConstants.VGAP_LARGE); + JPanel pane = TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, rowCount, IntervalConstants.INTERVAL_W2, IntervalConstants.INTERVAL_L1); pane.setBorder(BorderFactory.createEmptyBorder(10,0,10,0)); this.add(pane, BorderLayout.CENTER); diff --git a/designer/src/com/fr/design/widget/ui/ButtonGroupDictPane.java b/designer/src/com/fr/design/widget/ui/ButtonGroupDictPane.java index aaa116765f..8b8916ca32 100644 --- a/designer/src/com/fr/design/widget/ui/ButtonGroupDictPane.java +++ b/designer/src/com/fr/design/widget/ui/ButtonGroupDictPane.java @@ -5,6 +5,7 @@ import java.awt.*; import java.awt.event.ActionEvent; import com.fr.data.Dictionary; +import com.fr.design.designer.IntervalConstants; import com.fr.design.gui.ispinner.UIBasicSpinner; import java.awt.event.ActionListener; @@ -57,8 +58,7 @@ public class ButtonGroupDictPane extends JPanel { {new UILabel(Inter.getLocText("FR-Designer_DS-Dictionary")), dictPane, null}, {adaptiveCheckbox, columnLabel, columnSpinner} }; - JPanel panel = TableLayoutHelper.createGapTableLayoutPane(n_components, rowSize, columnSize, 16, 8); - panel.setBorder(BorderFactory.createEmptyBorder(10, 0, 10, 0)); + JPanel panel = TableLayoutHelper.createGapTableLayoutPane(n_components, rowSize, columnSize, IntervalConstants.INTERVAL_W1, IntervalConstants.INTERVAL_L1); this.add(panel); diff --git a/designer/src/com/fr/design/widget/ui/CheckBoxDefinePane.java b/designer/src/com/fr/design/widget/ui/CheckBoxDefinePane.java index 44d0df7f4a..3bbc5a113f 100644 --- a/designer/src/com/fr/design/widget/ui/CheckBoxDefinePane.java +++ b/designer/src/com/fr/design/widget/ui/CheckBoxDefinePane.java @@ -1,6 +1,7 @@ package com.fr.design.widget.ui; import com.fr.design.constants.LayoutConstants; +import com.fr.design.designer.IntervalConstants; import com.fr.design.foldablepane.UIExpandablePane; import com.fr.design.gui.ilable.UILabel; import com.fr.design.gui.itextfield.UITextField; @@ -17,28 +18,24 @@ public class CheckBoxDefinePane extends AbstractDataModify { private UITextField text; public CheckBoxDefinePane() { - this.iniComoponents(); + this.iniComponents(); } - private void iniComoponents() { + private void iniComponents() { this.setLayout(FRGUIPaneFactory.createBorderLayout()); text = new UITextField(); - JPanel panel = new JPanel(new BorderLayout()); - panel.add(text, BorderLayout.CENTER); - panel.setBorder(BorderFactory.createEmptyBorder(0, 35, 0, 0)); - double f = TableLayout.FILL; double p = TableLayout.PREFERRED; Component[][] components = new Component[][]{ - new Component[]{new UILabel(Inter.getLocText("FR-Designer_Text")), panel}, + new Component[]{new UILabel(Inter.getLocText("FR-Designer_Text")), text}, }; double[] rowSize = {p}; double[] columnSize = {p, f}; int[][] rowCount = {{1, 1}}; - JPanel pane = TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, rowCount, LayoutConstants.VGAP_LARGE, LayoutConstants.VGAP_LARGE); + JPanel pane = TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, rowCount, IntervalConstants.INTERVAL_W3, IntervalConstants.INTERVAL_L1); UIExpandablePane uiExpandablePane = new UIExpandablePane(Inter.getLocText("FR-Designer_Advanced"), 280, 24, pane); - pane.setBorder(BorderFactory.createEmptyBorder(10, 10, 10, 15)); + pane.setBorder(BorderFactory.createEmptyBorder(10, 5, 10, 0)); this.add(uiExpandablePane); } diff --git a/designer/src/com/fr/design/widget/ui/ComboBoxDefinePane.java b/designer/src/com/fr/design/widget/ui/ComboBoxDefinePane.java index ed4f94079c..a59b049791 100644 --- a/designer/src/com/fr/design/widget/ui/ComboBoxDefinePane.java +++ b/designer/src/com/fr/design/widget/ui/ComboBoxDefinePane.java @@ -4,6 +4,7 @@ import javax.swing.*; import com.fr.data.Dictionary; import com.fr.design.data.DataCreatorUI; +import com.fr.design.designer.IntervalConstants; import com.fr.design.gui.ilable.UILabel; import com.fr.design.layout.TableLayoutHelper; import com.fr.design.mainframe.widget.accessibles.AccessibleDictionaryEditor; @@ -26,8 +27,9 @@ public class ComboBoxDefinePane extends CustomWritableRepeatEditorPane protected JPanel setForthContentPane () { dictPane = new AccessibleDictionaryEditor(); - JPanel jPanel = TableLayoutHelper.createGapTableLayoutPane(new Component[][]{new Component[]{new UILabel(Inter.getLocText("FR-Designer_DS-Dictionary")), dictPane}}, TableLayoutHelper.FILL_LASTCOLUMN, 18, 7); - jPanel.setBorder(BorderFactory.createEmptyBorder(10, 0, 10, 0)); + JPanel jPanel = TableLayoutHelper.createGapTableLayoutPane( + new Component[][]{new Component[]{new UILabel(Inter.getLocText("FR-Designer_DS-Dictionary")), dictPane}}, TableLayoutHelper.FILL_LASTCOLUMN, IntervalConstants.INTERVAL_W1, IntervalConstants.INTERVAL_L1); + jPanel.setBorder(BorderFactory.createEmptyBorder(10, 0, 0, 0)); return jPanel; } diff --git a/designer/src/com/fr/design/widget/ui/ComboCheckBoxDefinePane.java b/designer/src/com/fr/design/widget/ui/ComboCheckBoxDefinePane.java index b8922ad557..d379f21336 100644 --- a/designer/src/com/fr/design/widget/ui/ComboCheckBoxDefinePane.java +++ b/designer/src/com/fr/design/widget/ui/ComboCheckBoxDefinePane.java @@ -2,6 +2,7 @@ package com.fr.design.widget.ui; import com.fr.data.Dictionary; import com.fr.design.data.DataCreatorUI; +import com.fr.design.designer.IntervalConstants; import com.fr.design.gui.icheckbox.UICheckBox; import com.fr.design.gui.ilable.UILabel; import com.fr.design.layout.FRGUIPaneFactory; @@ -42,7 +43,7 @@ public class ComboCheckBoxDefinePane extends CustomWritableRepeatEditorPane extends Abstr protected void initComponents() { this.setLayout(FRGUIPaneFactory.createBorderLayout()); JPanel contentPane = this.setFirstContentPane(); + JPanel jPanel = FRGUIPaneFactory.createBorderLayout_S_Pane(); + jPanel.add(contentPane, BorderLayout.CENTER); + contentPane.setBorder(BorderFactory.createEmptyBorder(10, 0, 10, 0)); if (contentPane != null) { - UIExpandablePane uiExpandablePane = new UIExpandablePane(Inter.getLocText("FR-Designer_Advanced"), 280, 24, contentPane); + UIExpandablePane uiExpandablePane = new UIExpandablePane(Inter.getLocText("FR-Designer_Advanced"), 280, 24, jPanel); this.add(uiExpandablePane, BorderLayout.NORTH); } this.addValidatePane(); diff --git a/designer/src/com/fr/design/widget/ui/IframeEditorDefinePane.java b/designer/src/com/fr/design/widget/ui/IframeEditorDefinePane.java index 7416f314fc..d70e633f47 100644 --- a/designer/src/com/fr/design/widget/ui/IframeEditorDefinePane.java +++ b/designer/src/com/fr/design/widget/ui/IframeEditorDefinePane.java @@ -2,6 +2,7 @@ package com.fr.design.widget.ui; import com.fr.base.FRContext; import com.fr.design.constants.LayoutConstants; +import com.fr.design.designer.IntervalConstants; import com.fr.design.dialog.DialogActionListener; import com.fr.design.dialog.UIDialog; import com.fr.design.foldablepane.UIExpandablePane; @@ -57,14 +58,15 @@ public class IframeEditorDefinePane extends AbstractDataModify { parameterViewPaneButton = new UIButton(Inter.getLocText("FR-Designer_Edit")); parameterViewPaneButton.addActionListener(parameterListener); parameterViewPane = new ReportletParameterViewPane(); - + horizontalCheck.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0)); + verticalCheck.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0)); java.awt.Component[][] coms = { {horizontalCheck, null}, {verticalCheck, null}, {new UILabel(Inter.getLocText("Form-Url")), srcTextField = new UITextField()}, {new UILabel(Inter.getLocText("FR-Designer_Parameters")), parameterViewPaneButton}}; int[][] rowCount = {{1, 1}, {1, 1}, {1, 1}, {1, 1}}; - JPanel panel = TableLayoutHelper.createGapTableLayoutPane(coms, rowSize, columnSize, rowCount, 45, LayoutConstants.VGAP_LARGE); + JPanel panel = TableLayoutHelper.createGapTableLayoutPane(coms, rowSize, columnSize, rowCount, IntervalConstants.INTERVAL_W3, IntervalConstants.INTERVAL_L1); contentPane.add(panel); diff --git a/designer/src/com/fr/design/widget/ui/ListEditorDefinePane.java b/designer/src/com/fr/design/widget/ui/ListEditorDefinePane.java index 1969bff204..a223ee439a 100644 --- a/designer/src/com/fr/design/widget/ui/ListEditorDefinePane.java +++ b/designer/src/com/fr/design/widget/ui/ListEditorDefinePane.java @@ -34,12 +34,12 @@ public class ListEditorDefinePane extends WriteUnableRepeatEditorPane double[] rowSize = {p, p, p}; double[] columnSize = {p, f}; int[][] rowCount = {{1, 1}, {1, 1}, {1, 1}}; - JPanel panel = TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, rowCount, 22, 10); - - panel.setBorder(BorderFactory.createEmptyBorder(10, 0, 10, 00)); + JPanel panel = TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, rowCount, IntervalConstants.INTERVAL_W1, IntervalConstants.INTERVAL_L1); contenter.add(panel, BorderLayout.CENTER); return contenter; diff --git a/designer/src/com/fr/design/widget/ui/NumberEditorDefinePane.java b/designer/src/com/fr/design/widget/ui/NumberEditorDefinePane.java index 122441b81d..88244b903f 100644 --- a/designer/src/com/fr/design/widget/ui/NumberEditorDefinePane.java +++ b/designer/src/com/fr/design/widget/ui/NumberEditorDefinePane.java @@ -29,7 +29,6 @@ public class NumberEditorDefinePane extends FieldEditorDefinePane protected JPanel setFirstContentPane() { JPanel content = FRGUIPaneFactory.createBorderLayout_S_Pane(); waterMarkDictPane = new WaterMarkDictPane(); - waterMarkDictPane.setBorder(BorderFactory.createEmptyBorder(0, 0, 10, 0)); content.add(waterMarkDictPane, BorderLayout.CENTER); return content; } diff --git a/designer/src/com/fr/design/widget/ui/TextFieldEditorDefinePane.java b/designer/src/com/fr/design/widget/ui/TextFieldEditorDefinePane.java index 33981226d6..e5ae558086 100644 --- a/designer/src/com/fr/design/widget/ui/TextFieldEditorDefinePane.java +++ b/designer/src/com/fr/design/widget/ui/TextFieldEditorDefinePane.java @@ -51,9 +51,7 @@ public class TextFieldEditorDefinePane extends FieldEditorDefinePane } }); JPanel content = FRGUIPaneFactory.createBorderLayout_S_Pane(); - waterMarkDictPane.setBorder(BorderFactory.createEmptyBorder(0, 0, 10, 0)); content.add(waterMarkDictPane, BorderLayout.CENTER); - return content; } diff --git a/designer/src/com/fr/design/widget/ui/TreeComboBoxEditorDefinePane.java b/designer/src/com/fr/design/widget/ui/TreeComboBoxEditorDefinePane.java index 1bebaf90c8..2b6ae09b95 100644 --- a/designer/src/com/fr/design/widget/ui/TreeComboBoxEditorDefinePane.java +++ b/designer/src/com/fr/design/widget/ui/TreeComboBoxEditorDefinePane.java @@ -7,6 +7,7 @@ import javax.swing.JPanel; import com.fr.data.Dictionary; import com.fr.design.data.DataCreatorUI; +import com.fr.design.designer.IntervalConstants; import com.fr.design.gui.ilable.UILabel; import com.fr.design.gui.itree.refreshabletree.TreeRootPane; import com.fr.design.layout.FRGUIPaneFactory; @@ -38,8 +39,9 @@ public class TreeComboBoxEditorDefinePane extends CustomWritableRepeatEditorPane protected JPanel setFirstContentPane() { treeSettingPane = new AccessibleTreeModelEditor(); JPanel jPanel = FRGUIPaneFactory.createBorderLayout_S_Pane(); - JPanel north = TableLayoutHelper.createGapTableLayoutPane(new Component[][]{new Component[]{new UILabel(Inter.getLocText("FR-Designer_Create_Tree")), treeSettingPane}}, TableLayoutHelper.FILL_LASTCOLUMN, 18, 7); - north.setBorder(BorderFactory.createEmptyBorder(10, 0, 0, 0)); + JPanel north = TableLayoutHelper.createGapTableLayoutPane(new Component[][]{ + new Component[]{new UILabel(Inter.getLocText("FR-Designer_Create_Tree")), treeSettingPane}}, TableLayoutHelper.FILL_LASTCOLUMN, IntervalConstants.INTERVAL_W2, IntervalConstants.INTERVAL_L1); + north.setBorder(BorderFactory.createEmptyBorder(0, 0, 10, 0)); JPanel center = super.setFirstContentPane(); jPanel.add(north, BorderLayout.NORTH); jPanel.add(center, BorderLayout.CENTER); diff --git a/designer/src/com/fr/design/widget/ui/TreeEditorDefinePane.java b/designer/src/com/fr/design/widget/ui/TreeEditorDefinePane.java index f98eea391a..2ed9c06636 100644 --- a/designer/src/com/fr/design/widget/ui/TreeEditorDefinePane.java +++ b/designer/src/com/fr/design/widget/ui/TreeEditorDefinePane.java @@ -2,6 +2,7 @@ package com.fr.design.widget.ui; import com.fr.data.Dictionary; import com.fr.design.data.DataCreatorUI; +import com.fr.design.designer.IntervalConstants; import com.fr.design.gui.icheckbox.UICheckBox; import com.fr.design.gui.ilable.UILabel; import com.fr.design.gui.itree.refreshabletree.TreeRootPane; @@ -55,8 +56,9 @@ public class TreeEditorDefinePane extends FieldEditorDefinePane { protected JPanel setSecondContentPane() { accessibleTreeModelEditor = new AccessibleTreeModelEditor(); - JPanel createTree = TableLayoutHelper.createGapTableLayoutPane(new Component[][]{new Component[]{new UILabel(Inter.getLocText("FR-Designer_Create_Tree")), accessibleTreeModelEditor}}, TableLayoutHelper.FILL_LASTCOLUMN, 18, 7); - createTree.setBorder(BorderFactory.createEmptyBorder(10, 0, 10, 0)); + JPanel createTree = TableLayoutHelper.createGapTableLayoutPane(new Component[][]{ + new Component[]{new UILabel(Inter.getLocText("FR-Designer_Create_Tree")), accessibleTreeModelEditor}}, TableLayoutHelper.FILL_LASTCOLUMN, IntervalConstants.INTERVAL_W2, IntervalConstants.INTERVAL_L1); + createTree.setBorder(BorderFactory.createEmptyBorder(0, 0, 10, 0)); JPanel contentPane = FRGUIPaneFactory.createBorderLayout_L_Pane(); JPanel contenter = FRGUIPaneFactory.createBorderLayout_S_Pane(); diff --git a/designer/src/com/fr/design/widget/ui/WaterMarkDictPane.java b/designer/src/com/fr/design/widget/ui/WaterMarkDictPane.java index 1bfcb06337..1d8f347a7a 100644 --- a/designer/src/com/fr/design/widget/ui/WaterMarkDictPane.java +++ b/designer/src/com/fr/design/widget/ui/WaterMarkDictPane.java @@ -1,5 +1,6 @@ package com.fr.design.widget.ui; +import com.fr.design.designer.IntervalConstants; import com.fr.design.gui.ilable.UILabel; import com.fr.design.gui.itextfield.UITextField; import com.fr.design.layout.TableLayout; @@ -28,8 +29,8 @@ public class WaterMarkDictPane extends JPanel { double[] rowSize = {p}; double[] columnSize = {p, f}; int[][] rowCount = {{1, 1}}; - JPanel panel = TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, rowCount, 18, 7); - panel.setBorder(BorderFactory.createEmptyBorder(10, 0, 0, 0)); + JPanel panel = TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, rowCount, IntervalConstants.INTERVAL_W3, IntervalConstants.INTERVAL_L1); +// panel.setBorder(BorderFactory.createEmptyBorder(10, 0, 0, 0)); this.add(panel, BorderLayout.CENTER); } diff --git a/designer/src/com/fr/design/widget/ui/WriteUnableRepeatEditorPane.java b/designer/src/com/fr/design/widget/ui/WriteUnableRepeatEditorPane.java index ffcf947a93..a81f7f7732 100644 --- a/designer/src/com/fr/design/widget/ui/WriteUnableRepeatEditorPane.java +++ b/designer/src/com/fr/design/widget/ui/WriteUnableRepeatEditorPane.java @@ -5,6 +5,7 @@ import java.awt.*; import javax.swing.BorderFactory; import javax.swing.JPanel; +import com.fr.design.designer.IntervalConstants; import com.fr.design.gui.icheckbox.UICheckBox; import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.layout.TableLayout; @@ -36,8 +37,7 @@ public abstract class WriteUnableRepeatEditorPane extends Butt {new UILabel(Inter.getLocText("FR-Designer_Button-Hotkeys")), hotkeysTextField = new UITextField()}, }; hotkeysTextField.setToolTipText(StableUtils.join(ButtonConstants.HOTKEYS, ",")); - JPanel panel = TableLayoutHelper.createGapTableLayoutPane(n_components, rowSize, columnSize, IntervalConstants.INTERVAL_L2, IntervalConstants.INTERVAL_L1); + JPanel panel = TableLayoutHelper.createGapTableLayoutPane(n_components, rowSize, columnSize, IntervalConstants.INTERVAL_W1, IntervalConstants.INTERVAL_L1); panel.setBorder(BorderFactory.createEmptyBorder(10, 0, 0, 0)); advancePane.add(panel, BorderLayout.NORTH); Component comp = createCenterPane(); diff --git a/designer_base/src/com/fr/design/widget/component/BackgroundCompPane.java b/designer_base/src/com/fr/design/widget/component/BackgroundCompPane.java index fef58a2ac4..e534521706 100644 --- a/designer_base/src/com/fr/design/widget/component/BackgroundCompPane.java +++ b/designer_base/src/com/fr/design/widget/component/BackgroundCompPane.java @@ -32,7 +32,6 @@ public abstract class BackgroundCompPane extends BasicPane { public void initComponent() { this.setLayout(FRGUIPaneFactory.createBorderLayout()); UILabel headLabel = createUILable(); - headLabel.setPreferredSize(new Dimension(50, 20)); initalBackgroundEditor = new AccessibleImgBackgroundEditor(); overBackgroundEditor = new AccessibleImgBackgroundEditor(); clickBackgroundEditor = new AccessibleImgBackgroundEditor(); @@ -48,10 +47,11 @@ public abstract class BackgroundCompPane extends BasicPane { new Component[]{new UILabel(Inter.getLocText("FR-Designer_Background-Over")), overBackgroundEditor}, new Component[]{new UILabel(Inter.getLocText("FR-Designer_Background-Click")), clickBackgroundEditor}, }; - panel = TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, rowCount, IntervalConstants.INTERVAL_L2, IntervalConstants.INTERVAL_L1); + panel = TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, rowCount, IntervalConstants.INTERVAL_W0, IntervalConstants.INTERVAL_L1); panel.setBorder(BorderFactory.createEmptyBorder(IntervalConstants.INTERVAL_L6, IntervalConstants.INTERVAL_L5, 0, 0)); backgroundHead = new UIButtonGroup(titles); - JPanel headPane = TableLayoutHelper.createGapTableLayoutPane(new Component[][]{new Component[]{headLabel, backgroundHead}}, TableLayoutHelper.FILL_LASTCOLUMN, IntervalConstants.INTERVAL_L2, 7); + JPanel headPane = TableLayoutHelper.createGapTableLayoutPane(new Component[][]{ + new Component[]{headLabel, backgroundHead}}, TableLayoutHelper.FILL_LASTCOLUMN, IntervalConstants.INTERVAL_W3, IntervalConstants.INTERVAL_L1); this.add(headPane, BorderLayout.NORTH); this.add(panel, BorderLayout.CENTER); diff --git a/designer_base/src/com/fr/design/widget/component/CheckBoxDictPane.java b/designer_base/src/com/fr/design/widget/component/CheckBoxDictPane.java index 506b637e95..eed4b7fbf0 100644 --- a/designer_base/src/com/fr/design/widget/component/CheckBoxDictPane.java +++ b/designer_base/src/com/fr/design/widget/component/CheckBoxDictPane.java @@ -35,11 +35,11 @@ public class CheckBoxDictPane extends JPanel { endComboBox = new DictionaryComboBox(DictionaryConstants.symbols, DictionaryConstants.symbolDisplays); endComboBox.setEditable(true); Component[][] components = new Component[][]{ - new Component[]{new UILabel(Inter.getLocText("Form-Delimiter") + ":"), delimiterComboBox}, - new Component[]{new UILabel(Inter.getLocText("ComboCheckBox-Start_Symbol") + ":"),startComboBox}, - new Component[]{new UILabel(Inter.getLocText("ComboCheckBox-End_Symbol") + ":"),endComboBox} + new Component[]{new UILabel(Inter.getLocText("Form-Delimiter")), delimiterComboBox}, + new Component[]{new UILabel(Inter.getLocText("ComboCheckBox-Start_Symbol")),startComboBox}, + new Component[]{new UILabel(Inter.getLocText("ComboCheckBox-End_Symbol")),endComboBox} }; - returnStringPane = TableLayoutHelper.createGapTableLayoutPane(components, TableLayoutHelper.FILL_LASTCOLUMN, IntervalConstants.INTERVAL_L2, IntervalConstants.INTERVAL_L1); + returnStringPane = TableLayoutHelper.createGapTableLayoutPane(components, TableLayoutHelper.FILL_LASTCOLUMN, IntervalConstants.INTERVAL_W2, IntervalConstants.INTERVAL_L1); returnTypeComboBox = new UIButtonGroup(new String[]{Inter.getLocText("Widget-Array"), Inter.getLocText("String")}); returnTypeComboBox.addActionListener(new ActionListener() { @@ -48,7 +48,8 @@ public class CheckBoxDictPane extends JPanel { checkVisible(returnTypeComboBox.getSelectedIndex()); } }); - JPanel headPane = TableLayoutHelper.createGapTableLayoutPane(new Component[][]{new Component[]{new UILabel(Inter.getLocText("Widget-Date_Selector_Return_Type") + ":"), returnTypeComboBox}}, TableLayoutHelper.FILL_LASTCOLUMN, 18, 7); + JPanel headPane = TableLayoutHelper.createGapTableLayoutPane( + new Component[][]{new Component[]{new UILabel(Inter.getLocText("Widget-Date_Selector_Return_Type")), returnTypeComboBox}}, TableLayoutHelper.FILL_LASTCOLUMN, IntervalConstants.INTERVAL_L2, IntervalConstants.INTERVAL_L1); JPanel jPanel = FRGUIPaneFactory.createBorderLayout_S_Pane(); jPanel.add(headPane, BorderLayout.NORTH); jPanel.add(returnStringPane, BorderLayout.CENTER); diff --git a/designer_form/src/com/fr/design/mainframe/widget/ui/FormBasicWidgetPropertyPane.java b/designer_form/src/com/fr/design/mainframe/widget/ui/FormBasicWidgetPropertyPane.java index 8fd6c8b00f..dd2f15af62 100644 --- a/designer_form/src/com/fr/design/mainframe/widget/ui/FormBasicWidgetPropertyPane.java +++ b/designer_form/src/com/fr/design/mainframe/widget/ui/FormBasicWidgetPropertyPane.java @@ -21,10 +21,12 @@ public class FormBasicWidgetPropertyPane extends FormBasicPropertyPane { protected void initOtherPane() { JPanel pane2 = FRGUIPaneFactory.createY_AXISBoxInnerContainer_M_Pane(); - pane2.setBorder(BorderFactory.createEmptyBorder(0,0,10,0)); + pane2.setBorder(BorderFactory.createEmptyBorder(0, 0, 10, 0)); enableCheckBox = new UICheckBox(Inter.getLocText("Enabled"), true); + enableCheckBox.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0)); pane2.add(enableCheckBox); visibleCheckBox = new UICheckBox(Inter.getLocText("Widget-Visible"), true); + visibleCheckBox.setBorder(BorderFactory.createEmptyBorder(10, 0, 0, 0)); pane2.add(visibleCheckBox); this.add(pane2, BorderLayout.CENTER); } diff --git a/designer_form/src/com/fr/design/parameter/RootDesignDefinePane.java b/designer_form/src/com/fr/design/parameter/RootDesignDefinePane.java index 6cb07d4f04..3a93e4feca 100644 --- a/designer_form/src/com/fr/design/parameter/RootDesignDefinePane.java +++ b/designer_form/src/com/fr/design/parameter/RootDesignDefinePane.java @@ -66,7 +66,7 @@ public class RootDesignDefinePane extends AbstractDataModify { Component[][] components = new Component[][]{ new Component[]{new UILabel(Inter.getLocText("Form-Desin_Width")), designerWidth}, }; - JPanel panel = TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, rowCount, IntervalConstants.INTERVAL_L2, IntervalConstants.INTERVAL_L1); + JPanel panel = TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, rowCount, IntervalConstants.INTERVAL_W1, IntervalConstants.INTERVAL_L1); JPanel jPanel = FRGUIPaneFactory.createBorderLayout_S_Pane(); panel.setBorder(BorderFactory.createEmptyBorder(10, 0, 10, 0)); jPanel.add(panel); @@ -98,7 +98,7 @@ public class RootDesignDefinePane extends AbstractDataModify { new Component[]{useParamsTemplate, null}, new Component[]{new UILabel(Inter.getLocText("FR-Designer_WidgetDisplyPosition")), hAlignmentPane} }; - JPanel panel = TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, rowCount, IntervalConstants.INTERVAL_L2, IntervalConstants.INTERVAL_L1); + JPanel panel = TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, rowCount, IntervalConstants.INTERVAL_W0, IntervalConstants.INTERVAL_L1); panel.setBorder(BorderFactory.createEmptyBorder(IntervalConstants.INTERVAL_L1, 0, IntervalConstants.INTERVAL_L1, 0)); jPanel.add(panel); return jPanel; diff --git a/designer_form/src/com/fr/design/widget/ui/designer/ButtonDefinePane.java b/designer_form/src/com/fr/design/widget/ui/designer/ButtonDefinePane.java index 5d5d093b12..d0ed62b0a7 100644 --- a/designer_form/src/com/fr/design/widget/ui/designer/ButtonDefinePane.java +++ b/designer_form/src/com/fr/design/widget/ui/designer/ButtonDefinePane.java @@ -1,5 +1,6 @@ package com.fr.design.widget.ui.designer; +import com.fr.design.designer.IntervalConstants; import com.fr.design.designer.creator.XCreator; import com.fr.design.foldablepane.UIExpandablePane; import com.fr.design.gui.ilable.UILabel; @@ -52,7 +53,7 @@ public abstract class ButtonDefinePane extends AbstractDataMod {new UILabel(Inter.getLocText("FR-Designer_Button-Hotkeys")), hotkeysTextField} }; hotkeysTextField.setToolTipText(StableUtils.join(ButtonConstants.HOTKEYS, ",")); - JPanel panel = TableLayoutHelper.createGapTableLayoutPane(n_components, rowSize, columnSize, rowCount, 10, 10); + JPanel panel = TableLayoutHelper.createGapTableLayoutPane(n_components, rowSize, columnSize, rowCount, IntervalConstants.INTERVAL_W1, IntervalConstants.INTERVAL_L1); JPanel boundsPane = FRGUIPaneFactory.createBorderLayout_S_Pane(); panel.setBorder(BorderFactory.createEmptyBorder(10, 0, 0, 0)); boundsPane.add(panel); diff --git a/designer_form/src/com/fr/design/widget/ui/designer/CheckBoxDefinePane.java b/designer_form/src/com/fr/design/widget/ui/designer/CheckBoxDefinePane.java index fd84442462..ab65dbda6f 100644 --- a/designer_form/src/com/fr/design/widget/ui/designer/CheckBoxDefinePane.java +++ b/designer_form/src/com/fr/design/widget/ui/designer/CheckBoxDefinePane.java @@ -1,5 +1,6 @@ package com.fr.design.widget.ui.designer; +import com.fr.design.designer.IntervalConstants; import com.fr.design.designer.creator.XCreator; import com.fr.design.foldablepane.UIExpandablePane; import com.fr.design.gui.ilable.UILabel; @@ -43,7 +44,7 @@ public class CheckBoxDefinePane extends AbstractDataModify { double[] rowSize = {p, p, p, p, p, p}; double[] columnSize = {p, f}; int[][] rowCount = {{1, 1},{1, 1}, {1, 3},{1, 1}}; - JPanel panel = TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, rowCount, 10, 7); + JPanel panel = TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, rowCount, IntervalConstants.INTERVAL_W1, IntervalConstants.INTERVAL_L1); JPanel boundsPane = FRGUIPaneFactory.createBorderLayout_S_Pane(); panel.setBorder(BorderFactory.createEmptyBorder(10, 0, 10, 0)); boundsPane.add(panel); diff --git a/designer_form/src/com/fr/design/widget/ui/designer/CheckBoxGroupDefinePane.java b/designer_form/src/com/fr/design/widget/ui/designer/CheckBoxGroupDefinePane.java index 15ed7b1042..1ffee293a5 100644 --- a/designer_form/src/com/fr/design/widget/ui/designer/CheckBoxGroupDefinePane.java +++ b/designer_form/src/com/fr/design/widget/ui/designer/CheckBoxGroupDefinePane.java @@ -1,6 +1,7 @@ package com.fr.design.widget.ui.designer; import com.fr.design.data.DataCreatorUI; +import com.fr.design.designer.IntervalConstants; import com.fr.design.designer.creator.XCreator; import com.fr.design.gui.icheckbox.UICheckBox; import com.fr.design.layout.TableLayout; @@ -50,8 +51,7 @@ public class CheckBoxGroupDefinePane extends ButtonGroupDefinePane public JPanel createOtherPane(){ supportTagCheckBox = new UICheckBox(Inter.getLocText("Form-SupportTag"), true); + supportTagCheckBox.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0)); checkBoxDictPane = new CheckBoxDictPane(); double f = TableLayout.FILL; @@ -49,8 +51,7 @@ public class ComboCheckBoxDefinePane extends DictEditorDefinePane double[] rowSize = {p, p}; double[] columnSize = {p, f}; int[][] rowCount = {{1, 1},{1, 1}}; - JPanel panel = TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, rowCount, 10, 7); - panel.setBorder(BorderFactory.createEmptyBorder(0, 0, 10, 0)); + JPanel panel = TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, rowCount, IntervalConstants.INTERVAL_L2, IntervalConstants.INTERVAL_L1); return panel; } diff --git a/designer_form/src/com/fr/design/widget/ui/designer/CustomWritableRepeatEditorPane.java b/designer_form/src/com/fr/design/widget/ui/designer/CustomWritableRepeatEditorPane.java index 96b4cc46a6..a962078715 100644 --- a/designer_form/src/com/fr/design/widget/ui/designer/CustomWritableRepeatEditorPane.java +++ b/designer_form/src/com/fr/design/widget/ui/designer/CustomWritableRepeatEditorPane.java @@ -1,6 +1,5 @@ package com.fr.design.widget.ui.designer; -import com.fr.base.GraphHelper; import com.fr.design.designer.creator.XCreator; import com.fr.design.gui.icheckbox.UICheckBox; import com.fr.design.utils.gui.GUICoreUtils; @@ -18,8 +17,6 @@ import java.awt.*; public abstract class CustomWritableRepeatEditorPane extends WritableRepeatEditorPane { private UICheckBox customDataCheckBox; - private static final int CUSTOM_DATA_CHECK_BOX_WIDTH = GraphHelper.getLocTextWidth("Form-Allow_CustomData") + 30; - private static final int CUSTOM_DATA_CHECK_BOX_HEIGHT = 30; public CustomWritableRepeatEditorPane(XCreator xCreator) { super(xCreator); @@ -28,9 +25,7 @@ public abstract class CustomWritableRepeatEditorPane(new String[] {Inter.getLocText("Date") , Inter.getLocText("String")}); JPanel formatHead = createFormatHead(); startDv = new DateValuePane(); @@ -78,9 +77,8 @@ public class DateEditorDefinePane extends DirectWriteEditorDefinePane e double[] rowSize = {p, p, p, p, p, p, p, p}; double[] columnSize = {p, f}; int[][] rowCount = {{1, 1},{1, 3},{1, 1},{1, 1},{1,1},{1,1}}; - JPanel panel = TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, rowCount, 10, 7); - panel.setBorder(BorderFactory.createEmptyBorder(10, 0, 0, 0)); + JPanel panel = TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, rowCount, IntervalConstants.INTERVAL_W1, IntervalConstants.INTERVAL_L1); +// panel.setBorder(BorderFactory.createEmptyBorder(10, 0, 0, 0)); advancePane.add(panel, BorderLayout.NORTH); JPanel otherPane = createOtherPane(); if(otherPane != null){ @@ -75,9 +76,8 @@ public abstract class DirectWriteEditorDefinePane e directWriteCheckBox = new UICheckBox(Inter.getLocText("Form-Allow_Edit"), false); directWriteCheckBox.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0)); JPanel otherContentPane = FRGUIPaneFactory.createY_AXISBoxInnerContainer_S_Pane(); - otherContentPane.setBorder(BorderFactory.createEmptyBorder(10, 0, 10, 0)); + otherContentPane.setBorder(BorderFactory.createEmptyBorder(0, 0, 10, 0)); JPanel jPanel = GUICoreUtils.createFlowPane(new JComponent[]{directWriteCheckBox}, FlowLayout.LEFT, 0); - jPanel.setPreferredSize(new Dimension(220, 30)); otherContentPane.add(jPanel); return otherContentPane; } diff --git a/designer_form/src/com/fr/design/widget/ui/designer/FieldEditorDefinePane.java b/designer_form/src/com/fr/design/widget/ui/designer/FieldEditorDefinePane.java index f6eac1df8e..8392ac2b6c 100644 --- a/designer_form/src/com/fr/design/widget/ui/designer/FieldEditorDefinePane.java +++ b/designer_form/src/com/fr/design/widget/ui/designer/FieldEditorDefinePane.java @@ -43,8 +43,11 @@ public abstract class FieldEditorDefinePane extends Abstr fontSizePane = new UISpinner(0, 20, 1, 0); errorMsgTextField = new UITextField(); JPanel contentPane = this.setFirstContentPane(); + JPanel jPanel = FRGUIPaneFactory.createBorderLayout_S_Pane(); + jPanel.add(contentPane, BorderLayout.CENTER); + contentPane.setBorder(BorderFactory.createEmptyBorder(10, 0, 10, 0)); if (contentPane != null) { - UIExpandablePane uiExpandablePane = new UIExpandablePane(Inter.getLocText("FR-Designer_Advanced"), 280, 20, contentPane); + UIExpandablePane uiExpandablePane = new UIExpandablePane(Inter.getLocText("FR-Designer_Advanced"), 280, 20, jPanel); this.add(uiExpandablePane, BorderLayout.NORTH); } this.addValidatePane(); @@ -110,7 +113,7 @@ public abstract class FieldEditorDefinePane extends Abstr final UILabel uiLabel = new UILabel(Inter.getLocText("FR-Designer_Widget_Error_Tip")); JPanel borderPane = FRGUIPaneFactory.createBorderLayout_S_Pane(); final JPanel errorTipPane = TableLayoutHelper.createGapTableLayoutPane(new Component[][]{new Component[]{uiLabel, errorMsgTextField}}, TableLayoutHelper.FILL_LASTCOLUMN, IntervalConstants.INTERVAL_L1, LayoutConstants.VGAP_MEDIUM); - errorTipPane.setBorder(BorderFactory.createEmptyBorder(0, IntervalConstants.INTERVAL_L5, 0, 0)); + errorTipPane.setBorder(BorderFactory.createEmptyBorder(IntervalConstants.INTERVAL_L6, IntervalConstants.INTERVAL_L5, 0, 0)); borderPane.add(errorTipPane, BorderLayout.CENTER); allowBlankCheckBox.addItemListener(new ItemListener() { @Override @@ -124,7 +127,7 @@ public abstract class FieldEditorDefinePane extends Abstr new Component[]{allowBlankCheckBox}, new Component[]{borderPane}, }; - JPanel panel = TableLayoutHelper.createGapTableLayoutPane(components, TableLayoutHelper.FILL_LASTCOLUMN, IntervalConstants.INTERVAL_L6, IntervalConstants.INTERVAL_L6); + JPanel panel = TableLayoutHelper.createGapTableLayoutPane(components, TableLayoutHelper.FILL_LASTCOLUMN, IntervalConstants.INTERVAL_L6, 0); panel.setBorder(BorderFactory.createEmptyBorder(IntervalConstants.INTERVAL_L1, 0, IntervalConstants.INTERVAL_L1, 0)); validatePane.add(panel, BorderLayout.NORTH); JPanel contentPane = this.setValidatePane(); diff --git a/designer_form/src/com/fr/design/widget/ui/designer/LabelDefinePane.java b/designer_form/src/com/fr/design/widget/ui/designer/LabelDefinePane.java index 30d703aee5..2cf3c72bb6 100644 --- a/designer_form/src/com/fr/design/widget/ui/designer/LabelDefinePane.java +++ b/designer_form/src/com/fr/design/widget/ui/designer/LabelDefinePane.java @@ -1,6 +1,7 @@ package com.fr.design.widget.ui.designer; import com.fr.base.BaseUtils; +import com.fr.design.designer.IntervalConstants; import com.fr.design.designer.creator.XCreator; import com.fr.design.foldablepane.UIExpandablePane; import com.fr.design.gui.ibutton.UIButtonGroup; @@ -44,7 +45,10 @@ public class LabelDefinePane extends AbstractDataModify