diff --git a/designer/src/com/fr/design/dscolumn/DSColumnConditionsPane.java b/designer/src/com/fr/design/dscolumn/DSColumnConditionsPane.java index 228e88ae42..88e807e92b 100644 --- a/designer/src/com/fr/design/dscolumn/DSColumnConditionsPane.java +++ b/designer/src/com/fr/design/dscolumn/DSColumnConditionsPane.java @@ -38,7 +38,7 @@ public class DSColumnConditionsPane extends BasicPane { if (setting > DSColumnPane.SETTING_DSRELATED) { liteConditionPane = new DSColumnLiteConditionPane() { - protected boolean needDoWithCondition(Condition liteCondition) { + protected boolean isNeedDoWithCondition(Condition liteCondition) { return liteCondition != null; } }; diff --git a/designer/src/com/fr/design/mainframe/CellWidgetPropertyPane.java b/designer/src/com/fr/design/mainframe/CellWidgetPropertyPane.java index e0a2cf4410..39b3e3d933 100644 --- a/designer/src/com/fr/design/mainframe/CellWidgetPropertyPane.java +++ b/designer/src/com/fr/design/mainframe/CellWidgetPropertyPane.java @@ -75,8 +75,8 @@ public class CellWidgetPropertyPane extends BasicPane { FRContext.getLogger().error(e.getMessage(), e); } } - cellEditorDefPane.populate(cellWidget); + cellEditorDefPane.populate(cellWidget); } @@ -122,10 +122,16 @@ public class CellWidgetPropertyPane extends BasicPane { } } }); - DesignerContext.getDesignerFrame().getSelectedJTemplate().fireTargetModified(); + if(DesignerContext.getDesignerFrame().getSelectedJTemplate() != null){ + DesignerContext.getDesignerFrame().getSelectedJTemplate().fireTargetModified(); + } } + public void reInitAllListener(){ + cellEditorDefPane.registerListener(); + } + private Widget upDateWidgetAuthority(TemplateCellElement cellElement, Widget newWidget) { try { Widget oldWidget = (Widget) cellElement.getWidget().clone(); diff --git a/designer/src/com/fr/design/mainframe/ElementCasePaneDelegate.java b/designer/src/com/fr/design/mainframe/ElementCasePaneDelegate.java index ed0d481465..556b5d59e1 100644 --- a/designer/src/com/fr/design/mainframe/ElementCasePaneDelegate.java +++ b/designer/src/com/fr/design/mainframe/ElementCasePaneDelegate.java @@ -47,7 +47,7 @@ public class ElementCasePaneDelegate extends ElementCasePane { this.addSelectionChangeListener(new SelectionListener() { @Override public void selectionChanged(SelectionEvent e) { - if (!isEditable()) { + if (!isEditable() && !BaseUtils.isAuthorityEditing()) { return; } doOnSelectionChanged(e); diff --git a/designer/src/com/fr/design/mainframe/JWorkBook.java b/designer/src/com/fr/design/mainframe/JWorkBook.java index 8d2854de72..c304f7a5e4 100644 --- a/designer/src/com/fr/design/mainframe/JWorkBook.java +++ b/designer/src/com/fr/design/mainframe/JWorkBook.java @@ -92,7 +92,7 @@ public class JWorkBook extends JTemplate { private UIModeControlContainer centerPane; public ReportComponentComposite reportComposite; private ParameterDefinitePane parameterPane; - private int resolution; + private int resolution = ScreenResolution.getScreenResolution(); public JWorkBook() { super(new WorkBook(new WorkSheet()), "WorkBook"); diff --git a/designer/src/com/fr/design/mainframe/ReportComponentComposite.java b/designer/src/com/fr/design/mainframe/ReportComponentComposite.java index b1d6e9e218..6d6a9b9fcc 100644 --- a/designer/src/com/fr/design/mainframe/ReportComponentComposite.java +++ b/designer/src/com/fr/design/mainframe/ReportComponentComposite.java @@ -33,6 +33,7 @@ public class ReportComponentComposite extends JComponent { private static final int MAX = 400; private static final int HUND = 100; private static final int MIN = 10; + private static final int DIR = 15; private JWorkBook parent; private UIModeControlContainer parentContainer = null; @@ -71,7 +72,7 @@ public class ReportComponentComposite extends JComponent { if (InputEventBaseOnOS.isControlDown(e)) { int dir = e.getWheelRotation(); int old_resolution = (int) jSliderContainer.getShowVal().getValue(); - jSliderContainer.getShowVal().setValue(old_resolution - (dir * MIN)); + jSliderContainer.getShowVal().setValue(old_resolution - (dir * DIR)); } } }; diff --git a/designer/src/com/fr/design/mainframe/alphafine/component/AlphaFineDialog.java b/designer/src/com/fr/design/mainframe/alphafine/component/AlphaFineDialog.java index ae811dbda9..e9d2ba784a 100644 --- a/designer/src/com/fr/design/mainframe/alphafine/component/AlphaFineDialog.java +++ b/designer/src/com/fr/design/mainframe/alphafine/component/AlphaFineDialog.java @@ -71,6 +71,7 @@ public class AlphaFineDialog extends UIDialog { private static final String PLUGIN_MARK_SHORT = "k:4 "; private static final String PLUGIN_MARK = "k:shop "; private static final String PLACE_HOLDER = Inter.getLocText("FR-Designer_AlphaFine"); + private static final int MAX_SHOW_SIZE = 12; private AlphaFineTextField searchTextField; private UIButton closeButton; @@ -89,7 +90,6 @@ public class AlphaFineDialog extends UIDialog { //是否强制打开,因为面板是否关闭绑定了全局鼠标事件,这里需要处理一下 private boolean forceOpen; - public AlphaFineDialog(Frame parent, boolean forceOpen) { super(parent); this.forceOpen = forceOpen; @@ -161,12 +161,6 @@ public class AlphaFineDialog extends UIDialog { }); topPane.add(closeButton, BorderLayout.EAST); add(topPane, BorderLayout.CENTER); - searchTextField.getDocument().addDocumentListener(new DocumentAdapter() { - @Override - protected void textChanged(DocumentEvent e) { - doSearch(searchTextField.getText()); - } - }); } /** @@ -174,7 +168,7 @@ public class AlphaFineDialog extends UIDialog { */ private void initSearchTextField() { searchTextField = new AlphaFineTextField(PLACE_HOLDER); - initTextFieldKeyListener(); + initTextFieldListener(); searchTextField.setFont(AlphaFineConstants.GREATER_FONT); searchTextField.setBackground(Color.WHITE); searchTextField.setBorderPainted(false); @@ -228,16 +222,11 @@ public class AlphaFineDialog extends UIDialog { * @param text */ private void doSearch(String text) { - - if (StringUtils.isBlank(text) || isNeedSearch(text)) { - removeSearchResult(); - } else { - showSearchResult(); - } + showSearchResult(text); } - boolean isNeedSearch(String text) { - return ComparatorUtils.equals(PLACE_HOLDER, text) || text.contains("'"); + boolean isNoNeedSearch(String text) { + return ComparatorUtils.equals(PLACE_HOLDER, text) || text.contains("'") || StringUtils.isBlank(text); } @Override @@ -272,17 +261,17 @@ public class AlphaFineDialog extends UIDialog { searchResultPane = null; } setSize(AlphaFineConstants.FIELD_SIZE); - repaint(); + refreshContainer(); } /** * 展示搜索结果 */ - private void showSearchResult() { + private void showSearchResult(String text) { if (searchResultPane == null) { initSearchResultComponents(); } - initSearchWorker(); + initSearchWorker(text); } /** @@ -299,8 +288,8 @@ public class AlphaFineDialog extends UIDialog { searchResultList.setCellRenderer(new ContentCellRender()); leftSearchResultPane = new UIScrollPane(searchResultList); + leftSearchResultPane.setBorder(null); leftSearchResultPane.setBackground(Color.WHITE); - leftSearchResultPane.setBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10)); leftSearchResultPane.setPreferredSize(new Dimension(AlphaFineConstants.LEFT_WIDTH, AlphaFineConstants.CONTENT_HEIGHT)); rightSearchResultPane = new JPanel(); rightSearchResultPane.setBackground(Color.WHITE); @@ -317,7 +306,7 @@ public class AlphaFineDialog extends UIDialog { /** * 异步加载搜索结果 */ - private void initSearchWorker() { + private void initSearchWorker(final String text) { if (this.searchWorker != null && !this.searchWorker.isDone()) { this.searchWorker.cancel(true); this.searchWorker = null; @@ -325,9 +314,7 @@ public class AlphaFineDialog extends UIDialog { this.searchWorker = new SwingWorker() { @Override protected Object doInBackground() throws Exception { - resumeLeftPane(); - splitLabel.setIcon(new ImageIcon(getClass().getResource("/com/fr/design/mainframe/alphafine/images/bigloading.gif"))); - rebuildList(searchTextField.getText().toLowerCase()); + rebuildList(text); return null; } @@ -347,11 +334,9 @@ public class AlphaFineDialog extends UIDialog { */ private void resumeLeftPane() { if (searchResultPane != null && defaultPane != null) { - rightSearchResultPane.removeAll(); searchResultPane.remove(defaultPane); defaultPane = null; searchResultPane.add(leftSearchResultPane, BorderLayout.WEST); - refreshContainer(); } } @@ -394,25 +379,26 @@ public class AlphaFineDialog extends UIDialog { */ private void rebuildList(String searchText) { resetContainer(); + if (searchText.startsWith(ADVANCED_SEARCH_MARK)) { if (searchText.startsWith(ACTION_MARK_SHORT) || searchText.startsWith(ACTION_MARK)) { storeText = searchText.substring(searchText.indexOf(StringUtils.BLANK) + 1, searchText.length()); - getActionList(storeText); + buildActionList(storeText); } else if (searchText.startsWith(DOCUMENT_MARK_SHORT) || searchText.startsWith(DOCUMENT_MARK)) { storeText = searchText.substring(searchText.indexOf(StringUtils.BLANK) + 1, searchText.length()); - getDocumentList(storeText); + buildDocumentList(storeText); } else if (searchText.startsWith(FILE_MARK_SHORT) || searchText.startsWith(FILE_MARK)) { storeText = searchText.substring(searchText.indexOf(StringUtils.BLANK) + 1, searchText.length()); - getFileList(storeText); + buildFileList(storeText); } else if (searchText.startsWith(CPT_MARK) || searchText.startsWith(FRM_MARK)) { storeText = searchText.substring(searchText.indexOf(StringUtils.BLANK) + 1, searchText.length()); - getFileList(searchText); + buildFileList(searchText); } else if (searchText.startsWith(DS_MARK)) { storeText = searchText.substring(searchText.indexOf(StringUtils.BLANK) + 1, searchText.length()); - getFileList(DS_NAME + storeText); + buildFileList(DS_NAME + storeText); } else if (searchText.startsWith(PLUGIN_MARK_SHORT) || searchText.startsWith(PLUGIN_MARK)) { storeText = searchText.substring(searchText.indexOf(StringUtils.BLANK) + 1, searchText.length()); - getPluginList(storeText); + buildPluginList(storeText); } } else { storeText = searchText.trim(); @@ -425,9 +411,11 @@ public class AlphaFineDialog extends UIDialog { * 重置面板 */ private void resetContainer() { + rightSearchResultPane.removeAll(); + splitLabel.setIcon(new ImageIcon(getClass().getResource("/com/fr/design/mainframe/alphafine/images/bigloading.gif"))); + resumeLeftPane(); searchListModel.removeAllElements(); searchListModel.resetSelectedState(); - rightSearchResultPane.removeAll(); refreshContainer(); } @@ -437,23 +425,22 @@ public class AlphaFineDialog extends UIDialog { * @param searchText */ private void doNormalSearch(String searchText) { - getRecentList(searchText); - getRecommendList(searchText); - getActionList(searchText); - getFileList(searchText); - getDocumentList(searchText); - getPluginList(searchText); + buildRecentList(searchText); + buildRecommendList(searchText); + buildActionList(searchText); + buildFileList(searchText); + buildDocumentList(searchText); + buildPluginList(searchText); } - private void getDocumentList(final String searchText) { + private void buildDocumentList(final String searchText) { SearchResult documentModelList = DocumentSearchManager.getDocumentSearchManager().getLessSearchResult(searchText); for (AlphaCellModel object : documentModelList) { - AlphaFineHelper.checkCancel(); searchListModel.addElement(object); } } - private void getFileList(final String searchText) { + private void buildFileList(final String searchText) { SearchResult fileModelList = FileSearchManager.getFileSearchManager().getLessSearchResult(searchText); for (AlphaCellModel object : fileModelList) { AlphaFineHelper.checkCancel(); @@ -461,34 +448,30 @@ public class AlphaFineDialog extends UIDialog { } } - private void getActionList(final String searchText) { + private void buildActionList(final String searchText) { SearchResult actionModelList = ActionSearchManager.getActionSearchManager().getLessSearchResult(searchText); for (AlphaCellModel object : actionModelList) { - AlphaFineHelper.checkCancel(); searchListModel.addElement(object); } } - private void getPluginList(final String searchText) { + private void buildPluginList(final String searchText) { SearchResult pluginModelList = PluginSearchManager.getPluginSearchManager().getLessSearchResult(searchText); for (AlphaCellModel object : pluginModelList) { - AlphaFineHelper.checkCancel(); searchListModel.addElement(object); } } - private void getRecommendList(final String searchText) { + private void buildRecommendList(final String searchText) { SearchResult recommendModelList = RecommendSearchManager.getRecommendSearchManager().getLessSearchResult(searchText); for (AlphaCellModel object : recommendModelList) { - AlphaFineHelper.checkCancel(); searchListModel.addElement(object); } } - private void getRecentList(final String searchText) { + private void buildRecentList(final String searchText) { SearchResult recentModelList = RecentSearchManager.getRecentSearchManger().getLessSearchResult(searchText); for (AlphaCellModel object : recentModelList) { - AlphaFineHelper.checkCancel(); searchListModel.addElement(object); } @@ -639,11 +622,10 @@ public class AlphaFineDialog extends UIDialog { } } - private void HandleMoreOrLessResult(int index, MoreModel selectedValue) { - if (selectedValue.getContent().equals(Inter.getLocText("FR-Designer_AlphaFine_ShowAll"))) { + private void dealWithMoreOrLessResult(int index, MoreModel selectedValue) { + if (ComparatorUtils.equals(Inter.getLocText("FR-Designer_AlphaFine_ShowAll"), selectedValue.getContent())) { selectedValue.setContent(Inter.getLocText("FR-Designer_AlphaFine_ShowLess")); rebuildShowMoreList(index, selectedValue); - } else { selectedValue.setContent(Inter.getLocText("FR-Designer_AlphaFine_ShowAll")); rebuildShowMoreList(index, selectedValue); @@ -655,8 +637,7 @@ public class AlphaFineDialog extends UIDialog { UILabel label = new UILabel(new ImageIcon(getClass().getResource("/com/fr/design/mainframe/alphafine/images/opening.gif"))); label.setBorder(BorderFactory.createEmptyBorder(120, 0, 0, 0)); rightSearchResultPane.add(label, BorderLayout.CENTER); - validate(); - repaint(); + refreshContainer(); } /** @@ -667,18 +648,15 @@ public class AlphaFineDialog extends UIDialog { } /** - * 为textfield添加键盘监听器 + * 为textfield添加监听器 */ - private void initTextFieldKeyListener() { + private void initTextFieldListener() { searchTextField.addKeyListener(new KeyAdapter() { @Override public void keyPressed(KeyEvent e) { if (e.getKeyCode() == KeyEvent.VK_DOWN) { searchResultList.requestFocus(); searchResultList.setSelectedIndex(searchResultList.getSelectedIndex() + 1); - } else if (e.getKeyCode() == KeyEvent.VK_ENTER) { - doNavigate(); - saveHistory(searchResultList.getSelectedValue()); } } @@ -690,7 +668,25 @@ public class AlphaFineDialog extends UIDialog { AlphaFineDialog.this.setVisible(false); } else { searchTextField.setText(null); + removeSearchResult(); + } + } + } + }); + + searchTextField.getDocument().addDocumentListener(new DocumentAdapter() { + @Override + protected void textChanged(DocumentEvent e) { + if (isNoNeedSearch(searchTextField.getText())) { + removeSearchResult(); + } else { + try { + Thread.sleep(10); + doSearch(searchTextField.getText()); + } catch (InterruptedException e1) { + FRLogger.getLogger().error(e1.getMessage()); } + } } }); @@ -726,7 +722,7 @@ public class AlphaFineDialog extends UIDialog { @Override public void checkValid() throws Exception { - + //不处理 } private void doNavigate() { @@ -778,7 +774,6 @@ public class AlphaFineDialog extends UIDialog { if (!httpClient.isServerAlive()) { FRLogger.getLogger().error("Failed to sent data to server!"); } - httpClient.setTimeout(5000); } @@ -935,7 +930,7 @@ public class AlphaFineDialog extends UIDialog { saveHistory(selectedValue); } else if (e.getClickCount() == 1) { if (selectedValue instanceof MoreModel && ((MoreModel) selectedValue).isNeedMore()) { - HandleMoreOrLessResult(selectedIndex, (MoreModel) selectedValue); + dealWithMoreOrLessResult(selectedIndex, (MoreModel) selectedValue); } } } @@ -971,10 +966,23 @@ public class AlphaFineDialog extends UIDialog { @Override public void addElement(AlphaCellModel element) { + AlphaFineHelper.checkCancel(); int index = myDelegate.size(); myDelegate.add(element); fireContentsChanged(this, index, index); fireSelectedStateChanged(element, index); + + } + + @Override + protected void fireContentsChanged(Object source, int index0, int index1) { + if (myDelegate.size() > MAX_SHOW_SIZE) { + leftSearchResultPane.getVerticalScrollBar().setBorder(BorderFactory.createEmptyBorder(0, 2, 0, 0)); + leftSearchResultPane.setBorder(BorderFactory.createEmptyBorder(10, 10, 10, 2)); + } else { + leftSearchResultPane.setBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10)); + } + super.fireContentsChanged(source, index0, index1); } /** diff --git a/designer/src/com/fr/design/mainframe/alphafine/preview/PluginPreviewPane.java b/designer/src/com/fr/design/mainframe/alphafine/preview/PluginPreviewPane.java index fed36e99f2..d6cffc8852 100644 --- a/designer/src/com/fr/design/mainframe/alphafine/preview/PluginPreviewPane.java +++ b/designer/src/com/fr/design/mainframe/alphafine/preview/PluginPreviewPane.java @@ -49,10 +49,10 @@ public class PluginPreviewPane extends JPanel { nameLabel.setBackground(AlphaFineConstants.BLUE); nameLabel.setBorder(BorderFactory.createEmptyBorder(20, 20, 10, 20)); line.setBorder(BorderFactory.createEmptyBorder(20, 0, 10, 0)); - String price0 = price == 0 ? Inter.getLocText("FR-Designer-Collect_Information_free") : String.valueOf(price); + String price0 = price == 0 ? Inter.getLocText("FR-Designer-Collect_Information_free") : "¥" + String.valueOf(price); UILabel priceLabel = new UILabel(price0); priceLabel.setForeground(AlphaFineConstants.RED); - priceLabel.setFont(AlphaFineConstants.SMALL_FONT); + priceLabel.setFont(AlphaFineConstants.MEDIUM_FONT); bottomPane.add(priceLabel, BorderLayout.WEST); panel.add(nameLabel, BorderLayout.NORTH); panel.add(line, BorderLayout.SOUTH); diff --git a/designer/src/com/fr/design/mainframe/alphafine/search/manager/ActionSearchManager.java b/designer/src/com/fr/design/mainframe/alphafine/search/manager/ActionSearchManager.java index 14135a2b23..185938ab81 100644 --- a/designer/src/com/fr/design/mainframe/alphafine/search/manager/ActionSearchManager.java +++ b/designer/src/com/fr/design/mainframe/alphafine/search/manager/ActionSearchManager.java @@ -75,10 +75,9 @@ public class ActionSearchManager implements AlphaFineSearchProcessor { result.add(object); } } - if (result.size() == 0) { + if (result.isEmpty()) { return lessModelList; - } - if (result.size() > 0 && result.size() < AlphaFineConstants.SHOW_SIZE + 1) { + } else if (result.size() < AlphaFineConstants.SHOW_SIZE + 1) { lessModelList.add(0, new MoreModel(Inter.getLocText("FR-Designer_Set"))); lessModelList.addAll(result); } else { diff --git a/designer/src/com/fr/design/mainframe/alphafine/search/manager/DocumentSearchManager.java b/designer/src/com/fr/design/mainframe/alphafine/search/manager/DocumentSearchManager.java index 7067dd17c9..11df762762 100644 --- a/designer/src/com/fr/design/mainframe/alphafine/search/manager/DocumentSearchManager.java +++ b/designer/src/com/fr/design/mainframe/alphafine/search/manager/DocumentSearchManager.java @@ -61,7 +61,6 @@ public class DocumentSearchManager implements AlphaFineSearchProcessor { if (!httpClient.isServerAlive()) { return getNoConnectList(); } - httpClient.setTimeout(5000); result = httpClient.getResponseText(); AlphaFineHelper.checkCancel(); try { @@ -76,10 +75,9 @@ public class DocumentSearchManager implements AlphaFineSearchProcessor { searchResult.add(cellModel); } } - if (searchResult.size() == 0) { + if (searchResult.isEmpty()) { return lessModelList; - } - if (searchResult.size() > 0 && searchResult.size() < AlphaFineConstants.SHOW_SIZE + 1) { + } else if (searchResult.size() < AlphaFineConstants.SHOW_SIZE + 1) { lessModelList.add(0, new MoreModel(Inter.getLocText("FR-Designer_COMMUNITY_HELP"))); lessModelList.addAll(searchResult); } else { @@ -90,7 +88,6 @@ public class DocumentSearchManager implements AlphaFineSearchProcessor { } } catch (JSONException e) { FRLogger.getLogger().error("document search error: " + e.getMessage()); - return lessModelList; } } return lessModelList; diff --git a/designer/src/com/fr/design/mainframe/alphafine/search/manager/FileSearchManager.java b/designer/src/com/fr/design/mainframe/alphafine/search/manager/FileSearchManager.java index d67d434bda..0c1a3b61b2 100644 --- a/designer/src/com/fr/design/mainframe/alphafine/search/manager/FileSearchManager.java +++ b/designer/src/com/fr/design/mainframe/alphafine/search/manager/FileSearchManager.java @@ -100,10 +100,9 @@ public class FileSearchManager implements AlphaFineSearchProcessor { } } - if (result.size() == 0) { + if (result.isEmpty()) { return lessModelList; - } - if (result.size() > 0 && result.size() < AlphaFineConstants.SHOW_SIZE + 1) { + } else if (result.size() < AlphaFineConstants.SHOW_SIZE + 1) { lessModelList.add(0, new MoreModel(Inter.getLocText("FR-Designer_Templates"))); lessModelList.addAll(result); } else { diff --git a/designer/src/com/fr/design/mainframe/alphafine/search/manager/PluginSearchManager.java b/designer/src/com/fr/design/mainframe/alphafine/search/manager/PluginSearchManager.java index 04c5074ef3..25efb5f6bd 100644 --- a/designer/src/com/fr/design/mainframe/alphafine/search/manager/PluginSearchManager.java +++ b/designer/src/com/fr/design/mainframe/alphafine/search/manager/PluginSearchManager.java @@ -96,7 +96,6 @@ public class PluginSearchManager implements AlphaFineSearchProcessor { if (!httpClient.isServerAlive()) { return getNoConnectList(); } - httpClient.setTimeout(5000); result = httpClient.getResponseText(); AlphaFineHelper.checkCancel(); JSONObject jsonObject = new JSONObject(result); @@ -109,11 +108,10 @@ public class PluginSearchManager implements AlphaFineSearchProcessor { searchResult.add(cellModel); } } - if (searchResult.size() == 0) { + if (searchResult.isEmpty()) { return this.lessModelList; - } - if (searchResult.size() > 0 && searchResult.size() < AlphaFineConstants.SHOW_SIZE + 1) { - lessModelList.add(0, new MoreModel(Inter.getLocText("FR-Designer_Templates"))); + } else if (searchResult.size() < AlphaFineConstants.SHOW_SIZE + 1) { + lessModelList.add(0, new MoreModel(Inter.getLocText("FR-Designer-Plugin_Addon"))); lessModelList.addAll(searchResult); } else { lessModelList.add(0, new MoreModel(Inter.getLocText("FR-Designer-Plugin_Addon"), Inter.getLocText("FR-Designer_AlphaFine_ShowAll"), true, CellType.PLUGIN)); diff --git a/designer/src/com/fr/design/mainframe/form/FormReportComponentComposite.java b/designer/src/com/fr/design/mainframe/form/FormReportComponentComposite.java index f060130f41..cc27c5486d 100644 --- a/designer/src/com/fr/design/mainframe/form/FormReportComponentComposite.java +++ b/designer/src/com/fr/design/mainframe/form/FormReportComponentComposite.java @@ -34,6 +34,7 @@ public class FormReportComponentComposite extends JComponent implements TargetMo private static final int MAX = 400; private static final int HUND = 100; private static final int MIN = 10; + private static final int DIR = 15; private static final double MIN_TIME = 0.4; public FormElementCaseDesigner elementCaseDesigner; private BaseJForm jForm; @@ -61,7 +62,7 @@ public class FormReportComponentComposite extends JComponent implements TargetMo if (InputEventBaseOnOS.isControlDown(e)) { int dir = e.getWheelRotation(); int old_resolution = (int) jSliderContainer.getShowVal().getValue(); - jSliderContainer.getShowVal().setValue(old_resolution - (dir * MIN)); + jSliderContainer.getShowVal().setValue(old_resolution - (dir * DIR)); } } }; diff --git a/designer/src/com/fr/design/widget/WidgetPane.java b/designer/src/com/fr/design/widget/WidgetPane.java index 593bf21979..61e79acb83 100644 --- a/designer/src/com/fr/design/widget/WidgetPane.java +++ b/designer/src/com/fr/design/widget/WidgetPane.java @@ -163,6 +163,10 @@ public class WidgetPane extends AbstractAttrNoScrollPane implements ItemListener } + public void registerListener(){ + initAllListeners(); + } + private static class EditorTypeComboBox extends UIComboBox { private Item item = new Item(Inter.getLocText("Widget-User_Defined"), diff --git a/designer/src/com/fr/design/widget/ui/ButtonDefinePane.java b/designer/src/com/fr/design/widget/ui/ButtonDefinePane.java index 3d2a703ddd..59a5b62bb2 100644 --- a/designer/src/com/fr/design/widget/ui/ButtonDefinePane.java +++ b/designer/src/com/fr/design/widget/ui/ButtonDefinePane.java @@ -1,10 +1,12 @@ package com.fr.design.widget.ui; import com.fr.design.layout.FRGUIPaneFactory; +import com.fr.design.mainframe.CellWidgetPropertyPane; import com.fr.design.widget.ui.btn.ButtonDetailPaneFactory; import com.fr.form.ui.Button; import com.fr.form.ui.FreeButton; import com.fr.design.widget.btn.ButtonDetailPane; + import javax.swing.event.ChangeEvent; import javax.swing.event.ChangeListener; import java.awt.*; @@ -38,6 +40,8 @@ public class ButtonDefinePane extends AbstractDataModify