Browse Source

REPORT-2897 9.0设计器修改

修改代码质量,加了一下方法备注
master
MoMeak 7 years ago
parent
commit
8ad699c1ba
  1. 2
      designer/src/com/fr/design/mainframe/JWorkBook.java
  2. 2
      designer/src/com/fr/design/mainframe/ReportComponentComposite.java
  3. 2
      designer/src/com/fr/design/mainframe/form/FormReportComponentComposite.java
  4. 2
      designer/src/com/fr/poly/PolyDesignUI.java
  5. 8
      designer/src/com/fr/poly/creator/ECBlockCreator.java
  6. 10
      designer_base/src/com/fr/design/mainframe/JTemplate.java
  7. 2
      designer_form/src/com/fr/design/mainframe/FormArea.java
  8. 19
      designer_form/src/com/fr/design/mainframe/JForm.java

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

@ -371,8 +371,6 @@ public class JWorkBook extends JTemplate<WorkBook, WorkBookUndoState> {
HistoryTemplateListPane.getInstance().getCurrentEditingTemplate().setJTemplateResolution(resolution); HistoryTemplateListPane.getInstance().getCurrentEditingTemplate().setJTemplateResolution(resolution);
polyDezi.updateUI(); polyDezi.updateUI();
} }
// reportComposite.centerCardPane.editingComponet.elementCasePane.getGrid().setVerticalValue(10);
HistoryTemplateListPane.getInstance().getCurrentEditingTemplate().fireTargetModified(); HistoryTemplateListPane.getInstance().getCurrentEditingTemplate().fireTargetModified();
} }
@Override @Override

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

@ -79,7 +79,7 @@ public class ReportComponentComposite extends JComponent {
} }
@Override @Override
public void keyPressed(KeyEvent e) { public void keyPressed(KeyEvent e) {
if( e.getKeyText(e.getKeyCode()).toLowerCase().equals("ctrl")){ if( e.isControlDown()){
isCtrl = true ; isCtrl = true ;
} }
} }

2
designer/src/com/fr/design/mainframe/form/FormReportComponentComposite.java

@ -62,7 +62,7 @@ public class FormReportComponentComposite extends JComponent implements TargetMo
} }
@Override @Override
public void keyPressed(KeyEvent e) { public void keyPressed(KeyEvent e) {
if( e.getKeyText(e.getKeyCode()).toLowerCase().equals("ctrl")){ if( e.isControlDown()){
isCtrl = true ; isCtrl = true ;
} }
} }

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

@ -47,8 +47,6 @@ public class PolyDesignUI extends ComponentUI {
private static final double SCROLL_POINT = 50; private static final double SCROLL_POINT = 50;
private static final int SCROLL_DISTANCE = 15; private static final int SCROLL_DISTANCE = 15;
private static final int CREATORWIDTH = 30;
private static final int CREATORGEIGHT = 19;
private static final int TEN = 10; private static final int TEN = 10;
private static final int HHUNDRED = 100; private static final int HHUNDRED = 100;
private PolyDesigner designer; private PolyDesigner designer;

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

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

10
designer_base/src/com/fr/design/mainframe/JTemplate.java

@ -143,11 +143,13 @@ public abstract class JTemplate<T extends IOFile, U extends BaseUndoState<?>> ex
return undoState; return undoState;
} }
/**
* set/get 模板屏幕分辨率
*/
public abstract void setJTemplateResolution(int resolution); public abstract void setJTemplateResolution(int resolution);
public abstract int getJTemplateResolution(); public abstract int getJTemplateResolution();
;
/** /**
* 初始化权限细粒度撤销状态 * 初始化权限细粒度撤销状态
@ -218,10 +220,16 @@ public abstract class JTemplate<T extends IOFile, U extends BaseUndoState<?>> ex
*/ */
public abstract void removeParameterPaneSelection(); public abstract void removeParameterPaneSelection();
/**
* 缩放参数
*/
public abstract void setScale(int resolution); public abstract void setScale(int resolution);
public abstract int getScale(); public abstract int getScale();
/**
* 缩放参数自适应
*/
public abstract int selfAdaptUpdate(); public abstract int selfAdaptUpdate();
protected abstract DesignModelAdapter<T, ?> createDesignModel(); protected abstract DesignModelAdapter<T, ?> createDesignModel();

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

@ -114,7 +114,7 @@ public class FormArea extends JComponent implements ScrollRulerComponent {
} }
@Override @Override
public void keyPressed(KeyEvent e) { public void keyPressed(KeyEvent e) {
if( e.getKeyText(e.getKeyCode()).toLowerCase().equals("ctrl")){ if( e.isControlDown()){
isCtrl = true ; isCtrl = true ;
} }
} }

19
designer_form/src/com/fr/design/mainframe/JForm.java

@ -260,25 +260,6 @@ public class JForm extends JTemplate<Form, FormUndoState> implements BaseJForm {
@Override @Override
public void setScale(int resolution) { public void setScale(int resolution) {
// this.resolution = resolution;
// ElementCasePane elementCasePane = ((FormReportComponentComposite)reportComposite).elementCaseDesigner.getEditingElementCasePane();
// elementCasePane.setResolution(resolution);
// elementCasePane.getGrid().getGridMouseAdapter().setResolution(resolution);
// elementCasePane.getGrid().setResolution(resolution);
// //更新Grid
// Grid grid = elementCasePane.getGrid();
// DynamicUnitList rowHeightList = ReportHelper.getRowHeightList(elementCasePane.getEditingElementCase());
// DynamicUnitList columnWidthList = ReportHelper.getColumnWidthList(elementCasePane.getEditingElementCase());
// grid.setVerticalExtent(GridUtils.getExtentValue(0, rowHeightList, grid.getHeight(), resolution));
// grid.setHorizontalExtent(GridUtils.getExtentValue(0, columnWidthList, grid.getWidth(), resolution));
// elementCasePane.getGrid().updateUI();
// //更新Column和Row
// ((DynamicScrollBar)elementCasePane.getVerticalScrollBar()).setDpi(resolution);
// ((DynamicScrollBar)elementCasePane.getHorizontalScrollBar()).setDpi(resolution);
// elementCasePane.getGridColumn().setResolution(resolution);
// elementCasePane.getGridColumn().updateUI();
// elementCasePane.getGridRow().setResolution(resolution);
// elementCasePane.getGridRow().updateUI();
} }
@Override @Override

Loading…
Cancel
Save