Browse Source

Merge branch 'release/9.0' of ssh://www.finedevelop.com:7999/~hzzz/design into release/9.0

master
hzzz 7 years ago
parent
commit
7fa3254964
  1. 2
      designer/src/com/fr/quickeditor/CellQuickEditor.java
  2. 52
      designer/src/com/fr/start/ReportSplashPane.java
  3. 1
      designer_base/src/com/fr/design/constants/UIConstants.java
  4. 3
      designer_base/src/com/fr/design/gui/UILookAndFeel.java
  5. 4
      designer_base/src/com/fr/design/gui/controlpane/UIControlPane.java
  6. 2
      designer_base/src/com/fr/design/gui/icontainer/UIEastResizableContainer.java
  7. 2
      designer_base/src/com/fr/design/gui/icontainer/UIResizableContainer.java
  8. 5
      designer_base/src/com/fr/design/gui/style/BackgroundPane.java
  9. 23
      designer_base/src/com/fr/design/gui/style/BorderPane.java
  10. 1
      designer_base/src/com/fr/design/mainframe/EastRegionContainerPane.java
  11. 7
      designer_base/src/com/fr/design/mainframe/backgroundpane/ColorBackgroundQuickPane.java
  12. 7
      designer_base/src/com/fr/start/BaseDesigner.java
  13. 72
      designer_base/src/com/fr/start/SplashPane.java
  14. 6
      designer_base/src/com/fr/start/SplashWindow.java
  15. 5
      designer_chart/src/com/fr/design/mainframe/chart/gui/data/table/MeterPlotTableDataContentPane.java
  16. 2
      designer_chart/src/com/fr/design/mainframe/chart/gui/other/ChartInteractivePane.java
  17. 2
      designer_chart/src/com/fr/plugin/chart/designer/other/VanChartInteractivePane.java
  18. 4
      designer_chart/src/com/fr/plugin/chart/designer/style/tooltip/VanChartTooltipPane.java
  19. 2
      designer_chart/src/com/fr/plugin/chart/structure/desinger/data/StructurePlotTableDataContentPane.java
  20. 8
      designer_form/src/com/fr/design/designer/creator/XBorderStyleWidgetCreator.java
  21. 9
      designer_form/src/com/fr/design/mainframe/FormHierarchyTreePane.java
  22. 11
      designer_form/src/com/fr/design/mainframe/widget/ui/FormWidgetCardPane.java

2
designer/src/com/fr/quickeditor/CellQuickEditor.java

@ -235,6 +235,8 @@ public abstract class CellQuickEditor extends QuickEditor<ElementCasePane> {
public void actionPerformed(ActionEvent e) { public void actionPerformed(ActionEvent e) {
cellInsertActions = ActionFactory.createCellInsertAction(ElementCasePane.class, tc); cellInsertActions = ActionFactory.createCellInsertAction(ElementCasePane.class, tc);
selectedIndex = comboBox.getSelectedIndex(); selectedIndex = comboBox.getSelectedIndex();
comboBox.setPopupVisible(false);
comboBox.repaint();
cellInsertActions[selectedIndex].actionPerformed(e); cellInsertActions[selectedIndex].actionPerformed(e);
comboBox.setSelectedIndex(currentSelectedIndex); comboBox.setSelectedIndex(currentSelectedIndex);
} }

52
designer/src/com/fr/start/ReportSplashPane.java

@ -3,6 +3,7 @@
*/ */
package com.fr.start; package com.fr.start;
import com.bulenkov.iconloader.IconLoader;
import com.fr.base.BaseUtils; import com.fr.base.BaseUtils;
import com.fr.base.FRContext; import com.fr.base.FRContext;
import com.fr.base.GraphHelper; import com.fr.base.GraphHelper;
@ -10,8 +11,6 @@ import com.fr.design.mainframe.bbs.BBSConstants;
import com.fr.general.GeneralContext; import com.fr.general.GeneralContext;
import com.fr.general.Inter; import com.fr.general.Inter;
import com.fr.general.ModuleContext; import com.fr.general.ModuleContext;
import com.fr.stable.Constants;
import com.fr.stable.CoreGraphHelper;
import com.fr.stable.StableUtils; import com.fr.stable.StableUtils;
import com.fr.stable.StringUtils; import com.fr.stable.StringUtils;
import com.fr.stable.module.ModuleAdapter; import com.fr.stable.module.ModuleAdapter;
@ -19,9 +18,6 @@ import com.fr.stable.module.ModuleListener;
import javax.swing.*; import javax.swing.*;
import java.awt.*; import java.awt.*;
import java.awt.font.FontRenderContext;
import java.awt.font.LineMetrics;
import java.awt.image.BufferedImage;
import java.util.Locale; import java.util.Locale;
import java.util.Random; import java.util.Random;
import java.util.TimerTask; import java.util.TimerTask;
@ -36,12 +32,12 @@ public class ReportSplashPane extends SplashPane {
private static final String SPLASH_MAC_CN = "splash_chinese_mac.png"; private static final String SPLASH_MAC_CN = "splash_chinese_mac.png";
private static final String SPLASH_MAC_EN = "splash_english_mac.png"; private static final String SPLASH_MAC_EN = "splash_english_mac.png";
private static final Color MODULE_COLOR = new Color(230, 230, 230); private static final Color MODULE_COLOR = new Color(255, 255, 255);
private static final int MODULE_INFO_X = 25; private static final int MODULE_INFO_X = 54;
private static final int MODULE_INFO_Y = 270; private static final int MODULE_INFO_Y = 340;
private static final Color THANK_COLOR = new Color(72, 216, 249); private static final Color THANK_COLOR = new Color(255, 255, 255, (int) (0.4 * 255 + 0.5));
private static final int THANK_INFO_X = 460; private static final int THANK_INFO_Y = 382;
private static final String GUEST = getRandomUser(); private static final String GUEST = getRandomUser();
@ -80,52 +76,34 @@ public class ReportSplashPane extends SplashPane {
} }
protected void paintComponent(Graphics g) { protected void paintComponent(Graphics g) {
super.paintComponent(g); Icon icon = IconLoader.getIcon(StableUtils.pathJoin(OEM_PATH, getImageName()));
Graphics2D g2d = (Graphics2D) g; icon.paintIcon(null, g, 0, 0);
Image image = getSplashImage(); paintShowText((Graphics2D) g);
ImageIcon imageIcon = new ImageIcon(image);
GraphHelper.paintImage(g2d, imageIcon.getIconWidth(), imageIcon.getIconHeight(), image, Constants.IMAGE_DEFAULT, Constants.NULL, Constants.CENTER, -1, -1);
} }
public void setShowText(String text) { public void setShowText(String text) {
this.showText = text; this.showText = text;
} }
public BufferedImage getSplashImage() { public Image getSplashImage() {
// p:初始化splashImage,其中画了字符. Icon icon = IconLoader.getIcon(StableUtils.pathJoin(OEM_PATH, getImageName()));
Image image = createSplashBackground(); return ((ImageIcon) IconLoader.getIconSnapshot(icon)).getImage();
BufferedImage splashBuffedImage = CoreGraphHelper.toBufferedImage(image);
Graphics2D splashG2d = splashBuffedImage.createGraphics();
splashG2d.setPaint(new Color(230, 230, 230));
splashG2d.setFont(new Font("Dialog", Font.PLAIN, 11));
//绘制需要显示的文本
paintShowText(splashG2d);
return splashBuffedImage;
} }
private void paintShowText(Graphics2D splashG2d) { private void paintShowText(Graphics2D splashG2d) {
FontRenderContext fontRenderContext = splashG2d.getFontRenderContext(); GraphHelper.applyRenderingHints(splashG2d);
LineMetrics fm = splashG2d.getFont().getLineMetrics("",
fontRenderContext);
double leading = fm.getLeading();
double ascent = fm.getAscent();
double height = fm.getHeight();
splashG2d.setPaint(MODULE_COLOR); splashG2d.setPaint(MODULE_COLOR);
splashG2d.setFont(new Font("Dialog", Font.PLAIN, 12)); splashG2d.setFont(new Font("Dialog", Font.PLAIN, 12));
//加载模块信息 //加载模块信息
double y = MODULE_INFO_Y + height + leading + ascent; GraphHelper.drawString(splashG2d, showText, MODULE_INFO_X, MODULE_INFO_Y);
GraphHelper.drawString(splashG2d, showText, MODULE_INFO_X, y);
//每次随机感谢一位论坛用户 //每次随机感谢一位论坛用户
if (shouldShowThanks()) { if (shouldShowThanks()) {
splashG2d.setPaint(THANK_COLOR); splashG2d.setPaint(THANK_COLOR);
String content = Inter.getLocText("FR-Designer_Thanks-To") + GUEST; String content = Inter.getLocText("FR-Designer_Thanks-To") + GUEST;
GraphHelper.drawString(splashG2d, content, THANK_INFO_X, y); GraphHelper.drawString(splashG2d, content, MODULE_INFO_X, THANK_INFO_Y);
} }
} }

1
designer_base/src/com/fr/design/constants/UIConstants.java

@ -113,6 +113,7 @@ public interface UIConstants {
public static final Color TAB_BUTTON_HOVER_SELECTED = new Color(239, 238, 243); public static final Color TAB_BUTTON_HOVER_SELECTED = new Color(239, 238, 243);
public static final Color TAB_BUTTON_PRESS = new Color(228, 227, 232); public static final Color TAB_BUTTON_PRESS = new Color(228, 227, 232);
public static final Color TAB_BUTTON_PRESS_SELECTED = new Color(236, 236, 238); public static final Color TAB_BUTTON_PRESS_SELECTED = new Color(236, 236, 238);
public static final Color POPUP_TITLE_BACKGROUND = new Color(0xd8f2fd);

3
designer_base/src/com/fr/design/gui/UILookAndFeel.java

@ -1,6 +1,5 @@
package com.fr.design.gui; package com.fr.design.gui;
import com.fr.base.BaseUtils;
import com.fr.design.gui.borders.*; import com.fr.design.gui.borders.*;
import com.fr.design.gui.frpane.UIBasicOptionPaneUI; import com.fr.design.gui.frpane.UIBasicOptionPaneUI;
import com.fr.design.gui.ibutton.UIBasicButtonUI; import com.fr.design.gui.ibutton.UIBasicButtonUI;
@ -110,8 +109,6 @@ public class UILookAndFeel extends MetalLookAndFeel {
table.put("RadioButtonMenuItem.border", border); table.put("RadioButtonMenuItem.border", border);
table.put("ToolTip.border", new BorderUIResource(new UIToolTipBorder(true))); table.put("ToolTip.border", new BorderUIResource(new UIToolTipBorder(true)));
table.put("ToolTip.borderInactive", new BorderUIResource(new UIToolTipBorder(false))); table.put("ToolTip.borderInactive", new BorderUIResource(new UIToolTipBorder(false)));
table.put("Tree.expandedIcon", BaseUtils.readIcon("/com/fr/design/images/tree/open.png"));
table.put("Tree.collapsedIcon", BaseUtils.readIcon("/com/fr/design/images/tree/close.png"));
table.put("PopupMenu.border", new UIPopupMenuBorder()); table.put("PopupMenu.border", new UIPopupMenuBorder());
table.put("PopupMenu.foreground", new ColorUIResource(255, 0, 0)); table.put("PopupMenu.foreground", new ColorUIResource(255, 0, 0));
table.put("SplitPane.dividerSize", new Integer(7)); table.put("SplitPane.dividerSize", new Integer(7));

4
designer_base/src/com/fr/design/gui/controlpane/UIControlPane.java

@ -37,6 +37,7 @@ public abstract class UIControlPane extends BasicPane implements UnrepeatedNameH
protected CardLayout cardLayout; protected CardLayout cardLayout;
protected JPanel cardPane; protected JPanel cardPane;
protected BasePlot plot; protected BasePlot plot;
private static final int TOP_TOOLBAR_HEIGHT = 24;
public UIControlPane() { public UIControlPane() {
this.initComponentPane(); this.initComponentPane();
@ -192,11 +193,10 @@ public abstract class UIControlPane extends BasicPane implements UnrepeatedNameH
topToolBar.setLayout(new BorderLayout()); topToolBar.setLayout(new BorderLayout());
ShortCut addItem = addItemShortCut().getShortCut(); ShortCut addItem = addItemShortCut().getShortCut();
addItem.intoJToolBar(topToolBar); addItem.intoJToolBar(topToolBar);
topToolBar.setBorder(BorderFactory.createEmptyBorder(2, 0, 2, 0));
double p = TableLayout.PREFERRED; double p = TableLayout.PREFERRED;
double f = TableLayout.FILL; double f = TableLayout.FILL;
double[] columnSize = { p, f}; double[] columnSize = { p, f};
double[] rowSize = {p}; double[] rowSize = {TOP_TOOLBAR_HEIGHT};
Component[][] components = new Component[][]{ Component[][] components = new Component[][]{
new Component[]{new UILabel(getAddItemText()), topToolBar}, new Component[]{new UILabel(getAddItemText()), topToolBar},
}; };

2
designer_base/src/com/fr/design/gui/icontainer/UIEastResizableContainer.java

@ -308,7 +308,7 @@ public class UIEastResizableContainer extends JPanel {
} }
} }
// g.drawImage(button, 2, ARROW_MARGIN_VERTICAL, 5, toolPaneHeight, null); // g.drawImage(button, 2, ARROW_MARGIN_VERTICAL, 5, toolPaneHeight, null);
g.drawImage(button, 18, 9, 5, 5, null); g.drawImage(button, 18, 7, 5, 10, null);
} }
} }

2
designer_base/src/com/fr/design/gui/icontainer/UIResizableContainer.java

@ -502,7 +502,7 @@ public class UIResizableContainer extends JPanel {
button = UIConstants.DRAG_LEFT_PRESS; button = UIConstants.DRAG_LEFT_PRESS;
} }
} }
g.drawImage(button, 3, ARROW_MARGIN_VERTICAL, 5, 5, null); g.drawImage(button, 3, ARROW_MARGIN_VERTICAL, 5, toolPaneHeight, null);
} else { } else {
g.drawImage(UIConstants.DRAG_BAR, 0, 0, toolPaneHeight, getHeight(), null); g.drawImage(UIConstants.DRAG_BAR, 0, 0, toolPaneHeight, getHeight(), null);
if (containerWidth == toolPaneHeight) { if (containerWidth == toolPaneHeight) {

5
designer_base/src/com/fr/design/gui/style/BackgroundPane.java

@ -33,6 +33,10 @@ public class BackgroundPane extends AbstractBasicStylePane {
protected BackgroundQuickPane[] paneList; protected BackgroundQuickPane[] paneList;
//获取当前面板
protected JPanel currentPane = null;
public BackgroundPane() { public BackgroundPane() {
this.initComponents(); this.initComponents();
} }
@ -141,6 +145,7 @@ public class BackgroundPane extends AbstractBasicStylePane {
if (pane.accept(background)) { if (pane.accept(background)) {
pane.populateBean(background); pane.populateBean(background);
typeComboBox.setSelectedIndex(i); typeComboBox.setSelectedIndex(i);
currentPane = paneList[i];
return; return;
} }
} }

23
designer_base/src/com/fr/design/gui/style/BorderPane.java

@ -16,6 +16,7 @@ import com.fr.design.gui.icombobox.LineComboBox;
import com.fr.design.gui.ilable.UILabel; import com.fr.design.gui.ilable.UILabel;
import com.fr.design.layout.TableLayout; import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper; import com.fr.design.layout.TableLayoutHelper;
import com.fr.design.mainframe.backgroundpane.ColorBackgroundQuickPane;
import com.fr.design.style.color.NewColorSelectBox; import com.fr.design.style.color.NewColorSelectBox;
import com.fr.design.utils.gui.GUICoreUtils; import com.fr.design.utils.gui.GUICoreUtils;
import com.fr.general.ComparatorUtils; import com.fr.general.ComparatorUtils;
@ -202,12 +203,24 @@ public class BorderPane extends AbstractBasicStylePane implements GlobalNameObse
CellBorderStyle cellBorderStyle = this.update(); CellBorderStyle cellBorderStyle = this.update();
HashSet<String> borderSet = new HashSet<String>(Arrays.asList(BORDERARRAY)); HashSet<String> borderSet = new HashSet<String>(Arrays.asList(BORDERARRAY));
if (borderSet.contains(globalNameListener.getGlobalName())) { if (backgroundPane.currentPane != backgroundPane.paneList[1]){
style = style.deriveBorder(cellBorderStyle.getTopStyle(), cellBorderStyle.getTopColor(), cellBorderStyle.getBottomStyle(), cellBorderStyle.getBottomColor(), if (borderSet.contains(globalNameListener.getGlobalName())) {
cellBorderStyle.getLeftStyle(), cellBorderStyle.getLeftColor(), cellBorderStyle.getRightStyle(), cellBorderStyle.getRightColor()); style = style.deriveBorder(cellBorderStyle.getTopStyle(), cellBorderStyle.getTopColor(), cellBorderStyle.getBottomStyle(), cellBorderStyle.getBottomColor(),
} else { cellBorderStyle.getLeftStyle(), cellBorderStyle.getLeftColor(), cellBorderStyle.getRightStyle(), cellBorderStyle.getRightColor());
style = style.deriveBackground(backgroundPane.update()); style = style.deriveBackground(backgroundPane.update());
} else {
style = style.deriveBackground(backgroundPane.update());
}
}else {
if (borderSet.contains(globalNameListener.getGlobalName()) && !((ColorBackgroundQuickPane) backgroundPane.currentPane).isBackGroundColor()){
style = style.deriveBorder(cellBorderStyle.getTopStyle(), cellBorderStyle.getTopColor(), cellBorderStyle.getBottomStyle(), cellBorderStyle.getBottomColor(),
cellBorderStyle.getLeftStyle(), cellBorderStyle.getLeftColor(), cellBorderStyle.getRightStyle(), cellBorderStyle.getRightColor());
style = style.deriveBackground(backgroundPane.update());
} else {
style = style.deriveBackground(backgroundPane.update());
}
} }
return style; return style;
} }

1
designer_base/src/com/fr/design/mainframe/EastRegionContainerPane.java

@ -852,6 +852,7 @@ public class EastRegionContainerPane extends UIEastResizableContainer {
setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR)); setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));
} else if (isMovable) { } else if (isMovable) {
setCursor(Cursor.getPredefinedCursor(Cursor.MOVE_CURSOR)); setCursor(Cursor.getPredefinedCursor(Cursor.MOVE_CURSOR));
setBackground(UIConstants.POPUP_TITLE_BACKGROUND);
} else { } else {
setCursor(Cursor.getDefaultCursor()); setCursor(Cursor.getDefaultCursor());
} }

7
designer_base/src/com/fr/design/mainframe/backgroundpane/ColorBackgroundQuickPane.java

@ -18,6 +18,7 @@ import java.awt.*;
public class ColorBackgroundQuickPane extends BackgroundQuickPane { public class ColorBackgroundQuickPane extends BackgroundQuickPane {
private NewColorSelectPane detailColorSelectPane; private NewColorSelectPane detailColorSelectPane;
private boolean isBackGroundColor;
public ColorBackgroundQuickPane() { public ColorBackgroundQuickPane() {
this.setLayout(FRGUIPaneFactory.createBorderLayout()); this.setLayout(FRGUIPaneFactory.createBorderLayout());
@ -28,6 +29,7 @@ public class ColorBackgroundQuickPane extends BackgroundQuickPane {
public void populateBean(Background background) { public void populateBean(Background background) {
ColorBackground colorBackgroud = (ColorBackground) background; ColorBackground colorBackgroud = (ColorBackground) background;
isBackGroundColor = false;
this.detailColorSelectPane.setColor(colorBackgroud.getColor()); this.detailColorSelectPane.setColor(colorBackgroud.getColor());
} }
@ -36,6 +38,10 @@ public class ColorBackgroundQuickPane extends BackgroundQuickPane {
return ColorBackground.getInstance(this.detailColorSelectPane.getNotNoneColor()); return ColorBackground.getInstance(this.detailColorSelectPane.getNotNoneColor());
} }
public boolean isBackGroundColor(){
return isBackGroundColor;
}
/** /**
* 给组件登记一个观察者监听事件 * 给组件登记一个观察者监听事件
* *
@ -45,6 +51,7 @@ public class ColorBackgroundQuickPane extends BackgroundQuickPane {
detailColorSelectPane.addChangeListener(new ChangeListener() { detailColorSelectPane.addChangeListener(new ChangeListener() {
public void stateChanged(ChangeEvent e) { public void stateChanged(ChangeEvent e) {
listener.doChange(); listener.doChange();
isBackGroundColor = true;
} }
}); });
} }

7
designer_base/src/com/fr/start/BaseDesigner.java

@ -64,7 +64,9 @@ public abstract class BaseDesigner extends ToolBarMenuDock {
setDebugEnv(); setDebugEnv();
} }
RestartHelper.deleteRecordFilesWhenStart(); RestartHelper.deleteRecordFilesWhenStart();
//初始化插件引擎
PluginStartup.start();
SiteCenter.getInstance(); SiteCenter.getInstance();
DesignUtils.setPort(getStartPort()); DesignUtils.setPort(getStartPort());
@ -95,8 +97,7 @@ public abstract class BaseDesigner extends ToolBarMenuDock {
DesignUtils.initLookAndFeel(); DesignUtils.initLookAndFeel();
DesignUtils.creatListeningServer(getStartPort(), startFileSuffix()); DesignUtils.creatListeningServer(getStartPort(), startFileSuffix());
//初始化插件引擎
PluginStartup.start();
// 初始化Log Handler // 初始化Log Handler
DesignerEnvManager.loadLogSetting(); DesignerEnvManager.loadLogSetting();
DesignerFrame df = createDesignerFrame(); DesignerFrame df = createDesignerFrame();

72
designer_base/src/com/fr/start/SplashPane.java

@ -1,12 +1,11 @@
/** /**
* *
*/ */
package com.fr.start; package com.fr.start;
import java.awt.Graphics; import java.awt.Graphics;
import java.awt.Graphics2D; import java.awt.Graphics2D;
import java.awt.Image; import java.awt.Image;
import java.awt.image.BufferedImage;
import javax.swing.ImageIcon; import javax.swing.ImageIcon;
import javax.swing.JPanel; import javax.swing.JPanel;
@ -19,22 +18,20 @@ import com.fr.stable.CoreGraphHelper;
/** /**
* @author neil * @author neil
*
* @date: 2015-3-13-上午10:20:43 * @date: 2015-3-13-上午10:20:43
*/ */
public class SplashPane extends JPanel{ public class SplashPane extends JPanel {
/**
* 获取已经绘制完毕的启动画面
*
* @return 绘制完毕的启动画面
*/
public Image getSplashImage() {
Image image = createSplashBackground();
return CoreGraphHelper.toBufferedImage(image);
}
/**
* 获取已经绘制完毕的启动画面
*
* @return 绘制完毕的启动画面
*
*/
public BufferedImage getSplashImage() {
Image image = createSplashBackground();
return CoreGraphHelper.toBufferedImage(image);
}
protected void paintComponent(Graphics g) { protected void paintComponent(Graphics g) {
super.paintComponent(g); super.paintComponent(g);
Graphics2D g2d = (Graphics2D) g; Graphics2D g2d = (Graphics2D) g;
@ -44,35 +41,32 @@ public class SplashPane extends JPanel{
} }
/** /**
* 设置在启动过程中, 动态改变的文本, 当前启动的模块信息 * 设置在启动过程中, 动态改变的文本, 当前启动的模块信息
* *
* @param text 指定的文本 * @param text 指定的文本
* */
*/ public void setShowText(String text) {
public void setShowText(String text) {
}
}
/** /**
* 创建启动画面的背景图片 * 创建启动画面的背景图片
* *
* @return 背景图片 * @return 背景图片
* */
*/ public Image createSplashBackground() {
public Image createSplashBackground() {
if (GeneralContext.isChineseEnv()) { if (GeneralContext.isChineseEnv()) {
return BaseUtils.readImage("/com/fr/base/images/oem/splash_chinese.png"); return BaseUtils.readImage("/com/fr/base/images/oem/splash_chinese.png");
} }
return BaseUtils.readImage("/com/fr/base/images/oem/splash_english.png"); return BaseUtils.readImage("/com/fr/base/images/oem/splash_english.png");
} }
/** /**
* 窗口关闭后取消定时获取模块信息的timer * 窗口关闭后取消定时获取模块信息的timer
* */
*/ public void releaseTimer() {
public void releaseTimer() {
}
}
} }

6
designer_base/src/com/fr/start/SplashWindow.java

@ -14,13 +14,14 @@ import com.fr.design.gui.ilable.UILabel;
import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.utils.gui.GUICoreUtils; import com.fr.design.utils.gui.GUICoreUtils;
import com.fr.stable.OperatingSystem; import com.fr.stable.OperatingSystem;
import com.sun.awt.AWTUtilities;
public class SplashWindow extends JFrame { public class SplashWindow extends JFrame {
private SplashPane splash = null; private SplashPane splash = null;
@SuppressWarnings("LeakingThisInConstructor") @SuppressWarnings("LeakingThisInConstructor")
public SplashWindow(SplashPane splashPane) { public SplashWindow(SplashPane splashPane) {
// alex:必须设置这个属性为true,才可以用透明背景 // alex:必须设置这个属性为true,才可以用透明背景
System.setProperty("sun.java2d.noddraw", "true"); System.setProperty("sun.java2d.noddraw", "true");
@ -45,7 +46,8 @@ public class SplashWindow extends JFrame {
this.setAlwaysOnTop(false); this.setAlwaysOnTop(false);
this.setUndecorated(true); this.setUndecorated(true);
AWTUtilities.setWindowOpaque(this, false);
//使窗体背景透明 //使窗体背景透明
if (OperatingSystem.isWindows()) { if (OperatingSystem.isWindows()) {
this.setBackground(new Color(0,0,0,0)); this.setBackground(new Color(0,0,0,0));

5
designer_chart/src/com/fr/design/mainframe/chart/gui/data/table/MeterPlotTableDataContentPane.java

@ -37,12 +37,9 @@ public class MeterPlotTableDataContentPane extends AbstractTableDataContentPane
valueBox = new UIComboBox(); valueBox = new UIComboBox();
filterPane = new ChartDataFilterPane(new MeterPlot(), parent); filterPane = new ChartDataFilterPane(new MeterPlot(), parent);
nameBox.setPreferredSize(new Dimension(100, 20));
valueBox.setPreferredSize(new Dimension(100, 20));
double p = TableLayout.PREFERRED; double p = TableLayout.PREFERRED;
double f = TableLayout.FILL; double f = TableLayout.FILL;
double[] columnSize = { p,f}; double[] columnSize = {f, COMPONENT_WIDTH};
double[] rowSize = {p, p}; double[] rowSize = {p, p};
Component[][] components = createComponents(); Component[][] components = createComponents();

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

@ -216,7 +216,7 @@ public class ChartInteractivePane extends BasicScrollPane<Chart> implements UIOb
@Override @Override
public void mouseClicked(MouseEvent e) { public void mouseClicked(MouseEvent e) {
if (valueFormatPane == null) { if (valueFormatPane == null) {
valueFormatPane = new FormatPane(); valueFormatPane = new FormatPaneWithOutFont();
} }
Point comPoint = dataPointValueFormat.getLocationOnScreen(); Point comPoint = dataPointValueFormat.getLocationOnScreen();
Point arrowPoint = new Point(comPoint.x - DET, comPoint.y + dataPointValueFormat.getHeight()); Point arrowPoint = new Point(comPoint.x - DET, comPoint.y + dataPointValueFormat.getHeight());

2
designer_chart/src/com/fr/plugin/chart/designer/other/VanChartInteractivePane.java

@ -111,7 +111,7 @@ public class VanChartInteractivePane extends AbstractVanChartScrollPane<Chart> {
return null; return null;
} }
zoomWidget = new UIButtonGroup(new String[]{Inter.getLocText("Plugin-ChartF_Open"), Inter.getLocText("Plugin-ChartF_Close")}); zoomWidget = new UIButtonGroup(new String[]{Inter.getLocText("Plugin-ChartF_Open"), Inter.getLocText("Plugin-ChartF_Close")});
zoomResize = new UIButtonGroup(new String[]{Inter.getLocText("Plugin-ChartF_Open"), Inter.getLocText("Plugin-ChartF_Close")}); zoomResize = new UIButtonGroup(new String[]{Inter.getLocText("Plugin-ChartF_Change"), Inter.getLocText("Plugin-ChartF_Non_Adjustment")});
from = new TinyFormulaPane(); from = new TinyFormulaPane();
to = new TinyFormulaPane(); to = new TinyFormulaPane();
zoomType = new UIButtonGroup(getNameArray(), getValueArray()); zoomType = new UIButtonGroup(getNameArray(), getValueArray());

4
designer_chart/src/com/fr/plugin/chart/designer/style/tooltip/VanChartTooltipPane.java

@ -58,12 +58,12 @@ public class VanChartTooltipPane extends AbstractVanChartScrollPane<Chart> {
if(chart == null) { if(chart == null) {
return; return;
} }
ConditionAttr attrList = chart.getPlot().getConditionCollection().getDefaultAttr(); AttrTooltip attrTooltip = tooltipPane.update();
DataSeriesCondition attr = ((VanChartPlot)chart.getPlot()).getAttrTooltipFromConditionCollection(); DataSeriesCondition attr = ((VanChartPlot)chart.getPlot()).getAttrTooltipFromConditionCollection();
ConditionAttr attrList = chart.getPlot().getConditionCollection().getDefaultAttr();
if(attr != null) { if(attr != null) {
attrList.remove(attr); attrList.remove(attr);
} }
AttrTooltip attrTooltip = tooltipPane.update();
if (attrTooltip != null) { if (attrTooltip != null) {
attrList.addDataSeriesCondition(attrTooltip); attrList.addDataSeriesCondition(attrTooltip);
} }

2
designer_chart/src/com/fr/plugin/chart/structure/desinger/data/StructurePlotTableDataContentPane.java

@ -31,7 +31,7 @@ public class StructurePlotTableDataContentPane extends AbstractTableDataContentP
public StructurePlotTableDataContentPane() { public StructurePlotTableDataContentPane() {
double p = TableLayout.PREFERRED; double p = TableLayout.PREFERRED;
double f = TableLayout.FILL; double f = TableLayout.FILL;
double[] columnSize = {p, f}; double[] columnSize = {f, COMPONENT_WIDTH};
double[] rowSize = {p, p, p, p, p, p}; double[] rowSize = {p, p, p, p, p, p};
nodeName = new UIComboBox(); nodeName = new UIComboBox();

8
designer_form/src/com/fr/design/designer/creator/XBorderStyleWidgetCreator.java

@ -148,5 +148,13 @@ public class XBorderStyleWidgetCreator extends XWidgetCreator{
public boolean supportSetVisibleOrEnable(){ public boolean supportSetVisibleOrEnable(){
return false; return false;
} }
/**
* data属性改变触发其他操作
*
*/
public void firePropertyChange(){
initStyle();
}
} }

9
designer_form/src/com/fr/design/mainframe/FormHierarchyTreePane.java

@ -92,6 +92,7 @@ public class FormHierarchyTreePane extends FormDockView implements HierarchyTree
public void refreshDockingView() { public void refreshDockingView() {
FormDesigner formDesigner = this.getEditingFormDesigner(); FormDesigner formDesigner = this.getEditingFormDesigner();
removeAll(); removeAll();
changeVarNameAction = null;
if(this.componentTree != null) { if(this.componentTree != null) {
this.componentTree.removeAll(); this.componentTree.removeAll();
} }
@ -156,10 +157,10 @@ public class FormHierarchyTreePane extends FormDockView implements HierarchyTree
protected ShortCut4JControlPane[] createShortcuts() { protected ShortCut4JControlPane[] createShortcuts() {
ArrayList<ShortCut4JControlPane> shortCutList = new ArrayList<>(); ArrayList<ShortCut4JControlPane> shortCutList = new ArrayList<>();
FormDesigner designer = getEditingFormDesigner(); FormDesigner designer = getEditingFormDesigner();
if (changeVarNameAction == null) { if (changeVarNameAction == null) {
changeVarNameAction = new ChangeNameAction(designer); changeVarNameAction = new ChangeNameAction(designer);
} }
shortCutList.add(new WidgetEnableShortCut(changeVarNameAction)); shortCutList.add(new WidgetEnableShortCut(changeVarNameAction));
for (Action action : designer.getActions()) { for (Action action : designer.getActions()) {
shortCutList.add(new WidgetEnableShortCut((UndoableAction)action)); shortCutList.add(new WidgetEnableShortCut((UndoableAction)action));
} }

11
designer_form/src/com/fr/design/mainframe/widget/ui/FormWidgetCardPane.java

@ -8,7 +8,6 @@ import com.fr.design.foldablepane.UIExpandablePane;
import com.fr.design.gui.frpane.AbstractAttrNoScrollPane; import com.fr.design.gui.frpane.AbstractAttrNoScrollPane;
import com.fr.design.gui.frpane.AttributeChangeListener; import com.fr.design.gui.frpane.AttributeChangeListener;
import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.mainframe.DesignerContext;
import com.fr.design.mainframe.FormDesigner; import com.fr.design.mainframe.FormDesigner;
import com.fr.design.widget.DataModify; import com.fr.design.widget.DataModify;
import com.fr.design.widget.Operator; import com.fr.design.widget.Operator;
@ -152,8 +151,7 @@ public class FormWidgetCardPane extends AbstractAttrNoScrollPane {
private void initDefinePane() { private void initDefinePane() {
currentEditorDefinePane = null; currentEditorDefinePane = null;
boolean dedicateLayout = xCreator.acceptType(XWScaleLayout.class) && xCreator.getComponentCount() > 0 && ((XCreator) xCreator.getComponent(0)).shouldScaleCreator() || xCreator.acceptType(XWTitleLayout.class); XCreator creator = getXCreatorDedicated();
XCreator creator = dedicateLayout ? (XCreator) xCreator.getComponent(0) : xCreator;
FormWidgetDefinePaneFactoryBase.RN rn = FormWidgetDefinePaneFactoryBase.createWidgetDefinePane(creator, creator.toData(), new Operator() { FormWidgetDefinePaneFactoryBase.RN rn = FormWidgetDefinePaneFactoryBase.createWidgetDefinePane(creator, creator.toData(), new Operator() {
@Override @Override
public void did(DataCreatorUI ui, String cardName) { public void did(DataCreatorUI ui, String cardName) {
@ -168,6 +166,10 @@ public class FormWidgetCardPane extends AbstractAttrNoScrollPane {
currentEditorDefinePane = definePane; currentEditorDefinePane = definePane;
} }
private XCreator getXCreatorDedicated(){
boolean dedicateLayout = xCreator.acceptType(XWScaleLayout.class) && xCreator.getComponentCount() > 0 && ((XCreator) xCreator.getComponent(0)).shouldScaleCreator() || xCreator.acceptType(XWTitleLayout.class);
return dedicateLayout ? (XCreator) xCreator.getComponent(0) : xCreator;
}
@Override @Override
public String title4PopupWindow() { public String title4PopupWindow() {
@ -217,7 +219,8 @@ public class FormWidgetCardPane extends AbstractAttrNoScrollPane {
} }
public void fireValueChanged() { public void fireValueChanged() {
xCreator.firePropertyChange(); XCreator creator = getXCreatorDedicated();
creator.firePropertyChange();
designer.fireTargetModified(); designer.fireTargetModified();
designer.refreshDesignerUI(); designer.refreshDesignerUI();
} }

Loading…
Cancel
Save