Browse Source

Merge branch 'release/10.0' of http://code.fineres.com/scm/~harrison/design into release/10.0

feature/big-screen
Harrison 5 years ago
parent
commit
a9baef150c
  1. 5
      designer-base/src/main/java/com/fr/design/DesignerEnvManager.java
  2. 5
      designer-base/src/main/java/com/fr/design/EnvChangeEntrance.java
  3. 34
      designer-base/src/main/java/com/fr/design/data/datapane/ChoosePane.java
  4. 11
      designer-base/src/main/java/com/fr/design/data/datapane/TreeTableDataComboBox.java
  5. 5
      designer-base/src/main/java/com/fr/design/env/DesignerWorkspaceGenerator.java
  6. 101
      designer-base/src/main/java/com/fr/design/mainframe/mobile/ui/MobileStyleDefinePane.java
  7. 99
      designer-base/src/main/java/com/fr/design/mainframe/mobile/ui/MobileStyleFontConfigPane.java
  8. 23
      designer-base/src/main/java/com/fr/design/unit/UnitConvertUtil.java
  9. 4
      designer-base/src/main/java/com/fr/design/utils/DesignUtils.java
  10. 5
      designer-base/src/main/java/com/fr/design/utils/DesignerPort.java
  11. 4
      designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/style/ChartTextAttrPane.java
  12. 19
      designer-chart/src/main/java/com/fr/van/chart/map/designer/type/VanChartMapSourceChoosePane.java
  13. 2
      designer-form/src/main/java/com/fr/design/actions/FormMobileAttrAction.java
  14. 1
      designer-realize/src/main/java/com/fr/design/mainframe/ElementCasePaneDelegate.java
  15. 1
      designer-realize/src/main/java/com/fr/design/mainframe/form/FormElementCasePaneDelegate.java
  16. 3
      designer-realize/src/main/java/com/fr/design/report/RichTextPane.java
  17. 5
      designer-realize/src/main/java/com/fr/start/LifecycleFatalErrorHandler.java

5
designer-base/src/main/java/com/fr/design/DesignerEnvManager.java

@ -58,6 +58,7 @@ import javax.swing.SwingWorker.StateValue;
import java.awt.Color;
import java.awt.Rectangle;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.FileReader;
import java.io.FileWriter;
@ -206,9 +207,11 @@ public class DesignerEnvManager implements XMLReadable, XMLWriter {
GeneralContext.setLocale(designerEnvManager.getLanguage());
try {
XMLTools.readFileXML(designerEnvManager, designerEnvManager.getDesignerEnvFile());
} catch (Exception e) {
} catch (FileNotFoundException e) {
FineLoggerFactory.getLogger().error(e.getMessage(), e);
XmlHandler.Self.handle(e);
} catch (Exception e) {
FineLoggerFactory.getLogger().error(e.getMessage(), e);
}
// james:如果没有env定义,要设置一个默认的

5
designer-base/src/main/java/com/fr/design/EnvChangeEntrance.java

@ -415,10 +415,7 @@ public class EnvChangeEntrance {
@Override
public void doOk() {
ProcessEventPipe pipe = FineProcessContext.getParentPipe();
if (FineProcessContext.getParentPipe() != null) {
pipe.fire(new CarryMessageEvent(ReportState.ACTIVE.getValue()));
}
FineProcessContext.getParentPipe().fire(new CarryMessageEvent(ReportState.ACTIVE.getValue()));
if (!envListOkAction(envListPane, PopTipStrategy.NOW)) {
DesignerExiter.getInstance().execute();
}

34
designer-base/src/main/java/com/fr/design/data/datapane/ChoosePane.java

@ -1,12 +1,10 @@
package com.fr.design.data.datapane;
import com.fr.base.BaseUtils;
import com.fr.base.TableData;
import com.fr.data.core.DataCoreUtils;
import com.fr.data.core.db.DBUtils;
import com.fr.data.core.db.TableProcedure;
import com.fr.data.core.db.dialect.DialectFactory;
import com.fr.data.impl.Connection;
import com.fr.data.impl.DBTableData;
import com.fr.data.operator.DataOperator;
import com.fr.design.DesignerEnvManager;
@ -37,6 +35,7 @@ import com.fr.general.IOUtils;
import com.fr.log.FineLoggerFactory;
import com.fr.stable.StringUtils;
import com.fr.workspace.WorkContext;
import com.fr.workspace.server.connection.DBConnectAuth;
import javax.swing.JList;
import javax.swing.JOptionPane;
@ -61,9 +60,10 @@ import java.awt.event.FocusEvent;
import java.awt.event.ItemEvent;
import java.awt.event.ItemListener;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Enumeration;
import java.util.List;
import java.util.Map;
import java.util.Set;
/**
* @author zhou
@ -210,10 +210,7 @@ public class ChoosePane extends BasicBeanPane<DataBaseItems> implements Refresha
@SuppressWarnings("unchecked")
protected void initDsNameComboBox() {
dsNameComboBox.setRefreshingModel(true);
ConnectionConfig connectionConfig = ConnectionConfig.getInstance();
List<String> dsList = new ArrayList<>();
dsList.addAll(connectionConfig.getConnections().keySet());
FilterableComboBoxModel dsNameComboBoxModel = new FilterableComboBoxModel(dsList);
FilterableComboBoxModel dsNameComboBoxModel = new FilterableComboBoxModel(getHasAuthConnections());
dsNameComboBox.setModel(dsNameComboBoxModel);
dsNameComboBox.setRefreshingModel(false);
}
@ -322,14 +319,31 @@ public class ChoosePane extends BasicBeanPane<DataBaseItems> implements Refresha
return null; // peter:选中了当前的零长度的节点,直接返回.
}
ConnectionConfig connectionConfig = ConnectionConfig.getInstance();
for (Map.Entry<String, Connection> entry : connectionConfig.getConnections().entrySet()) {
if (ComparatorUtils.equals(selectedDSName, entry.getKey())) {
return entry.getValue();
List<String> authConnections = getHasAuthConnections();
for (String name : authConnections) {
if (ComparatorUtils.equals(selectedDSName, name)) {
return connectionConfig.getConnection(name);
}
}
return null;
}
private List<String> getHasAuthConnections() {
List<String> authConnections = new ArrayList<>();
Set<String> allConnections = ConnectionConfig.getInstance().getConnections().keySet();
Collection<String> noAuthConnections = WorkContext.getCurrent().get(DBConnectAuth.class).getNoAuthConnections();
if (noAuthConnections == null) {
return authConnections;
}
for (String name : allConnections) {
if (!noAuthConnections.contains(name)) {
authConnections.add(name);
}
}
return authConnections;
}
/**
* 刷新没多大用而且要刷新也不是这儿刷新
*/

11
designer-base/src/main/java/com/fr/design/data/datapane/TreeTableDataComboBox.java

@ -2,6 +2,7 @@ package com.fr.design.data.datapane;
import com.fr.data.TableDataSource;
import com.fr.data.impl.RecursionTableData;
import com.fr.design.data.DesignTableDataManager;
import com.fr.design.data.tabledata.wrapper.ServerTableDataWrapper;
import com.fr.design.data.tabledata.wrapper.TableDataWrapper;
import com.fr.design.data.tabledata.wrapper.TemplateTableDataWrapper;
@ -70,8 +71,14 @@ public class TreeTableDataComboBox extends UIComboBox {
}
public void setSelectedTableDataByName(String name) {
TableDataWrapper tableDataWrappe = res_map.get(name);
this.getModel().setSelectedItem(tableDataWrappe);
TableDataWrapper tableDataWrapper;
if (res_map.get(name) != null) {
tableDataWrapper = res_map.get(name);
} else {
String changeName = DesignTableDataManager.getChangedDsNameByOldDsName(name);
tableDataWrapper = res_map.get(changeName);
}
this.getModel().setSelectedItem(tableDataWrapper);
}
@Override

5
designer-base/src/main/java/com/fr/design/env/DesignerWorkspaceGenerator.java vendored

@ -72,10 +72,7 @@ public class DesignerWorkspaceGenerator {
enum RemoteHandler {
SELF;
public static void handle(DesignerWorkspaceInfo config) {
ProcessEventPipe eventPipe = FineProcessContext.getParentPipe();
if (eventPipe != null) {
eventPipe.fire(new CarryMessageEvent(ReportState.STOP.getValue()));
}
FineProcessContext.getParentPipe().fire(new CarryMessageEvent(ReportState.STOP.getValue()));
StartErrorMessageCollector.getInstance().record(DesignerErrorMessage.REMOTE_DESIGN_NO_RESPONSE.getId(),
DesignerErrorMessage.REMOTE_DESIGN_NO_RESPONSE.getMessage(),
StringUtils.EMPTY);

101
designer-base/src/main/java/com/fr/design/mainframe/mobile/ui/MobileStyleDefinePane.java

@ -2,29 +2,53 @@ package com.fr.design.mainframe.mobile.ui;
import com.fr.base.background.ColorBackground;
import com.fr.design.beans.BasicBeanPane;
import com.fr.design.constants.LayoutConstants;
import com.fr.design.designer.IntervalConstants;
import com.fr.design.gui.icombobox.LineComboBox;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.gui.ispinner.UISpinner;
import com.fr.design.i18n.Toolkit;
import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.layout.TableLayoutHelper;
import com.fr.design.style.color.ColorSelectBox;
import com.fr.design.style.color.NewColorSelectBox;
import com.fr.design.utils.gui.GUICoreUtils;
import com.fr.form.ui.Widget;
import com.fr.form.ui.mobile.MobileStyle;
import com.fr.general.FRFont;
import com.fr.invoke.Reflect;
import com.fr.stable.Constants;
import javax.swing.*;
import javax.swing.JPanel;
import javax.swing.border.TitledBorder;
import javax.swing.event.ChangeEvent;
import javax.swing.event.ChangeListener;
import java.awt.*;
import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.Component;
import java.awt.Dimension;
import java.awt.FlowLayout;
import java.awt.Font;
public class MobileStyleDefinePane extends BasicBeanPane<MobileStyle> {
public class MobileStyleDefinePane extends BasicBeanPane<MobileStyle> {
private final static int[] BORDER_LINE_STYLE_ARRAY = new int[]{
Constants.LINE_NONE,
Constants.LINE_THIN, //1px
Constants.LINE_MEDIUM, //2px
Constants.LINE_THICK, //3px
};
private static final int NORMAL_COMBO_WIDTH = 152;
private Widget widget;
private MobileStyleCustomDefinePane customBeanPane;
private Class<? extends MobileStyle> mobileStyleClazz;
private ColorSelectBox colorSelectBox;
private Color titleColor = new Color(47, 142, 241);
private JPanel commomPane;
private LineComboBox borderType;
private NewColorSelectBox borderColor;
private UISpinner borderRadius;
private MobileStyleFontConfigPane fontConfigPane;
MobileStyleDefinePane(Widget widget, Class<? extends MobileStyleCustomDefinePane> customBeanPaneClass,
Class<? extends MobileStyle> mobileStyleClazz) {
@ -40,6 +64,14 @@ public class MobileStyleDefinePane extends BasicBeanPane<MobileStyle> {
if(ob.getBackground() != null) {
colorSelectBox.setSelectObject(((ColorBackground)ob.getBackground()).getColor());
}
borderType.setSelectedLineStyle(ob.getBorderType());
if (ob.getBorderColor() != null) {
borderColor.setSelectObject(ob.getBorderColor());
}
borderRadius.setValue(ob.getBorderRadius());
if (ob.getFont() != null) {
fontConfigPane.populateBean(ob.getFont());
}
}
@Override
@ -48,6 +80,10 @@ public class MobileStyleDefinePane extends BasicBeanPane<MobileStyle> {
this.widget.setMobileStyle(mobileStyle);
this.customBeanPane.updateBean();
mobileStyle.setBackground(ColorBackground.getInstance(colorSelectBox.getSelectObject()));
mobileStyle.setBorderType(borderType.getSelectedLineStyle());
mobileStyle.setBorderColor(borderColor.getSelectObject());
mobileStyle.setBorderRadius(borderRadius.getValue());
mobileStyle.setFont(fontConfigPane.updateBean());
return mobileStyle;
}
@ -64,7 +100,7 @@ public class MobileStyleDefinePane extends BasicBeanPane<MobileStyle> {
private void createGeneralPane() {
createPreviewPane();
createBackgroundPane();
createCommonPane();
}
private void createPreviewPane() {
@ -79,29 +115,49 @@ public class MobileStyleDefinePane extends BasicBeanPane<MobileStyle> {
}
}
private void createBackgroundPane() {
JPanel backgroundPane = new JPanel();
backgroundPane.setLayout(new FlowLayout(FlowLayout.LEFT, 10, 5));
backgroundPane.setPreferredSize(new Dimension(500, 65));
private void createCommonPane() {
TitledBorder titledBorder = createTitledBorder(Toolkit.i18nText("Fine-Design_Mobile_Common_Attribute"));
backgroundPane.setBorder(titledBorder);
commomPane = FRGUIPaneFactory.createVerticalFlowLayout_Pane(true, FlowLayout.LEADING, 0, 10);
commomPane.setBorder(titledBorder);
this.add(commomPane, BorderLayout.NORTH);
UILabel colorSelectLabel = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Mobile_Widget_Background"), UILabel.RIGHT);
colorSelectLabel.setPreferredSize(new Dimension(65, 20));
createBackgroundPane();
createBorderPane();
createFontPane();
}
colorSelectBox = new ColorSelectBox(152);
private void createBackgroundPane() {
colorSelectBox = new ColorSelectBox(NORMAL_COMBO_WIDTH);
colorSelectBox.addSelectChangeListener(new ChangeListener() {
@Override
public void stateChanged(ChangeEvent e) {
}
});
backgroundPane.add(colorSelectLabel);
backgroundPane.add(colorSelectBox);
JPanel backgroundPane = createLeftRightComponentsPane(createConfigLabel(Toolkit.i18nText("Fine-Design_Mobile_Widget_Background")), colorSelectBox);
commomPane.add(backgroundPane);
}
this.add(backgroundPane, BorderLayout.NORTH);
private void createBorderPane() {
borderType = new LineComboBox(BORDER_LINE_STYLE_ARRAY);
borderType.setSelectedLineStyle(Constants.LINE_THIN);
borderType.setPreferredSize(new Dimension(NORMAL_COMBO_WIDTH + 15, 20));
borderColor = new NewColorSelectBox(NORMAL_COMBO_WIDTH);
borderColor.addSelectChangeListener(new ChangeListener() {
@Override
public void stateChanged(ChangeEvent e) {
}
});
borderRadius = new UISpinner(0, Integer.MAX_VALUE, 1, 2);
borderRadius.setPreferredSize(new Dimension(NORMAL_COMBO_WIDTH + 20, 20));
commomPane.add(createLeftRightComponentsPane(createConfigLabel(Toolkit.i18nText("Fine-Design_Mobile_Widget_BorderType")), borderType));
commomPane.add(createLeftRightComponentsPane(createConfigLabel(Toolkit.i18nText("Fine-Design_Mobile_Widget_BorderColor")), borderColor));
commomPane.add(createLeftRightComponentsPane(createConfigLabel(Toolkit.i18nText("Fine-Design_Mobile_Widget_BorderRadius")), borderRadius));
}
private void createFontPane() {
fontConfigPane = new MobileStyleFontConfigPane();
commomPane.add(createLeftRightComponentsPane(createConfigLabel(Toolkit.i18nText("Fine-Design_Mobile_Widget_Font")), fontConfigPane));
}
private void createCustomPane() {
@ -109,6 +165,7 @@ public class MobileStyleDefinePane extends BasicBeanPane<MobileStyle> {
TitledBorder titledBorder = createTitledBorder(Toolkit.i18nText("Fine-Design_Report_Set"));
configPane.setBorder(titledBorder);
JPanel container = FRGUIPaneFactory.createVerticalFlowLayout_Pane(true, FlowLayout.LEADING, 0, 10);
configPane.add(this.customBeanPane, BorderLayout.CENTER);
this.add(configPane, BorderLayout.CENTER);
@ -119,4 +176,14 @@ public class MobileStyleDefinePane extends BasicBeanPane<MobileStyle> {
titledBorder.setTitleFont(FRFont.getInstance("PingFangSC-Regular", Font.PLAIN, 12));
return titledBorder;
}
private UILabel createConfigLabel(String title) {
UILabel label = new UILabel(title + ":", UILabel.RIGHT);
label.setPreferredSize(new Dimension(75, 20));
return label;
}
private JPanel createLeftRightComponentsPane(Component... components) {
return TableLayoutHelper.createGapTableLayoutPane(new Component[][]{components}, TableLayoutHelper.FILL_LASTCOLUMN, IntervalConstants.INTERVAL_L1, LayoutConstants.VGAP_MEDIUM);
}
}

99
designer-base/src/main/java/com/fr/design/mainframe/mobile/ui/MobileStyleFontConfigPane.java

@ -0,0 +1,99 @@
package com.fr.design.mainframe.mobile.ui;
import com.fr.base.BaseUtils;
import com.fr.design.constants.LayoutConstants;
import com.fr.design.gui.ibutton.UIToggleButton;
import com.fr.design.gui.icombobox.UIComboBox;
import com.fr.design.i18n.Toolkit;
import com.fr.design.utils.gui.GUICoreUtils;
import com.fr.general.FRFont;
import com.fr.stable.Constants;
import javax.swing.JPanel;
import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.Component;
import java.awt.Dimension;
import java.awt.FlowLayout;
import java.awt.Font;
import java.util.Vector;
public class MobileStyleFontConfigPane extends JPanel {
private static final int MAX_FONT_SIZE = 18;
private static final int MIN_FONT_SIZE = 12;
private static final Dimension BUTTON_SIZE = new Dimension(20, 18);
public static Vector<Integer> getFontSizes() {
Vector<Integer> FONT_SIZES = new Vector<Integer>();
for (int i = MIN_FONT_SIZE; i <= MAX_FONT_SIZE; i++) {
FONT_SIZES.add(i);
}
return FONT_SIZES;
}
private UIComboBox fontSizeComboBox;
private UIToggleButton underline;
private UIToggleButton italic;
private UIToggleButton bold;
public MobileStyleFontConfigPane() {
this.initComponent();
}
private void initComponent() {
fontSizeComboBox = new UIComboBox(getFontSizes());
fontSizeComboBox.setSelectedItem(16);
fontSizeComboBox.setPreferredSize(new Dimension(60, 20));
fontSizeComboBox.setEditable(true);
underline = new UIToggleButton(BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/underline.png"));
italic = new UIToggleButton(BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/italic.png"));
bold = new UIToggleButton(BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/bold.png"));
this.setButtonsTips();
this.setButtonsSize(BUTTON_SIZE);
Component[] components_font = new Component[]{
fontSizeComboBox, underline, italic, bold
};
JPanel buttonPane = new JPanel(new BorderLayout());
buttonPane.add(GUICoreUtils.createFlowPane(components_font, FlowLayout.LEFT, LayoutConstants.HGAP_LARGE));
this.setLayout(new BorderLayout(0,0));
this.add(buttonPane, BorderLayout.CENTER);
}
private void setButtonsTips() {
underline.setToolTipText(Toolkit.i18nText("Fine-Design_Report_Underline"));
italic.setToolTipText(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Italic"));
bold.setToolTipText(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Bold"));
}
private void setButtonsSize(Dimension size) {
underline.setPreferredSize(size);
italic.setPreferredSize(size);
bold.setPreferredSize(size);
}
public void populateBean(FRFont frFont) {
fontSizeComboBox.setSelectedItem(frFont.getSize());
bold.setSelected(frFont.isBold());
italic.setSelected(frFont.isItalic());
underline.setSelected(frFont.getUnderline() != Constants.LINE_NONE);
}
public FRFont updateBean() {
int style = Font.PLAIN;
style += this.bold.isSelected() ? Font.BOLD : Font.PLAIN;
style += this.italic.isSelected() ? Font.ITALIC : Font.PLAIN;
return FRFont.getInstance(
FRFont.DEFAULT_FONTNAME,
style,
Float.parseFloat(fontSizeComboBox.getSelectedItem().toString()),
Color.BLACK,
underline.isSelected() ? Constants.LINE_THIN : Constants.LINE_NONE
);
}
}

23
designer-base/src/main/java/com/fr/design/unit/UnitConvertUtil.java

@ -6,7 +6,11 @@ import com.fr.design.unit.impl.CMReportLengthUNIT;
import com.fr.design.unit.impl.INCHReportLengthUNIT;
import com.fr.design.unit.impl.MMReportLengthUNIT;
import com.fr.design.unit.impl.PTReportLengthUNIT;
import com.fr.general.GeneralContext;
import com.fr.plugin.context.PluginContext;
import com.fr.plugin.manage.PluginFilter;
import com.fr.plugin.observer.PluginEvent;
import com.fr.plugin.observer.PluginEventListener;
import java.util.ArrayList;
import java.util.List;
import java.util.Set;
@ -18,6 +22,23 @@ public class UnitConvertUtil {
private static List<ReportLengthUNITProvider> lengthUNITList = new ArrayList<ReportLengthUNITProvider>();
static {
GeneralContext.listenPluginRunningChanged(new PluginEventListener() {
@Override
public void on(PluginEvent pluginEvent) {
initSupportedReportLengthUNIT();
}
}, new PluginFilter() {
@Override
public boolean accept(PluginContext pluginContext) {
return pluginContext.contain(ReportLengthUNITProvider.MARK_STRING);
}
});
initSupportedReportLengthUNIT();
}
private static void initSupportedReportLengthUNIT(){
lengthUNITList.clear();
lengthUNITList.add(new MMReportLengthUNIT());
lengthUNITList.add(new CMReportLengthUNIT());
lengthUNITList.add(new INCHReportLengthUNIT());

4
designer-base/src/main/java/com/fr/design/utils/DesignUtils.java

@ -291,10 +291,8 @@ public class DesignUtils {
if (isDisplaySimSun(defaultLocale)) {
guiFRFont = getNamedFont("SimSun");
} else if (isDisplayDialog(defaultLocale)) {
guiFRFont = getNamedFont("Dialog");
} else {
guiFRFont = getNamedFont("Tahoma");
guiFRFont = getNamedFont("Dialog");
}
//先初始化的设计器locale, 后初始化lookandfeel.如果顺序改了, 这边也要调整.

5
designer-base/src/main/java/com/fr/design/utils/DesignerPort.java

@ -90,10 +90,7 @@ public class DesignerPort implements XMLReadable, XMLWriter {
}
public void resetPort() {
ProcessEventPipe eventPipe = FineProcessContext.getParentPipe();
if (eventPipe != null) {
eventPipe.fire(new CarryMessageEvent(ReportState.STOP.getValue()));
}
FineProcessContext.getParentPipe().fire(new CarryMessageEvent(ReportState.STOP.getValue()));
TipDialog dialog = new TipDialog(null,
StringUtils.EMPTY,
Toolkit.i18nText("Fine-Design_Port_Found_Port_Conflict"),

4
designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/style/ChartTextAttrPane.java

@ -1,6 +1,7 @@
package com.fr.design.mainframe.chart.gui.style;
import com.fr.base.BaseUtils;
import com.fr.base.FRContext;
import com.fr.base.Utils;
import com.fr.chart.base.TextAttr;
import com.fr.design.constants.LayoutConstants;
@ -14,7 +15,6 @@ import com.fr.design.i18n.Toolkit;
import com.fr.design.layout.TableLayout;
import com.fr.design.utils.gui.GUICoreUtils;
import com.fr.general.FRFont;
import com.fr.general.GeneralUtils;
import com.fr.van.chart.designer.TableLayout4VanChartHelper;
@ -202,7 +202,7 @@ public class ChartTextAttrPane extends BasicPane {
this.setLayout(new BorderLayout());
this.add(getContentPane(buttonPane), BorderLayout.CENTER);
populate(FRFont.getInstance());
populate(FRContext.getDefaultValues().getFRFont());
}
protected JPanel getContentPane(JPanel buttonPane) {

19
designer-chart/src/main/java/com/fr/van/chart/map/designer/type/VanChartMapSourceChoosePane.java

@ -42,7 +42,7 @@ import com.fr.van.chart.drillmap.designer.data.comp.MapDataTree;
import com.fr.workspace.WorkContext;
import javax.swing.BorderFactory;
import javax.swing.JOptionPane;
import javax.swing.DefaultComboBoxModel;
import javax.swing.JPanel;
import javax.swing.SwingConstants;
import javax.swing.SwingWorker;
@ -51,6 +51,8 @@ import javax.swing.event.PopupMenuListener;
import javax.swing.tree.DefaultMutableTreeNode;
import javax.swing.tree.TreeNode;
import javax.swing.tree.TreePath;
import java.util.ArrayList;
import java.util.List;
import java.awt.BorderLayout;
import java.awt.CardLayout;
import java.awt.Component;
@ -61,8 +63,6 @@ import java.awt.event.ItemEvent;
import java.awt.event.ItemListener;
import java.awt.event.MouseEvent;
import java.awt.event.MouseListener;
import java.util.ArrayList;
import java.util.List;
/**
* Created by Mitisky on 16/5/11.
@ -280,14 +280,12 @@ public class VanChartMapSourceChoosePane extends JPanel implements UIObserver {
public void popupMenuWillBecomeVisible(PopupMenuEvent e) {
String selected = Utils.objectToString(gisLayer.getSelectedItem());
ZoomLevel zoomSelected = (ZoomLevel) zoomLevel.getSelectedItem();
gisLayer.removeAllItems();
for (String item : MapLayerConfigManager.getLayerItems()) {
gisLayer.addItem(item);
}
gisLayer.setModel(new DefaultComboBoxModel(MapLayerConfigManager.getLayerItems()));
gisLayer.setSelectedItem(selected);
zoomLevel.setSelectedItem(zoomSelected);
}
});
@ -346,10 +344,7 @@ public class VanChartMapSourceChoosePane extends JPanel implements UIObserver {
} else {
levels = ZOOM_LEVELS;
}
zoomLevel.removeAllItems();
for (int i = 0; i < levels.length; i++) {
zoomLevel.addItem(levels[i]);
}
zoomLevel.setModel(new DefaultComboBoxModel(levels));
}

2
designer-form/src/main/java/com/fr/design/actions/FormMobileAttrAction.java

@ -112,7 +112,7 @@ public class FormMobileAttrAction extends JTemplateAction<JForm> {
private static final MenuKeySet REPORT_APP_ATTR = new MenuKeySet() {
@Override
public char getMnemonic() {
return 'T';
return 'P';
}
@Override

1
designer-realize/src/main/java/com/fr/design/mainframe/ElementCasePaneDelegate.java

@ -117,6 +117,7 @@ public class ElementCasePaneDelegate extends ElementCasePane<WorkSheet> {
@Override
protected void afterPasteAction() {
refreshPropertyPanes();
fireTargetModified();
repaint();
}

1
designer-realize/src/main/java/com/fr/design/mainframe/form/FormElementCasePaneDelegate.java

@ -72,6 +72,7 @@ public class FormElementCasePaneDelegate extends ElementCasePane<FormElementCase
@Override
protected void afterPasteAction() {
refreshPropertyPanes();
fireTargetModified();
repaint();
}

3
designer-realize/src/main/java/com/fr/design/report/RichTextPane.java

@ -1,6 +1,7 @@
package com.fr.design.report;
import com.fr.base.BaseFormula;
import com.fr.base.FRContext;
import com.fr.base.Style;
import com.fr.design.cell.editor.RichTextToolBar;
import com.fr.design.dialog.BasicPane;
@ -36,7 +37,7 @@ public class RichTextPane extends BasicPane {
//12号字体有个奇怪的bug, 字体下部分渲染会截断一部分, 换其他字体没问题, 字体改大小也没问题.
//直接弄个jtexarea放到jframe里也有同样问题, 不知道是字体渲染bug还是jdk问题
public static final FRFont DEFAUL_FONT = FRFont.getInstance().applySize(13);
public static final FRFont DEFAUL_FONT = FRContext.getDefaultValues().getFRFont().applySize(13);
private RichTextEditingPane textPane;
//用于populate时动态更新按钮

5
designer-realize/src/main/java/com/fr/start/LifecycleFatalErrorHandler.java

@ -49,10 +49,7 @@ public class LifecycleFatalErrorHandler {
public void handle(FineLifecycleFatalError fatal) {
SplashContext.getInstance().hide();
ProcessEventPipe eventPipe = FineProcessContext.getParentPipe();
if (eventPipe != null) {
eventPipe.fire(new CarryMessageEvent(ReportState.STOP.getValue()));
}
FineProcessContext.getParentPipe().fire(new CarryMessageEvent(ReportState.STOP.getValue()));
map.get(fatal.getErrorType()).handle(fatal);
}

Loading…
Cancel
Save