Browse Source

Merge remote-tracking branch 'origin/feature/10.0' into feature/10.0

research/11.0
Bruce.Deng 5 years ago
parent
commit
8877c174a2
  1. 52
      designer-base/src/main/java/com/fr/design/beans/BasicBeanPane.java
  2. 6
      designer-base/src/main/java/com/fr/design/beans/FurtherBasicBeanPane.java
  3. 6
      designer-base/src/main/java/com/fr/design/dialog/BasicDialog.java
  4. 17
      designer-base/src/main/java/com/fr/design/dialog/BasicPane.java
  5. 3
      designer-base/src/main/java/com/fr/design/dialog/DialogActionAdapter.java
  6. 11
      designer-base/src/main/java/com/fr/design/dialog/DialogActionListener.java
  7. 8
      designer-base/src/main/java/com/fr/design/dialog/UIDialog.java
  8. 2
      designer-base/src/main/java/com/fr/design/gui/itableeditorpane/UITableModelAdapter.java
  9. 3
      designer-base/src/main/java/com/fr/design/gui/itabpane/UITabsHeaderIconPane.java
  10. 1
      designer-base/src/main/java/com/fr/design/gui/style/NumberDragBar.java
  11. 4
      designer-base/src/main/java/com/fr/design/gui/syntax/ui/rsyntaxtextarea/RSyntaxDocument.java
  12. 1
      designer-base/src/main/java/com/fr/design/mainframe/DesignerFrame.java
  13. 23
      designer-base/src/main/java/com/fr/design/mainframe/mobile/ui/MobileStyleDefinePane.java
  14. 7
      designer-base/src/main/java/com/fr/design/mainframe/vcs/ui/VcsLabel.java
  15. 1
      designer-base/src/main/java/com/fr/design/style/color/ColorPicker.java
  16. 1
      designer-base/src/main/java/com/fr/design/update/actions/FileDownloader.java
  17. 1
      designer-base/src/main/java/com/fr/design/update/ui/dialog/UpdateMainDialog.java
  18. 9
      designer-chart/src/main/java/com/fr/design/mainframe/MapEditPane.java
  19. 5
      designer-chart/src/main/java/com/fr/van/chart/bar/VanChartBarPlotPane.java
  20. 5
      designer-chart/src/main/java/com/fr/van/chart/bubble/VanChartBubblePlotPane.java
  21. 5
      designer-chart/src/main/java/com/fr/van/chart/column/VanChartColumnPlotPane.java
  22. 4
      designer-chart/src/main/java/com/fr/van/chart/custom/VanChartCustomPlotPane.java
  23. 5
      designer-chart/src/main/java/com/fr/van/chart/designer/style/axis/component/VanChartAxisButtonPane.java

52
designer-base/src/main/java/com/fr/design/beans/BasicBeanPane.java

@ -1,41 +1,35 @@
package com.fr.design.beans; package com.fr.design.beans;
import com.fr.common.annotations.Open;
import com.fr.design.dialog.BasicPane; import com.fr.design.dialog.BasicPane;
/** @Open
* Update Pane
*/
public abstract class BasicBeanPane<T> extends BasicPane { public abstract class BasicBeanPane<T> extends BasicPane {
/**
* 展示数据
* @param ob 待展示的对象
*/
public abstract void populateBean(T ob);
/** /**
* Populate. * 保存数据
*/ * @return 待保存的对象
public abstract void populateBean(T ob); */
public abstract T updateBean();
/** /**
* Update. * 保存数据
*/ * @param ob 待保存的对象
public abstract T updateBean(); */
public void updateBean(T ob) {
public void updateBean(T ob) { }
} /**
* 更新权限工具栏面板
/** */
* 更新权限工具栏面板 public void populateAuthority() {
*/
public void populateAuthority() {
}
/**
* 仅用来处理图表设计器的地图面板
* @param mapType 地图类型
*/
public void dealWidthMap(String mapType){
}
}
} }

6
designer-base/src/main/java/com/fr/design/beans/FurtherBasicBeanPane.java

@ -1,11 +1,9 @@
package com.fr.design.beans; package com.fr.design.beans;
import com.fr.common.annotations.Open;
import com.fr.stable.StringUtils; import com.fr.stable.StringUtils;
/** @Open
* @author zhou
* @since 2012-5-30下午12:12:42
*/
public abstract class FurtherBasicBeanPane<T> extends BasicBeanPane<T> { public abstract class FurtherBasicBeanPane<T> extends BasicBeanPane<T> {
/** /**
* 是否是指定类型 * 是否是指定类型

6
designer-base/src/main/java/com/fr/design/dialog/BasicDialog.java

@ -1,10 +1,10 @@
package com.fr.design.dialog; package com.fr.design.dialog;
import com.fr.common.annotations.Open;
import java.awt.*; import java.awt.*;
/* @Open
* @author _denny
*/
public abstract class BasicDialog extends UIDialog { public abstract class BasicDialog extends UIDialog {
public static final Dimension SMALL = new Dimension(340, 180); public static final Dimension SMALL = new Dimension(340, 180);
public static final Dimension MEDIUM = new Dimension(600, 400); public static final Dimension MEDIUM = new Dimension(600, 400);

17
designer-base/src/main/java/com/fr/design/dialog/BasicPane.java

@ -1,24 +1,17 @@
package com.fr.design.dialog; package com.fr.design.dialog;
import com.fr.common.annotations.Open;
import com.fr.design.gui.ilable.UILabel; import com.fr.design.gui.ilable.UILabel;
import com.fr.design.gui.itextfield.UITextField; import com.fr.design.gui.itextfield.UITextField;
import com.fr.design.i18n.Toolkit; import com.fr.design.i18n.Toolkit;
import com.fr.design.utils.gui.GUICoreUtils; import com.fr.design.utils.gui.GUICoreUtils;
import com.fr.stable.core.PropertyChangeAdapter; import com.fr.stable.core.PropertyChangeAdapter;
import javax.swing.JPanel; import javax.swing.*;
import javax.swing.event.DocumentEvent; import javax.swing.event.DocumentEvent;
import java.awt.BorderLayout; import java.awt.*;
import java.awt.Color;
import java.awt.Dialog; @Open
import java.awt.Dimension;
import java.awt.Frame;
import java.awt.Window;
/*
* _denny: 这里的BasicPane通常会有populate & update方法
* 记得populate 一定要在对应的dialog setVisible之前populate
*/
public abstract class BasicPane extends JPanel { public abstract class BasicPane extends JPanel {
/** /**

3
designer-base/src/main/java/com/fr/design/dialog/DialogActionAdapter.java

@ -1,5 +1,8 @@
package com.fr.design.dialog; package com.fr.design.dialog;
import com.fr.common.annotations.Open;
@Open
public abstract class DialogActionAdapter implements DialogActionListener { public abstract class DialogActionAdapter implements DialogActionListener {
@Override @Override
public void doOk() {} public void doOk() {}

11
designer-base/src/main/java/com/fr/design/dialog/DialogActionListener.java

@ -1,8 +1,11 @@
package com.fr.design.dialog; package com.fr.design.dialog;
import com.fr.common.annotations.Open;
@Open
public interface DialogActionListener { public interface DialogActionListener {
public void doOk(); void doOk();
public void doCancel(); void doCancel();
} }

8
designer-base/src/main/java/com/fr/design/dialog/UIDialog.java

@ -25,13 +25,7 @@ import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent; import java.awt.event.WindowEvent;
import java.util.ArrayList; import java.util.ArrayList;
/**
* Created with IntelliJ IDEA.
* User: 小灰灰
* Date: 13-7-16
* Time: 下午2:17
* To change this template use File | Settings | File Templates.
*/
public abstract class UIDialog extends JDialog { public abstract class UIDialog extends JDialog {
public static final String OK_BUTTON = "basic_ok"; public static final String OK_BUTTON = "basic_ok";
public static final String CANCEL_BUTTON = "basic_cancel"; public static final String CANCEL_BUTTON = "basic_cancel";

2
designer-base/src/main/java/com/fr/design/gui/itableeditorpane/UITableModelAdapter.java

@ -244,7 +244,7 @@ public abstract class UITableModelAdapter<T extends Object> extends AbstractTabl
FineLoggerFactory.getLogger().error(ee.getMessage(), ee); FineLoggerFactory.getLogger().error(ee.getMessage(), ee);
} }
} }
if (getRowCount() < 1 || selectedRow.length < 0) { if (getRowCount() < 1) {
return; return;
} }

3
designer-base/src/main/java/com/fr/design/gui/itabpane/UITabsHeaderIconPane.java

@ -153,6 +153,7 @@ public class UITabsHeaderIconPane extends JPanel implements UITabComponent {
try { try {
Thread.sleep(3); Thread.sleep(3);
} catch (InterruptedException e) { } catch (InterruptedException e) {
Thread.currentThread().interrupt();
} }
} }
if (currentPanel != panel) { if (currentPanel != panel) {
@ -202,7 +203,7 @@ public class UITabsHeaderIconPane extends JPanel implements UITabComponent {
} }
@Override @Override
public int getSelectedIndex() { public synchronized int getSelectedIndex() {
return selectedIndex; return selectedIndex;
} }

1
designer-base/src/main/java/com/fr/design/gui/style/NumberDragBar.java

@ -127,6 +127,7 @@ public class NumberDragBar extends JComponent {
revalidate(); revalidate();
} catch (InterruptedException e) { } catch (InterruptedException e) {
FineLoggerFactory.getLogger().error(e.toString()); FineLoggerFactory.getLogger().error(e.toString());
Thread.currentThread().interrupt();
} }
} }
}); });

4
designer-base/src/main/java/com/fr/design/gui/syntax/ui/rsyntaxtextarea/RSyntaxDocument.java

@ -366,7 +366,9 @@ public class RSyntaxDocument extends RDocument implements Iterable<Token>,
*/ */
public boolean getShouldIndentNextLine(int line) { public boolean getShouldIndentNextLine(int line) {
Token t = getTokenListForLine(line); Token t = getTokenListForLine(line);
t = t.getLastNonCommentNonWhitespaceToken(); if (t != null) {
t = t.getLastNonCommentNonWhitespaceToken();
}
return tokenMaker.getShouldIndentNextLineAfter(t); return tokenMaker.getShouldIndentNextLineAfter(t);
} }

1
designer-base/src/main/java/com/fr/design/mainframe/DesignerFrame.java

@ -1091,6 +1091,7 @@ public class DesignerFrame extends JFrame implements JTemplateActionListener, Ta
thread.join(); thread.join();
} catch (InterruptedException e) { } catch (InterruptedException e) {
FineLoggerFactory.getLogger().error("Map Thread Error"); FineLoggerFactory.getLogger().error("Map Thread Error");
Thread.currentThread().interrupt();
} }
DesignerEnvManager.getEnvManager().setLastOpenFile( DesignerEnvManager.getEnvManager().setLastOpenFile(

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

@ -1,5 +1,6 @@
package com.fr.design.mainframe.mobile.ui; package com.fr.design.mainframe.mobile.ui;
import com.fr.base.background.ColorBackground;
import com.fr.design.beans.BasicBeanPane; import com.fr.design.beans.BasicBeanPane;
import com.fr.design.gui.ilable.UILabel; import com.fr.design.gui.ilable.UILabel;
import com.fr.design.i18n.Toolkit; import com.fr.design.i18n.Toolkit;
@ -23,6 +24,7 @@ public class MobileStyleDefinePane extends BasicBeanPane<MobileStyle> {
private MobileStyleCustomDefinePane customBeanPane; private MobileStyleCustomDefinePane customBeanPane;
private Class<? extends MobileStyle> mobileStyleClazz; private Class<? extends MobileStyle> mobileStyleClazz;
private NewColorSelectBox colorSelectBox; private NewColorSelectBox colorSelectBox;
private Color titleColor = new Color(47, 142, 241);
MobileStyleDefinePane(Widget widget, Class<? extends MobileStyleCustomDefinePane> customBeanPaneClass, MobileStyleDefinePane(Widget widget, Class<? extends MobileStyleCustomDefinePane> customBeanPaneClass,
Class<? extends MobileStyle> mobileStyleClazz) { Class<? extends MobileStyle> mobileStyleClazz) {
@ -35,7 +37,9 @@ public class MobileStyleDefinePane extends BasicBeanPane<MobileStyle> {
@Override @Override
public void populateBean(MobileStyle ob) { public void populateBean(MobileStyle ob) {
this.customBeanPane.populateBean(ob); this.customBeanPane.populateBean(ob);
colorSelectBox.setSelectObject(ob.getBackground()); if(ob.getBackground() != null) {
colorSelectBox.setSelectObject(((ColorBackground)ob.getBackground()).getColor());
}
} }
@Override @Override
@ -43,7 +47,7 @@ public class MobileStyleDefinePane extends BasicBeanPane<MobileStyle> {
MobileStyle mobileStyle = Reflect.on(mobileStyleClazz).create().get(); MobileStyle mobileStyle = Reflect.on(mobileStyleClazz).create().get();
this.widget.setMobileStyle(mobileStyle); this.widget.setMobileStyle(mobileStyle);
this.customBeanPane.updateBean(); this.customBeanPane.updateBean();
mobileStyle.setBackground(colorSelectBox.getSelectObject()); mobileStyle.setBackground(ColorBackground.getInstance(colorSelectBox.getSelectObject()));
return mobileStyle; return mobileStyle;
} }
@ -67,8 +71,7 @@ public class MobileStyleDefinePane extends BasicBeanPane<MobileStyle> {
JPanel mobileStylePreviewPane = this.customBeanPane.createPreviewPane(); JPanel mobileStylePreviewPane = this.customBeanPane.createPreviewPane();
if(mobileStylePreviewPane != null) { if(mobileStylePreviewPane != null) {
JPanel previewPane = FRGUIPaneFactory.createBorderLayout_S_Pane(); JPanel previewPane = FRGUIPaneFactory.createBorderLayout_S_Pane();
TitledBorder titledBorder = GUICoreUtils.createTitledBorder(Toolkit.i18nText("Fine-Design_Basic_Widget_Style_Preview"), null); TitledBorder titledBorder = createTitledBorder(Toolkit.i18nText("Fine-Design_Basic_Widget_Style_Preview"));
titledBorder.setTitleFont(FRFont.getInstance("PingFangSC-Regular", Font.PLAIN, 12, new Color(0x2f8ef100)));
previewPane.setBorder(titledBorder); previewPane.setBorder(titledBorder);
previewPane.setPreferredSize(new Dimension(500, 83)); previewPane.setPreferredSize(new Dimension(500, 83));
previewPane.add(mobileStylePreviewPane, BorderLayout.CENTER); previewPane.add(mobileStylePreviewPane, BorderLayout.CENTER);
@ -82,8 +85,7 @@ public class MobileStyleDefinePane extends BasicBeanPane<MobileStyle> {
backgroundPane.setLayout(new FlowLayout(FlowLayout.LEFT, 10, 5)); backgroundPane.setLayout(new FlowLayout(FlowLayout.LEFT, 10, 5));
backgroundPane.setPreferredSize(new Dimension(500, 65)); backgroundPane.setPreferredSize(new Dimension(500, 65));
TitledBorder titledBorder = GUICoreUtils.createTitledBorder(Toolkit.i18nText("Fine-Design_Mobile_Common_Attribute"), null); TitledBorder titledBorder = createTitledBorder(Toolkit.i18nText("Fine-Design_Mobile_Common_Attribute"));
titledBorder.setTitleFont(FRFont.getInstance("PingFangSC-Regular", Font.PLAIN, 12, Color.BLUE));
backgroundPane.setBorder(titledBorder); backgroundPane.setBorder(titledBorder);
UILabel colorSelectLabel = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Mobile_Widget_Background"), UILabel.RIGHT); UILabel colorSelectLabel = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Mobile_Widget_Background"), UILabel.RIGHT);
@ -104,12 +106,17 @@ public class MobileStyleDefinePane extends BasicBeanPane<MobileStyle> {
private void createCustomPane() { private void createCustomPane() {
JPanel configPane = FRGUIPaneFactory.createBorderLayout_S_Pane(); JPanel configPane = FRGUIPaneFactory.createBorderLayout_S_Pane();
TitledBorder titledBorder = GUICoreUtils.createTitledBorder(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Set"), null); TitledBorder titledBorder = createTitledBorder(Toolkit.i18nText("Fine-Design_Report_Set"));
titledBorder.setTitleFont(FRFont.getInstance("PingFangSC-Regular", Font.PLAIN, 12, Color.BLUE));
configPane.setBorder(titledBorder); configPane.setBorder(titledBorder);
configPane.add(this.customBeanPane, BorderLayout.CENTER); configPane.add(this.customBeanPane, BorderLayout.CENTER);
this.add(configPane, BorderLayout.CENTER); this.add(configPane, BorderLayout.CENTER);
} }
private TitledBorder createTitledBorder(String title) {
TitledBorder titledBorder = GUICoreUtils.createTitledBorder(title, titleColor);
titledBorder.setTitleFont(FRFont.getInstance("PingFangSC-Regular", Font.PLAIN, 12));
return titledBorder;
}
} }

7
designer-base/src/main/java/com/fr/design/mainframe/vcs/ui/VcsLabel.java

@ -19,12 +19,11 @@ public class VcsLabel extends ActionLabel {
} }
public void paintComponent(Graphics g) { public void paintComponent(Graphics g) {
if (ui != null) { if (ui != null && g != null) {
Graphics scratchGraphics = (g == null) ? null : g.create(); Graphics scratchGraphics = g.create();
try { try {
ui.update(scratchGraphics, this); ui.update(scratchGraphics, this);
} } finally {
finally {
scratchGraphics.dispose(); scratchGraphics.dispose();
} }
} }

1
designer-base/src/main/java/com/fr/design/style/color/ColorPicker.java

@ -74,6 +74,7 @@ public class ColorPicker extends JDialog implements ActionListener
Thread.sleep(100); // 等待弹窗关闭 Thread.sleep(100); // 等待弹窗关闭
} catch (InterruptedException e) { } catch (InterruptedException e) {
FineLoggerFactory.getLogger().error(e.getMessage(), e); FineLoggerFactory.getLogger().error(e.getMessage(), e);
Thread.currentThread().interrupt();
} }
colorPickerPanel.captureScreen(); colorPickerPanel.captureScreen();
} }

1
designer-base/src/main/java/com/fr/design/update/actions/FileDownloader.java

@ -65,6 +65,7 @@ public abstract class FileDownloader extends SwingWorker<Boolean, DownloadItem>
success = get(); success = get();
} catch (InterruptedException e) { } catch (InterruptedException e) {
FineLoggerFactory.getLogger().error(e.getMessage(), e); FineLoggerFactory.getLogger().error(e.getMessage(), e);
Thread.currentThread().interrupt();
} catch (ExecutionException e) { } catch (ExecutionException e) {
FineLoggerFactory.getLogger().error(e.getMessage(), e); FineLoggerFactory.getLogger().error(e.getMessage(), e);
} }

1
designer-base/src/main/java/com/fr/design/update/ui/dialog/UpdateMainDialog.java

@ -385,6 +385,7 @@ public class UpdateMainDialog extends UIDialog {
showDownLoadInfo(); showDownLoadInfo();
} catch (InterruptedException e) { } catch (InterruptedException e) {
stopLoading(); stopLoading();
Thread.currentThread().interrupt();
} catch (ExecutionException e) { } catch (ExecutionException e) {
stopLoading(); stopLoading();
} finally { } finally {

9
designer-chart/src/main/java/com/fr/design/mainframe/MapEditPane.java

@ -96,15 +96,6 @@ public class MapEditPane extends BasicBeanPane<MapSvgAttr>{
} }
/**
* 再图片面板设置类型和名字
* @param mapType 地图类型
*/
public void dealWidthMap(String mapType){
areaPane.setTypeNameAndMapName(mapType,currentMapName);
// pointPane.setTypeNameAndMapName(mapType,currentMapName);
}
@Override @Override
public MapSvgAttr updateBean() { public MapSvgAttr updateBean() {
MapSvgAttr currentAttr = editingPane.updateCurrentAttr(); MapSvgAttr currentAttr = editingPane.updateCurrentAttr();

5
designer-chart/src/main/java/com/fr/van/chart/bar/VanChartBarPlotPane.java

@ -65,10 +65,11 @@ public class VanChartBarPlotPane extends AbstractVanChartTypePane {
newPlot = (VanChartColumnPlot)barChart[i].getPlot(); newPlot = (VanChartColumnPlot)barChart[i].getPlot();
} }
} }
Plot cloned = null; Plot cloned = null;
try { try {
cloned = (Plot)newPlot.clone(); if(newPlot != null) {
cloned = (Plot) newPlot.clone();
}
} catch (CloneNotSupportedException e) { } catch (CloneNotSupportedException e) {
FineLoggerFactory.getLogger().error("Error In ColumnChart"); FineLoggerFactory.getLogger().error("Error In ColumnChart");
} }

5
designer-chart/src/main/java/com/fr/van/chart/bubble/VanChartBubblePlotPane.java

@ -77,10 +77,11 @@ public class VanChartBubblePlotPane extends AbstractVanChartTypePane {
newPlot = (VanChartBubblePlot)bubbleChart[i].getPlot(); newPlot = (VanChartBubblePlot)bubbleChart[i].getPlot();
} }
} }
Plot cloned = null; Plot cloned = null;
try { try {
cloned = (Plot)newPlot.clone(); if(newPlot != null) {
cloned = (Plot) newPlot.clone();
}
} catch (CloneNotSupportedException e) { } catch (CloneNotSupportedException e) {
FineLoggerFactory.getLogger().error("Error In BubbleChart"); FineLoggerFactory.getLogger().error("Error In BubbleChart");
} }

5
designer-chart/src/main/java/com/fr/van/chart/column/VanChartColumnPlotPane.java

@ -66,10 +66,11 @@ public class VanChartColumnPlotPane extends AbstractVanChartTypePane {
newPlot = (VanChartColumnPlot)columnChart[i].getPlot(); newPlot = (VanChartColumnPlot)columnChart[i].getPlot();
} }
} }
Plot cloned = null; Plot cloned = null;
try { try {
cloned = (Plot)newPlot.clone(); if(newPlot != null) {
cloned = (Plot) newPlot.clone();
}
} catch (CloneNotSupportedException e) { } catch (CloneNotSupportedException e) {
FineLoggerFactory.getLogger().error("Error In ColumnChart"); FineLoggerFactory.getLogger().error("Error In ColumnChart");
} }

4
designer-chart/src/main/java/com/fr/van/chart/custom/VanChartCustomPlotPane.java

@ -261,7 +261,9 @@ public class VanChartCustomPlotPane extends AbstractVanChartTypePane {
} }
Plot cloned = null; Plot cloned = null;
try { try {
cloned = (Plot) newPlot.clone(); if(newPlot != null) {
cloned = (Plot) newPlot.clone();
}
} catch (CloneNotSupportedException e) { } catch (CloneNotSupportedException e) {
FineLoggerFactory.getLogger().error("Error In ScatterChart"); FineLoggerFactory.getLogger().error("Error In ScatterChart");
} }

5
designer-chart/src/main/java/com/fr/van/chart/designer/style/axis/component/VanChartAxisButtonPane.java

@ -92,8 +92,9 @@ public class VanChartAxisButtonPane extends BasicBeanPane<VanChartAxisPlot> {
pane = new JPanel(new FlowLayout(FlowLayout.LEFT, 0, 0)); pane = new JPanel(new FlowLayout(FlowLayout.LEFT, 0, 0));
buttonPane.add(pane); buttonPane.add(pane);
} }
if(pane != null) {
pane.add(indexList_Y.get(i)); pane.add(indexList_Y.get(i));
}
} }
if(popupMenu != null){ if(popupMenu != null){

Loading…
Cancel
Save