Browse Source

Pull request #1681: REPORT-31236 && REPORT-31801

Merge in DESIGN/design from ~HADES/design:release/10.0 to release/10.0

* commit '24a569e172025aeb491ffcd33b305f2a51f3facf':
  REPORT-31236 && REPORT-31801
feature/big-screen
Hades 5 years ago
parent
commit
7cce33535d
  1. 6
      designer-base/src/main/java/com/fr/design/actions/server/GlobalTableDataAction.java
  2. 5
      designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/DBTableDataPane.java
  3. 20
      designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/MaxMemRowCountPanel.java
  4. 2
      designer-realize/src/main/java/com/fr/design/cell/editor/RichTextToolBar.java

6
designer-base/src/main/java/com/fr/design/actions/server/GlobalTableDataAction.java

@ -27,6 +27,7 @@ import com.fr.transaction.Worker;
import com.fr.transaction.WorkerFacade; import com.fr.transaction.WorkerFacade;
import javax.swing.KeyStroke; import javax.swing.KeyStroke;
import java.awt.*;
import java.awt.event.ActionEvent; import java.awt.event.ActionEvent;
import java.util.HashMap; import java.util.HashMap;
import java.util.Map; import java.util.Map;
@ -35,7 +36,8 @@ import java.util.Map;
* Global TableData. * Global TableData.
*/ */
public class GlobalTableDataAction extends UpdateAction implements ResponseDataSourceChange { public class GlobalTableDataAction extends UpdateAction implements ResponseDataSourceChange {
//private static TableDataManagerPane globalTableDataPane = new TableDataManagerPane();
private static final Dimension DEFAULT_DIMENSION = new Dimension(1000, 600);
public GlobalTableDataAction() { public GlobalTableDataAction() {
this.setMenuKeySet(SERVER_TABLEDATA); this.setMenuKeySet(SERVER_TABLEDATA);
@ -80,7 +82,7 @@ public class GlobalTableDataAction extends UpdateAction implements ResponseDataS
tableDataConfig.renameTableData(oldName, newName); tableDataConfig.renameTableData(oldName, newName);
} }
}; };
final BasicDialog globalTableDataDialog = globalTableDataPane.showLargeWindow(designerFrame, null); final BasicDialog globalTableDataDialog = globalTableDataPane.showWindowWithCustomSize(designerFrame, null, DEFAULT_DIMENSION);
globalTableDataDialog.addDialogActionListener(new DialogActionAdapter() { globalTableDataDialog.addDialogActionListener(new DialogActionAdapter() {

5
designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/DBTableDataPane.java

@ -238,13 +238,10 @@ public class DBTableDataPane extends AbstractTableDataPane<DBTableData> {
isShareCheckBox.setBackground(Color.WHITE); isShareCheckBox.setBackground(Color.WHITE);
maxPanel = new MaxMemRowCountPanel(); maxPanel = new MaxMemRowCountPanel();
maxPanel.setBorder(null); maxPanel.setBorder(null);
JPanel wrapMaxPanel = FRGUIPaneFactory.createBorderLayout_S_Pane();
wrapMaxPanel.add(maxPanel);
wrapMaxPanel.setPreferredSize(new Dimension(350, 20));
UIToolbar editToolBar = ToolBarDef.createJToolBar(); UIToolbar editToolBar = ToolBarDef.createJToolBar();
toolBarDef.updateToolBar(editToolBar); toolBarDef.updateToolBar(editToolBar);
editToolBar.add(isShareCheckBox); editToolBar.add(isShareCheckBox);
editToolBar.add(wrapMaxPanel); editToolBar.add(maxPanel);
return editToolBar; return editToolBar;
} }

20
designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/MaxMemRowCountPanel.java

@ -4,6 +4,7 @@ import java.awt.Dimension;
import java.awt.event.ActionEvent; import java.awt.event.ActionEvent;
import java.awt.event.ActionListener; import java.awt.event.ActionListener;
import com.fr.base.GraphHelper;
import com.fr.design.constants.UIConstants; import com.fr.design.constants.UIConstants;
import com.fr.design.gui.ilable.UILabel; import com.fr.design.gui.ilable.UILabel;
@ -15,6 +16,20 @@ import com.fr.design.gui.itoolbar.UIToolbar;
public class MaxMemRowCountPanel extends UIToolbar { public class MaxMemRowCountPanel extends UIToolbar {
private static final int ALL_IN_MEMORY = 0; private static final int ALL_IN_MEMORY = 0;
private static final int MAX_IN_MEMORY = 1; private static final int MAX_IN_MEMORY = 1;
private static final String[] CACHE_LIST = {com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Save_All_Records_In_Memory"),
com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Max_Mem_Row_Count") };
private static final int MAX_WIDTH = getMaxComBoBoxWidth() > 200 ? 350 : 250;
private static int getMaxComBoBoxWidth() {
int maxWidth = GraphHelper.getWidth(CACHE_LIST[0]);
for (int i = 1; i < CACHE_LIST.length; i++) {
int width = GraphHelper.getWidth(CACHE_LIST[i]);
if (width > maxWidth) {
maxWidth = width;
}
}
return maxWidth;
}
private UISpinner numberSpinner; private UISpinner numberSpinner;
private UIComboBox switchCache; private UIComboBox switchCache;
@ -44,7 +59,7 @@ public class MaxMemRowCountPanel extends UIToolbar {
@Override @Override
public Dimension getPreferredSize() { public Dimension getPreferredSize() {
Dimension dim = super.getPreferredSize(); Dimension dim = super.getPreferredSize();
dim.width = 340; dim.width = MAX_WIDTH;
return dim; return dim;
}; };
@ -52,8 +67,7 @@ public class MaxMemRowCountPanel extends UIToolbar {
this.setFloatable(false); this.setFloatable(false);
this.setRollover(true); this.setRollover(true);
this.setBackground(UIConstants.NORMAL_BACKGROUND); this.setBackground(UIConstants.NORMAL_BACKGROUND);
String[] cacheList = { com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Save_All_Records_In_Memory"), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Max_Mem_Row_Count") }; switchCache = new UIComboBox(CACHE_LIST);
switchCache = new UIComboBox(cacheList);
switchCache.addActionListener(switchStateL); switchCache.addActionListener(switchStateL);
numberSpinner = new UISpinner(0, Integer.MAX_VALUE, 1); numberSpinner = new UISpinner(0, Integer.MAX_VALUE, 1);
} }

2
designer-realize/src/main/java/com/fr/design/cell/editor/RichTextToolBar.java

@ -155,7 +155,7 @@ public class RichTextToolBar extends BasicPane{
private void bindListener(){ private void bindListener(){
FRFont defaultFont = (this.textPane != null) ? FRFont.getInstance(this.textPane.getFont()) : RichTextPane.DEFAUL_FONT; FRFont defaultFont = (this.textPane != null) ? FRFont.getInstance(this.textPane.getFont()) : RichTextPane.DEFAUL_FONT;
fontNameComboBox.addItemListener(fontNameItemListener); fontNameComboBox.addItemListener(fontNameItemListener);
fontNameComboBox.setSelectedItem(defaultFont.getFontName()); fontNameComboBox.setSelectedItem(defaultFont.getFamily());
fontSizeComboBox.addItemListener(fontSizeItemListener); fontSizeComboBox.addItemListener(fontSizeItemListener);
fontSizeComboBox.setSelectedItem(scaleDown(defaultFont.getSize())); fontSizeComboBox.setSelectedItem(scaleDown(defaultFont.getSize()));

Loading…
Cancel
Save