Browse Source

Merge branch 'release' of http://www.finedevelop.com:2015/scm/~xiaoxia/design into release

master
xiaoxia 8 years ago
parent
commit
651c390ef7
  1. 6
      designer/src/com/fr/design/widget/ui/TextFieldEditorDefinePane.java
  2. 18
      designer_base/src/com/fr/design/data/BasicTableDataTreePane.java
  3. 3
      designer_base/src/com/fr/design/data/datapane/TableDataTreePane.java
  4. 37
      designer_base/src/com/fr/design/gui/frpane/TreeSettingPane.java
  5. 23
      designer_base/src/com/fr/design/mainframe/toolbar/ToolBarMenuDock.java
  6. 2
      designer_chart/src/com/fr/design/ChartTypeInterfaceManager.java
  7. 13
      designer_chart/src/com/fr/design/chart/series/SeriesCondition/DataSeriesConditionPane.java
  8. 2
      designer_chart/src/com/fr/design/mainframe/chart/gui/style/ChartDatapointLabelPane.java
  9. 3
      designer_form/src/com/fr/design/designer/properties/WidgetPropertyTable.java
  10. 2
      designer_form/src/com/fr/design/mainframe/FormDesigner.java

6
designer/src/com/fr/design/widget/ui/TextFieldEditorDefinePane.java

@ -61,11 +61,7 @@ public class TextFieldEditorDefinePane extends FieldEditorDefinePane<TextEditor>
regPane.getRegComboBox().addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
RegExp regExp = (RegExp) regPane.getRegComboBox().getSelectedItem();
if (!StringUtils.isNotEmpty(regExp.toRegText())) {
getRegErrorMsgTextField().setEnabled(false);
} else {
getRegErrorMsgTextField().setEnabled(true);
}
getRegErrorMsgTextField().setEnabled(regExp.errorMessageEditable());
}
});

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

@ -118,7 +118,7 @@ public abstract class BasicTableDataTreePane extends DockingView implements Resp
if (StringUtils.isBlank(tempName)) {
nPanel.setShowText(Inter.getLocText(new String[]{"DS-TableData", "ISEMPTY", "PLEASE", "GIVE-NAME"}, new String[]{"", ",", "", "!"}));
dg.setButtonEnabled(false);
} else if (!ComparatorUtils.equals(oldName, tempName) && isDsNameRepeaded(tempName, allDSNames)) {
} else if (!ComparatorUtils.equals(oldName, tempName) && isDsNameRepeaded(tempName)) {
String[] waring = new String[]{"DS-TableData", "Utils-has_been_existed", "PLEASE", "Rename"};
String[] sign = new String[]{tempName, ",", "", "!"};
nPanel.setShowText(Inter.getLocText(waring, sign));
@ -324,20 +324,22 @@ public abstract class BasicTableDataTreePane extends DockingView implements Resp
private String createDsName(String prefix) {
int count = 1;
allDSNames = DesignTableDataManager.getAllDSNames(tc.getBook());
while (isDsNameRepeaded(prefix + count, allDSNames)) {
while (isDsNameRepeaded(prefix + count)) {
count++;
}
return prefix + count;
}
private boolean isDsNameRepeaded(String name, String[] names) {
boolean repeat = false;
for (int i = 0; i < names.length; i++) {
if (ComparatorUtils.equals(name, names[i])) {
repeat = true;
protected boolean isDsNameRepeaded(String name) {
if (allDSNames == null) {
allDSNames = DesignTableDataManager.getAllDSNames(tc.getBook());
}
for (int i = 0; i < allDSNames.length; i++) {
if (ComparatorUtils.equals(name, allDSNames[i])) {
return true;
}
}
return repeat;
return false;
}
protected KeyAdapter getTableTreeNodeListener(final UpdateAction editAction, final UpdateAction previewTableDataAction, final UpdateAction removeAction, final TableDataSourceOP op, final TableDataTree dataTree) {

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

@ -276,13 +276,14 @@ public class TableDataTreePane extends BasicTableDataTreePane {
* @param tableDataSource 数据集
*/
public void addTableData(String srcName, TableDataSource tableDataSource) {
allDSNames = DesignTableDataManager.getAllDSNames(tc.getBook());
DesignTableDataManager.setThreadLocal(DesignTableDataManager.NO_PARAMETER);
TableDataSource tds = tc.getBook();
Iterator tdIterator = tableDataSource.getTableDataNameIterator();
while (tdIterator.hasNext()) {
String tdName = (String) tdIterator.next();
TableData td = tableDataSource.getTableData(tdName);
if (tds.getTableData(tdName) != null) {//如果有同名的就拼上来源名称
if (tds.getTableData(tdName) != null || isDsNameRepeaded(tdName)) {//如果有同名的就拼上来源名称
tdName = srcName + tdName;
}
int i = 0;

37
designer_base/src/com/fr/design/gui/frpane/TreeSettingPane.java

@ -23,6 +23,7 @@ import javax.swing.*;
import java.awt.*;
import java.awt.event.ItemEvent;
import java.awt.event.ItemListener;
import java.util.Arrays;
public class TreeSettingPane extends BasicPane implements DataCreatorUI {
private JTreeControlPane controlPane;
@ -133,7 +134,7 @@ public class TreeSettingPane extends BasicPane implements DataCreatorUI {
for (LayerConfig layerConfig : layerConfigList) {
layerConfigs[i++] = layerConfig;
}
this.layerDataControlPane.populate(new NameObject("tree", layerConfigs));
this.layerDataControlPane.populate(new NameObject("Tree Layer Data", layerConfigs));
} else {
buildBox.setSelectedIndex(2);
}
@ -154,10 +155,12 @@ public class TreeSettingPane extends BasicPane implements DataCreatorUI {
if (buildBox.getSelectedIndex() == 1) {
TableDataDictionary dictionary = this.autoBuildPane.update();
te.setAutoBuild(true);
te.setLayerBuild(false);
te.setDictionary(dictionary);
te.setNodeOrDict(dictionary);
} else if (buildBox.getSelectedIndex() == 2) {
te.setAutoBuild(false);
te.setLayerBuild(false);
NameObject no = this.controlPane.update();
if (no != null) {
TreeEditor editor = (TreeEditor) no.getObject();
@ -174,6 +177,11 @@ public class TreeSettingPane extends BasicPane implements DataCreatorUI {
te.setNodeOrDict(editor.getTreeNodeAttr());
te.setPerformanceFirst(editor.isPerformanceFirst());
}
} else {
LayerConfig[] configs = (LayerConfig[]) layerDataControlPane.update().getObject();
te.setAutoBuild(false);
te.setLayerBuild(true);
te.setLayerConfigs(Arrays.asList(configs));
}
return te;
}
@ -206,15 +214,17 @@ public class TreeSettingPane extends BasicPane implements DataCreatorUI {
if (buildBox.getSelectedIndex() == 1) {
TableDataDictionary dictionary = this.autoBuildPane.update();
tcb.setAutoBuild(true);
tcb.setDictionary(dictionary);
tcb.setNodeOrDict(dictionary);
} else if (buildBox.getSelectedIndex() == 2) {
tcb.setAutoBuild(false);
NameObject no = this.controlPane.update();
if (no != null) {
if (no.getObject() instanceof TreeComboBoxEditor) {
return (TreeComboBoxEditor) no.getObject();
}
tcb.setLayerBuild(false);
tcb.setDictionary(dictionary);
tcb.setNodeOrDict(dictionary);
} else if (buildBox.getSelectedIndex() == 2) {
tcb.setAutoBuild(false);
tcb.setLayerBuild(false);
NameObject no = this.controlPane.update();
if (no != null) {
if (no.getObject() instanceof TreeComboBoxEditor) {
return (TreeComboBoxEditor) no.getObject();
}
TreeEditor editor = (TreeEditor) no.getObject();
tcb.setAllowBlank(editor.isAllowBlank());
@ -230,7 +240,12 @@ public class TreeSettingPane extends BasicPane implements DataCreatorUI {
tcb.setNodeOrDict(editor.getTreeNodeAttr());
tcb.setPerformanceFirst(editor.isPerformanceFirst());
}
}
}else {
LayerConfig[] configs = (LayerConfig[]) layerDataControlPane.update().getObject();
tcb.setAutoBuild(false);
tcb.setLayerBuild(true);
tcb.setLayerConfigs(Arrays.asList(configs));
}
return tcb;
}

23
designer_base/src/com/fr/design/mainframe/toolbar/ToolBarMenuDock.java

@ -138,8 +138,31 @@ public abstract class ToolBarMenuDock {
// 添加帮助菜单
menuList.add(createHelpMenuDef());
// 添加社区菜单
addCommunityMenuDef(menuList);
return menuList.toArray(new MenuDef[menuList.size()]);
}
public void addCommunityMenuDef(java.util.List<MenuDef> menuList){
Locale locale = FRContext.getLocale();
Locale [] locales =supportCommunityLocales();
for(int i = 0; i < locales.length; i++) {
if(locale.equals(locales[i])){
menuList.add(createCommunityMenuDef());
break;
}
}
}
public Locale[] supportCommunityLocales() {
return new Locale[]{
Locale.CHINA,
Locale.JAPAN,
Locale.TAIWAN,
Locale.US,
};
}
public void insertTemplateExtendMenu(ToolBarMenuDockPlus plus, MenuDef[] menuDefs) {
// 给菜单加插件入口

2
designer_chart/src/com/fr/design/ChartTypeInterfaceManager.java

@ -485,7 +485,7 @@ public class ChartTypeInterfaceManager extends XMLFileManager implements ExtraCh
extraChartDesignInterfaceList.add(tagName);
}
if (IndependentChartUIProvider.XML_TAG.equals(tagName)) {
addChartInterface(reader.getAttrAsString("class", ""), reader.getAttrAsString("priority", ChartTypeManager.CHART_PRIORITY),reader.getAttrAsString("plotID", ""), simplify);
addChartInterface(reader.getAttrAsString("class", ""), reader.getAttrAsString("priority", ChartTypeManager.DEFAULT_PRIORITY),reader.getAttrAsString("plotID", ""), simplify);
}
}
}

13
designer_chart/src/com/fr/design/chart/series/SeriesCondition/DataSeriesConditionPane.java

@ -27,13 +27,22 @@ import java.util.Iterator;
* Time : 上午9:16
*/
public class DataSeriesConditionPane extends ConditionAttributesPane<ConditionAttr> {
protected Plot plot;
public DataSeriesConditionPane() {
public DataSeriesConditionPane(Plot plot) {
this.plot = plot;
initAvailableActionList();
initComponents();
}
public void setPlot(Plot plot) {
this.plot = plot;
}
public DataSeriesConditionPane() {
this(null);
}
private void initAvailableActionList() {
addBasicAction();
addAxisPositionAction();

2
designer_chart/src/com/fr/design/mainframe/chart/gui/style/ChartDatapointLabelPane.java

@ -432,7 +432,7 @@ public class ChartDatapointLabelPane extends BasicPane{
this.percentFormatPane = new FormatPane();
}
if(this.percentFormat == null){
DecimalFormat defaultFormat = new CoreDecimalFormat(new DecimalFormat(), "#.##%");
DecimalFormat defaultFormat = new CoreDecimalFormat(new DecimalFormat("#.##%"), "#.##%");
percentFormatPane.populateBean(defaultFormat);
this.percentFormat = defaultFormat;
}

3
designer_form/src/com/fr/design/designer/properties/WidgetPropertyTable.java

@ -21,6 +21,7 @@ import com.fr.design.designer.creator.XLayoutContainer;
import com.fr.design.designer.creator.XWFitLayout;
import com.fr.design.designer.creator.XWParameterLayout;
import com.fr.design.designer.creator.cardlayout.XWCardLayout;
import com.fr.general.ComparatorUtils;
public class WidgetPropertyTable extends AbstractPropertyTable {
@ -71,7 +72,7 @@ public class WidgetPropertyTable extends AbstractPropertyTable {
if (size == 0 || size == 1) {
XCreator creator = size == 0 ? designer.getRootComponent() : designer.getSelectionModel().getSelection()
.getSelectedCreator();
if (designer.isRoot(creator)) {
if (ComparatorUtils.equals(creator, designer.getRootComponent())) {
groups = designer.getDesignerMode().createRootDesignerPropertyGroup();
} else {
groups = getCreatorPropertyGroup(designer, creator);

2
designer_form/src/com/fr/design/mainframe/FormDesigner.java

@ -853,7 +853,7 @@ public class FormDesigner extends TargetComponent<Form> implements TreeSelection
* @return 是则返回true
*/
public boolean isRoot(XCreator comp) {
return comp == rootComponent;
return comp == rootComponent || comp.acceptType(XWAbsoluteBodyLayout.class);
}
// 计算鼠标事件e所发生的位置相对根组件的位置关系

Loading…
Cancel
Save