Browse Source

Merge remote-tracking branch 'origin/release/9.0' into release/9.0

master
mengao 7 years ago
parent
commit
cb725b6d5f
  1. 28
      designer/src/com/fr/design/mainframe/ReportComponentComposite.java
  2. 2
      designer/src/com/fr/design/mainframe/ReportFloatPane.java
  3. 43
      designer/src/com/fr/design/mainframe/alphafine/component/AlphaFineDialog.java
  4. BIN
      designer/src/com/fr/design/mainframe/alphafine/images/no_result.png
  5. 37
      designer/src/com/fr/design/mainframe/alphafine/preview/ActionPreviewPane.java
  6. 31
      designer/src/com/fr/design/mainframe/alphafine/preview/NoResultPane.java
  7. 10
      designer/src/com/fr/design/mainframe/alphafine/search/manager/ActionSearchManager.java
  8. 9
      designer/src/com/fr/design/mainframe/alphafine/search/manager/DocumentSearchManager.java
  9. 9
      designer/src/com/fr/design/mainframe/alphafine/search/manager/FileSearchManager.java
  10. 9
      designer/src/com/fr/design/mainframe/alphafine/search/manager/PluginSearchManager.java
  11. 24
      designer/src/com/fr/design/mainframe/form/FormReportComponentComposite.java
  12. 4
      designer/src/com/fr/grid/GridColumn.java
  13. 15
      designer/src/com/fr/grid/GridColumnUI.java
  14. 13
      designer/src/com/fr/grid/GridCorner.java
  15. 2
      designer/src/com/fr/grid/GridMouseAdapter.java
  16. 4
      designer/src/com/fr/grid/GridRow.java
  17. 11
      designer/src/com/fr/grid/GridRowUI.java
  18. 60
      designer/src/com/fr/poly/PolyDesigner.java
  19. 6
      designer_base/src/com/fr/design/editor/DoubleDeckValueEditorPane.java
  20. 6
      designer_base/src/com/fr/design/gui/controlpane/UIControlPane.java
  21. 4
      designer_base/src/com/fr/design/gui/icombobox/UIComboBoxUI.java
  22. 1
      designer_base/src/com/fr/design/locale/designer.properties
  23. 1
      designer_base/src/com/fr/design/locale/designer_en_US.properties
  24. 1
      designer_base/src/com/fr/design/locale/designer_zh_CN.properties
  25. 1
      designer_base/src/com/fr/design/locale/designer_zh_TW.properties
  26. 41
      designer_base/src/com/fr/design/mainframe/EastRegionContainerPane.java
  27. 5
      designer_base/src/com/fr/design/mainframe/toolbar/ToolBarMenuDock.java
  28. 5
      designer_base/src/com/fr/design/present/dict/DatabaseDictPane.java
  29. 18
      designer_base/src/com/fr/design/style/AbstractSelectBox.java
  30. 2
      designer_base/src/com/fr/design/utils/gui/GUIPaintUtils.java
  31. 25
      designer_form/src/com/fr/design/mainframe/FormArea.java

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

@ -2,6 +2,7 @@ package com.fr.design.mainframe;
import com.fr.base.FRContext; import com.fr.base.FRContext;
import com.fr.base.ScreenResolution; import com.fr.base.ScreenResolution;
import com.fr.common.inputevent.InputEventBaseOnOS;
import com.fr.design.designer.EditingState; import com.fr.design.designer.EditingState;
import com.fr.design.event.TargetModifiedListener; import com.fr.design.event.TargetModifiedListener;
import com.fr.design.file.HistoryTemplateListPane; import com.fr.design.file.HistoryTemplateListPane;
@ -11,6 +12,7 @@ import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.general.Inter; import com.fr.general.Inter;
import com.fr.grid.Grid; import com.fr.grid.Grid;
import com.fr.main.impl.WorkBook; import com.fr.main.impl.WorkBook;
import com.fr.poly.PolyDesigner;
import com.fr.report.report.TemplateReport; import com.fr.report.report.TemplateReport;
import javax.swing.*; import javax.swing.*;
@ -45,9 +47,6 @@ public class ReportComponentComposite extends JComponent {
private JSliderPane jSliderContainer; private JSliderPane jSliderContainer;
private boolean isCtrl = false;
/** /**
* Constructor with workbook.. * Constructor with workbook..
*/ */
@ -66,29 +65,10 @@ public class ReportComponentComposite extends JComponent {
jSliderContainer.getSelfAdaptButton().addItemListener(selfAdaptButtonItemListener); jSliderContainer.getSelfAdaptButton().addItemListener(selfAdaptButtonItemListener);
} }
KeyListener showValSpinnerKeyListener = new KeyListener() {
@Override
public void keyTyped(KeyEvent e) {
}
@Override
public void keyPressed(KeyEvent e) {
if (e.isControlDown()) {
isCtrl = true;
}
}
@Override
public void keyReleased(KeyEvent e) {
isCtrl = false;
}
};
MouseWheelListener showValSpinnerMouseWheelListener = new MouseWheelListener() { MouseWheelListener showValSpinnerMouseWheelListener = new MouseWheelListener() {
@Override @Override
public void mouseWheelMoved(MouseWheelEvent e) { public void mouseWheelMoved(MouseWheelEvent e) {
if (isCtrl) { if (InputEventBaseOnOS.isControlDown(e)) {
int dir = e.getWheelRotation(); int dir = e.getWheelRotation();
int old_resolution = (int) jSliderContainer.getShowVal().getValue(); int old_resolution = (int) jSliderContainer.getShowVal().getValue();
jSliderContainer.getShowVal().setValue(old_resolution - (dir * MIN)); jSliderContainer.getShowVal().setValue(old_resolution - (dir * MIN));
@ -149,12 +129,12 @@ public class ReportComponentComposite extends JComponent {
} }
if (centerCardPane.editingComponet.elementCasePane == null) { if (centerCardPane.editingComponet.elementCasePane == null) {
centerCardPane.getPolyDezi().polyArea.addMouseWheelListener(showValSpinnerMouseWheelListener);
return; return;
} }
Grid grid = centerCardPane.editingComponet.elementCasePane.getGrid(); Grid grid = centerCardPane.editingComponet.elementCasePane.getGrid();
this.centerCardPane.editingComponet.elementCasePane.getGrid().addMouseWheelListener(showValSpinnerMouseWheelListener); this.centerCardPane.editingComponet.elementCasePane.getGrid().addMouseWheelListener(showValSpinnerMouseWheelListener);
this.centerCardPane.editingComponet.elementCasePane.getGrid().addKeyListener(showValSpinnerKeyListener);
if (!grid.hasFocus() && grid.isRequestFocusEnabled()) { if (!grid.hasFocus() && grid.isRequestFocusEnabled()) {
grid.requestFocus(); grid.requestFocus();

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

@ -62,7 +62,7 @@ public class ReportFloatPane extends JPanel {
new Component[]{new UILabel(), new UILabel(Inter.getLocText("FR-Designer_Add_FloatElement")), emptyLabel, toolBarPane}, new Component[]{new UILabel(), new UILabel(Inter.getLocText("FR-Designer_Add_FloatElement")), emptyLabel, toolBarPane},
}; };
JPanel leftTopPane = TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize); JPanel leftTopPane = TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize);
leftTopPane.setBorder(BorderFactory.createEmptyBorder(10, 5, 0, 15)); leftTopPane.setBorder(BorderFactory.createEmptyBorder(12, 5, 0, 15));
this.add(leftTopPane, BorderLayout.NORTH); this.add(leftTopPane, BorderLayout.NORTH);
} }

43
designer/src/com/fr/design/mainframe/alphafine/component/AlphaFineDialog.java

@ -16,15 +16,13 @@ import com.fr.design.mainframe.alphafine.cell.model.PluginModel;
import com.fr.design.mainframe.alphafine.cell.render.ContentCellRender; import com.fr.design.mainframe.alphafine.cell.render.ContentCellRender;
import com.fr.design.mainframe.alphafine.listener.DocumentAdapter; import com.fr.design.mainframe.alphafine.listener.DocumentAdapter;
import com.fr.design.mainframe.alphafine.model.SearchResult; import com.fr.design.mainframe.alphafine.model.SearchResult;
import com.fr.design.mainframe.alphafine.preview.ActionPreviewPane; import com.fr.design.mainframe.alphafine.preview.*;
import com.fr.design.mainframe.alphafine.preview.DocumentPreviewPane;
import com.fr.design.mainframe.alphafine.preview.FilePreviewPane;
import com.fr.design.mainframe.alphafine.preview.PluginPreviewPane;
import com.fr.design.mainframe.alphafine.search.manager.*; import com.fr.design.mainframe.alphafine.search.manager.*;
import com.fr.form.main.Form; import com.fr.form.main.Form;
import com.fr.form.main.FormIO; import com.fr.form.main.FormIO;
import com.fr.general.ComparatorUtils; import com.fr.general.ComparatorUtils;
import com.fr.general.FRLogger; import com.fr.general.FRLogger;
import com.fr.general.IOUtils;
import com.fr.general.Inter; import com.fr.general.Inter;
import com.fr.general.http.HttpClient; import com.fr.general.http.HttpClient;
import com.fr.io.TemplateWorkBookIO; import com.fr.io.TemplateWorkBookIO;
@ -75,6 +73,7 @@ public class AlphaFineDialog extends UIDialog {
private JPanel searchResultPane; private JPanel searchResultPane;
private Point pressedPoint; private Point pressedPoint;
private UIScrollPane leftSearchResultPane; private UIScrollPane leftSearchResultPane;
private JPanel defaultPane;
private JPanel rightSearchResultPane; private JPanel rightSearchResultPane;
private AlphaFineList searchResultList; private AlphaFineList searchResultList;
private SearchListModel searchListModel; private SearchListModel searchListModel;
@ -299,15 +298,10 @@ public class AlphaFineDialog extends UIDialog {
leftSearchResultPane.setPreferredSize(new Dimension(AlphaFineConstants.LEFT_WIDTH, AlphaFineConstants.CONTENT_HEIGHT)); leftSearchResultPane.setPreferredSize(new Dimension(AlphaFineConstants.LEFT_WIDTH, AlphaFineConstants.CONTENT_HEIGHT));
rightSearchResultPane = new JPanel(); rightSearchResultPane = new JPanel();
rightSearchResultPane.setBackground(Color.WHITE); rightSearchResultPane.setBackground(Color.WHITE);
UILabel splitLine = new UILabel();
splitLine.setBackground(AlphaFineConstants.GRAY);
splitLine.setPreferredSize(new Dimension(1, AlphaFineConstants.CONTENT_HEIGHT));
rightSearchResultPane.setPreferredSize(new Dimension(AlphaFineConstants.RIGHT_WIDTH - 1, AlphaFineConstants.CONTENT_HEIGHT)); rightSearchResultPane.setPreferredSize(new Dimension(AlphaFineConstants.RIGHT_WIDTH - 1, AlphaFineConstants.CONTENT_HEIGHT));
searchResultPane.add(leftSearchResultPane, BorderLayout.WEST); searchResultPane.add(leftSearchResultPane, BorderLayout.WEST);
searchResultPane.add(splitLine, BorderLayout.CENTER);
searchResultPane.add(rightSearchResultPane, BorderLayout.EAST); searchResultPane.add(rightSearchResultPane, BorderLayout.EAST);
UILabel splitLabel = new UILabel(); UILabel splitLabel = new UILabel();
splitLabel.setBackground(AlphaFineConstants.GRAY);
splitLabel.setPreferredSize(new Dimension(AlphaFineConstants.HEIGHT, 1)); splitLabel.setPreferredSize(new Dimension(AlphaFineConstants.HEIGHT, 1));
searchResultPane.add(splitLabel, BorderLayout.NORTH); searchResultPane.add(splitLabel, BorderLayout.NORTH);
add(searchResultPane, BorderLayout.SOUTH); add(searchResultPane, BorderLayout.SOUTH);
@ -344,6 +338,32 @@ public class AlphaFineDialog extends UIDialog {
*/ */
private void fireStopLoading() { private void fireStopLoading() {
searchListModel.resetState(); searchListModel.resetState();
replaceLeftPane();
}
/**
* 刷新容器
*/
private void refreshContainer() {
validate();
repaint();
revalidate();
}
/**
* 重置结果面板
*/
private void replaceLeftPane() {
if (searchListModel.getSize() == 0 && defaultPane == null) {
defaultPane = new NoResultPane(Inter.getLocText("FR-Designer-AlphaFine_NO_Result"), IOUtils.readIcon("/com/fr/design/mainframe/alphafine/images/no_result.png"));
searchResultPane.remove(leftSearchResultPane);
searchResultPane.add(defaultPane, BorderLayout.WEST);
} else if (searchListModel.getSize() > 0 && defaultPane != null) {
searchResultPane.remove(defaultPane);
defaultPane = null;
searchResultPane.add(leftSearchResultPane, BorderLayout.WEST);
}
refreshContainer();
} }
/** /**
@ -534,7 +554,7 @@ public class AlphaFineDialog extends UIDialog {
break; break;
case ACTION: case ACTION:
rightSearchResultPane.removeAll(); rightSearchResultPane.removeAll();
rightSearchResultPane.add(new ActionPreviewPane()); rightSearchResultPane.add(new NoResultPane(Inter.getLocText("FR-Designer_NoResult"), IOUtils.readIcon("/com/fr/design/mainframe/alphafine/images/noresult.png")));
validate(); validate();
repaint(); repaint();
break; break;
@ -625,7 +645,6 @@ public class AlphaFineDialog extends UIDialog {
*/ */
private void initGlobalListener() { private void initGlobalListener() {
initAWTEventListener(); initAWTEventListener();
initMouseListener();
} }
/** /**
@ -912,6 +931,8 @@ public class AlphaFineDialog extends UIDialog {
if (getSelectedIndex() == 1) { if (getSelectedIndex() == 1) {
searchTextField.requestFocus(); searchTextField.requestFocus();
} }
} else if (e.getKeyCode() == KeyEvent.VK_ESCAPE) {
searchTextField.requestFocus();
} }
} }
}); });

BIN
designer/src/com/fr/design/mainframe/alphafine/images/no_result.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

37
designer/src/com/fr/design/mainframe/alphafine/preview/ActionPreviewPane.java

@ -1,37 +0,0 @@
package com.fr.design.mainframe.alphafine.preview;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.mainframe.alphafine.AlphaFineConstants;
import com.fr.general.IOUtils;
import com.fr.general.Inter;
import javax.swing.*;
import java.awt.*;
/**
* Created by XiaXiang on 2017/5/5.
*/
public class ActionPreviewPane extends JPanel {
private static final Font NAME = new Font("Song_TypeFace", 0, 14);
public ActionPreviewPane() {
setLayout(new BorderLayout());
setBackground(null);
setBorder(BorderFactory.createEmptyBorder(135, 0, 0, 0));
UILabel image = new UILabel();
image.setPreferredSize(new Dimension(150, 111));
image.setHorizontalAlignment(SwingConstants.CENTER);
image.setBorder(BorderFactory.createEmptyBorder(0, 0, 10, 0));
image.setIcon(IOUtils.readIcon("/com/fr/design/mainframe/alphafine/images/noresult.png"));
UILabel description = new UILabel(Inter.getLocText("FR-Designer_NoResult"));
description.setForeground(AlphaFineConstants.MEDIUM_GRAY);
description.setFont(NAME);
description.setBorder(BorderFactory.createEmptyBorder(10, 0, 10, 0));
description.setHorizontalAlignment(SwingConstants.CENTER);
this.add(image, BorderLayout.CENTER);
this.add(description, BorderLayout.SOUTH);
}
}

31
designer/src/com/fr/design/mainframe/alphafine/preview/NoResultPane.java

@ -0,0 +1,31 @@
package com.fr.design.mainframe.alphafine.preview;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.mainframe.alphafine.AlphaFineConstants;
import com.fr.general.FRFont;
import javax.swing.*;
import java.awt.*;
/**
* Created by XiaXiang on 2017/8/14.
*/
public class NoResultPane extends JPanel {
public NoResultPane(String title, Icon icon) {
setLayout(new BorderLayout());
setBackground(Color.white);
setPreferredSize(new Dimension(AlphaFineConstants.LEFT_WIDTH, AlphaFineConstants.CONTENT_HEIGHT));
UILabel image = new UILabel();
image.setPreferredSize(new Dimension(150, 111));
image.setHorizontalAlignment(SwingConstants.CENTER);
image.setIcon(icon);
image.setBorder(BorderFactory.createEmptyBorder(100,0,0,0));
UILabel description = new UILabel(title);
description.setForeground(AlphaFineConstants.MEDIUM_GRAY);
description.setFont(FRFont.getInstance("SimSun", Font.PLAIN, 14));
description.setBorder(BorderFactory.createEmptyBorder(0, 0, 135, 0));
description.setHorizontalAlignment(SwingConstants.CENTER);
add(image, BorderLayout.CENTER);
add(description, BorderLayout.SOUTH);
}
}

10
designer/src/com/fr/design/mainframe/alphafine/search/manager/ActionSearchManager.java

@ -74,15 +74,13 @@ public class ActionSearchManager implements AlphaFineSearchProcessor {
if (!AlphaFineHelper.getFilterResult().contains(object)) { if (!AlphaFineHelper.getFilterResult().contains(object)) {
result.add(object); result.add(object);
} }
} }
if (result.size() < AlphaFineConstants.SHOW_SIZE + 1) {
lessModelList.add(0, new MoreModel(Inter.getLocText("FR-Designer_Set")));
if (result.size() == 0) { if (result.size() == 0) {
lessModelList.add(AlphaFineHelper.NO_RESULT_MODEL); return lessModelList;
} else {
lessModelList.addAll(result);
} }
if (result.size() > 0 && result.size() < AlphaFineConstants.SHOW_SIZE + 1) {
lessModelList.add(0, new MoreModel(Inter.getLocText("FR-Designer_Set")));
lessModelList.addAll(result);
} else { } else {
lessModelList.add(0, new MoreModel(Inter.getLocText("FR-Designer_Set"), Inter.getLocText("FR-Designer_AlphaFine_ShowAll"), true, CellType.ACTION)); lessModelList.add(0, new MoreModel(Inter.getLocText("FR-Designer_Set"), Inter.getLocText("FR-Designer_AlphaFine_ShowAll"), true, CellType.ACTION));
lessModelList.addAll(result.subList(0, AlphaFineConstants.SHOW_SIZE)); lessModelList.addAll(result.subList(0, AlphaFineConstants.SHOW_SIZE));

9
designer/src/com/fr/design/mainframe/alphafine/search/manager/DocumentSearchManager.java

@ -76,13 +76,12 @@ public class DocumentSearchManager implements AlphaFineSearchProcessor {
searchResult.add(cellModel); searchResult.add(cellModel);
} }
} }
if (searchResult.size() < AlphaFineConstants.SHOW_SIZE + 1) {
lessModelList.add(0, new MoreModel(Inter.getLocText("FR-Designer_COMMUNITY_HELP")));
if (searchResult.size() == 0) { if (searchResult.size() == 0) {
lessModelList.add(AlphaFineHelper.NO_RESULT_MODEL); return lessModelList;
} else {
lessModelList.addAll(searchResult);
} }
if (searchResult.size() > 0 && searchResult.size() < AlphaFineConstants.SHOW_SIZE + 1) {
lessModelList.add(0, new MoreModel(Inter.getLocText("FR-Designer_COMMUNITY_HELP")));
lessModelList.addAll(searchResult);
} else { } else {
lessModelList.add(0, new MoreModel(Inter.getLocText("FR-Designer_COMMUNITY_HELP"), Inter.getLocText("FR-Designer_AlphaFine_ShowAll"), true, CellType.DOCUMENT)); lessModelList.add(0, new MoreModel(Inter.getLocText("FR-Designer_COMMUNITY_HELP"), Inter.getLocText("FR-Designer_AlphaFine_ShowAll"), true, CellType.DOCUMENT));
lessModelList.addAll(searchResult.subList(0, AlphaFineConstants.SHOW_SIZE)); lessModelList.addAll(searchResult.subList(0, AlphaFineConstants.SHOW_SIZE));

9
designer/src/com/fr/design/mainframe/alphafine/search/manager/FileSearchManager.java

@ -100,13 +100,12 @@ public class FileSearchManager implements AlphaFineSearchProcessor {
} }
} }
if (result.size() < AlphaFineConstants.SHOW_SIZE + 1) {
lessModelList.add(0, new MoreModel(Inter.getLocText("FR-Designer_Templates")));
if (result.size() == 0) { if (result.size() == 0) {
lessModelList.add(AlphaFineHelper.NO_RESULT_MODEL); return lessModelList;
} else {
lessModelList.addAll(result);
} }
if (result.size() > 0 && result.size() < AlphaFineConstants.SHOW_SIZE + 1) {
lessModelList.add(0, new MoreModel(Inter.getLocText("FR-Designer_Templates")));
lessModelList.addAll(result);
} else { } else {
lessModelList.add(0, new MoreModel(Inter.getLocText("FR-Designer_Templates"), Inter.getLocText("FR-Designer_AlphaFine_ShowAll"), true, CellType.FILE)); lessModelList.add(0, new MoreModel(Inter.getLocText("FR-Designer_Templates"), Inter.getLocText("FR-Designer_AlphaFine_ShowAll"), true, CellType.FILE));
lessModelList.addAll(result.subList(0, AlphaFineConstants.SHOW_SIZE)); lessModelList.addAll(result.subList(0, AlphaFineConstants.SHOW_SIZE));

9
designer/src/com/fr/design/mainframe/alphafine/search/manager/PluginSearchManager.java

@ -109,13 +109,12 @@ public class PluginSearchManager implements AlphaFineSearchProcessor {
searchResult.add(cellModel); searchResult.add(cellModel);
} }
} }
if (searchResult.size() < AlphaFineConstants.SHOW_SIZE + 1) {
lessModelList.add(0, new MoreModel(Inter.getLocText("FR-Designer-Plugin_Addon")));
if (searchResult.size() == 0) { if (searchResult.size() == 0) {
lessModelList.add(AlphaFineHelper.NO_RESULT_MODEL); return this.lessModelList;
} else {
lessModelList.addAll(searchResult);
} }
if (searchResult.size() > 0 && searchResult.size() < AlphaFineConstants.SHOW_SIZE + 1) {
lessModelList.add(0, new MoreModel(Inter.getLocText("FR-Designer_Templates")));
lessModelList.addAll(searchResult);
} else { } else {
lessModelList.add(0, new MoreModel(Inter.getLocText("FR-Designer-Plugin_Addon"), Inter.getLocText("FR-Designer_AlphaFine_ShowAll"), true, CellType.PLUGIN)); lessModelList.add(0, new MoreModel(Inter.getLocText("FR-Designer-Plugin_Addon"), Inter.getLocText("FR-Designer_AlphaFine_ShowAll"), true, CellType.PLUGIN));
lessModelList.addAll(searchResult.subList(0, AlphaFineConstants.SHOW_SIZE)); lessModelList.addAll(searchResult.subList(0, AlphaFineConstants.SHOW_SIZE));

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

@ -2,6 +2,7 @@ package com.fr.design.mainframe.form;
import com.fr.base.DynamicUnitList; import com.fr.base.DynamicUnitList;
import com.fr.base.ScreenResolution; import com.fr.base.ScreenResolution;
import com.fr.common.inputevent.InputEventBaseOnOS;
import com.fr.design.cell.bar.DynamicScrollBar; import com.fr.design.cell.bar.DynamicScrollBar;
import com.fr.design.event.TargetModifiedEvent; import com.fr.design.event.TargetModifiedEvent;
import com.fr.design.event.TargetModifiedListener; import com.fr.design.event.TargetModifiedListener;
@ -40,7 +41,6 @@ public class FormReportComponentComposite extends JComponent implements TargetMo
private FormTabPane sheetNameTab; private FormTabPane sheetNameTab;
private JPanel hbarContainer; private JPanel hbarContainer;
private JSliderPane jSliderContainer; private JSliderPane jSliderContainer;
private boolean isCtrl = false;
public FormReportComponentComposite(BaseJForm jform, FormElementCaseDesigner elementCaseDesign, FormElementCaseContainerProvider ecContainer) { public FormReportComponentComposite(BaseJForm jform, FormElementCaseDesigner elementCaseDesign, FormElementCaseContainerProvider ecContainer) {
this.jForm = jform; this.jForm = jform;
@ -52,33 +52,13 @@ public class FormReportComponentComposite extends JComponent implements TargetMo
jSliderContainer.getShowVal().addChangeListener(showValSpinnerChangeListener); jSliderContainer.getShowVal().addChangeListener(showValSpinnerChangeListener);
jSliderContainer.getSelfAdaptButton().addItemListener(selfAdaptButtonItemListener); jSliderContainer.getSelfAdaptButton().addItemListener(selfAdaptButtonItemListener);
this.elementCaseDesigner.elementCasePane.getGrid().addMouseWheelListener(showValSpinnerMouseWheelListener); this.elementCaseDesigner.elementCasePane.getGrid().addMouseWheelListener(showValSpinnerMouseWheelListener);
this.elementCaseDesigner.elementCasePane.getGrid().addKeyListener(showValSpinnerKeyListener);
elementCaseDesigner.addTargetModifiedListener(this); elementCaseDesigner.addTargetModifiedListener(this);
} }
KeyListener showValSpinnerKeyListener = new KeyListener() {
@Override
public void keyTyped(KeyEvent e) {
}
@Override
public void keyPressed(KeyEvent e) {
if (e.isControlDown()) {
isCtrl = true;
}
}
@Override
public void keyReleased(KeyEvent e) {
isCtrl = false;
}
};
MouseWheelListener showValSpinnerMouseWheelListener = new MouseWheelListener() { MouseWheelListener showValSpinnerMouseWheelListener = new MouseWheelListener() {
@Override @Override
public void mouseWheelMoved(MouseWheelEvent e) { public void mouseWheelMoved(MouseWheelEvent e) {
if (isCtrl) { if (InputEventBaseOnOS.isControlDown(e)) {
int dir = e.getWheelRotation(); int dir = e.getWheelRotation();
int old_resolution = (int) jSliderContainer.getShowVal().getValue(); int old_resolution = (int) jSliderContainer.getShowVal().getValue();
jSliderContainer.getShowVal().setValue(old_resolution - (dir * MIN)); jSliderContainer.getShowVal().setValue(old_resolution - (dir * MIN));

4
designer/src/com/fr/grid/GridColumn.java

@ -68,11 +68,11 @@ public class GridColumn extends GridHeader<String> {
@Override @Override
public Dimension getPreferredSize() { public Dimension getPreferredSize() {
ElementCasePane reportPane = this.getElementCasePane(); ElementCasePane reportPane = this.getElementCasePane();
float time = (float)reportPane.getResolution()/ ScreenResolution.getScreenResolution();
if (!reportPane.isColumnHeaderVisible()) { if (!reportPane.isColumnHeaderVisible()) {
return new Dimension(0, 0); return new Dimension(0, 0);
} }
return new Dimension(super.getPreferredSize().width, GraphHelper.getFontMetrics(this.getFont()).getHeight() + SIZE_ADJUST); return new Dimension(super.getPreferredSize().width, (int) (GraphHelper.getFontMetrics(this.getFont()).getHeight() * time + SIZE_ADJUST));
} }
} }

15
designer/src/com/fr/grid/GridColumnUI.java

@ -48,6 +48,9 @@ public class GridColumnUI extends ComponentUI {
Grid gird = reportPane.getGrid(); Grid gird = reportPane.getGrid();
// size // size
Dimension size = gridColumn.getSize(); Dimension size = gridColumn.getSize();
float time = (float)resolution/ScreenResolution.getScreenResolution();
g2d.setFont(gridColumn.getFont().deriveFont(gridColumn.getFont().getSize2D() * time));
ElementCase elementCase = reportPane.getEditingElementCase(); ElementCase elementCase = reportPane.getEditingElementCase();
DynamicUnitList columnWidthList = ReportHelper.getColumnWidthList(elementCase); DynamicUnitList columnWidthList = ReportHelper.getColumnWidthList(elementCase);
int horizontalValue = gird.getHorizontalValue(); int horizontalValue = gird.getHorizontalValue();
@ -77,7 +80,7 @@ public class GridColumnUI extends ComponentUI {
g2d.setPaint(gridColumn.getSeparatorLineColor()); g2d.setPaint(gridColumn.getSeparatorLineColor());
GraphHelper.drawLine(g2d, 0, 0, 0, size.getHeight()); GraphHelper.drawLine(g2d, 0, 0, 0, size.getHeight());
double tmpWidth2 = 0; double tmpWidth2 = 0;
drawColumn(horizontalBeginValue, horizontalEndValue, columnWidthList, tmpWidth2, reportPane, g2d, gridColumn); drawColumn(horizontalBeginValue, horizontalEndValue, columnWidthList, tmpWidth2, reportPane, g2d, gridColumn, size);
// 画上边的边框线. // 画上边的边框线.
g2d.setColor(gridColumn.getSeparatorLineColor()); g2d.setColor(gridColumn.getSeparatorLineColor());
GraphHelper.drawLine(g2d, 0, 0, tmpWidth2, 0); GraphHelper.drawLine(g2d, 0, 0, tmpWidth2, 0);
@ -85,14 +88,13 @@ public class GridColumnUI extends ComponentUI {
private void drawColumn(int horizontalBeginValue, int horizontalEndValue, DynamicUnitList columnWidthList, double tmpWidth2, private void drawColumn(int horizontalBeginValue, int horizontalEndValue, DynamicUnitList columnWidthList, double tmpWidth2,
ElementCasePane reportPane, Graphics2D g2d, GridColumn gridColumn) { ElementCasePane reportPane, Graphics2D g2d, GridColumn gridColumn, Dimension size) {
// draw column. // draw column.
boolean isSelectedBounds; boolean isSelectedBounds;
double tmpWidth1 = 0; double tmpWidth1 = 0;
double tmpIncreaseWidth = 0; double tmpIncreaseWidth = 0;
ElementCase elementCase = reportPane.getEditingElementCase(); ElementCase elementCase = reportPane.getEditingElementCase();
Dimension size = gridColumn.getSize();
// FontMetrics // FontMetrics
FontRenderContext fontRenderContext = g2d.getFontRenderContext(); FontRenderContext fontRenderContext = g2d.getFontRenderContext();
LineMetrics fm = gridColumn.getFont().getLineMetrics("", fontRenderContext); LineMetrics fm = gridColumn.getFont().getLineMetrics("", fontRenderContext);
@ -158,8 +160,9 @@ public class GridColumnUI extends ComponentUI {
columnContent += "(FR)"; columnContent += "(FR)";
} }
} }
float time = (float)resolution/ScreenResolution.getScreenResolution();
double stringWidth = gridColumn.getFont().getStringBounds(columnContent, fontRenderContext).getWidth(); double stringWidth = gridColumn.getFont().getStringBounds(columnContent, fontRenderContext).getWidth() * time;
// if (stringWidth > tmpIncreaseWidth) { // if (stringWidth > tmpIncreaseWidth) {
// paintMoreContent(i, g2d, tmpWidth1, size, tmpIncreaseWidth, isSelectedBounds, gridColumn, elementCase, columnContent, stringWidth, fmAscent); // paintMoreContent(i, g2d, tmpWidth1, size, tmpIncreaseWidth, isSelectedBounds, gridColumn, elementCase, columnContent, stringWidth, fmAscent);
// } else { // } else {
@ -203,8 +206,8 @@ public class GridColumnUI extends ComponentUI {
g2d.setPaint(UIManager.getColor("controlShadow")); g2d.setPaint(UIManager.getColor("controlShadow"));
} }
} }
GraphHelper.drawString(g2d, columnContent, tmpWidth1 + (tmpIncreaseWidth - stringWidth) / 2,
GraphHelper.drawString(g2d, columnContent, tmpWidth1 + (tmpIncreaseWidth - stringWidth) / 2, fmAscent + GridHeader.SIZE_ADJUST / 2 + 1); (gridColumn.getSize().height/2 + g2d.getFont().getSize2D()/2));
} }

13
designer/src/com/fr/grid/GridCorner.java

@ -12,6 +12,7 @@ import java.awt.geom.Rectangle2D;
import javax.swing.event.MouseInputListener; import javax.swing.event.MouseInputListener;
import com.fr.base.GraphHelper; import com.fr.base.GraphHelper;
import com.fr.base.ScreenResolution;
import com.fr.design.mainframe.ElementCasePane; import com.fr.design.mainframe.ElementCasePane;
/** /**
@ -37,7 +38,7 @@ public class GridCorner extends BaseGridComponent {
Graphics2D g2d = (Graphics2D) g; Graphics2D g2d = (Graphics2D) g;
ElementCasePane reportPane = this.getElementCasePane(); ElementCasePane reportPane = this.getElementCasePane();
float time = (float)reportPane.getResolution()/ ScreenResolution.getScreenResolution();
//size //size
Dimension size = this.getSize(); Dimension size = this.getSize();
Rectangle2D rect2D = new Rectangle2D.Double(0, 0, size.getWidth(), size.getHeight()); Rectangle2D rect2D = new Rectangle2D.Double(0, 0, size.getWidth(), size.getHeight());
@ -50,7 +51,7 @@ public class GridCorner extends BaseGridComponent {
GraphHelper.fill(g2d, rect2D); GraphHelper.fill(g2d, rect2D);
} }
paintArc(g2d, size); paintArc(g2d, size, time);
//画左边的边框线. //画左边的边框线.
g2d.setColor(reportPane.getGridColumn().getSeparatorLineColor()); g2d.setColor(reportPane.getGridColumn().getSeparatorLineColor());
@ -85,15 +86,15 @@ public class GridCorner extends BaseGridComponent {
} }
private void paintArc(Graphics2D g2d, Dimension size) { private void paintArc(Graphics2D g2d, Dimension size, float time) {
g2d.setColor(Color.gray); g2d.setColor(Color.gray);
int width = size.width - 16; int width = (int) (size.width - (16 * time));
int avgWidth = width / 3; int avgWidth = width / 3;
int height = size.height - 8; int height = (int) (size.height - (8 * time));
int avgHeight = height / 3; int avgHeight = height / 3;
for (int i = 0; i < 3; i ++) { for (int i = 0; i < 3; i ++) {
for (int j = 0; j < 3; j ++) { for (int j = 0; j < 3; j ++) {
GraphHelper.fillArc(g2d, 8 + i * avgWidth, 4 + j * avgHeight, 3, 3, 0, 360); GraphHelper.fillArc(g2d, (8 * time) + (i * avgWidth), (4 * time) + (j * avgHeight), 3, 3, 0, 360);
} }
} }
} }

2
designer/src/com/fr/grid/GridMouseAdapter.java

@ -807,11 +807,13 @@ public class GridMouseAdapter implements MouseListener, MouseWheelListener, Mous
* @param e * @param e
*/ */
public void mouseWheelMoved(MouseWheelEvent e) { public void mouseWheelMoved(MouseWheelEvent e) {
if (!InputEventBaseOnOS.isControlDown(e)) {
ElementCasePane reportPane = grid.getElementCasePane(); ElementCasePane reportPane = grid.getElementCasePane();
if (reportPane.isHorizontalScrollBarVisible()) { if (reportPane.isHorizontalScrollBarVisible()) {
reportPane.getVerticalScrollBar().setValue(reportPane.getVerticalScrollBar().getValue() + e.getWheelRotation() * 3); reportPane.getVerticalScrollBar().setValue(reportPane.getVerticalScrollBar().getValue() + e.getWheelRotation() * 3);
} }
} }
}
/** /**
* @param e * @param e

4
designer/src/com/fr/grid/GridRow.java

@ -65,13 +65,13 @@ public class GridRow extends GridHeader<Integer> {
@Override @Override
public Dimension getPreferredSize() { public Dimension getPreferredSize() {
ElementCasePane reportPane = this.getElementCasePane(); ElementCasePane reportPane = this.getElementCasePane();
float time = (float)reportPane.getResolution()/ ScreenResolution.getScreenResolution();
if (!(reportPane.isRowHeaderVisible())) { if (!(reportPane.isRowHeaderVisible())) {
return new Dimension(0, 0); return new Dimension(0, 0);
} }
int maxCharNumber = this.caculateMaxCharNumber(reportPane); int maxCharNumber = this.caculateMaxCharNumber(reportPane);
return new Dimension(maxCharNumber * GraphHelper.getFontMetrics(this.getFont()).charWidth('M'), super.getPreferredSize().height); return new Dimension((int) (maxCharNumber * GraphHelper.getFontMetrics(this.getFont()).charWidth('M') * time), super.getPreferredSize().height);
} }
/** /**

11
designer/src/com/fr/grid/GridRowUI.java

@ -46,6 +46,9 @@ public class GridRowUI extends ComponentUI {
ElementCasePane reportPane = gridRow.getElementCasePane(); ElementCasePane reportPane = gridRow.getElementCasePane();
// size // size
Dimension size = gridRow.getSize(); Dimension size = gridRow.getSize();
float time = (float)resolution/ScreenResolution.getScreenResolution();
g2d.setFont(gridRow.getFont().deriveFont(gridRow.getFont().getSize2D() * time));
ElementCase elementCase = reportPane.getEditingElementCase(); ElementCase elementCase = reportPane.getEditingElementCase();
DynamicUnitList rowHeightList = ReportHelper.getRowHeightList(elementCase); DynamicUnitList rowHeightList = ReportHelper.getRowHeightList(elementCase);
int verticalValue = reportPane.getGrid().getVerticalValue(); int verticalValue = reportPane.getGrid().getVerticalValue();
@ -152,10 +155,10 @@ public class GridRowUI extends ComponentUI {
, ElementCase elementCase, Dimension size, double tmpHeight1) { , ElementCase elementCase, Dimension size, double tmpHeight1) {
// FontMetrics // FontMetrics
FontRenderContext fontRenderContext = g2d.getFontRenderContext(); FontRenderContext fontRenderContext = g2d.getFontRenderContext();
float time = (float)resolution/ScreenResolution.getScreenResolution();
float fmAscent = GraphHelper.getFontMetrics(gridRow.getFont()).getAscent(); float fmAscent = GraphHelper.getFontMetrics(gridRow.getFont()).getAscent() * time;
double stringWidth = gridRow.getFont().getStringBounds(paintText, fontRenderContext).getWidth(); double stringWidth = gridRow.getFont().getStringBounds(paintText, fontRenderContext).getWidth() * time;
double stringHeight = gridRow.getFont().getStringBounds(paintText, fontRenderContext).getHeight(); double stringHeight = gridRow.getFont().getStringBounds(paintText, fontRenderContext).getHeight() * time;
if (isSelectedBounds) { if (isSelectedBounds) {
g2d.setColor(gridRow.getSelectedForeground()); g2d.setColor(gridRow.getSelectedForeground());
} else { } else {

60
designer/src/com/fr/poly/PolyDesigner.java

@ -7,6 +7,7 @@ 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;
import com.fr.base.ScreenResolution; import com.fr.base.ScreenResolution;
import com.fr.common.inputevent.InputEventBaseOnOS;
import com.fr.design.DesignState; import com.fr.design.DesignState;
import com.fr.design.DesignerEnvManager; import com.fr.design.DesignerEnvManager;
import com.fr.design.actions.edit.CopyAction; import com.fr.design.actions.edit.CopyAction;
@ -51,10 +52,7 @@ import com.fr.stable.unit.UnitRectangle;
import javax.swing.*; import javax.swing.*;
import java.awt.*; import java.awt.*;
import java.awt.event.ActionEvent; import java.awt.event.*;
import java.awt.event.KeyEvent;
import java.awt.event.KeyListener;
import java.awt.event.MouseEvent;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
@ -98,7 +96,6 @@ public class PolyDesigner extends ReportComponent<PolyWorkSheet, PolyElementCase
private JSliderPane jSliderContainer; private JSliderPane jSliderContainer;
private int resolution = (int) (ScreenResolution.getScreenResolution() * JSliderPane.getInstance().resolutionTimes); private int resolution = (int) (ScreenResolution.getScreenResolution() * JSliderPane.getInstance().resolutionTimes);
private float time; private float time;
private boolean isCtrl = false;
public PolyDesigner(PolyWorkSheet report) { public PolyDesigner(PolyWorkSheet report) {
super(report); super(report);
@ -123,6 +120,7 @@ public class PolyDesigner extends ReportComponent<PolyWorkSheet, PolyElementCase
this.setFocusTraversalKeysEnabled(false); this.setFocusTraversalKeysEnabled(false);
new PolyDesignerDropTarget(this); new PolyDesignerDropTarget(this);
toolBarComponent = new JComponent[]{new CutAction(this).createToolBarComponent(), new CopyAction(this).createToolBarComponent(), new PasteAction(this).createToolBarComponent(), new DeleteBlockAction(this).createToolBarComponent()}; toolBarComponent = new JComponent[]{new CutAction(this).createToolBarComponent(), new CopyAction(this).createToolBarComponent(), new PasteAction(this).createToolBarComponent(), new DeleteBlockAction(this).createToolBarComponent()};
polyArea.addMouseWheelListener(mouseWheelListener);
this.addSelectionChangeListener(new SelectionListener() { this.addSelectionChangeListener(new SelectionListener() {
@Override @Override
@ -138,8 +136,21 @@ public class PolyDesigner extends ReportComponent<PolyWorkSheet, PolyElementCase
}); });
} }
MouseWheelListener mouseWheelListener = new MouseWheelListener() {
@Override
public void mouseWheelMoved(MouseWheelEvent evt) {
int id = evt.getID();
if (id == MouseEvent.MOUSE_WHEEL){
if (!InputEventBaseOnOS.isControlDown(evt)) {
int rotations = evt.getWheelRotation();
verScrollBar.setValue(verScrollBar.getValue() + rotations * ROTATIONS);
}
}
}
};
private void initComponents() { private void initComponents() {
jSliderContainer = JSliderPane.getInstance(); // jSliderContainer = JSliderPane.getInstance();
this.setLayout(FRGUIPaneFactory.createBorderLayout()); this.setLayout(FRGUIPaneFactory.createBorderLayout());
ployareaPane = new JPanel(new PolyDesignerLayout()); ployareaPane = new JPanel(new PolyDesignerLayout());
polyArea = new PolyArea(this, resolution); polyArea = new PolyArea(this, resolution);
@ -155,28 +166,8 @@ public class PolyDesigner extends ReportComponent<PolyWorkSheet, PolyElementCase
ployareaPane.setBackground(Color.WHITE); ployareaPane.setBackground(Color.WHITE);
this.add(ployareaPane, BorderLayout.CENTER); this.add(ployareaPane, BorderLayout.CENTER);
this.add(polyComponetsBar, BorderLayout.WEST); this.add(polyComponetsBar, BorderLayout.WEST);
this.addKeyListener(showValSpinnerKeyListener);
}
KeyListener showValSpinnerKeyListener = new KeyListener() {
@Override
public void keyTyped(KeyEvent e) {
}
@Override
public void keyPressed(KeyEvent e) {
if (e.isControlDown()) {
isCtrl = true;
}
} }
@Override
public void keyReleased(KeyEvent e) {
isCtrl = false;
}
};
private void initPolyBlocks() { private void initPolyBlocks() {
for (int i = 0, count = this.getTarget().getBlockCount(); i < count; i++) { for (int i = 0, count = this.getTarget().getBlockCount(); i < count; i++) {
TemplateBlock block = (TemplateBlock) getTarget().getBlock(i); TemplateBlock block = (TemplateBlock) getTarget().getBlock(i);
@ -671,23 +662,6 @@ public class PolyDesigner extends ReportComponent<PolyWorkSheet, PolyElementCase
return this.getWidth(); return this.getWidth();
} }
@Override
protected void processMouseWheelEvent(java.awt.event.MouseWheelEvent evt) {
int id = evt.getID();
switch (id) {
case MouseEvent.MOUSE_WHEEL: {
if (isCtrl) {
int dir = evt.getWheelRotation();
int old_resolution = (int) jSliderContainer.getShowVal().getValue();
jSliderContainer.getShowVal().setValue(old_resolution - (dir * MIN));
} else {
int rotations = evt.getWheelRotation();
this.getVerticalScrollBar().setValue(this.getVerticalScrollBar().getValue() + rotations * ROTATIONS);
}
break;
}
}
}
/** /**
* 开始编辑 * 开始编辑

6
designer_base/src/com/fr/design/editor/DoubleDeckValueEditorPane.java

@ -128,6 +128,7 @@ public class DoubleDeckValueEditorPane extends BasicPane implements UIObserver,
} }
public void setCurrentEditor(int i) { public void setCurrentEditor(int i) {
upButton.setSelectedIndex(i);
currentEditor = this.cards[i]; currentEditor = this.cards[i];
centerPane.removeAll(); centerPane.removeAll();
centerPane.add(currentEditor); centerPane.add(currentEditor);
@ -223,6 +224,10 @@ public class DoubleDeckValueEditorPane extends BasicPane implements UIObserver,
return columnIndex; return columnIndex;
} }
public void updateUpButton(){
upButton.setSelectedIndex(this.getCurrentEditorIndex());
}
public Object update(String makeAdiff) { public Object update(String makeAdiff) {
String name = currentEditor.getName(); String name = currentEditor.getName();
Object columnIndex = currentEditor.getValue(); Object columnIndex = currentEditor.getValue();
@ -335,6 +340,7 @@ public class DoubleDeckValueEditorPane extends BasicPane implements UIObserver,
* 清除组件数据 * 清除组件数据
*/ */
public void clearComponentsData() { public void clearComponentsData() {
setCurrentEditor(0);
for (Editor card : cards) { for (Editor card : cards) {
card.clearData(); card.clearData();
} }

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

@ -301,6 +301,12 @@ public abstract class UIControlPane extends BasicPane implements UnrepeatedNameH
return; return;
} }
} }
// 如果有可见模态对话框,则不隐藏
for (Window window : DesignerContext.getDesignerFrame().getOwnedWindows()) {
if (window instanceof JDialog && window.isVisible() && ((JDialog)window).isModal()) {
return;
}
}
saveSettings(); saveSettings();
setVisible(false); setVisible(false);
} }

4
designer_base/src/com/fr/design/gui/icombobox/UIComboBoxUI.java

@ -57,12 +57,12 @@ public class UIComboBoxUI extends BasicComboBoxUI implements MouseListener {
super.paint(g, c); super.paint(g, c);
Graphics2D g2d = (Graphics2D) g; Graphics2D g2d = (Graphics2D) g;
g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON); g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
Color linecolor = UIConstants.TITLED_BORDER_COLOR; Color linecolor = UIConstants.POP_DIALOG_BORDER;
if (comboBox.isPopupVisible()) { if (comboBox.isPopupVisible()) {
arrowButton.setSelected(true); arrowButton.setSelected(true);
} else { } else {
linecolor = UIConstants.TITLED_BORDER_COLOR; linecolor = UIConstants.POP_DIALOG_BORDER;
arrowButton.setSelected(false); arrowButton.setSelected(false);
} }
g2d.setColor(linecolor); g2d.setColor(linecolor);

1
designer_base/src/com/fr/design/locale/designer.properties

@ -2126,3 +2126,4 @@ FS-Designer_DS_Filter_Even_Tip=Even_Tip
FS-Designer_DS_Filter_Specify_Tip=Specify_Tip FS-Designer_DS_Filter_Specify_Tip=Specify_Tip
FR-Designer_Mobile-Height-Percent=Max Percent FR-Designer_Mobile-Height-Percent=Max Percent
FR-Designer_Mobile-Height-Limit=Height Limit FR-Designer_Mobile-Height-Limit=Height Limit
FR-Designer-AlphaFine_NO_Result=no search result

1
designer_base/src/com/fr/design/locale/designer_en_US.properties

@ -2122,3 +2122,4 @@ FR-Designer_Barcode_Size=Barcode_Size
FS-Designer_DS_Filter_Odd_Tip=Odd_Tip FS-Designer_DS_Filter_Odd_Tip=Odd_Tip
FS-Designer_DS_Filter_Even_Tip=Even_Tip FS-Designer_DS_Filter_Even_Tip=Even_Tip
FS-Designer_DS_Filter_Specify_Tip=Specify_Tip FS-Designer_DS_Filter_Specify_Tip=Specify_Tip
FR-Designer-AlphaFine_NO_Result=no search result

1
designer_base/src/com/fr/design/locale/designer_zh_CN.properties

@ -2133,3 +2133,4 @@ FR-Designer_Barcode_Size=\u6761\u5F62\u7801\u5927\u5C0F
FS-Designer_DS_Filter_Odd_Tip=\u63D0\u793A\uFF1A\u5E8F\u53F7\u4ECE1\u5F00\u59CB\uFF0C\u9009\u62E9\u4E86\u5947\u6570\u96C6(1,3,5...) FS-Designer_DS_Filter_Odd_Tip=\u63D0\u793A\uFF1A\u5E8F\u53F7\u4ECE1\u5F00\u59CB\uFF0C\u9009\u62E9\u4E86\u5947\u6570\u96C6(1,3,5...)
FS-Designer_DS_Filter_Even_Tip=\u63D0\u793A\uFF1A\u5E8F\u53F7\u4ECE1\u5F00\u59CB\uFF0C\u9009\u62E9\u4E86\u5076\u6570\u96C6(2,4,6...) FS-Designer_DS_Filter_Even_Tip=\u63D0\u793A\uFF1A\u5E8F\u53F7\u4ECE1\u5F00\u59CB\uFF0C\u9009\u62E9\u4E86\u5076\u6570\u96C6(2,4,6...)
FS-Designer_DS_Filter_Specify_Tip=\u63D0\u793A\uFF1A\u683C\u5F0F\u4E3A1,2-3,5,8\uFF0C\u5E8F\u53F7\u4ECE1\u5F00\u59CB\uFF0C\u5185\u503C\u53C2\u6570$_count_\u8868\u793A\u603B\u4E2A\u6570 FS-Designer_DS_Filter_Specify_Tip=\u63D0\u793A\uFF1A\u683C\u5F0F\u4E3A1,2-3,5,8\uFF0C\u5E8F\u53F7\u4ECE1\u5F00\u59CB\uFF0C\u5185\u503C\u53C2\u6570$_count_\u8868\u793A\u603B\u4E2A\u6570
FR-Designer-AlphaFine_NO_Result=\u65E0\u641C\u7D22\u7ED3\u679C

1
designer_base/src/com/fr/design/locale/designer_zh_TW.properties

@ -2125,3 +2125,4 @@ FS-Designer_DS_Filter_Odd_Tip=\u63D0\u793A\uFF1A\u5E8F\u865F\u5F9E1\u958B\u59CB\
FS-Designer_DS_Filter_Even_Tip=\u63D0\u793A\uFF1A\u5E8F\u865F\u5F9E1\u958B\u59CB\uFF0C\u9078\u64C7\u4E86\u5076\u6578\u96C6(2,4,6...) FS-Designer_DS_Filter_Even_Tip=\u63D0\u793A\uFF1A\u5E8F\u865F\u5F9E1\u958B\u59CB\uFF0C\u9078\u64C7\u4E86\u5076\u6578\u96C6(2,4,6...)
FS-Designer_DS_Filter_Specify_Tip=\u63D0\u793A\uFF1A\u683C\u5F0F\u70BA1,2-3,5,8\uFF0C\u5E8F\u865F\u5F9E1\u958B\u59CB\uFF0C\u5185\u7F6E\u53C3\u6578$_count_\u8868\u793A\u7E02\u500B\u6578 FS-Designer_DS_Filter_Specify_Tip=\u63D0\u793A\uFF1A\u683C\u5F0F\u70BA1,2-3,5,8\uFF0C\u5E8F\u865F\u5F9E1\u958B\u59CB\uFF0C\u5185\u7F6E\u53C3\u6578$_count_\u8868\u793A\u7E02\u500B\u6578
M-New_FormBook=\u65B0\u589E\u6C7A\u7B56\u5831\u8868 M-New_FormBook=\u65B0\u589E\u6C7A\u7B56\u5831\u8868
FR-Designer-AlphaFine_NO_Result=\u7121\u641C\u7D22\u7D50\u679C

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

@ -77,7 +77,6 @@ public class EastRegionContainerPane extends UIEastResizableContainer {
public static final EastRegionContainerPane getInstance() { public static final EastRegionContainerPane getInstance() {
if (THIS == null) { if (THIS == null) {
THIS = new EastRegionContainerPane(); THIS = new EastRegionContainerPane();
// THIS.setLastToolPaneY(DesignerEnvManager.getEnvManager().getLastEastRegionToolPaneY());
THIS.setLastContainerWidth(DesignerEnvManager.getEnvManager().getLastEastRegionContainerWidth()); THIS.setLastContainerWidth(DesignerEnvManager.getEnvManager().getLastEastRegionContainerWidth());
} }
return THIS; return THIS;
@ -85,13 +84,10 @@ public class EastRegionContainerPane extends UIEastResizableContainer {
public EastRegionContainerPane() { public EastRegionContainerPane() {
super(); super();
// setVerticalDragEnabled(false);
initPropertyItemList(); initPropertyItemList();
defaultPane = getDefaultPane(Inter.getLocText("FR-Designer_No_Settings_Available")); defaultPane = getDefaultPane(Inter.getLocText("FR-Designer_No_Settings_Available"));
defaultAuthorityPane = getDefaultPane(Inter.getLocText("FR-Designer_Not_Support_Authority_Edit")); defaultAuthorityPane = getDefaultPane(Inter.getLocText("FR-Designer_Not_Support_Authority_Edit"));
switchMode(PropertyMode.REPORT); switchMode(PropertyMode.REPORT);
// initContentPane();
// super(leftPane, rightPane);
setContainerWidth(CONTAINER_WIDTH); setContainerWidth(CONTAINER_WIDTH);
} }
@ -230,8 +226,6 @@ public class EastRegionContainerPane extends UIEastResizableContainer {
public EastRegionContainerPane(JPanel leftPane, JPanel rightPane) { public EastRegionContainerPane(JPanel leftPane, JPanel rightPane) {
super(leftPane, rightPane); super(leftPane, rightPane);
// setVerticalDragEnabled(false);
// setContainerWidth(260);
} }
public void replaceUpPane(JComponent pane) { public void replaceUpPane(JComponent pane) {
@ -377,29 +371,23 @@ public class EastRegionContainerPane extends UIEastResizableContainer {
hasEnabledTab = true; hasEnabledTab = true;
if (!propertyItem.isPoppedOut()) { if (!propertyItem.isPoppedOut()) {
propertyCard.show(rightPane, name); // 显示第一个可用tab propertyCard.show(rightPane, name); // 显示第一个可用tab
propertyItem.setTabButtonSelected();
hasAvailableTab = true; hasAvailableTab = true;
break; break;
} }
} }
} }
if (!hasAvailableTab) { if (!hasAvailableTab) {
resetPropertyIcons();
if (!hasEnabledTab && BaseUtils.isAuthorityEditing()) { if (!hasEnabledTab && BaseUtils.isAuthorityEditing()) {
propertyCard.show(rightPane, DEFAULT_AUTHORITY_PANE); propertyCard.show(rightPane, DEFAULT_AUTHORITY_PANE);
} else { } else {
propertyCard.show(rightPane, DEFAULT_PANE); propertyCard.show(rightPane, DEFAULT_PANE);
} }
} }
// if (this.getRightPane() instanceof DockingView) {
// ((DockingView) this.getRightPane()).refreshDockingView();
// }
} }
public void refreshDownPane() { public void refreshDownPane() {
// JComponent pane = propertyItemList.get(1).getContentPane();
// if (pane instanceof DockingView) {
// ((DockingView) pane).refreshDockingView();
// }
} }
private void refreshContainer() { private void refreshContainer() {
@ -460,7 +448,6 @@ public class EastRegionContainerPane extends UIEastResizableContainer {
this.btnIconName = btnIconName; this.btnIconName = btnIconName;
initButton(); initButton();
initPropertyPanel(); initPropertyPanel();
// this.visibleModes = new ArrayList<PropertyMode>(visibleModes);
initModes(visibleModes, enableModes); initModes(visibleModes, enableModes);
} }
@ -576,11 +563,6 @@ public class EastRegionContainerPane extends UIEastResizableContainer {
} }
} }
// private void refreshContainer() {
// propertyPanel.validate();
// propertyPanel.repaint();
// propertyPanel.revalidate();
// }
private String getBtnIconUrl() { private String getBtnIconUrl() {
return ICON_BASE_DIR + btnIconName + iconSuffix; return ICON_BASE_DIR + btnIconName + iconSuffix;
} }
@ -594,6 +576,14 @@ public class EastRegionContainerPane extends UIEastResizableContainer {
} }
} }
public void setTabButtonSelected() {
resetPropertyIcons();
iconSuffix = ICON_SUFFIX_SELECTED;
button.setIcon(BaseUtils.readIcon(getBtnIconUrl()));
button.setBackground(selectedBtnBackground);
button.setOpaque(true);
}
private void initButton() { private void initButton() {
button = new UIButton(BaseUtils.readIcon(getBtnIconUrl())) { button = new UIButton(BaseUtils.readIcon(getBtnIconUrl())) {
public Dimension getPreferredSize() { public Dimension getPreferredSize() {
@ -614,11 +604,7 @@ public class EastRegionContainerPane extends UIEastResizableContainer {
} else { } else {
popupFixedPane(); popupFixedPane();
} }
resetPropertyIcons(); setTabButtonSelected();
iconSuffix = ICON_SUFFIX_SELECTED;
button.setIcon(BaseUtils.readIcon(getBtnIconUrl()));
button.setBackground(selectedBtnBackground);
button.setOpaque(true);
} }
}); });
} }
@ -655,7 +641,6 @@ public class EastRegionContainerPane extends UIEastResizableContainer {
// 弹出对话框 // 弹出对话框
public void popupDialog() { public void popupDialog() {
// setIsPoppedOut(true);
if (isPoppedOut) { if (isPoppedOut) {
return; return;
} }
@ -667,15 +652,12 @@ public class EastRegionContainerPane extends UIEastResizableContainer {
popupDialog.adjustLocation(); popupDialog.adjustLocation();
popupDialog.setVisible(true); popupDialog.setVisible(true);
} }
// initContentPane();
// refreshContainer();
removeItem(this); removeItem(this);
} }
public void popToFrame() { public void popToFrame() {
if (isPoppedOut) { if (isPoppedOut) {
isPoppedOut = false; isPoppedOut = false;
// popupDialog.dispose();
popupDialog.setVisible(false); popupDialog.setVisible(false);
initContentPane(); initContentPane();
onResize(); onResize();
@ -892,7 +874,6 @@ public class EastRegionContainerPane extends UIEastResizableContainer {
container.add(popupToolPane, BorderLayout.NORTH); container.add(popupToolPane, BorderLayout.NORTH);
container.add(contentPane, BorderLayout.CENTER); container.add(contentPane, BorderLayout.CENTER);
setSize(CONTENT_WIDTH, POPUP_DEFAULT_HEIGHT); setSize(CONTENT_WIDTH, POPUP_DEFAULT_HEIGHT);
// validate();
adjustLocation(); adjustLocation();
initListener(); initListener();

5
designer_base/src/com/fr/design/mainframe/toolbar/ToolBarMenuDock.java

@ -379,10 +379,9 @@ public abstract class ToolBarMenuDock {
// shortCuts.add(new ForumAction()); // shortCuts.add(new ForumAction());
} }
shortCuts.add(SeparatorDef.DEFAULT); shortCuts.add(SeparatorDef.DEFAULT);
shortCuts.add(new AboutAction());
shortCuts.add(SeparatorDef.DEFAULT);
shortCuts.add(new AlphaFineAction()); shortCuts.add(new AlphaFineAction());
shortCuts.add(SeparatorDef.DEFAULT);
shortCuts.add(new AboutAction());
return shortCuts.toArray(new ShortCut[shortCuts.size()]); return shortCuts.toArray(new ShortCut[shortCuts.size()]);
} }

5
designer_base/src/com/fr/design/present/dict/DatabaseDictPane.java

@ -137,6 +137,8 @@ public class DatabaseDictPane extends FurtherBasicBeanPane<DatabaseDictionary> i
this.chooseTable.populateBean(new DataBaseItems(dbName, dbDict.getSchema(), dbDict.getTableName())); this.chooseTable.populateBean(new DataBaseItems(dbName, dbDict.getSchema(), dbDict.getTableName()));
if (this.database == null) { if (this.database == null) {
this.keyColumnPane.updateUpButton();
this.valueDictPane.updateUpButton();
return; return;
} }
@ -187,6 +189,9 @@ public class DatabaseDictPane extends FurtherBasicBeanPane<DatabaseDictionary> i
} }
dbDict.setKeyColumnIndex(keyColumnIndex); dbDict.setKeyColumnIndex(keyColumnIndex);
dbDict.setKeyColumnName(keyColumnName); dbDict.setKeyColumnName(keyColumnName);
}else {
this.keyColumnPane.updateUpButton();
this.valueDictPane.updateUpButton();
} }
Object value = this.valueDictPane.update(); Object value = this.valueDictPane.update();
if (value instanceof Integer) { if (value instanceof Integer) {

18
designer_base/src/com/fr/design/style/AbstractSelectBox.java

@ -38,12 +38,10 @@ public abstract class AbstractSelectBox<T> extends AbstractPopBox implements Mou
displayComponent.setEmptyBackground(); displayComponent.setEmptyBackground();
displayComponent.setBorder(new TriggleLineBorder()); displayComponent.setBorder(new TriggleLineBorder());
triggleButton = new UIToggleButton(UIConstants.ARROW_DOWN_ICON); triggleButton = new UIToggleButton(UIConstants.ARROW_DOWN_ICON);
triggleButton.setRoundBorder(true, Constants.LEFT); triggleButton.setPreferredSize(new Dimension(20, 20));
triggleButton.setPreferredSize(new Dimension(21, 20));
JPanel displayPane = FRGUIPaneFactory.createBorderLayout_S_Pane(); JPanel displayPane = FRGUIPaneFactory.createBorderLayout_S_Pane();
displayPane.add(displayComponent, BorderLayout.CENTER); displayPane.add(displayComponent, BorderLayout.CENTER);
displayComponent.setPreferredSize(new Dimension(preWidth, displayPane.getPreferredSize().height)); displayComponent.setPreferredSize(new Dimension(preWidth, displayPane.getPreferredSize().height));
displayComponent.addMouseListener(mouseListener); displayComponent.addMouseListener(mouseListener);
@ -59,7 +57,6 @@ public abstract class AbstractSelectBox<T> extends AbstractPopBox implements Mou
} }
public void ancestorRemoved(AncestorEvent evt) { public void ancestorRemoved(AncestorEvent evt) {
hidePopupMenu();
} }
public void ancestorMoved(AncestorEvent event) { public void ancestorMoved(AncestorEvent event) {
@ -75,8 +72,6 @@ public abstract class AbstractSelectBox<T> extends AbstractPopBox implements Mou
triggleButton.setEnabled(enabled); triggleButton.setEnabled(enabled);
} }
@Override @Override
public JPanel initWindowPane(double preWidth) { public JPanel initWindowPane(double preWidth) {
// TODO Auto-generated method stub // TODO Auto-generated method stub
@ -88,8 +83,8 @@ public abstract class AbstractSelectBox<T> extends AbstractPopBox implements Mou
super.paint(g); super.paint(g);
Graphics2D g2d = (Graphics2D)g; Graphics2D g2d = (Graphics2D)g;
g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON); g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
g2d.setColor(UIConstants.LINE_COLOR); g2d.setColor(UIConstants.POP_DIALOG_BORDER);
g2d.drawRoundRect(0, 0, this.getWidth() , this.getHeight() - 1, UIConstants.ARC, UIConstants.ARC); g2d.drawRoundRect(0, 0, this.getWidth() - 1 , this.getHeight() - 1, 4, 4);
triggleButton.setSelected(isPopupVisible()); triggleButton.setSelected(isPopupVisible());
} }
@ -105,15 +100,12 @@ public abstract class AbstractSelectBox<T> extends AbstractPopBox implements Mou
private class TriggleLineBorder extends AbstractBorder { private class TriggleLineBorder extends AbstractBorder {
private static final long serialVersionUID = 1065857667981063530L; private static final long serialVersionUID = 1065857667981063530L;
protected Insets borderInsets = new Insets(0, 0, 0, 1); protected Insets borderInsets = new Insets(0, 0, 0, 0);
public void paintBorder(Component c, Graphics g, int x, int y, int w, int h) { public void paintBorder(Component c, Graphics g, int x, int y, int w, int h) {
g.translate(x, y); g.translate(x, y);
g.setColor(UIConstants.LINE_COLOR); g.setColor(UIConstants.POP_DIALOG_BORDER);
g.drawLine(3, 0, w-2, 0);
g.drawLine(3, h - 1, w-2, h - 1);
g.drawLine(w - 1, 0, w - 1, h);
g.translate(-x, -y); g.translate(-x, -y);
} }

2
designer_base/src/com/fr/design/utils/gui/GUIPaintUtils.java

@ -19,7 +19,7 @@ public class GUIPaintUtils {
if (BaseUtils.isAuthorityEditing() && isAuthorityEdited) { if (BaseUtils.isAuthorityEditing() && isAuthorityEdited) {
g2d.setColor(UIConstants.AUTHORITY_LINE_COLOR); g2d.setColor(UIConstants.AUTHORITY_LINE_COLOR);
} else { } else {
g2d.setColor(UIConstants.TITLED_BORDER_COLOR); g2d.setColor(UIConstants.POP_DIALOG_BORDER);
} }
if (isRound) { if (isRound) {
g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON); g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);

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

@ -1,6 +1,7 @@
package com.fr.design.mainframe; package com.fr.design.mainframe;
import com.fr.base.ScreenResolution; import com.fr.base.ScreenResolution;
import com.fr.common.inputevent.InputEventBaseOnOS;
import com.fr.design.designer.beans.events.DesignerEvent; import com.fr.design.designer.beans.events.DesignerEvent;
import com.fr.design.designer.creator.XCreator; import com.fr.design.designer.creator.XCreator;
import com.fr.design.designer.creator.XLayoutContainer; import com.fr.design.designer.creator.XLayoutContainer;
@ -50,7 +51,6 @@ public class FormArea extends JComponent implements ScrollRulerComponent {
private double START_VALUE = DEFAULT_SLIDER; private double START_VALUE = DEFAULT_SLIDER;
private int resolution = ScreenResolution.getScreenResolution(); private int resolution = ScreenResolution.getScreenResolution();
private double screenValue; private double screenValue;
private boolean isCtrl = false;
public FormScrollBar getHorScrollBar() { public FormScrollBar getHorScrollBar() {
return horScrollBar; return horScrollBar;
@ -86,35 +86,14 @@ public class FormArea extends JComponent implements ScrollRulerComponent {
} }
this.setFocusTraversalKeysEnabled(false); this.setFocusTraversalKeysEnabled(false);
this.designer.addMouseWheelListener(showValSpinnerMouseWheelListener); this.designer.addMouseWheelListener(showValSpinnerMouseWheelListener);
this.designer.addKeyListener(showValSpinnerKeyListener);
this.setOpaque(true); this.setOpaque(true);
this.setBackground(Color.WHITE); this.setBackground(Color.WHITE);
} }
KeyListener showValSpinnerKeyListener = new KeyListener() {
@Override
public void keyTyped(KeyEvent e) {
}
@Override
public void keyPressed(KeyEvent e) {
if (e.isControlDown()) {
isCtrl = true;
}
}
@Override
public void keyReleased(KeyEvent e) {
isCtrl = false;
}
};
MouseWheelListener showValSpinnerMouseWheelListener = new MouseWheelListener() { MouseWheelListener showValSpinnerMouseWheelListener = new MouseWheelListener() {
@Override @Override
public void mouseWheelMoved(MouseWheelEvent e) { public void mouseWheelMoved(MouseWheelEvent e) {
if (isCtrl) { if (InputEventBaseOnOS.isControlDown(e)) {
int dir = e.getWheelRotation(); int dir = e.getWheelRotation();
int old_resolution = (int) slidePane.getShowVal().getValue(); int old_resolution = (int) slidePane.getShowVal().getValue();
slidePane.getShowVal().setValue(old_resolution - (dir * SHOWVALMIN)); slidePane.getShowVal().setValue(old_resolution - (dir * SHOWVALMIN));

Loading…
Cancel
Save