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

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

@ -1,11 +1,9 @@
package com.fr.design.beans;
import com.fr.common.annotations.Open;
import com.fr.stable.StringUtils;
/**
* @author zhou
* @since 2012-5-30下午12:12:42
*/
@Open
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;
import com.fr.common.annotations.Open;
import java.awt.*;
/*
* @author _denny
*/
@Open
public abstract class BasicDialog extends UIDialog {
public static final Dimension SMALL = new Dimension(340, 180);
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;
import com.fr.common.annotations.Open;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.gui.itextfield.UITextField;
import com.fr.design.i18n.Toolkit;
import com.fr.design.utils.gui.GUICoreUtils;
import com.fr.stable.core.PropertyChangeAdapter;
import javax.swing.JPanel;
import javax.swing.*;
import javax.swing.event.DocumentEvent;
import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.Dialog;
import java.awt.Dimension;
import java.awt.Frame;
import java.awt.Window;
/*
* _denny: 这里的BasicPane通常会有populate & update方法
* 记得populate 一定要在对应的dialog setVisible之前populate
*/
import java.awt.*;
@Open
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;
import com.fr.common.annotations.Open;
@Open
public abstract class DialogActionAdapter implements DialogActionListener {
@Override
public void doOk() {}

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

@ -1,8 +1,11 @@
package com.fr.design.dialog;
import com.fr.common.annotations.Open;
@Open
public interface DialogActionListener {
public void doOk();
public void doCancel();
void doOk();
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.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 static final String OK_BUTTON = "basic_ok";
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);
}
}
if (getRowCount() < 1 || selectedRow.length < 0) {
if (getRowCount() < 1) {
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 {
Thread.sleep(3);
} catch (InterruptedException e) {
Thread.currentThread().interrupt();
}
}
if (currentPanel != panel) {
@ -202,7 +203,7 @@ public class UITabsHeaderIconPane extends JPanel implements UITabComponent {
}
@Override
public int getSelectedIndex() {
public synchronized int getSelectedIndex() {
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();
} catch (InterruptedException e) {
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) {
Token t = getTokenListForLine(line);
t = t.getLastNonCommentNonWhitespaceToken();
if (t != null) {
t = t.getLastNonCommentNonWhitespaceToken();
}
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();
} catch (InterruptedException e) {
FineLoggerFactory.getLogger().error("Map Thread Error");
Thread.currentThread().interrupt();
}
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;
import com.fr.base.background.ColorBackground;
import com.fr.design.beans.BasicBeanPane;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.i18n.Toolkit;
@ -23,6 +24,7 @@ public class MobileStyleDefinePane extends BasicBeanPane<MobileStyle> {
private MobileStyleCustomDefinePane customBeanPane;
private Class<? extends MobileStyle> mobileStyleClazz;
private NewColorSelectBox colorSelectBox;
private Color titleColor = new Color(47, 142, 241);
MobileStyleDefinePane(Widget widget, Class<? extends MobileStyleCustomDefinePane> customBeanPaneClass,
Class<? extends MobileStyle> mobileStyleClazz) {
@ -35,7 +37,9 @@ public class MobileStyleDefinePane extends BasicBeanPane<MobileStyle> {
@Override
public void populateBean(MobileStyle ob) {
this.customBeanPane.populateBean(ob);
colorSelectBox.setSelectObject(ob.getBackground());
if(ob.getBackground() != null) {
colorSelectBox.setSelectObject(((ColorBackground)ob.getBackground()).getColor());
}
}
@Override
@ -43,7 +47,7 @@ public class MobileStyleDefinePane extends BasicBeanPane<MobileStyle> {
MobileStyle mobileStyle = Reflect.on(mobileStyleClazz).create().get();
this.widget.setMobileStyle(mobileStyle);
this.customBeanPane.updateBean();
mobileStyle.setBackground(colorSelectBox.getSelectObject());
mobileStyle.setBackground(ColorBackground.getInstance(colorSelectBox.getSelectObject()));
return mobileStyle;
}
@ -67,8 +71,7 @@ public class MobileStyleDefinePane extends BasicBeanPane<MobileStyle> {
JPanel mobileStylePreviewPane = this.customBeanPane.createPreviewPane();
if(mobileStylePreviewPane != null) {
JPanel previewPane = FRGUIPaneFactory.createBorderLayout_S_Pane();
TitledBorder titledBorder = GUICoreUtils.createTitledBorder(Toolkit.i18nText("Fine-Design_Basic_Widget_Style_Preview"), null);
titledBorder.setTitleFont(FRFont.getInstance("PingFangSC-Regular", Font.PLAIN, 12, new Color(0x2f8ef100)));
TitledBorder titledBorder = createTitledBorder(Toolkit.i18nText("Fine-Design_Basic_Widget_Style_Preview"));
previewPane.setBorder(titledBorder);
previewPane.setPreferredSize(new Dimension(500, 83));
previewPane.add(mobileStylePreviewPane, BorderLayout.CENTER);
@ -82,8 +85,7 @@ public class MobileStyleDefinePane extends BasicBeanPane<MobileStyle> {
backgroundPane.setLayout(new FlowLayout(FlowLayout.LEFT, 10, 5));
backgroundPane.setPreferredSize(new Dimension(500, 65));
TitledBorder titledBorder = GUICoreUtils.createTitledBorder(Toolkit.i18nText("Fine-Design_Mobile_Common_Attribute"), null);
titledBorder.setTitleFont(FRFont.getInstance("PingFangSC-Regular", Font.PLAIN, 12, Color.BLUE));
TitledBorder titledBorder = createTitledBorder(Toolkit.i18nText("Fine-Design_Mobile_Common_Attribute"));
backgroundPane.setBorder(titledBorder);
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() {
JPanel configPane = FRGUIPaneFactory.createBorderLayout_S_Pane();
TitledBorder titledBorder = GUICoreUtils.createTitledBorder(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Set"), null);
titledBorder.setTitleFont(FRFont.getInstance("PingFangSC-Regular", Font.PLAIN, 12, Color.BLUE));
TitledBorder titledBorder = createTitledBorder(Toolkit.i18nText("Fine-Design_Report_Set"));
configPane.setBorder(titledBorder);
configPane.add(this.customBeanPane, 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) {
if (ui != null) {
Graphics scratchGraphics = (g == null) ? null : g.create();
if (ui != null && g != null) {
Graphics scratchGraphics = g.create();
try {
ui.update(scratchGraphics, this);
}
finally {
} finally {
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); // 等待弹窗关闭
} catch (InterruptedException e) {
FineLoggerFactory.getLogger().error(e.getMessage(), e);
Thread.currentThread().interrupt();
}
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();
} catch (InterruptedException e) {
FineLoggerFactory.getLogger().error(e.getMessage(), e);
Thread.currentThread().interrupt();
} catch (ExecutionException 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();
} catch (InterruptedException e) {
stopLoading();
Thread.currentThread().interrupt();
} catch (ExecutionException e) {
stopLoading();
} 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
public MapSvgAttr updateBean() {
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();
}
}
Plot cloned = null;
try {
cloned = (Plot)newPlot.clone();
if(newPlot != null) {
cloned = (Plot) newPlot.clone();
}
} catch (CloneNotSupportedException e) {
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();
}
}
Plot cloned = null;
try {
cloned = (Plot)newPlot.clone();
if(newPlot != null) {
cloned = (Plot) newPlot.clone();
}
} catch (CloneNotSupportedException e) {
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();
}
}
Plot cloned = null;
try {
cloned = (Plot)newPlot.clone();
if(newPlot != null) {
cloned = (Plot) newPlot.clone();
}
} catch (CloneNotSupportedException e) {
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;
try {
cloned = (Plot) newPlot.clone();
if(newPlot != null) {
cloned = (Plot) newPlot.clone();
}
} catch (CloneNotSupportedException e) {
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));
buttonPane.add(pane);
}
pane.add(indexList_Y.get(i));
if(pane != null) {
pane.add(indexList_Y.get(i));
}
}
if(popupMenu != null){

Loading…
Cancel
Save