Browse Source

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

master
mengao 7 years ago
parent
commit
6bb644ce2d
  1. 34
      designer/src/com/fr/design/mainframe/SheetNameTabPane.java
  2. 4
      designer/src/com/fr/design/widget/CellWidgetCardPane.java
  3. 11
      designer_base/src/com/fr/design/condition/LiteConditionPane.java
  4. 11
      designer_base/src/com/fr/design/condition/ObjectLiteConditionPane.java
  5. 4
      designer_base/src/com/fr/design/constants/UIConstants.java
  6. 5
      designer_base/src/com/fr/design/editor/editor/ColumnSelectedEditor.java
  7. 21
      designer_base/src/com/fr/design/gui/ibutton/UIButtonGroup.java
  8. 4
      designer_base/src/com/fr/design/gui/ibutton/UIButtonUI.java
  9. BIN
      designer_base/src/com/fr/design/images/sheet/left_hover@1x.png
  10. BIN
      designer_base/src/com/fr/design/images/sheet/left_normal@1x.png
  11. BIN
      designer_base/src/com/fr/design/images/sheet/right_hover@1x.png
  12. BIN
      designer_base/src/com/fr/design/images/sheet/right_normal@1x.png
  13. 4
      designer_base/src/com/fr/design/utils/gui/GUICoreUtils.java
  14. 4
      designer_base/src/com/fr/design/web/CustomIconPane.java
  15. 4
      designer_form/src/com/fr/design/mainframe/WidgetPropertyPane.java

34
designer/src/com/fr/design/mainframe/SheetNameTabPane.java

@ -25,11 +25,13 @@ import com.fr.design.actions.UpdateAction;
import com.fr.design.constants.UIConstants; import com.fr.design.constants.UIConstants;
import com.fr.design.file.HistoryTemplateListPane; import com.fr.design.file.HistoryTemplateListPane;
import com.fr.design.gui.ibutton.UIButton; import com.fr.design.gui.ibutton.UIButton;
import com.fr.design.gui.ibutton.UIButtonUI;
import com.fr.design.menu.MenuDef; import com.fr.design.menu.MenuDef;
import com.fr.design.menu.SeparatorDef; import com.fr.design.menu.SeparatorDef;
import com.fr.design.roleAuthority.ReportAndFSManagePane; import com.fr.design.roleAuthority.ReportAndFSManagePane;
import com.fr.design.roleAuthority.RolesAlreadyEditedPane; import com.fr.design.roleAuthority.RolesAlreadyEditedPane;
import com.fr.design.utils.gui.GUICoreUtils; import com.fr.design.utils.gui.GUICoreUtils;
import com.fr.design.utils.gui.GUIPaintUtils;
import com.fr.general.ComparatorUtils; import com.fr.general.ComparatorUtils;
import com.fr.general.Inter; import com.fr.general.Inter;
import com.fr.main.impl.WorkBook; import com.fr.main.impl.WorkBook;
@ -54,10 +56,10 @@ public class SheetNameTabPane extends JComponent implements MouseListener, Mouse
private static final Icon WORK_SHEET_ICON = BaseUtils.readIcon("com/fr/base/images/oem/worksheet.png"); private static final Icon WORK_SHEET_ICON = BaseUtils.readIcon("com/fr/base/images/oem/worksheet.png");
private static final Icon POLY_SHEET_ICON = BaseUtils.readIcon("com/fr/design/images/sheet/polysheet.png"); private static final Icon POLY_SHEET_ICON = BaseUtils.readIcon("com/fr/design/images/sheet/polysheet.png");
private static final Image DESIGN_IMAGE = BaseUtils.readImage("com/fr/design/images/sheet/left_right_btn.png"); private static final Image DESIGN_IMAGE = BaseUtils.readImage("com/fr/design/images/sheet/left_right_btn.png");
private static final Icon DISABLED_LEFT_ICON = BaseUtils.readIcon("com/fr/design/images/sheet/left_normal@1x.png"); private static final Icon LEFT_ICON = BaseUtils.readIcon("com/fr/design/images/sheet/left_normal@1x.png");
private static final Icon DISABLED_RIGHT_ICON = BaseUtils.readIcon("com/fr/design/images/sheet/right_normal@1x.png"); private static final Icon RIGHT_ICON = BaseUtils.readIcon("com/fr/design/images/sheet/right_normal@1x.png");
private static final Icon LEFT_ICON = BaseUtils.readIcon("com/fr/design/images/sheet/left_hover@1x.png"); private static final Icon DISABLED_LEFT_ICON = BaseUtils.readIcon("com/fr/design/images/sheet/left_hover@1x.png");
private static final Icon RIGHT_ICON = BaseUtils.readIcon("com/fr/design/images/sheet/right_hover@1x.png"); private static final Icon DISABLED_RIGHT_ICON = BaseUtils.readIcon("com/fr/design/images/sheet/right_hover@1x.png");
private static final int ICON_SEP_DISTANCE = 8; private static final int ICON_SEP_DISTANCE = 8;
private static final int TOOLBAR_HEIGHT = 16; private static final int TOOLBAR_HEIGHT = 16;
@ -145,6 +147,18 @@ public class SheetNameTabPane extends JComponent implements MouseListener, Mouse
return new Dimension(super.getPreferredSize().width, TOOLBAR_HEIGHT); return new Dimension(super.getPreferredSize().width, TOOLBAR_HEIGHT);
} }
}; };
leftButton.setUI(new UIButtonUI() {
@Override
protected void doExtraPainting(UIButton b, Graphics2D g2d, int w, int h, String selectedRoles) {
if (isPressed(b) && b.isPressedPainted()) {
GUIPaintUtils.fillPressed(g2d, 0, 0, w, h, b.isRoundBorder(), b.getRectDirection(), b.isDoneAuthorityEdited(selectedRoles), UIConstants.PROPERTY_PANE_BACKGROUND);
} else if (isRollOver(b)) {
GUIPaintUtils.fillRollOver(g2d, 0, 0, w, h, b.isRoundBorder(), b.getRectDirection(), b.isDoneAuthorityEdited(selectedRoles), b.isPressedPainted(), UIConstants.PROPERTY_PANE_BACKGROUND);
} else if (b.isNormalPainted()) {
GUIPaintUtils.fillNormal(g2d, 0, 0, w, h, b.isRoundBorder(), b.getRectDirection(), b.isDoneAuthorityEdited(selectedRoles), b.isPressedPainted());
}
}
});
leftButton.set4ToolbarButton(); leftButton.set4ToolbarButton();
leftButton.setDisabledIcon(DISABLED_LEFT_ICON); leftButton.setDisabledIcon(DISABLED_LEFT_ICON);
rightButton = new UIButton(RIGHT_ICON) { rightButton = new UIButton(RIGHT_ICON) {
@ -152,6 +166,18 @@ public class SheetNameTabPane extends JComponent implements MouseListener, Mouse
return new Dimension(super.getPreferredSize().width, TOOLBAR_HEIGHT); return new Dimension(super.getPreferredSize().width, TOOLBAR_HEIGHT);
} }
}; };
rightButton.setUI(new UIButtonUI() {
@Override
protected void doExtraPainting(UIButton b, Graphics2D g2d, int w, int h, String selectedRoles) {
if (isPressed(b) && b.isPressedPainted()) {
GUIPaintUtils.fillPressed(g2d, 0, 0, w, h, b.isRoundBorder(), b.getRectDirection(), b.isDoneAuthorityEdited(selectedRoles), UIConstants.PROPERTY_PANE_BACKGROUND);
} else if (isRollOver(b)) {
GUIPaintUtils.fillRollOver(g2d, 0, 0, w, h, b.isRoundBorder(), b.getRectDirection(), b.isDoneAuthorityEdited(selectedRoles), b.isPressedPainted(), UIConstants.PROPERTY_PANE_BACKGROUND);
} else if (b.isNormalPainted()) {
GUIPaintUtils.fillNormal(g2d, 0, 0, w, h, b.isRoundBorder(), b.getRectDirection(), b.isDoneAuthorityEdited(selectedRoles), b.isPressedPainted());
}
}
});
rightButton.set4ToolbarButton(); rightButton.set4ToolbarButton();
rightButton.setDisabledIcon(DISABLED_RIGHT_ICON); rightButton.setDisabledIcon(DISABLED_RIGHT_ICON);
buttonPane = new JPanel(new BorderLayout(3, 0)); buttonPane = new JPanel(new BorderLayout(3, 0));

4
designer/src/com/fr/design/widget/CellWidgetCardPane.java

@ -1,5 +1,6 @@
package com.fr.design.widget; package com.fr.design.widget;
import com.fr.design.constants.UIConstants;
import com.fr.design.data.DataCreatorUI; import com.fr.design.data.DataCreatorUI;
import com.fr.design.designer.IntervalConstants; import com.fr.design.designer.IntervalConstants;
import com.fr.design.dialog.BasicPane; import com.fr.design.dialog.BasicPane;
@ -91,7 +92,8 @@ public class CellWidgetCardPane extends BasicPane {
tabbedPane.show(center, tabTitles[index]); tabbedPane.show(center, tabTitles[index]);
} }
}; };
tabsHeaderIconPane.setNeedLeftRightOutLine(false); tabsHeaderIconPane.setNeedLeftRightOutLine(true);
tabsHeaderIconPane.setBorder(BorderFactory.createMatteBorder(1, 0, 0, 0, UIConstants.SHADOW_GREY));
this.add(tabsHeaderIconPane, BorderLayout.NORTH); this.add(tabsHeaderIconPane, BorderLayout.NORTH);
widgetPropertyPane = new BasicWidgetPropertySettingPane(); widgetPropertyPane = new BasicWidgetPropertySettingPane();

11
designer_base/src/com/fr/design/condition/LiteConditionPane.java

@ -69,6 +69,7 @@ public abstract class LiteConditionPane<T extends Condition> extends BasicBeanPa
private static final int DOWN_PADDING = 4; private static final int DOWN_PADDING = 4;
private static final int STRUT_ONE = 35; private static final int STRUT_ONE = 35;
private static final int STRUT_TWO = 4; private static final int STRUT_TWO = 4;
private static final int ADD_CONTROL_PANE_PADDING_RIGHT = -5;
private ActionListener actionListener1 = new ActionListener() { private ActionListener actionListener1 = new ActionListener() {
@ -537,8 +538,14 @@ public abstract class LiteConditionPane<T extends Condition> extends BasicBeanPa
private void initControlPane(JPanel controlPane) { private void initControlPane(JPanel controlPane) {
JPanel addControlPane = FRGUIPaneFactory.createRightFlowInnerContainer_S_Pane(); JPanel addControlPane = FRGUIPaneFactory.createRightFlowInnerContainer_S_Pane();
controlPane.add(addControlPane, BorderLayout.SOUTH); addControlPane.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, ADD_CONTROL_PANE_PADDING_RIGHT));
addControlPane.setBorder(new ModLineBorder(ModLineBorder.TOP)); JPanel splitPane = new JPanel();
splitPane.setBorder(new ModLineBorder(ModLineBorder.TOP));
JPanel addControlPaneWrapper = new JPanel(new BorderLayout());
addControlPaneWrapper.add(addControlPane, BorderLayout.CENTER);
addControlPaneWrapper.add(splitPane, BorderLayout.NORTH);
controlPane.add(addControlPaneWrapper, BorderLayout.SOUTH);
ButtonGroup bg = new ButtonGroup(); ButtonGroup bg = new ButtonGroup();
bg.add(andRadioButton); bg.add(andRadioButton);

11
designer_base/src/com/fr/design/condition/ObjectLiteConditionPane.java

@ -36,10 +36,11 @@ public class ObjectLiteConditionPane extends LiteConditionPane<ObjectCondition>
@Override @Override
protected void clearDefaultConditionPane() { protected void clearDefaultConditionPane() {
defaultConditionPane.populateBean(new ObjectCondition(new Compare(Compare.EQUALS, StringUtils.EMPTY))); ((ObjectConditionPane)defaultConditionPane).clearConditionValuePane();
} defaultConditionPane.populateBean(new ObjectCondition(new Compare(Compare.EQUALS, StringUtils.EMPTY)));
}
private class ObjectConditionPane extends BasicBeanPane<ObjectCondition> { private class ObjectConditionPane extends BasicBeanPane<ObjectCondition> {
private UIComboBox conditionOPComboBox; private UIComboBox conditionOPComboBox;
private ValueEditorPane conditionValuePane; private ValueEditorPane conditionValuePane;
@ -48,6 +49,10 @@ public class ObjectLiteConditionPane extends LiteConditionPane<ObjectCondition>
this.initComponents(); this.initComponents();
} }
private void clearConditionValuePane() {
conditionValuePane.clearComponentsData();
}
protected void initComponents() { protected void initComponents() {
this.setLayout(FRGUIPaneFactory.createBorderLayout()); this.setLayout(FRGUIPaneFactory.createBorderLayout());
// condition operation // condition operation

4
designer_base/src/com/fr/design/constants/UIConstants.java

@ -74,7 +74,7 @@ public interface UIConstants {
public static final Color OCEAN_BLUE = new Color(141, 179, 217); public static final Color OCEAN_BLUE = new Color(141, 179, 217);
public static final Color DARK_BLUE = new Color(0, 88, 144); public static final Color DARK_BLUE = new Color(0, 88, 144);
public static final Color NORMAL_BACKGROUND = new Color(212, 212, 216); public static final Color NORMAL_BACKGROUND = new Color(212, 212, 216);
public static final Color TREE_BACKGROUND = new Color(240, 240, 243); public static final Color TREE_BACKGROUND = new Color(245, 245, 247);
public static final Color TOOL_PANE_BACKGROUND = new Color(232, 232, 223); public static final Color TOOL_PANE_BACKGROUND = new Color(232, 232, 223);
public static final Color SELECT_TAB = new Color(245, 245, 247); public static final Color SELECT_TAB = new Color(245, 245, 247);
public static final Color TOOLBARUI_BACKGROUND = new Color(255, 255, 255); public static final Color TOOLBARUI_BACKGROUND = new Color(255, 255, 255);
@ -106,7 +106,7 @@ public interface UIConstants {
public static final Color RULER_SCALE_COLOR = new Color(0x4e504f); public static final Color RULER_SCALE_COLOR = new Color(0x4e504f);
public static final Color PROPERTY_PANE_BACKGROUND = new Color(0xdadadd); public static final Color PROPERTY_PANE_BACKGROUND = new Color(0xdadadd);
public static final Color SPLIT_LINE = new Color(201, 198, 184); public static final Color SPLIT_LINE = new Color(201, 198, 184);
public static final Color TITLED_BORDER_COLOR = new Color(0xededee); public static final Color TITLED_BORDER_COLOR = new Color(0xe8e8e9);
public static final Color POP_DIALOG_BORDER = new Color(218, 218, 221); public static final Color POP_DIALOG_BORDER = new Color(218, 218, 221);
public static final Color PROPERTY_DIALOG_BORDER = new Color(0xc9c9cd); public static final Color PROPERTY_DIALOG_BORDER = new Color(0xc9c9cd);
public static final Color TAB_BUTTON_HOVER = new Color(231, 230, 235); public static final Color TAB_BUTTON_HOVER = new Color(231, 230, 235);

5
designer_base/src/com/fr/design/editor/editor/ColumnSelectedEditor.java

@ -102,4 +102,9 @@ public class ColumnSelectedEditor extends Editor<SimpleDSColumn> {
} }
} }
@Override
public void clearData() {
tableDataComboBox.setSelectedItem(null);
columnNameComboBox.setSelectedItem(null);
}
} }

21
designer_base/src/com/fr/design/gui/ibutton/UIButtonGroup.java

@ -8,11 +8,14 @@ import com.fr.design.utils.gui.GUICoreUtils;
import com.fr.stable.ArrayUtils; import com.fr.stable.ArrayUtils;
import com.fr.stable.Constants; import com.fr.stable.Constants;
import com.fr.stable.StringUtils; import com.fr.stable.StringUtils;
import sun.swing.SwingUtilities2;
import javax.swing.*; import javax.swing.*;
import javax.swing.border.Border; import javax.swing.border.Border;
import javax.swing.event.ChangeEvent; import javax.swing.event.ChangeEvent;
import javax.swing.event.ChangeListener; import javax.swing.event.ChangeListener;
import javax.swing.plaf.basic.BasicHTML;
import javax.swing.text.View;
import java.awt.*; import java.awt.*;
import java.awt.event.ActionListener; import java.awt.event.ActionListener;
import java.awt.event.MouseAdapter; import java.awt.event.MouseAdapter;
@ -145,6 +148,24 @@ public class UIButtonGroup<T> extends JPanel implements GlobalNameObserver {
} }
}; };
labelButton.setUI(new UIButtonUI() {
protected void paintText(Graphics g, AbstractButton b, String text, Rectangle textRec) {
View v = (View) b.getClientProperty(BasicHTML.propertyKey);
if (v != null) {
v.paint(g, textRec);
return;
}
FontMetrics fm = SwingUtilities2.getFontMetrics(b, g);
int mnemonicIndex = b.getDisplayedMnemonicIndex();
if (isPressed(b)) {
g.setColor(Color.white);
} else {
g.setColor(Color.black);
}
SwingUtilities2.drawStringUnderlineCharAt(b, g, text, mnemonicIndex, textRec.x + getTextShiftOffset(), textRec.y + fm.getAscent() + getTextShiftOffset());
}
});
initButton(labelButton); initButton(labelButton);
} }
} }

4
designer_base/src/com/fr/design/gui/ibutton/UIButtonUI.java

@ -68,6 +68,10 @@ public class UIButtonUI extends BasicButtonUI {
} }
private void paintText(Graphics g, AbstractButton b, String text) { private void paintText(Graphics g, AbstractButton b, String text) {
paintText(g, b, text ,textRec);
}
protected void paintText(Graphics g, AbstractButton b, String text, Rectangle textRec) {
View v = (View) b.getClientProperty(BasicHTML.propertyKey); View v = (View) b.getClientProperty(BasicHTML.propertyKey);
if (v != null) { if (v != null) {
v.paint(g, textRec); v.paint(g, textRec);

BIN
designer_base/src/com/fr/design/images/sheet/left_hover@1x.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 252 B

After

Width:  |  Height:  |  Size: 157 B

BIN
designer_base/src/com/fr/design/images/sheet/left_normal@1x.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 247 B

After

Width:  |  Height:  |  Size: 157 B

BIN
designer_base/src/com/fr/design/images/sheet/right_hover@1x.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 240 B

After

Width:  |  Height:  |  Size: 154 B

BIN
designer_base/src/com/fr/design/images/sheet/right_normal@1x.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 244 B

After

Width:  |  Height:  |  Size: 170 B

4
designer_base/src/com/fr/design/utils/gui/GUICoreUtils.java

@ -172,7 +172,7 @@ public abstract class GUICoreUtils{
public static TitledBorder createTitledBorder(String s, Color c) { public static TitledBorder createTitledBorder(String s, Color c) {
UITitledBorder tb = UITitledBorder.createBorderWithTitle(s); UITitledBorder tb = UITitledBorder.createBorderWithTitle(s);
if (c == null) { if (c == null) {
c = new Color(102, 153, 255); c = Color.black;
} }
tb.setTitleColor(c); tb.setTitleColor(c);
return tb; return tb;
@ -185,7 +185,7 @@ public abstract class GUICoreUtils{
* @return 同上 * @return 同上
*/ */
public static TitledBorder createTitledBorder(String s) { public static TitledBorder createTitledBorder(String s) {
return createTitledBorder(s, new Color(102, 153, 255)); return createTitledBorder(s, Color.black);
} }
/** /**

4
designer_base/src/com/fr/design/web/CustomIconPane.java

@ -4,6 +4,7 @@ import com.fr.base.BaseUtils;
import com.fr.base.GraphHelper; import com.fr.base.GraphHelper;
import com.fr.base.Icon; import com.fr.base.Icon;
import com.fr.base.IconManager; import com.fr.base.IconManager;
import com.fr.design.constants.UIConstants;
import com.fr.design.dialog.BasicPane; import com.fr.design.dialog.BasicPane;
import com.fr.design.dialog.DialogActionAdapter; import com.fr.design.dialog.DialogActionAdapter;
import com.fr.design.gui.ibutton.UIButton; import com.fr.design.gui.ibutton.UIButton;
@ -16,6 +17,7 @@ import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.layout.TableLayout; import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper; import com.fr.design.layout.TableLayoutHelper;
import com.fr.design.mainframe.DesignerContext; import com.fr.design.mainframe.DesignerContext;
import com.fr.design.utils.gui.GUICoreUtils;
import com.fr.form.ui.WidgetManager; import com.fr.form.ui.WidgetManager;
import com.fr.general.ComparatorUtils; import com.fr.general.ComparatorUtils;
import com.fr.general.Inter; import com.fr.general.Inter;
@ -63,7 +65,7 @@ public class CustomIconPane extends BasicPane {
private void initComponents() { private void initComponents() {
this.setLayout(FRGUIPaneFactory.createBorderLayout()); this.setLayout(FRGUIPaneFactory.createBorderLayout());
JPanel centerPane = FRGUIPaneFactory.createBorderLayout_S_Pane(); JPanel centerPane = FRGUIPaneFactory.createBorderLayout_S_Pane();
centerPane.setBorder(BorderFactory.createTitledBorder(Inter.getLocText("FR-Designer_Icon"))); centerPane.setBorder(GUICoreUtils.createTitledBorder(Inter.getLocText("FR-Designer_Icon")));
JPanel noNamePane = FRGUIPaneFactory.createCenterFlowInnerContainer_S_Pane(); JPanel noNamePane = FRGUIPaneFactory.createCenterFlowInnerContainer_S_Pane();
centerPane.add(noNamePane, BorderLayout.CENTER); centerPane.add(noNamePane, BorderLayout.CENTER);

4
designer_form/src/com/fr/design/mainframe/WidgetPropertyPane.java

@ -2,6 +2,7 @@ package com.fr.design.mainframe;
import com.fr.base.BaseUtils; import com.fr.base.BaseUtils;
import com.fr.design.ExtraDesignClassManager; import com.fr.design.ExtraDesignClassManager;
import com.fr.design.constants.UIConstants;
import com.fr.design.designer.beans.events.DesignerEditListener; import com.fr.design.designer.beans.events.DesignerEditListener;
import com.fr.design.designer.beans.events.DesignerEvent; import com.fr.design.designer.beans.events.DesignerEvent;
import com.fr.design.designer.creator.*; import com.fr.design.designer.creator.*;
@ -275,7 +276,8 @@ public class WidgetPropertyPane extends FormDockView implements BaseWidgetPrope
tabbedPane.show(center, tabTitles[index]); tabbedPane.show(center, tabTitles[index]);
} }
}; };
tabsHeaderIconPane.setNeedLeftRightOutLine(false); tabsHeaderIconPane.setNeedLeftRightOutLine(true);
tabsHeaderIconPane.setBorder(BorderFactory.createMatteBorder(1, 0, 0, 0, UIConstants.SHADOW_GREY));
this.add(tabsHeaderIconPane, BorderLayout.NORTH); this.add(tabsHeaderIconPane, BorderLayout.NORTH);
} }

Loading…
Cancel
Save