Browse Source

提交

master
MoMeak 7 years ago
parent
commit
c5c982f7a5
  1. 6
      designer/src/com/fr/design/mainframe/ElementCasePane.java
  2. 2
      designer/src/com/fr/design/mainframe/ReportComponentComposite.java
  3. 9
      designer_base/src/com/fr/design/gui/ibutton/UIToggleButton.java
  4. 3
      designer_base/src/com/fr/design/gui/ispinner/UISpinner.java
  5. 2
      designer_base/src/com/fr/design/style/color/NewColorSelectBox.java
  6. 8
      designer_base/src/com/fr/start/BaseDesigner.java
  7. 20
      designer_form/src/com/fr/design/mainframe/FormArea.java

6
designer/src/com/fr/design/mainframe/ElementCasePane.java

@ -1325,7 +1325,7 @@ public abstract class ElementCasePane<T extends TemplateElementCase> extends Tar
* @return 返回正在编辑的状态.
*/
public EditingState createEditingState() {
return new ElementCaseEditingState(this.selection, this.verScrollBar.getValue(), this.horScrollBar.getValue());
return new ElementCaseEditingState(this.selection, this.verScrollBar.getValue(), this.horScrollBar.getValue(), this.getResolution());
}
public void setCellNeedTOFormat(CellSelection selection) {
@ -1341,10 +1341,12 @@ public abstract class ElementCasePane<T extends TemplateElementCase> extends Tar
protected Selection selection;
protected int verticalValue = 0;
protected int horizontalValue = 0;
protected int resolution = ScreenResolution.getScreenResolution();
protected ElementCaseEditingState(Selection selection, int verticalValue, int horizontalValue) {
protected ElementCaseEditingState(Selection selection, int verticalValue, int horizontalValue, int resolution) {
try {
this.selection = selection.clone();
this.resolution = resolution;
} catch (CloneNotSupportedException e) {
throw new RuntimeException(e);
}

2
designer/src/com/fr/design/mainframe/ReportComponentComposite.java

@ -111,7 +111,7 @@ public class ReportComponentComposite extends JComponent {
return;
}
centerCardPane.populate(workbook.getTemplateReport(newIndex));
// (ElementCasePane)templateStateList.get(newIndex-2).revert();
if (parentContainer != null) {
parentContainer.setDownPane(ReportComponentComposite.this);
}

9
designer_base/src/com/fr/design/gui/ibutton/UIToggleButton.java

@ -1,8 +1,6 @@
package com.fr.design.gui.ibutton;
import java.awt.Graphics;
import java.awt.Graphics2D;
import java.awt.Shape;
import java.awt.*;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import java.awt.event.MouseListener;
@ -125,6 +123,11 @@ public class UIToggleButton extends UIButton implements GlobalNameObserver{
}
}
@Override
public Insets getInsets() {
return new Insets(0, 0, 0, 0);
}
@Override
protected void paintBorder(Graphics g) {
if (!isBorderPainted()) {

3
designer_base/src/com/fr/design/gui/ispinner/UISpinner.java

@ -62,6 +62,9 @@ public class UISpinner extends JPanel implements UIObserver, GlobalNameObserver
if (uiObserverListener == null) {
return;
}
if (globalNameListener != null && shouldResponseNameListener()){
globalNameListener.setGlobalName(spinnerName);
}
uiObserverListener.doChange();
}
});

2
designer_base/src/com/fr/design/style/color/NewColorSelectBox.java

@ -38,7 +38,7 @@ public class NewColorSelectBox extends AbstractSelectBox<Color> implements UIObs
if(uiObserverListener == null){
return;
}
if (globalNameListener != null && shouldResponseNameListener()){
if (globalNameListener != null && shouldResponseNameListener() && globalNameListener.getGlobalName().length() != 0){
globalNameListener.setGlobalName(newColorSelectBoxName);
}
uiObserverListener.doChange();

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

@ -57,10 +57,10 @@ public abstract class BaseDesigner extends ToolBarMenuDock {
DesignUtils.setPort(getStartPort());
// 如果端口被占用了 说明程序已经运行了一次,也就是说,已经建立一个监听服务器,现在只要给服务器发送命令就好了
if (DesignUtils.isStarted()) {
DesignUtils.clientSend(args);
return;
}
// if (DesignUtils.isStarted()) {
// DesignUtils.clientSend(args);
// return;
// }
//下面这两句的位置不能随便调换,因为会影响语言切换的问题
initLanguage();

20
designer_form/src/com/fr/design/mainframe/FormArea.java

@ -119,7 +119,7 @@ public class FormArea extends JComponent implements ScrollRulerComponent {
// slidePane = new UINumberSlidePane(SLIDER_MIN, SLIDER_FLOAT);
// slidePane.setPreferredSize(new Dimension(260,20));
slidePane = JFormSliderPane.getInstance();
slidePane.setPreferredSize(new Dimension(350, 20));
slidePane.setPreferredSize(new Dimension(200, 0));
JPanel resizePane = TableLayoutHelper.createCommonTableLayoutPane(new JComponent[][]{
@ -130,8 +130,8 @@ public class FormArea extends JComponent implements ScrollRulerComponent {
setWidgetsConfig();
// 先初始话滑块及对应事件,然后获取分辨率调整容器的显示大小
slidePane.setEnabled(false);
slidePane.setVisible(true);
initTransparent();
slidePane.setVisible(false);
// initTransparent();
initCalculateSize();
}
@ -162,11 +162,15 @@ public class FormArea extends JComponent implements ScrollRulerComponent {
jf.resolution = (int) value;
jf.getFormDesign().setResolution((int) value);
jf.getFormDesign().getArea().resolution = (int) value;
reCalculateRoot(value, true);
JTemplate form = HistoryTemplateListPane.getInstance().getCurrentEditingTemplate();
if (form != null) {
form.fireTargetModified();
}
double times = (double) resolution / 100;
// widthPane.setValue((int)(widthPane.getValue() * times));
changeWidthPaneValue((int)(widthPane.getValue() * times));
changeHeightPaneValue((int)(heightPane.getValue() * times));
// reCalculateRoot(value, true);
// JTemplate form = HistoryTemplateListPane.getInstance().getCurrentEditingTemplate();
// if (form != null) {
// form.fireTargetModified();
// }
}
};

Loading…
Cancel
Save