Browse Source

Merge pull request #49 in BA/design from ~ZACK/design:dev to dev

* commit '0f2680faea0490031ba74d81d4b36e70e157f4bd':
  数据集分组接口修改
  数据集分组插件需要改一下frame加载顺序
master
richie 9 years ago
parent
commit
03295b96b8
  1. 41
      designer_base/src/com/fr/design/data/BasicTableDataTreePane.java
  2. 13
      designer_base/src/com/fr/design/data/datapane/TableDataTreePane.java
  3. 5
      designer_base/src/com/fr/design/fun/TableDataTreePaneProcessor.java
  4. 3
      designer_base/src/com/fr/design/gui/frpane/JTreeAutoBuildPane.java
  5. 19
      designer_base/src/com/fr/design/gui/icontainer/UIResizableContainer.java
  6. 15
      designer_base/src/com/fr/design/gui/itree/refreshabletree/RefreshableJTree.java
  7. 26
      designer_base/src/com/fr/design/mainframe/WestRegionContainerPane.java
  8. 6
      designer_base/src/com/fr/start/BaseDesigner.java
  9. 43
      designer_form/src/com/fr/design/gui/xpane/JTreeAutoBuildPane.java

41
designer_base/src/com/fr/design/data/BasicTableDataTreePane.java

@ -0,0 +1,41 @@
package com.fr.design.data;
import com.fr.design.data.datapane.TableDataTree;
import com.fr.design.data.tabledata.tabledatapane.AbstractTableDataPane;
import com.fr.design.mainframe.DockingView;
import javax.swing.*;
/**
* Coder: zack
* Date: 2016/4/22
* Time: 16:23
*/
public class BasicTableDataTreePane extends DockingView{
@Override
public void refreshDockingView() {
}
@Override
public String getViewTitle() {
return null;
}
@Override
public Icon getViewIcon() {
return null;
}
@Override
public Location preferredLocation() {
return null;
}
public void dgEdit(final AbstractTableDataPane<?> uPanel, String originalName) {
}
public TableDataTree getDataTree() {
return null;
}
}

13
designer_base/src/com/fr/design/data/datapane/TableDataTreePane.java

@ -6,7 +6,9 @@ import com.fr.base.TableData;
import com.fr.data.TableDataSource;
import com.fr.data.impl.storeproc.StoreProcedure;
import com.fr.design.DesignModelAdapter;
import com.fr.design.ExtraDesignClassManager;
import com.fr.design.actions.UpdateAction;
import com.fr.design.data.BasicTableDataTreePane;
import com.fr.design.data.DesignTableDataManager;
import com.fr.design.data.tabledata.ResponseDataSourceChange;
import com.fr.design.data.tabledata.StoreProcedureWorkerListener;
@ -18,6 +20,7 @@ import com.fr.design.data.tabledata.wrapper.TemplateTableDataWrapper;
import com.fr.design.dialog.BasicDialog;
import com.fr.design.dialog.BasicPane;
import com.fr.design.dialog.DialogActionAdapter;
import com.fr.design.fun.TableDataTreePaneProcessor;
import com.fr.design.gui.ibutton.UIHeadGroup;
import com.fr.design.gui.icontainer.UIScrollPane;
import com.fr.design.gui.itextfield.UITextField;
@ -26,7 +29,6 @@ import com.fr.design.gui.itree.refreshabletree.ExpandMutableTreeNode;
import com.fr.design.icon.IconPathConstants;
import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.mainframe.DesignerContext;
import com.fr.design.mainframe.DockingView;
import com.fr.design.menu.LineSeparator;
import com.fr.design.menu.MenuDef;
import com.fr.design.menu.SeparatorDef;
@ -50,7 +52,7 @@ import java.util.EventObject;
import java.util.HashMap;
import java.util.Map;
public class TableDataTreePane extends DockingView implements ResponseDataSourceChange {
public class TableDataTreePane extends BasicTableDataTreePane implements ResponseDataSourceChange {
protected static final int PROCEDURE_NAME_INDEX = 4;
protected static final int TEMPLATE_TABLE_DATA = 0;
@ -65,7 +67,12 @@ public class TableDataTreePane extends DockingView implements ResponseDataSource
* @param tc
* @return
*/
public synchronized static TableDataTreePane getInstance(DesignModelAdapter<?, ?> tc) {
public synchronized static BasicTableDataTreePane getInstance(DesignModelAdapter<?, ?> tc) {
TableDataTreePaneProcessor treePaneProcessor = ExtraDesignClassManager.getInstance().getTableDataTreePaneProcessor();
if (treePaneProcessor != null) {
return treePaneProcessor.createTableDataTreePane(tc);
}
if (singleton.tc == null) {
singleton.addMenuDef.clearShortCuts();
singleton.createAddMenuDef();

5
designer_base/src/com/fr/design/fun/TableDataTreePaneProcessor.java

@ -1,6 +1,7 @@
package com.fr.design.fun;
import com.fr.design.data.datapane.TableDataTreePane;
import com.fr.design.DesignModelAdapter;
import com.fr.design.data.BasicTableDataTreePane;
import com.fr.stable.fun.Level;
/**
@ -17,6 +18,6 @@ public interface TableDataTreePaneProcessor extends Level {
* 创建数据集面板
* @return 数据集面板
*/
TableDataTreePane createTableDataTreePane();
BasicTableDataTreePane createTableDataTreePane(DesignModelAdapter<?, ?> tc);
}

3
designer_base/src/com/fr/design/gui/frpane/JTreeAutoBuildPane.java

@ -1,6 +1,7 @@
package com.fr.design.gui.frpane;
import com.fr.base.Formula;
import com.fr.design.data.BasicTableDataTreePane;
import com.fr.design.data.DesignTableDataManager;
import com.fr.design.data.datapane.EditOrNewLabel;
import com.fr.design.data.datapane.TableDataTreePane;
@ -207,7 +208,7 @@ public class JTreeAutoBuildPane extends BasicPane implements PreviewLabel.Previe
public void edit(JPanel jPanel) {
RecursionTableData rtd = null;
String name = "";
TableDataTreePane tdtp = TableDataTreePane.getInstance(DesignModelAdapter.getCurrentModelAdapter());
BasicTableDataTreePane tdtp = TableDataTreePane.getInstance(DesignModelAdapter.getCurrentModelAdapter());
if (treeTableDataComboBox.getSelectedItem() == null) {
//新建
rtd = new RecursionTableData();

19
designer_base/src/com/fr/design/gui/icontainer/UIResizableContainer.java

@ -86,6 +86,25 @@ public class UIResizableContainer extends JPanel {
add(downPane);
add(verticalToolPane);
}
public UIResizableContainer(JComponent upPane, int direction) {
setBackground(UIConstants.NORMAL_BACKGROUND);
this.upPane = upPane;
this.direction = direction;
this.horizontToolPane = new HorizotalToolPane();
setLayout(containerLayout);
add(upPane);
add(horizontToolPane);
}
public void setDownPane(JComponent downPane) {
this.verticalToolPane = new VerticalToolPane();
this.downPane = downPane;
add(downPane);
add(verticalToolPane);
}
/**
* 将面板设置成最佳的宽度

15
designer_base/src/com/fr/design/gui/itree/refreshabletree/RefreshableJTree.java

@ -1,19 +1,18 @@
package com.fr.design.gui.itree.refreshabletree;
import javax.swing.*;
import javax.swing.event.TreeExpansionEvent;
import javax.swing.event.TreeExpansionListener;
import javax.swing.event.TreeWillExpandListener;
import javax.swing.tree.*;
import com.fr.general.NameObject;
import com.fr.design.constants.UIConstants;
import com.fr.design.gui.itooltip.UIToolTip;
import com.fr.design.gui.itree.checkboxtree.CheckBoxTree;
import com.fr.general.ComparatorUtils;
import com.fr.general.Inter;
import com.fr.general.NameObject;
import com.fr.stable.StringUtils;
import javax.swing.*;
import javax.swing.event.TreeExpansionEvent;
import javax.swing.event.TreeExpansionListener;
import javax.swing.event.TreeWillExpandListener;
import javax.swing.tree.*;
import java.awt.*;
import java.awt.event.MouseEvent;
@ -249,7 +248,7 @@ public abstract class RefreshableJTree extends CheckBoxTree {
isExpanded(selRow), getModel().isLeaf(lastPath), selRow,
true);
if (rComponent instanceof JComponent && rComponent.getPreferredSize().getWidth() + i * WIDTH_BETWEEN_NODES > getVisibleRect().getWidth()) {
if (r instanceof DefaultTreeCellRenderer && rComponent instanceof JComponent && rComponent.getPreferredSize().getWidth() + i * WIDTH_BETWEEN_NODES > getVisibleRect().getWidth()) {
tip = ((DefaultTreeCellRenderer) r).getText();
icon = ((DefaultTreeCellRenderer) r).getIcon();
}

26
designer_base/src/com/fr/design/mainframe/WestRegionContainerPane.java

@ -2,13 +2,11 @@ package com.fr.design.mainframe;
import com.fr.design.DesignModelAdapter;
import com.fr.design.DesignerEnvManager;
import com.fr.design.ExtraDesignClassManager;
import com.fr.design.data.datapane.TableDataTreePane;
import com.fr.design.fun.TableDataTreePaneProcessor;
import com.fr.design.gui.icontainer.UIResizableContainer;
import com.fr.general.GeneralContext;
import com.fr.stable.Constants;
import javax.swing.*;
import com.fr.stable.plugin.PluginReadListener;
public class WestRegionContainerPane extends UIResizableContainer {
@ -20,23 +18,21 @@ public class WestRegionContainerPane extends UIResizableContainer {
*/
public static final WestRegionContainerPane getInstance() {
if (THIS == null) {
TableDataTreePane tableDataTreePane = null;
TableDataTreePaneProcessor treePaneProcessor = ExtraDesignClassManager.getInstance().getTableDataTreePaneProcessor();
if (treePaneProcessor != null) {
tableDataTreePane = treePaneProcessor.createTableDataTreePane();
} else {
tableDataTreePane = TableDataTreePane.getInstance(DesignModelAdapter.getCurrentModelAdapter());
}
THIS = new WestRegionContainerPane(tableDataTreePane);
THIS = new WestRegionContainerPane();
THIS.setLastToolPaneY(DesignerEnvManager.getEnvManager().getLastWestRegionToolPaneY());
THIS.setLastContainerWidth(DesignerEnvManager.getEnvManager().getLastWestRegionContainerWidth());
}
return THIS;
}
public WestRegionContainerPane(JComponent pane) {
super(DesignerFrameFileDealerPane.getInstance(), pane, Constants.RIGHT);
public WestRegionContainerPane() {
super(DesignerFrameFileDealerPane.getInstance(), Constants.RIGHT);
GeneralContext.addPluginReadListener(new PluginReadListener() {
@Override
public void success() {
setDownPane(TableDataTreePane.getInstance(DesignModelAdapter.getCurrentModelAdapter()));
}
});
setContainerWidth(165);
}
}

6
designer_base/src/com/fr/start/BaseDesigner.java

@ -7,7 +7,6 @@ import com.fr.base.FRContext;
import com.fr.design.DesignerEnvManager;
import com.fr.design.ExtraDesignClassManager;
import com.fr.design.RestartHelper;
import com.fr.design.actions.server.PluginManagerAction;
import com.fr.design.dialog.BasicDialog;
import com.fr.design.extra.PluginManagerPane;
import com.fr.design.file.HistoryTemplateListPane;
@ -23,7 +22,10 @@ import com.fr.env.SignIn;
import com.fr.file.FILE;
import com.fr.file.FILEFactory;
import com.fr.file.FileFILE;
import com.fr.general.*;
import com.fr.general.ComparatorUtils;
import com.fr.general.FRLogger;
import com.fr.general.Inter;
import com.fr.general.ModuleContext;
import com.fr.plugin.PluginCollector;
import com.fr.stable.*;

43
designer_form/src/com/fr/design/gui/xpane/JTreeAutoBuildPane.java

@ -1,41 +1,38 @@
package com.fr.design.gui.xpane;
import java.awt.BorderLayout;
import java.awt.Component;
import java.awt.Dimension;
import java.awt.event.ItemEvent;
import java.awt.event.ItemListener;
import java.util.List;
import com.fr.design.gui.ilable.UILabel;
import javax.swing.JPanel;
import com.fr.base.Formula;
import com.fr.design.layout.TableLayoutHelper;
import com.fr.general.Inter;
import com.fr.data.impl.NameTableData;
import com.fr.data.impl.RecursionTableData;
import com.fr.data.impl.TableDataDictionary;
import com.fr.design.DesignModelAdapter;
import com.fr.design.data.BasicTableDataTreePane;
import com.fr.design.data.DesignTableDataManager;
import com.fr.design.data.datapane.EditOrNewLabel;
import com.fr.design.data.datapane.EditOrNewLabel.Editable;
import com.fr.design.data.datapane.TableDataTreePane;
import com.fr.design.data.datapane.TreeTableDataComboBox;
import com.fr.design.data.datapane.EditOrNewLabel.Editable;
import com.fr.data.impl.NameTableData;
import com.fr.data.impl.RecursionTableData;
import com.fr.data.impl.TableDataDictionary;
import com.fr.design.data.datapane.preview.PreviewLabel;
import com.fr.design.data.datapane.preview.PreviewLabel.Previewable;
import com.fr.design.data.tabledata.wrapper.TemplateTableDataWrapper;
import com.fr.design.data.tabledata.wrapper.AbstractTableDataWrapper;
import com.fr.design.data.tabledata.wrapper.TableDataWrapper;
import com.fr.design.DesignModelAdapter;
import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.layout.TableLayout;
import com.fr.design.data.tabledata.wrapper.TemplateTableDataWrapper;
import com.fr.design.dialog.BasicPane;
import com.fr.design.editor.ValueEditorPane;
import com.fr.design.editor.ValueEditorPaneFactory;
import com.fr.design.editor.editor.OldColumnIndexEditor;
import com.fr.design.editor.editor.Editor;
import com.fr.design.editor.editor.FormulaEditor;
import com.fr.design.editor.editor.OldColumnIndexEditor;
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.general.Inter;
import javax.swing.*;
import java.awt.*;
import java.awt.event.ItemEvent;
import java.awt.event.ItemListener;
import java.util.List;
public class JTreeAutoBuildPane extends BasicPane implements Previewable, Editable {
private TreeTableDataComboBox treeTableDataComboBox;
@ -176,7 +173,7 @@ public class JTreeAutoBuildPane extends BasicPane implements Previewable, Editab
public void edit(JPanel jPanel) {
RecursionTableData rtd = null;
String name = "";
TableDataTreePane tdtp = TableDataTreePane.getInstance(DesignModelAdapter.getCurrentModelAdapter());
BasicTableDataTreePane tdtp = TableDataTreePane.getInstance(DesignModelAdapter.getCurrentModelAdapter());
if (treeTableDataComboBox.getSelectedItem() == null) {
//新建
rtd = new RecursionTableData();

Loading…
Cancel
Save