Browse Source

边框问题

newui
renekton 3 months ago
parent
commit
da67399d43
  1. 8
      designer-base/src/main/java/com/fr/design/file/SaveSomeTemplatePane.java
  2. 9
      designer-base/src/main/java/com/fr/design/gui/controlpane/UIControlPane.java
  3. 15
      designer-base/src/main/java/com/fr/design/gui/controlpane/UIListGroupControlPane.java
  4. 44
      designer-base/src/main/java/com/fr/design/gui/date/UICalendarPanel.java
  5. 14
      designer-base/src/main/java/com/fr/design/javascript/Commit2DBJavaScriptPane.java
  6. 4
      designer-base/src/main/java/com/fr/design/mainframe/backgroundpane/ImageBackgroundQuickPane.java
  7. 19
      designer-base/src/main/java/com/fr/design/write/submit/DBManipulationInWidgetEventPane.java
  8. 59
      designer-base/src/main/java/com/fr/design/write/submit/DBManipulationPane.java
  9. 8
      designer-chart/src/main/java/com/fr/van/chart/designer/component/LineTypeComboBox.java
  10. 1
      designer-realize/src/main/java/com/fr/design/widget/FloatWidgetManageCardPane.java
  11. 14
      designer-realize/src/main/java/com/fr/design/write/submit/SmartInsertDBManipulationInWidgetEventPane.java

8
designer-base/src/main/java/com/fr/design/file/SaveSomeTemplatePane.java

@ -1,5 +1,7 @@
package com.fr.design.file; package com.fr.design.file;
import com.fine.theme.light.ui.FineRoundBorder;
import com.formdev.flatlaf.util.SystemInfo;
import com.fr.design.dialog.BasicDialog; import com.fr.design.dialog.BasicDialog;
import com.fr.design.dialog.BasicPane; import com.fr.design.dialog.BasicPane;
import com.fr.design.dialog.DialogActionAdapter; import com.fr.design.dialog.DialogActionAdapter;
@ -8,6 +10,7 @@ import com.fr.design.gui.icheckbox.UICheckBox;
import com.fr.design.gui.icontainer.UIScrollPane; import com.fr.design.gui.icontainer.UIScrollPane;
import com.fr.design.gui.ilable.UILabel; import com.fr.design.gui.ilable.UILabel;
import com.fr.design.gui.ilist.UIList; import com.fr.design.gui.ilist.UIList;
import com.fr.design.gui.iscrollbar.UIScrollBarUI;
import com.fr.design.gui.itree.checkboxtree.NullTristateCheckBox; import com.fr.design.gui.itree.checkboxtree.NullTristateCheckBox;
import com.fr.design.gui.itree.checkboxtree.TristateCheckBox; import com.fr.design.gui.itree.checkboxtree.TristateCheckBox;
import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.layout.FRGUIPaneFactory;
@ -81,13 +84,16 @@ public class SaveSomeTemplatePane extends BasicPane {
this.add(tip, BorderLayout.NORTH); this.add(tip, BorderLayout.NORTH);
templatesChoosePane = FRGUIPaneFactory.createBorderLayout_S_Pane(); templatesChoosePane = FRGUIPaneFactory.createBorderLayout_S_Pane();
UIScrollPane scrollPane = new UIScrollPane(templatesChoosePane); UIScrollPane scrollPane = new UIScrollPane(templatesChoosePane);
scrollPane.setBorder(new FineRoundBorder());
if (SystemInfo.isWindows) {
scrollPane.getVerticalScrollBar().setUI(new UIScrollBarUI());
}
this.add(scrollPane, BorderLayout.CENTER); this.add(scrollPane, BorderLayout.CENTER);
this.isJudgeCurrentEditingTemplate = isNeedTojudgeCurrent; this.isJudgeCurrentEditingTemplate = isNeedTojudgeCurrent;
} }
private void initTemplatesChoosePane(boolean judgeJTemplateMustSave) { private void initTemplatesChoosePane(boolean judgeJTemplateMustSave) {
templatesChoosePane.setBorder(BorderFactory.createTitledBorder(""));
for (int i = 0; i < unSavedTemplate.size(); i++) { for (int i = 0; i < unSavedTemplate.size(); i++) {
templateCheckBoxes[i] = new UICheckBox(unSavedTemplate.get(i).getEditingFILE().getName()); templateCheckBoxes[i] = new UICheckBox(unSavedTemplate.get(i).getEditingFILE().getName());
templateCheckBoxes[i].setSelected(true); templateCheckBoxes[i].setSelected(true);

9
designer-base/src/main/java/com/fr/design/gui/controlpane/UIControlPane.java

@ -49,6 +49,7 @@ import java.awt.event.WindowEvent;
import static com.fine.swing.ui.layout.Layouts.cell; import static com.fine.swing.ui.layout.Layouts.cell;
import static com.fine.swing.ui.layout.Layouts.row; import static com.fine.swing.ui.layout.Layouts.row;
import static com.fine.theme.utils.FineUIScale.scale;
/** /**
* Created by plough on 2017/7/21. * Created by plough on 2017/7/21.
@ -199,7 +200,7 @@ public abstract class UIControlPane extends JControlPane {
PopupEditDialog(JComponent pane) { PopupEditDialog(JComponent pane) {
super(DesignerContext.getDesignerFrame()); super(DesignerContext.getDesignerFrame());
setUndecorated(true); setUndecorated(true);
pane.setBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10)); pane.setBorder(new ScaledEmptyBorder(10, 10, 10, 10));
this.editPane = pane; this.editPane = pane;
JPanel editPaneWrapper = new JPanel(new BorderLayout()); JPanel editPaneWrapper = new JPanel(new BorderLayout());
popupToolPane = new PopupToolPane(this); popupToolPane = new PopupToolPane(this);
@ -207,7 +208,7 @@ public abstract class UIControlPane extends JControlPane {
editPaneWrapper.add(editPane, BorderLayout.CENTER); editPaneWrapper.add(editPane, BorderLayout.CENTER);
editPaneWrapper.setBorder(BorderFactory.createLineBorder(UIConstants.POP_DIALOG_BORDER, 1)); editPaneWrapper.setBorder(BorderFactory.createLineBorder(UIConstants.POP_DIALOG_BORDER, 1));
this.getContentPane().add(editPaneWrapper, BorderLayout.CENTER); this.getContentPane().add(editPaneWrapper, BorderLayout.CENTER);
setSize(FineUIScale.scale(new Dimension(WIDTH, HEIGHT))); setSize(scale(new Dimension(WIDTH, HEIGHT)));
this.setVisible(false); this.setVisible(false);
initListener(); initListener();
} }
@ -375,7 +376,7 @@ public abstract class UIControlPane extends JControlPane {
titleLabel = new UILabel(title); titleLabel = new UILabel(title);
FineUIStyle.setStyle(titleLabel, FineUIStyle.LABEL_BOLD); FineUIStyle.setStyle(titleLabel, FineUIStyle.LABEL_BOLD);
contentPane.add(titleLabel, BorderLayout.WEST); contentPane.add(titleLabel, BorderLayout.WEST);
contentPane.setBorder(new EmptyBorder(5, 14, 6, 0)); contentPane.setBorder(new ScaledEmptyBorder(5, 14, 6, 0));
setLayout(new BorderLayout()); setLayout(new BorderLayout());
add(contentPane, BorderLayout.CENTER); add(contentPane, BorderLayout.CENTER);
@ -391,7 +392,7 @@ public abstract class UIControlPane extends JControlPane {
@Override @Override
public Dimension getPreferredSize() { public Dimension getPreferredSize() {
return new Dimension(super.getPreferredSize().width, 28); return new Dimension(super.getPreferredSize().width, scale(28));
} }
} }
} }

15
designer-base/src/main/java/com/fr/design/gui/controlpane/UIListGroupControlPane.java

@ -44,6 +44,10 @@ import java.util.Iterator;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import static com.fine.swing.ui.layout.Layouts.cell;
import static com.fine.swing.ui.layout.Layouts.column;
import static com.fine.theme.utils.FineUIScale.scale;
/** /**
* Created by kerry on 5/31/21 * Created by kerry on 5/31/21
*/ */
@ -84,7 +88,7 @@ public abstract class UIListGroupControlPane extends UIControlPane implements Li
@Override @Override
protected JPanel getLeftTopPane(UIToolbar topToolBar) { protected JPanel getLeftTopPane(UIToolbar topToolBar) {
UIToolbar toolbar = getTopToolBar(); UIToolbar toolbar = getTopToolBar();
toolbar.setPreferredSize(FineUIScale.scale(new Dimension(160, 24))); toolbar.setPreferredSize(scale(new Dimension(160, 24)));
return super.getLeftTopPane(topToolBar); return super.getLeftTopPane(topToolBar);
} }
@ -555,13 +559,12 @@ public abstract class UIListGroupControlPane extends UIControlPane implements Li
super.paint(g); super.paint(g);
} }
}; };
label.setBorder(BorderFactory.createMatteBorder(0, 0, FineUIScale.scale(1), 0, FineUIUtils.getUIColor("fill.hover", "fill.hover"))); label.setBorder(BorderFactory.createMatteBorder(0, 0, 1, 0, FineUIUtils.getUIColor("fill.hover", "fill.hover")));
label.setForeground(UIManager.getColor("List.wrapper.text.fontColor")); label.setForeground(UIManager.getColor("List.wrapper.text.fontColor"));
label.setFont(label.getFont().deriveFont(11F)); label.setFont(label.getFont().deriveFont(scale(11F)));
label.setPreferredSize(new Dimension(this.getPreferredSize().width, FineUIScale.scale(24))); label.setPreferredSize(new Dimension(this.getPreferredSize().width, scale(24)));
this.nameEdList = nameEdList; this.nameEdList = nameEdList;
this.add(label, BorderLayout.NORTH); this.add(column(cell(label), cell(this.nameEdList)).getComponent());
this.add(this.nameEdList, BorderLayout.CENTER);
} }
public UINameEdList getNameEdList() { public UINameEdList getNameEdList() {

44
designer-base/src/main/java/com/fr/design/gui/date/UICalendarPanel.java

@ -58,10 +58,16 @@ import java.util.Set;
import static com.fine.theme.utils.FineUIScale.scale; import static com.fine.theme.utils.FineUIScale.scale;
public class UICalendarPanel extends JPanel { public class UICalendarPanel extends JPanel {
private static final Font FONT_UI = DesignUtils.getDefaultGUIFont().applySize(12); private static final Font FONT_UI = DesignUtils.getDefaultGUIFont().applySize(scale(12));
private static final Font FONT_BLACK = new Font(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Black_Font"), Font.PLAIN, 12); private static final Font FONT_BLACK = new Font(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Black_Font"), Font.PLAIN, scale(12));
private static final int WEEKDAY_COUNT = 7; private static final int WEEKDAY_COUNT = 7;
private static final int TOTAL_DAYS_COUNT = 42; private static final int TOTAL_DAYS_COUNT = 42;
private static final int WIDTH = scale(31);
private static final int HEIGHT = scale(19);
private static final int START_X = scale(30);
private static final int START_Y = scale(19);
//卡顿日志所在地址 //卡顿日志所在地址
private static final String JOURNAL_FILE_PATH = StableUtils.pathJoin(ProductConstantsBase.getEnvHome(), "journal_log"); private static final String JOURNAL_FILE_PATH = StableUtils.pathJoin(ProductConstantsBase.getEnvHome(), "journal_log");
protected Color selectedBackground; protected Color selectedBackground;
@ -432,7 +438,7 @@ public class UICalendarPanel extends JPanel {
gp.setBorder(null); gp.setBorder(null);
UIDayLabel label = new UIDayLabel(setupCalendar.getTime()); UIDayLabel label = new UIDayLabel(setupCalendar.getTime());
label.setHorizontalAlignment(SwingConstants.RIGHT); label.setHorizontalAlignment(SwingConstants.RIGHT);
label.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 9)); label.setBorder(new ScaledEmptyBorder(0, 0, 0, 9));
if ("1".equals(label.getText())) { if ("1".equals(label.getText())) {
isCurrentMonth = !isCurrentMonth; isCurrentMonth = !isCurrentMonth;
} }
@ -655,12 +661,12 @@ public class UICalendarPanel extends JPanel {
public void paint(Graphics g) { public void paint(Graphics g) {
super.paint(g); super.paint(g);
int width = 31; int width = UICalendarPanel.WIDTH;
int height = 19; int height = UICalendarPanel.HEIGHT;
Color oldColor = g.getColor(); Color oldColor = g.getColor();
g.setColor(new Color(0xDADADA)); g.setColor(new Color(0xDADADA));
int start_x = 30; int start_x = UICalendarPanel.START_X;
int start_y = 19; int start_y = UICalendarPanel.START_Y;
for (int i = 0; i < 6; i++) { for (int i = 0; i < 6; i++) {
g.drawLine(start_x, 0, start_x, getHeight()); g.drawLine(start_x, 0, start_x, getHeight());
start_x += width; start_x += width;
@ -683,19 +689,19 @@ public class UICalendarPanel extends JPanel {
private void paintChindPane(Graphics g, int index) { private void paintChindPane(Graphics g, int index) {
if (index % 7 == 0) { if (index % 7 == 0) {
int y1 = index / 7 * 19; int y1 = index / 7 * UICalendarPanel.HEIGHT;
g.drawLine(0, y1, 30, y1); g.drawLine(0, y1, UICalendarPanel.START_X, y1);
g.drawLine(0, y1 + 19, 30, y1 + 19); g.drawLine(0, y1 + UICalendarPanel.HEIGHT, UICalendarPanel.START_X, y1 + UICalendarPanel.HEIGHT);
g.drawLine(30, y1, 30, y1 + 19); g.drawLine(UICalendarPanel.START_X, y1, UICalendarPanel.START_X, y1 + UICalendarPanel.HEIGHT);
} else if (index % 7 == 6) { } else if (index % 7 == 6) {
int y1 = index / 7 * 19; int y1 = index / 7 * UICalendarPanel.HEIGHT;
g.drawLine(185, y1, 216, y1); g.drawLine(scale(185), y1, scale(216), y1);
g.drawLine(185, y1 + 19, 216, y1 + 19); g.drawLine(scale(185), y1 + UICalendarPanel.HEIGHT, scale(216), y1 + UICalendarPanel.HEIGHT);
g.drawLine(185, y1, 185, y1 + 19); g.drawLine(scale(185), y1, scale(185), y1 + UICalendarPanel.HEIGHT);
} else { } else {
int x1 = index % 7 * 31 - 1; int x1 = index % 7 * UICalendarPanel.WIDTH - 1;
int y1 = index / 7 * 19; int y1 = index / 7 * UICalendarPanel.HEIGHT;
g.drawRect(x1, y1, 31, 19); g.drawRect(x1, y1, UICalendarPanel.WIDTH, UICalendarPanel.HEIGHT);
} }
} }
@ -833,7 +839,7 @@ public class UICalendarPanel extends JPanel {
uiLabel.setHorizontalAlignment(SwingConstants.CENTER); uiLabel.setHorizontalAlignment(SwingConstants.CENTER);
uiLabel.setBackground(null); uiLabel.setBackground(null);
uiLabel.setBorder(null); uiLabel.setBorder(null);
uiLabel.setPreferredSize(new Dimension(6, 10)); uiLabel.setPreferredSize(scale(new Dimension(6, 10)));
return uiLabel; return uiLabel;
} }

14
designer-base/src/main/java/com/fr/design/javascript/Commit2DBJavaScriptPane.java

@ -1,8 +1,10 @@
package com.fr.design.javascript; package com.fr.design.javascript;
import com.fine.theme.utils.FineUIScale;
import com.fr.design.beans.FurtherBasicBeanPane; import com.fr.design.beans.FurtherBasicBeanPane;
import com.fr.design.gui.frpane.CommitTabbedPane; import com.fr.design.gui.frpane.CommitTabbedPane;
import com.fr.design.gui.ibutton.UIButton; import com.fr.design.gui.ibutton.UIButton;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.write.submit.DBManipulationPane; import com.fr.design.write.submit.DBManipulationPane;
import com.fr.js.Commit2DBJavaScript; import com.fr.js.Commit2DBJavaScript;
@ -15,6 +17,9 @@ import java.awt.Dimension;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import static com.fine.swing.ui.layout.Layouts.row;
import static com.fine.swing.ui.layout.Layouts.cell;
public class Commit2DBJavaScriptPane extends FurtherBasicBeanPane<Commit2DBJavaScript> { public class Commit2DBJavaScriptPane extends FurtherBasicBeanPane<Commit2DBJavaScript> {
private List dbmPaneList = new ArrayList(); private List dbmPaneList = new ArrayList();
private CommitTabbedPane commitTabbedPane; private CommitTabbedPane commitTabbedPane;
@ -50,13 +55,18 @@ public class Commit2DBJavaScriptPane extends FurtherBasicBeanPane<Commit2DBJavaS
} }
this.add(cardPane, BorderLayout.CENTER); this.add(cardPane, BorderLayout.CENTER);
JPanel btPane = FRGUIPaneFactory.createNormalFlowInnerContainer_S_Pane(); JPanel btPane = new JPanel(new BorderLayout());
this.add(btPane, BorderLayout.SOUTH); btPane.setPreferredSize(createCallbackBtnPanePreferredSize());
this.add(row(cell(btPane), cell(new UILabel())).getComponent(), BorderLayout.SOUTH);
addCallbackButton = javaScriptActionPane.createCallButton(); addCallbackButton = javaScriptActionPane.createCallButton();
btPane.add(addCallbackButton); btPane.add(addCallbackButton);
} }
protected Dimension createCallbackBtnPanePreferredSize(){
return FineUIScale.scale(new Dimension(110, 20));
}
/** /**
* 更新DBManipulationPane * 更新DBManipulationPane
*/ */

4
designer-base/src/main/java/com/fr/design/mainframe/backgroundpane/ImageBackgroundQuickPane.java

@ -24,6 +24,8 @@ 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 static com.fine.theme.utils.FineUIScale.scale;
/** /**
* @author zhou * @author zhou
* @since 2012-5-29下午1:12:06 * @since 2012-5-29下午1:12:06
@ -53,7 +55,7 @@ public class ImageBackgroundQuickPane extends BackgroundQuickPane {
previewPane = new ImagePreviewPane(); previewPane = new ImagePreviewPane();
JPanel borderPane = FRGUIPaneFactory.createBorderLayout_S_Pane(); JPanel borderPane = FRGUIPaneFactory.createBorderLayout_S_Pane();
borderPane.setBorder(new FineRoundBorder()); borderPane.setBorder(new FineRoundBorder());
borderPane.setPreferredSize(FineUIScale.scale(new Dimension(0, 145))); borderPane.setPreferredSize(new Dimension(super.getPreferredSize().width, scale(145)));
borderPane.add(previewPane, BorderLayout.CENTER); borderPane.add(previewPane, BorderLayout.CENTER);
this.add(borderPane, BorderLayout.NORTH); this.add(borderPane, BorderLayout.NORTH);
previewPane.addChangeListener(imageSizeChangeListener); previewPane.addChangeListener(imageSizeChangeListener);

19
designer-base/src/main/java/com/fr/design/write/submit/DBManipulationInWidgetEventPane.java

@ -1,8 +1,15 @@
package com.fr.design.write.submit; package com.fr.design.write.submit;
import com.fine.theme.utils.FineUIScale;
import com.fine.theme.utils.FineUIUtils;
import com.fr.design.layout.FRGUIPaneFactory;
import javax.swing.*; import javax.swing.*;
import java.awt.*; import java.awt.*;
import static com.fine.swing.ui.layout.Layouts.cell;
import static com.fine.swing.ui.layout.Layouts.column;
/** /**
* Created with IntelliJ IDEA. * Created with IntelliJ IDEA.
* User: zheng * User: zheng
@ -15,19 +22,19 @@ public class DBManipulationInWidgetEventPane extends DBManipulationPane {
super(); super();
} }
protected void setBorderAndLayout(JPanel jPanel){
jPanel.setLayout(new FlowLayout(FlowLayout.LEFT));
}
protected void addComponent(JPanel mainPane,JScrollPane addPane){ protected void addComponent(JPanel mainPane,JScrollPane addPane){
} }
protected Dimension createConditionPanePreferredSize(){ protected Dimension createConditionPanePreferredSize(){
return new Dimension(454, 30); return FineUIScale.scale(new Dimension(454, 20));
}
protected boolean setJpVisible() {
return false;
} }
protected Dimension createControlBtnPanePreferredSize(){ protected Dimension createControlBtnPanePreferredSize(){
return new Dimension(92, 20); return FineUIScale.scale(new Dimension(110, 20));
} }
protected String setControlBtnPanePosition(){ protected String setControlBtnPanePosition(){

59
designer-base/src/main/java/com/fr/design/write/submit/DBManipulationPane.java

@ -168,7 +168,8 @@ public class DBManipulationPane extends BasicBeanPane<DBManipulation> {
// peter:编辑的TablePane // peter:编辑的TablePane
JPanel editTablePane = new JPanel(new BorderLayout(FineUIScale.scale(10), 0)); JPanel editTablePane = new JPanel(new BorderLayout(FineUIScale.scale(10), 0));
editTablePane.setBounds(0, 0, FineUIScale.scale(280), FineUIScale.scale(180)); Dimension editTableDimension = createEditTablePreferredSize();
editTablePane.setBounds(0, 0, editTableDimension.width, editTableDimension.height);
keyColumnValuesTable = new KeyColumnNameValueTable(); keyColumnValuesTable = new KeyColumnNameValueTable();
editTablePane.add(new UIScrollPane(keyColumnValuesTable), BorderLayout.CENTER); editTablePane.add(new UIScrollPane(keyColumnValuesTable), BorderLayout.CENTER);
keyColumnValuesTable.setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION); keyColumnValuesTable.setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION);
@ -180,18 +181,15 @@ public class DBManipulationPane extends BasicBeanPane<DBManipulation> {
cell(FineUIUtils.wrapComponentWithTitle(chooseTable, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Base_Table")))) cell(FineUIUtils.wrapComponentWithTitle(chooseTable, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Base_Table"))))
.getComponent()); .getComponent());
JPanel bottomPane = initBottomPane(); JPanel bottomPane = initBottomPane();
this.add(new AttrScrollPane() {
@Override JPanel contentPane = new JPanel(new BorderLayout());
protected JPanel createContentPane() { contentPane.add(column(10,
JPanel contentPane = new JPanel(new BorderLayout()); cell(northPane),
contentPane.add(column(10, cell(FineUIUtils.wrapComponentWithTitle(editTablePane, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Base_Value"))),
cell(northPane), cell(bottomPane))
cell(FineUIUtils.wrapComponentWithTitle(editTablePane, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Base_Value"))), .getComponent(), BorderLayout.CENTER);
cell(bottomPane))
.getComponent(), BorderLayout.CENTER); this.add(new UIScrollPane(contentPane));
return contentPane;
}
});
initJTableColumn(); initJTableColumn();
@ -264,17 +262,17 @@ public class DBManipulationPane extends BasicBeanPane<DBManipulation> {
UpdateCheckBox.setEnabled(b); UpdateCheckBox.setEnabled(b);
} }
private JPanel initBottomPane() { protected JPanel initBottomPane() {
JPanel eventPane = new JPanel(new BorderLayout()); JPanel eventPane = new JPanel(new BorderLayout());
eventPane.setPreferredSize(createControlBtnPanePreferredSize()); eventPane.setPreferredSize(createControlBtnPanePreferredSize());
eventPane.add(addEventButton(), BorderLayout.WEST); eventPane.add(addEventButton());
JPanel conditionPane = this.createConditionPane(); JPanel conditionPane = this.createConditionPane();
JPanel btPane = new JPanel(FRGUIPaneFactory.createBorderLayout()); JPanel btPane = new JPanel(FRGUIPaneFactory.createBorderLayout());
btPane.add(column(5, btPane.add(column(5,
cell(FineUIUtils.wrapComponentWithTitle(conditionPane, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Submit_Condition"))), cell(FineUIUtils.wrapComponentWithTitle(conditionPane, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Submit_Condition"))),
cell(eventPane) row(cell(eventPane), cell(new UILabel()))
).getComponent()); ).getComponent());
return btPane; return btPane;
} }
@ -315,8 +313,8 @@ public class DBManipulationPane extends BasicBeanPane<DBManipulation> {
DefaultTreeCellRenderer cr = (DefaultTreeCellRenderer) conditionsTree.getCellRenderer(); DefaultTreeCellRenderer cr = (DefaultTreeCellRenderer) conditionsTree.getCellRenderer();
cr.setForeground(UIConstants.NORMAL_BACKGROUND); cr.setForeground(UIConstants.NORMAL_BACKGROUND);
JScrollPane jp = new JScrollPane(conditionsTree); JScrollPane jp = new JScrollPane(conditionsTree);
jp.setPreferredSize(FineUIScale.scale(new Dimension(0, 40))); jp.setPreferredSize(createJpPreferredSize());
addComponent(conditionPane, jp); jp.setVisible(setJpVisible());
String submitCondition = Toolkit.i18nText("Fine-Design_Basic_Set_Submit_Condition"); String submitCondition = Toolkit.i18nText("Fine-Design_Basic_Set_Submit_Condition");
UIButton addSubmitConditionButton = new UIButton(submitCondition); UIButton addSubmitConditionButton = new UIButton(submitCondition);
addSubmitConditionButton.setToolTipText(submitCondition); addSubmitConditionButton.setToolTipText(submitCondition);
@ -354,12 +352,11 @@ public class DBManipulationPane extends BasicBeanPane<DBManipulation> {
}); });
JPanel controlBtnPane = new JPanel(new BorderLayout()); JPanel controlBtnPane = new JPanel(new BorderLayout());
controlBtnPane.setPreferredSize(FineUIScale.scale(new Dimension(122, 20))); controlBtnPane.setPreferredSize(createControlBtnPanePreferredSize());
controlBtnPane.add(addSubmitConditionButton, BorderLayout.NORTH); controlBtnPane.add(addSubmitConditionButton, BorderLayout.NORTH);
conditionPane.add(row( conditionPane.setPreferredSize(createConditionPanePreferredSize());
cell(jp).weight(1.0), conditionPane.add(controlBtnPane, setControlBtnPanePosition());
cell(new Spacer(122).add(controlBtnPane)) conditionPane.add(jp, BorderLayout.CENTER);
).getComponent());
return conditionPane; return conditionPane;
} }
@ -372,13 +369,25 @@ public class DBManipulationPane extends BasicBeanPane<DBManipulation> {
mainPane.add(addPane, BorderLayout.CENTER); mainPane.add(addPane, BorderLayout.CENTER);
} }
protected Dimension createEditTablePreferredSize() {
return FineUIScale.scale(new Dimension(280, 180));
}
protected Dimension createConditionPanePreferredSize() { protected Dimension createConditionPanePreferredSize() {
return FineUIScale.scale(new Dimension(454, 80)); return FineUIScale.scale(new Dimension(454, 60));
}
protected boolean setJpVisible() {
return true;
} }
protected Dimension createJpPreferredSize() {
return FineUIScale.scale(new Dimension(280, 60));
}
protected Dimension createControlBtnPanePreferredSize() { protected Dimension createControlBtnPanePreferredSize() {
return new Dimension(110, 20); return FineUIScale.scale(new Dimension(110, 20));
} }
protected String setControlBtnPanePosition() { protected String setControlBtnPanePosition() {

8
designer-chart/src/main/java/com/fr/van/chart/designer/component/LineTypeComboBox.java

@ -14,6 +14,8 @@ import java.awt.Dimension;
import java.awt.Graphics; import java.awt.Graphics;
import java.awt.Graphics2D; import java.awt.Graphics2D;
import static com.fine.theme.utils.FineUIScale.scale;
/** /**
* Created by shine on 2019/08/30. * Created by shine on 2019/08/30.
*/ */
@ -47,10 +49,10 @@ public class LineTypeComboBox extends UIComboBox {
switch (this.lineType) { switch (this.lineType) {
case SOLID: case SOLID:
GraphHelper.drawLine(g2d, 4, d.height / 2, d.width - 8, d.height / 2); GraphHelper.drawLine(g2d, scale(4), d.height / 2, d.width - scale(8), d.height / 2);
break; break;
case DASHED: case DASHED:
GraphHelper.drawLine(g2d, 4, d.height / 2, d.width - 8, d.height / 2, Constants.LINE_DASH); GraphHelper.drawLine(g2d, scale(4), d.height / 2, d.width - scale(8), d.height / 2, Constants.LINE_DASH);
break; break;
default: default:
break; break;
@ -59,7 +61,7 @@ public class LineTypeComboBox extends UIComboBox {
} }
public Dimension getPreferredSize() { public Dimension getPreferredSize() {
return new Dimension(60, 16); return scale(new Dimension(60, 16));
} }
public Dimension getMinimumSize() { public Dimension getMinimumSize() {

1
designer-realize/src/main/java/com/fr/design/widget/FloatWidgetManageCardPane.java

@ -11,6 +11,7 @@ public class FloatWidgetManageCardPane extends EastCellWidgetCardPane {
/** /**
* 悬浮窗控件管理 * 悬浮窗控件管理
* @param pane 面板
*/ */
public FloatWidgetManageCardPane(ElementCasePane pane) { public FloatWidgetManageCardPane(ElementCasePane pane) {
super(pane); super(pane);

14
designer-realize/src/main/java/com/fr/design/write/submit/SmartInsertDBManipulationInWidgetEventPane.java

@ -1,5 +1,7 @@
package com.fr.design.write.submit; package com.fr.design.write.submit;
import com.fine.theme.utils.FineUIScale;
import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.mainframe.ElementCasePane; import com.fr.design.mainframe.ElementCasePane;
import javax.swing.*; import javax.swing.*;
@ -17,19 +19,19 @@ public class SmartInsertDBManipulationInWidgetEventPane extends SmartInsertDBMan
super(ePane); super(ePane);
} }
protected void setBorderAndLayout(JPanel jPanel){
jPanel.setLayout(new FlowLayout(FlowLayout.LEFT));
}
protected void addComponent(JPanel mainPane,JScrollPane addPane){ protected void addComponent(JPanel mainPane,JScrollPane addPane){
} }
protected Dimension createConditionPanePreferredSize(){ protected Dimension createConditionPanePreferredSize(){
return new Dimension(454, 30); return FineUIScale.scale(new Dimension(454, 20));
}
protected boolean setJpVisible() {
return false;
} }
protected Dimension createControlBtnPanePreferredSize(){ protected Dimension createControlBtnPanePreferredSize(){
return new Dimension(92, 20); return FineUIScale.scale(new Dimension(110, 20));
} }
protected String setControlBtnPanePosition(){ protected String setControlBtnPanePosition(){

Loading…
Cancel
Save