Browse Source

Merge branch 'release/9.0' of http://cloud.finedevelop.com:2015/scm/~mango/m_design into release/9.0

master
mengao 7 years ago
parent
commit
68bac045c3
  1. 19
      designer/src/com/fr/poly/PolyDesignUI.java
  2. 10
      designer/src/com/fr/poly/creator/BlockCreator.java
  3. 6
      designer/src/com/fr/poly/creator/ECBlockCreator.java
  4. 5
      designer_base/src/com/fr/start/BaseDesigner.java
  5. 3
      designer_chart/src/com/fr/design/ChartTypeInterfaceManager.java
  6. 2
      designer_chart/src/com/fr/plugin/chart/map/designer/type/VanChartMapSourceChoosePane.java
  7. 9
      designer_form/src/com/fr/design/designer/creator/DedicateLayoutContainer.java
  8. 1
      designer_form/src/com/fr/design/mainframe/widget/ui/FormWidgetCardPane.java

19
designer/src/com/fr/poly/PolyDesignUI.java

@ -220,18 +220,21 @@ public class PolyDesignUI extends ComponentUI {
ArrayList<JComponent> dbcomponents = new ArrayList<JComponent>();
// richer:禁止双缓冲行为,否则会出现两个图像
ComponentUtils.disableBuffer(comp, dbcomponents);
if (comp instanceof ECBlockCreator) {
Graphics clipg = g.create((int) (x * time), (int) (y * time), (int) (width * time), (int) (height * time));
comp.paint(clipg);
clipg.dispose();
}else {
BufferedImage img = CoreGraphHelper.createBufferedImage(comp.getWidth(), comp.getHeight(), BufferedImage.TYPE_INT_RGB);
// if (comp instanceof ECBlockCreator) {
// Graphics clipg = g.create((int) (x * time), (int) (y * time), (int) (width * time), (int) (height * time));
// comp.paint(clipg);
// clipg.dispose();
// }else {
BufferedImage img = CoreGraphHelper.createBufferedImage(comp.getWidth(), comp.getHeight(), BufferedImage.TYPE_4BYTE_ABGR);
Graphics2D g2d = img.createGraphics();
g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
comp.printAll(g2d);
g2d.dispose();
g.drawImage(img, (int) (x * time), (int) (y * time), (int) (width * time), (int) (height * time),null);
}
g2d.dispose();
// }
ComponentUtils.resetBuffer(dbcomponents);
}

10
designer/src/com/fr/poly/creator/BlockCreator.java

@ -114,10 +114,12 @@ public abstract class BlockCreator<T extends TemplateBlock> extends JComponent i
public Rectangle getEditorBounds() {
Rectangle bounds = this.getBounds();
Dimension d = getEditor().getCornerSize();
bounds.x -= d.width + designer.getHorizontalValue();
bounds.y -= d.height + designer.getVerticalValue();
bounds.width += d.width + PolyConstants.OPERATION_SIZE;
bounds.height += d.height + PolyConstants.OPERATION_SIZE;
//ECBlockCreator缩放的时候边框需要重新算下
double times = this.designer.getResolution() / (double)resolution;
bounds.x -= d.width/times + designer.getHorizontalValue();
bounds.y -= d.height/times + designer.getVerticalValue();
bounds.width += Math.ceil(d.width/times + PolyConstants.OPERATION_SIZE/times);
bounds.height += Math.ceil(d.height/times + PolyConstants.OPERATION_SIZE/times);
return bounds;
}

6
designer/src/com/fr/poly/creator/ECBlockCreator.java

@ -23,8 +23,6 @@ import com.fr.stable.unit.UnitRectangle;
*/
public class ECBlockCreator extends BlockCreator<PolyECBlock> {
private ECBlockEditor editor;
private static final int CREATOR_WIDTH = 20;
private static final int CREATOR_HEIGHT = 9;
public ECBlockCreator() {
@ -69,12 +67,12 @@ public class ECBlockCreator extends BlockCreator<PolyECBlock> {
@Override
public int getX(float time) {
return Math.round ((this.getX() - CREATOR_WIDTH) * time) + CREATOR_WIDTH;
return Math.round (this.getX() * time);
}
@Override
public int getY(float time) {
return Math.round ((this.getY() - CREATOR_HEIGHT) * time) + CREATOR_HEIGHT;
return Math.round (this.getY() * time);
}
/**

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

@ -32,6 +32,7 @@ import com.fr.plugin.PluginCollector;
import com.fr.plugin.conversion.PluginConversionModule;
import com.fr.plugin.manage.PluginManager;
import com.fr.plugin.manage.PluginStartup;
import com.fr.register.Register;
import com.fr.stable.ArrayUtils;
import com.fr.stable.BuildContext;
import com.fr.stable.OperatingSystem;
@ -61,8 +62,8 @@ public abstract class BaseDesigner extends ToolBarMenuDock {
public BaseDesigner(String[] args) {
RestartHelper.deleteRecordFilesWhenStart();
//初始化插件引擎
PluginStartup.start();
//启动core
Register.load();
//标记一下是设计器启动
PluginConversionModule.getInstance().markDesignerStart();
SiteCenter.getInstance();

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

@ -69,6 +69,7 @@ import com.fr.plugin.chart.map.MapIndependentVanChartInterface;
import com.fr.plugin.chart.map.VanChartMapPlot;
import com.fr.plugin.chart.multilayer.MultiPieIndependentVanChartInterface;
import com.fr.plugin.chart.multilayer.VanChartMultiPiePlot;
import com.fr.plugin.chart.phantom.VanChartPhantomService;
import com.fr.plugin.chart.pie.PieIndependentVanChartInterface;
import com.fr.plugin.chart.radar.RadarIndependentVanChartInterface;
import com.fr.plugin.chart.radar.VanChartRadarPlot;
@ -157,6 +158,8 @@ public class ChartTypeInterfaceManager implements ExtraChartDesignClassManagerPr
@Override
public void run() {
VanChartPhantomService.startPhantomService();
initAllChartsDemoImage(allCharts);
}
}).start();

2
designer_chart/src/com/fr/plugin/chart/map/designer/type/VanChartMapSourceChoosePane.java

@ -564,7 +564,7 @@ public class VanChartMapSourceChoosePane extends JPanel implements UIObserver {
mapDataTree.changeRootNode(this.getRootNode());
if(samePlotChange) {
mapPlot.setGeoUrl(GEOJSONHelper.getInstance().getDefaultJSONURL());
mapPlot.setGeoUrl(GEOJSONHelper.getDefaultJSONURL());
mapDataTree.selectDefaultTreeNode();
selectTreePath = mapDataTree.getSelectionPath();
sourceComboBox.setSelectedItem(selectTreePath);

9
designer_form/src/com/fr/design/designer/creator/DedicateLayoutContainer.java

@ -66,6 +66,15 @@ public abstract class DedicateLayoutContainer extends XLayoutContainer {
child.toData().setWidgetName(name);
}
/**
* 重置组件的可见性
* @param visible 可见性
*/
public void resetVisible(boolean visible){
super.resetVisible(visible);
XCreator child = getXCreator(XWScaleLayout.INDEX);
child.toData().setVisible(visible);
}
/**
* 返回对应属性表的组件scale和title返回其子组件
*

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

@ -213,6 +213,7 @@ public class FormWidgetCardPane extends AbstractAttrNoScrollPane {
if (ComparatorUtils.equals(getGlobalName(), Inter.getLocText("FR-Designer_Basic")) && widgetPropertyPane != null) {
widgetPropertyPane.update(widget);
xCreator.resetCreatorName(widget.getWidgetName());
xCreator.resetVisible(widget.isVisible());
designer.getEditListenerTable().fireCreatorModified(xCreator, DesignerEvent.CREATOR_RENAMED);
return;
}

Loading…
Cancel
Save