Browse Source

Merging in latest from upstream (BA/design:refs/heads/dev)

* commit 'fdfef6ef0a18f049f9fee481c1b432ffd50fa754':
  REPORT-1095 超链平台内打开插件卸载后设计这边会看到fs_self这样的字符串,打开方式是枚举的,不需要最后的else的。修改一下
  获取plotTypePane标题名
  update
  在构建下拉框时,就考虑到是否处于切换模式
  update
  update
  模板参数触发界面更新
master
daniel 8 years ago
parent
commit
fcc61c8db0
  1. 3
      designer/src/com/fr/design/actions/report/ReportParameterAction.java
  2. 8
      designer_base/src/com/fr/design/beans/FurtherBasicBeanPane.java
  3. 12
      designer_base/src/com/fr/design/hyperlink/AbstractHyperlinkPane.java
  4. 14
      designer_base/src/com/fr/design/hyperlink/HyperlinkTargetFrame.java
  5. 8
      designer_chart/src/com/fr/design/ChartTypeInterfaceManager.java
  6. 5
      designer_chart/src/com/fr/design/chart/fun/IndependentChartUIProvider.java
  7. 8
      designer_chart/src/com/fr/design/chart/fun/impl/AbstractIndependentChartUIWithAPILevel.java
  8. 2
      designer_chart/src/com/fr/design/mainframe/chart/gui/ChartTypeButtonPane.java
  9. 23
      designer_chart/src/com/fr/design/mainframe/chart/gui/ChartTypePane.java

3
designer/src/com/fr/design/actions/report/ReportParameterAction.java

@ -21,7 +21,7 @@ import com.fr.main.parameter.ReportParameterAttr;
/**
* Report Parameter
*/
public class ReportParameterAction extends JWorkBookAction {
public class ReportParameterAction extends JWorkBookAction{
public ReportParameterAction(JWorkBook jwb) {
super(jwb);
@ -62,6 +62,7 @@ public class ReportParameterAction extends JWorkBookAction {
jwb.fireTargetModified();
jwb.updateReportParameterAttr();
jwb.populateReportParameterAttr();
}
});
parameterArrayDialog.setVisible(true);

8
designer_base/src/com/fr/design/beans/FurtherBasicBeanPane.java

@ -1,5 +1,7 @@
package com.fr.design.beans;
import com.fr.stable.StringUtils;
/**
*
* @author zhou
@ -17,8 +19,10 @@ public abstract class FurtherBasicBeanPane<T> extends BasicBeanPane<T> {
* title应该是一个属性不只是对话框的标题时用到与其他组件结合时也会用得到
* @return 绥化狂标题
*/
@Override
public abstract String title4PopupWindow();
@Deprecated
public String title4PopupWindow(){
return StringUtils.EMPTY;
}
/**
* 重置

12
designer_base/src/com/fr/design/hyperlink/AbstractHyperlinkPane.java

@ -115,17 +115,7 @@ public abstract class AbstractHyperlinkPane<T extends Hyperlink> extends BasicBe
@Override
public void populateBean(T link) {
String name = link.getTargetFrame();
if ("_self".equals(name)) {
targetFrameComboBox.setSelectedIndex(SELF);
} else if ("_dialog".equals(name)) {
targetFrameComboBox.setSelectedIndex(DIALOG);
} else if ("_blank".equals(name)) {
targetFrameComboBox.setSelectedIndex(NEW_WINDOW);
} else {
DefaultComboBoxModel model = (DefaultComboBoxModel) targetFrameComboBox.getModel();
model.addElement(name);
targetFrameComboBox.setSelectedItem(name);
}
targetFrameComboBox.setSelectedIndex(HyperlinkTargetFrame.convert(name));
heightTextFiled.setText(String.valueOf(link.getHeight() == 0 ? DEFAULT_H_VALUE : link.getHeight()));
widthTextFiled.setText(String.valueOf(link.getWidth() == 0 ? DEFAULT_V_VALUE : link.getWidth()));
populateSubHyperlinkBean(link);

14
designer_base/src/com/fr/design/hyperlink/HyperlinkTargetFrame.java

@ -1,5 +1,7 @@
package com.fr.design.hyperlink;
import com.fr.general.ComparatorUtils;
/**
* Created by ibm on 2016/10/13.
*/
@ -27,6 +29,18 @@ public enum HyperlinkTargetFrame {
return BLANK_FRAME;
}
public static int convert(String name) {
if (arrayOfValues == null) {
arrayOfValues = HyperlinkTargetFrame.values();
}
for (HyperlinkTargetFrame hyperlinkTargetFrame : HyperlinkTargetFrame.values()) {
if (ComparatorUtils.equals(hyperlinkTargetFrame.getName(), name)) {
return hyperlinkTargetFrame.getIndex();
}
}
return BLANK_FRAME.getIndex();
}
public int getIndex() {
return index;

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

@ -260,7 +260,7 @@ public class ChartTypeInterfaceManager extends XMLFileManager implements ExtraCh
while (iterator.hasNext()){
Map.Entry entry = (Map.Entry) iterator.next();
IndependentChartUIProvider provider = (IndependentChartUIProvider) entry.getValue();
names[i++] = provider.getPlotTypePane().title4PopupWindow();
names[i++] = provider.getPlotTypeTitle4PopupWindow();
}
return names;
}
@ -275,7 +275,7 @@ public class ChartTypeInterfaceManager extends XMLFileManager implements ExtraCh
public String getTitle4PopupWindow(String priority, String plotID){
if (chartTypeInterfaces != null && chartTypeInterfaces.containsKey(priority) && chartTypeInterfaces.get(priority).containsKey(plotID)){
IndependentChartUIProvider provider = chartTypeInterfaces.get(priority).get(plotID);
return provider.getPlotTypePane().title4PopupWindow();
return provider.getPlotTypeTitle4PopupWindow();
}
//兼容老的插件
@ -285,7 +285,7 @@ public class ChartTypeInterfaceManager extends XMLFileManager implements ExtraCh
Map.Entry entry = (Map.Entry) iterator.next();
String defaultPriority = (String) entry.getKey();
if (chartTypeInterfaces.get(defaultPriority).containsKey(plotID)) {
return chartTypeInterfaces.get(defaultPriority).get(plotID).getPlotTypePane().title4PopupWindow();
return chartTypeInterfaces.get(defaultPriority).get(plotID).getPlotTypeTitle4PopupWindow();
}
}
}
@ -333,7 +333,7 @@ public class ChartTypeInterfaceManager extends XMLFileManager implements ExtraCh
while (chartUI.hasNext()) {
Map.Entry chartUIEntry = (Map.Entry) chartUI.next();
IndependentChartUIProvider provider = (IndependentChartUIProvider) chartUIEntry.getValue();
names[index++] = provider.getPlotTypePane().title4PopupWindow();
names[index++] = provider.getPlotTypeTitle4PopupWindow();
}
return index;
}

5
designer_chart/src/com/fr/design/chart/fun/IndependentChartUIProvider.java

@ -84,5 +84,10 @@ public interface IndependentChartUIProvider extends Level {
*/
String getIconPath();
/**
* plot面板的标题
*/
String getPlotTypeTitle4PopupWindow();
}

8
designer_chart/src/com/fr/design/chart/fun/impl/AbstractIndependentChartUIWithAPILevel.java

@ -57,4 +57,12 @@ public abstract class AbstractIndependentChartUIWithAPILevel implements Independ
public ConditionAttributesPane getPlotConditionPane(Plot plot){
return new DataSeriesConditionPane();
}
/**
* plot面板的标题
* 插件兼容
*/
public String getPlotTypeTitle4PopupWindow(){
return getPlotTypePane().title4PopupWindow();
}
}

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

@ -138,7 +138,7 @@ public class ChartTypeButtonPane extends BasicBeanPane<ChartCollection> implemen
private void checkoutChange(){
editingCollection.calculateMultiChartMode();
if (parent != null){
parent.reactorChartTypePane(editingCollection);
parent.relayoutChartTypePane(editingCollection);
}
//检查是否可以配置切换
configButton.setEnabled(editingCollection.changeEnable());

23
designer_chart/src/com/fr/design/mainframe/chart/gui/ChartTypePane.java

@ -68,8 +68,13 @@ public class ChartTypePane extends AbstractChartAttrPane{
buttonPane = new ChartTypeButtonPane(this);
content.add(buttonPane, BorderLayout.NORTH);
chartTypePane = new ComboBoxPane();
if (editingCollection != null) {
relayoutChartTypePane(editingCollection);
}else {
chartTypePane = new ComboBoxPane();
}
BasicScrollPane scrollPane = new BasicScrollPane() {
@Override
protected JPanel createContentPane() {
@ -192,7 +197,7 @@ public class ChartTypePane extends AbstractChartAttrPane{
});
}
public void reactor(ChartCollection collection){
public void relayout(ChartCollection collection){
//重构需要重构下拉框选项和cardNames
Chart chart = collection.getSelectedChart();
String chartID = chart.getPriority();
@ -278,9 +283,9 @@ public class ChartTypePane extends AbstractChartAttrPane{
}
public void reactorChartTypePane(ChartCollection collection){
if (needReactor(collection)) {
chartTypePane.reactor(collection);
public void relayoutChartTypePane(ChartCollection collection){
if (needRelayout(collection)) {
chartTypePane.relayout(collection);
//设置面板切换状态
updatePaneState(collection);
}
@ -292,7 +297,7 @@ public class ChartTypePane extends AbstractChartAttrPane{
}
// TODO: 2016/11/17 因为现在populate面板时会重新构造面板,所以每次都需要重构
private boolean needReactor(ChartCollection collection) {
private boolean needRelayout(ChartCollection collection) {
/*return paneState.getChartID() != collection.getRepresentChartID() || paneState.getPaneState() != collection.getState();*/
return true;
}
@ -301,14 +306,14 @@ public class ChartTypePane extends AbstractChartAttrPane{
* 更新界面属性 用于展示
*/
public void populate(ChartCollection collection) {
editingCollection = collection;
Chart chart = collection.getSelectedChart();
this.remove(leftContentPane);
initContentPane();
buttonPane.populateBean(collection);
chartTypePane.populateBean(chart);
//remove面板之后,就需要重构下拉框
reactorChartTypePane(collection);
this.initAllListeners();
}

Loading…
Cancel
Save