Browse Source

REPORT-31236 && REPORT-31801

feature/big-screen
hades 5 years ago
parent
commit
24a569e172
  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 javax.swing.KeyStroke;
import java.awt.*;
import java.awt.event.ActionEvent;
import java.util.HashMap;
import java.util.Map;
@ -35,7 +36,8 @@ import java.util.Map;
* Global TableData.
*/
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() {
this.setMenuKeySet(SERVER_TABLEDATA);
@ -80,7 +82,7 @@ public class GlobalTableDataAction extends UpdateAction implements ResponseDataS
tableDataConfig.renameTableData(oldName, newName);
}
};
final BasicDialog globalTableDataDialog = globalTableDataPane.showLargeWindow(designerFrame, null);
final BasicDialog globalTableDataDialog = globalTableDataPane.showWindowWithCustomSize(designerFrame, null, DEFAULT_DIMENSION);
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);
maxPanel = new MaxMemRowCountPanel();
maxPanel.setBorder(null);
JPanel wrapMaxPanel = FRGUIPaneFactory.createBorderLayout_S_Pane();
wrapMaxPanel.add(maxPanel);
wrapMaxPanel.setPreferredSize(new Dimension(350, 20));
UIToolbar editToolBar = ToolBarDef.createJToolBar();
toolBarDef.updateToolBar(editToolBar);
editToolBar.add(isShareCheckBox);
editToolBar.add(wrapMaxPanel);
editToolBar.add(maxPanel);
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.ActionListener;
import com.fr.base.GraphHelper;
import com.fr.design.constants.UIConstants;
import com.fr.design.gui.ilable.UILabel;
@ -15,6 +16,20 @@ import com.fr.design.gui.itoolbar.UIToolbar;
public class MaxMemRowCountPanel extends UIToolbar {
private static final int ALL_IN_MEMORY = 0;
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 UIComboBox switchCache;
@ -44,7 +59,7 @@ public class MaxMemRowCountPanel extends UIToolbar {
@Override
public Dimension getPreferredSize() {
Dimension dim = super.getPreferredSize();
dim.width = 340;
dim.width = MAX_WIDTH;
return dim;
};
@ -52,8 +67,7 @@ public class MaxMemRowCountPanel extends UIToolbar {
this.setFloatable(false);
this.setRollover(true);
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(cacheList);
switchCache = new UIComboBox(CACHE_LIST);
switchCache.addActionListener(switchStateL);
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(){
FRFont defaultFont = (this.textPane != null) ? FRFont.getInstance(this.textPane.getFont()) : RichTextPane.DEFAUL_FONT;
fontNameComboBox.addItemListener(fontNameItemListener);
fontNameComboBox.setSelectedItem(defaultFont.getFontName());
fontNameComboBox.setSelectedItem(defaultFont.getFamily());
fontSizeComboBox.addItemListener(fontSizeItemListener);
fontSizeComboBox.setSelectedItem(scaleDown(defaultFont.getSize()));

Loading…
Cancel
Save