Browse Source

REPORT-3163 合作开发9.0设计器=>外框架遗留=》替换tab按钮icon

master
plough 7 years ago
parent
commit
d5a439c906
  1. BIN
      designer_base/src/com/fr/design/images/buttonicon/propertiestab/authorityedit_disabled.png
  2. BIN
      designer_base/src/com/fr/design/images/buttonicon/propertiestab/authorityedit_normal.png
  3. BIN
      designer_base/src/com/fr/design/images/buttonicon/propertiestab/authorityedit_selected.png
  4. BIN
      designer_base/src/com/fr/design/images/buttonicon/propertiestab/cellattr_disabled.png
  5. BIN
      designer_base/src/com/fr/design/images/buttonicon/propertiestab/cellattr_normal.png
  6. BIN
      designer_base/src/com/fr/design/images/buttonicon/propertiestab/cellattr_selected.png
  7. BIN
      designer_base/src/com/fr/design/images/buttonicon/propertiestab/cellelement_disabled.png
  8. BIN
      designer_base/src/com/fr/design/images/buttonicon/propertiestab/cellelement_normal.png
  9. BIN
      designer_base/src/com/fr/design/images/buttonicon/propertiestab/cellelement_selected.png
  10. BIN
      designer_base/src/com/fr/design/images/buttonicon/propertiestab/conditionattr_disabled.png
  11. BIN
      designer_base/src/com/fr/design/images/buttonicon/propertiestab/conditionattr_normal.png
  12. BIN
      designer_base/src/com/fr/design/images/buttonicon/propertiestab/conditionattr_selected.png
  13. BIN
      designer_base/src/com/fr/design/images/buttonicon/propertiestab/configuredroles_disabled.png
  14. BIN
      designer_base/src/com/fr/design/images/buttonicon/propertiestab/configuredroles_normal.png
  15. BIN
      designer_base/src/com/fr/design/images/buttonicon/propertiestab/configuredroles_selected.png
  16. BIN
      designer_base/src/com/fr/design/images/buttonicon/propertiestab/floatelement_disabled.png
  17. BIN
      designer_base/src/com/fr/design/images/buttonicon/propertiestab/floatelement_normal.png
  18. BIN
      designer_base/src/com/fr/design/images/buttonicon/propertiestab/floatelement_selected.png
  19. BIN
      designer_base/src/com/fr/design/images/buttonicon/propertiestab/hyperlink_disabled.png
  20. BIN
      designer_base/src/com/fr/design/images/buttonicon/propertiestab/hyperlink_normal.png
  21. BIN
      designer_base/src/com/fr/design/images/buttonicon/propertiestab/hyperlink_selected.png
  22. BIN
      designer_base/src/com/fr/design/images/buttonicon/propertiestab/widgetlib_disabled.png
  23. BIN
      designer_base/src/com/fr/design/images/buttonicon/propertiestab/widgetlib_normal.png
  24. BIN
      designer_base/src/com/fr/design/images/buttonicon/propertiestab/widgetlib_selected.png
  25. BIN
      designer_base/src/com/fr/design/images/buttonicon/propertiestab/widgetsettings_diabled.png
  26. BIN
      designer_base/src/com/fr/design/images/buttonicon/propertiestab/widgetsettings_normal.png
  27. BIN
      designer_base/src/com/fr/design/images/buttonicon/propertiestab/widgetsettings_selected.png
  28. 72
      designer_base/src/com/fr/design/mainframe/EastRegionContainerPane.java

BIN
designer_base/src/com/fr/design/images/buttonicon/propertiestab/authorityedit_disabled.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 667 B

BIN
designer_base/src/com/fr/design/images/buttonicon/propertiestab/authorityedit_normal.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 624 B

BIN
designer_base/src/com/fr/design/images/buttonicon/propertiestab/authorityedit_selected.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 639 B

BIN
designer_base/src/com/fr/design/images/buttonicon/propertiestab/cellattr_disabled.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 380 B

BIN
designer_base/src/com/fr/design/images/buttonicon/propertiestab/cellattr_normal.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 363 B

BIN
designer_base/src/com/fr/design/images/buttonicon/propertiestab/cellattr_selected.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 373 B

BIN
designer_base/src/com/fr/design/images/buttonicon/propertiestab/cellelement_disabled.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 156 B

BIN
designer_base/src/com/fr/design/images/buttonicon/propertiestab/cellelement_normal.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 156 B

BIN
designer_base/src/com/fr/design/images/buttonicon/propertiestab/cellelement_selected.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 156 B

BIN
designer_base/src/com/fr/design/images/buttonicon/propertiestab/conditionattr_disabled.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 344 B

BIN
designer_base/src/com/fr/design/images/buttonicon/propertiestab/conditionattr_normal.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 352 B

BIN
designer_base/src/com/fr/design/images/buttonicon/propertiestab/conditionattr_selected.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 361 B

BIN
designer_base/src/com/fr/design/images/buttonicon/propertiestab/configuredroles_disabled.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 574 B

BIN
designer_base/src/com/fr/design/images/buttonicon/propertiestab/configuredroles_normal.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 542 B

BIN
designer_base/src/com/fr/design/images/buttonicon/propertiestab/configuredroles_selected.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 559 B

BIN
designer_base/src/com/fr/design/images/buttonicon/propertiestab/floatelement_disabled.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 135 B

BIN
designer_base/src/com/fr/design/images/buttonicon/propertiestab/floatelement_normal.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 143 B

BIN
designer_base/src/com/fr/design/images/buttonicon/propertiestab/floatelement_selected.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 143 B

BIN
designer_base/src/com/fr/design/images/buttonicon/propertiestab/hyperlink_disabled.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 708 B

BIN
designer_base/src/com/fr/design/images/buttonicon/propertiestab/hyperlink_normal.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 740 B

BIN
designer_base/src/com/fr/design/images/buttonicon/propertiestab/hyperlink_selected.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 729 B

BIN
designer_base/src/com/fr/design/images/buttonicon/propertiestab/widgetlib_disabled.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 619 B

BIN
designer_base/src/com/fr/design/images/buttonicon/propertiestab/widgetlib_normal.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 614 B

BIN
designer_base/src/com/fr/design/images/buttonicon/propertiestab/widgetlib_selected.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 628 B

BIN
designer_base/src/com/fr/design/images/buttonicon/propertiestab/widgetsettings_diabled.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 394 B

BIN
designer_base/src/com/fr/design/images/buttonicon/propertiestab/widgetsettings_normal.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 393 B

BIN
designer_base/src/com/fr/design/images/buttonicon/propertiestab/widgetsettings_selected.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 408 B

72
designer_base/src/com/fr/design/mainframe/EastRegionContainerPane.java

@ -30,6 +30,7 @@ public class EastRegionContainerPane extends UIEastResizableContainer {
private FixedPopupPane currentPopupPane; private FixedPopupPane currentPopupPane;
private static final int CONTAINER_WIDTH = 290; private static final int CONTAINER_WIDTH = 290;
private static final int TAB_WIDTH = 40; private static final int TAB_WIDTH = 40;
private static final int TAB_BUTTON_WIDTH = 32;
private static final int CONTENT_WIDTH = CONTAINER_WIDTH - TAB_WIDTH; private static final int CONTENT_WIDTH = CONTAINER_WIDTH - TAB_WIDTH;
private static final int POPUP_TOOLPANE_HEIGHT = 25; private static final int POPUP_TOOLPANE_HEIGHT = 25;
private static final int ARROW_RANGE_START = CONTENT_WIDTH - 30; private static final int ARROW_RANGE_START = CONTENT_WIDTH - 30;
@ -86,39 +87,39 @@ public class EastRegionContainerPane extends UIEastResizableContainer {
propertyItemMap = new LinkedHashMap<>(); // 有序map propertyItemMap = new LinkedHashMap<>(); // 有序map
// 单元格元素 // 单元格元素
PropertyItem cellElement = new PropertyItem(KEY_CELL_ELEMENT, Inter.getLocText("FR-Designer_Cell_Element"), PropertyItem cellElement = new PropertyItem(KEY_CELL_ELEMENT, Inter.getLocText("FR-Designer_Cell_Element"),
"/com/fr/design/images/buttonicon/add.png", new PropertyMode[]{PropertyMode.REPORT, PropertyMode.REPORT_PARA, PropertyMode.REPORT_FLOAT, PropertyMode.POLY, PropertyMode.POLY_CHART}, "cellelement", new PropertyMode[]{PropertyMode.REPORT, PropertyMode.REPORT_PARA, PropertyMode.REPORT_FLOAT, PropertyMode.POLY, PropertyMode.POLY_CHART},
new PropertyMode[]{PropertyMode.REPORT, PropertyMode.FORM_REPORT, PropertyMode.POLY_REPORT}); new PropertyMode[]{PropertyMode.REPORT, PropertyMode.FORM_REPORT, PropertyMode.POLY_REPORT});
// 单元格属性 // 单元格属性
PropertyItem cellAttr = new PropertyItem(KEY_CELL_ATTR, Inter.getLocText("FR-Designer_Cell_Attributes"), PropertyItem cellAttr = new PropertyItem(KEY_CELL_ATTR, Inter.getLocText("FR-Designer_Cell_Attributes"),
"/com/fr/design/images/buttonicon/add.png", new PropertyMode[]{PropertyMode.REPORT, PropertyMode.REPORT_PARA, PropertyMode.REPORT_FLOAT, PropertyMode.POLY, PropertyMode.POLY_CHART}, "cellattr", new PropertyMode[]{PropertyMode.REPORT, PropertyMode.REPORT_PARA, PropertyMode.REPORT_FLOAT, PropertyMode.POLY, PropertyMode.POLY_CHART},
new PropertyMode[]{PropertyMode.REPORT, PropertyMode.FORM_REPORT, PropertyMode.POLY_REPORT}); new PropertyMode[]{PropertyMode.REPORT, PropertyMode.FORM_REPORT, PropertyMode.POLY_REPORT});
// 悬浮元素 // 悬浮元素
PropertyItem floatElement = new PropertyItem(KEY_FLOAT_ELEMENT, Inter.getLocText("FR-Designer_Float_Element"), PropertyItem floatElement = new PropertyItem(KEY_FLOAT_ELEMENT, Inter.getLocText("FR-Designer_Float_Element"),
"/com/fr/design/images/buttonicon/add.png", new PropertyMode[]{PropertyMode.REPORT, PropertyMode.REPORT_PARA, PropertyMode.REPORT_FLOAT, PropertyMode.POLY, PropertyMode.POLY_CHART}, "floatelement", new PropertyMode[]{PropertyMode.REPORT, PropertyMode.REPORT_PARA, PropertyMode.REPORT_FLOAT, PropertyMode.POLY, PropertyMode.POLY_CHART},
new PropertyMode[]{PropertyMode.REPORT, PropertyMode.REPORT_FLOAT, PropertyMode.POLY_REPORT}); new PropertyMode[]{PropertyMode.REPORT, PropertyMode.REPORT_FLOAT, PropertyMode.POLY_REPORT});
// 控件设置 // 控件设置
PropertyItem widgetSettings = new PropertyItem(KEY_WIDGET_SETTINGS, Inter.getLocText("FR-Designer-Widget_Settings"), PropertyItem widgetSettings = new PropertyItem(KEY_WIDGET_SETTINGS, Inter.getLocText("FR-Designer-Widget_Settings"),
"/com/fr/design/images/buttonicon/add.png", new PropertyMode[]{PropertyMode.REPORT, PropertyMode.REPORT_PARA, PropertyMode.REPORT_FLOAT, PropertyMode.FORM, PropertyMode.POLY}, "widgetsettings", new PropertyMode[]{PropertyMode.REPORT, PropertyMode.REPORT_PARA, PropertyMode.REPORT_FLOAT, PropertyMode.FORM, PropertyMode.POLY},
new PropertyMode[]{PropertyMode.REPORT, PropertyMode.REPORT_PARA, PropertyMode.FORM, PropertyMode.POLY_REPORT, PropertyMode.POLY_CHART}); new PropertyMode[]{PropertyMode.REPORT, PropertyMode.REPORT_PARA, PropertyMode.FORM, PropertyMode.POLY_REPORT, PropertyMode.POLY_CHART});
// 条件属性 // 条件属性
PropertyItem conditionAttr = new PropertyItem(KEY_CONDITION_ATTR, Inter.getLocText("FR-Designer_Condition_Attributes"), PropertyItem conditionAttr = new PropertyItem(KEY_CONDITION_ATTR, Inter.getLocText("FR-Designer_Condition_Attributes"),
"/com/fr/design/images/buttonicon/add.png", new PropertyMode[]{PropertyMode.REPORT, PropertyMode.REPORT_PARA, PropertyMode.REPORT_FLOAT, PropertyMode.POLY, PropertyMode.POLY_CHART}, "conditionattr", new PropertyMode[]{PropertyMode.REPORT, PropertyMode.REPORT_PARA, PropertyMode.REPORT_FLOAT, PropertyMode.POLY, PropertyMode.POLY_CHART},
new PropertyMode[]{PropertyMode.REPORT, PropertyMode.FORM_REPORT, PropertyMode.POLY_REPORT}); new PropertyMode[]{PropertyMode.REPORT, PropertyMode.FORM_REPORT, PropertyMode.POLY_REPORT});
// 超级链接 // 超级链接
PropertyItem hyperlink = new PropertyItem(KEY_HYPERLINK, Inter.getLocText("FR-Designer_Hyperlink"), PropertyItem hyperlink = new PropertyItem(KEY_HYPERLINK, Inter.getLocText("FR-Designer_Hyperlink"),
"/com/fr/design/images/buttonicon/add.png", new PropertyMode[]{PropertyMode.REPORT, PropertyMode.REPORT_PARA, PropertyMode.REPORT_FLOAT, PropertyMode.POLY, PropertyMode.POLY_CHART}, "hyperlink", new PropertyMode[]{PropertyMode.REPORT, PropertyMode.REPORT_PARA, PropertyMode.REPORT_FLOAT, PropertyMode.POLY, PropertyMode.POLY_CHART},
new PropertyMode[]{PropertyMode.REPORT, PropertyMode.REPORT_FLOAT, PropertyMode.FORM_REPORT, PropertyMode.POLY_REPORT}); new PropertyMode[]{PropertyMode.REPORT, PropertyMode.REPORT_FLOAT, PropertyMode.FORM_REPORT, PropertyMode.POLY_REPORT});
// 组件库 // 组件库
PropertyItem widgetLib = new PropertyItem(KEY_WIDGET_LIB, Inter.getLocText("FR-Designer_Widget_Library"), PropertyItem widgetLib = new PropertyItem(KEY_WIDGET_LIB, Inter.getLocText("FR-Designer_Widget_Library"),
"/com/fr/design/images/buttonicon/add.png", new PropertyMode[]{PropertyMode.FORM}, "widgetlib", new PropertyMode[]{PropertyMode.FORM},
new PropertyMode[]{PropertyMode.FORM}); new PropertyMode[]{PropertyMode.FORM});
// 权限编辑 // 权限编辑
PropertyItem authorityEdition = new PropertyItem(KEY_AUTHORITY_EDITION, Inter.getLocText("FR-Designer_Permissions_Edition"), PropertyItem authorityEdition = new PropertyItem(KEY_AUTHORITY_EDITION, Inter.getLocText("FR-Designer_Permissions_Edition"),
"/com/fr/design/images/buttonicon/add.png", new PropertyMode[]{PropertyMode.AUTHORITY_EDITION}, "authorityedit", new PropertyMode[]{PropertyMode.AUTHORITY_EDITION},
new PropertyMode[]{PropertyMode.AUTHORITY_EDITION}); new PropertyMode[]{PropertyMode.AUTHORITY_EDITION});
// 已配置角色 // 已配置角色
PropertyItem configuredRoles = new PropertyItem(KEY_CONFIGURED_ROLES, Inter.getLocText("FR-Designer_Configured_Roles"), PropertyItem configuredRoles = new PropertyItem(KEY_CONFIGURED_ROLES, Inter.getLocText("FR-Designer_Configured_Roles"),
"/com/fr/design/images/buttonicon/add.png", new PropertyMode[]{PropertyMode.AUTHORITY_EDITION}, "configuredroles", new PropertyMode[]{PropertyMode.AUTHORITY_EDITION},
new PropertyMode[]{PropertyMode.AUTHORITY_EDITION}); new PropertyMode[]{PropertyMode.AUTHORITY_EDITION});
propertyItemMap.put(KEY_CELL_ELEMENT, cellElement); propertyItemMap.put(KEY_CELL_ELEMENT, cellElement);
@ -167,7 +168,7 @@ public class EastRegionContainerPane extends UIEastResizableContainer {
// 左侧按钮面板 // 左侧按钮面板
private void initLeftPane() { private void initLeftPane() {
leftPane = new JPanel(); leftPane = new JPanel();
leftPane.setLayout(new VerticalFlowLayout(VerticalFlowLayout.TOP, 0, 0)); leftPane.setLayout(new VerticalFlowLayout(VerticalFlowLayout.TOP, 4, 4));
for (PropertyItem item : propertyItemMap.values()) { for (PropertyItem item : propertyItemMap.values()) {
if (item.isPoppedOut() || !item.isVisible()) { if (item.isPoppedOut() || !item.isVisible()) {
continue; continue;
@ -176,7 +177,7 @@ public class EastRegionContainerPane extends UIEastResizableContainer {
} }
// leftPane.setLayout(new BoxLayout(leftPane, BoxLayout.Y_AXIS)); // leftPane.setLayout(new BoxLayout(leftPane, BoxLayout.Y_AXIS));
leftPane.setBackground(new Color(210, 210, 210)); leftPane.setBackground(new Color(226, 226, 226));
replaceLeftPane(leftPane); replaceLeftPane(leftPane);
} }
@ -396,6 +397,12 @@ public class EastRegionContainerPane extends UIEastResizableContainer {
} }
} }
private void resetPropertyIcons() {
for (PropertyItem item : propertyItemMap.values()) {
item.resetButtonIcon();
}
}
class PropertyItem { class PropertyItem {
@ -416,10 +423,21 @@ public class EastRegionContainerPane extends UIEastResizableContainer {
private Set<PropertyMode> enableModes; private Set<PropertyMode> enableModes;
private static final int MAX_PARA_HEIGHT = 240; private static final int MAX_PARA_HEIGHT = 240;
public PropertyItem(String name, String title, String btnUrl, PropertyMode[] visibleModes, PropertyMode[] enableModes) { // 完整icon路径为 ICON_BASE_DIR + btnIconName + iconSuffix
private static final String ICON_BASE_DIR = "/com/fr/design/images/buttonicon/propertiestab/";
private static final String ICON_SUFFIX_NORMAL = "_normal.png";
private static final String ICON_SUFFIX_DISABLED = "_disabled.png";
private static final String ICON_SUFFIX_SELECTED = "_selected.png";
private String btnIconName;
private String iconSuffix = ICON_SUFFIX_NORMAL; // normal, diabled, selected, 三者之一
private final Color selectedBtnBackground = new Color(240, 240, 240);
private Color originBtnBackground;
public PropertyItem(String name, String title, String btnIconName, PropertyMode[] visibleModes, PropertyMode[] enableModes) {
this.name = name; this.name = name;
this.title = title; this.title = title;
initButton(btnUrl); this.btnIconName = btnIconName;
initButton();
initPropertyPanel(); initPropertyPanel();
// this.visibleModes = new ArrayList<PropertyMode>(visibleModes); // this.visibleModes = new ArrayList<PropertyMode>(visibleModes);
initModes(visibleModes, enableModes); initModes(visibleModes, enableModes);
@ -542,14 +560,31 @@ public class EastRegionContainerPane extends UIEastResizableContainer {
// propertyPanel.repaint(); // propertyPanel.repaint();
// propertyPanel.revalidate(); // propertyPanel.revalidate();
// } // }
private String getBtnIconUrl() {
return ICON_BASE_DIR + btnIconName + iconSuffix;
}
private void initButton(String btnUrl) { public void resetButtonIcon() {
button = new UIButton(BaseUtils.readIcon(btnUrl)) { if (iconSuffix.equals(ICON_SUFFIX_SELECTED)) {
iconSuffix = ICON_SUFFIX_NORMAL;
button.setIcon(BaseUtils.readIcon(getBtnIconUrl()));
button.setBackground(originBtnBackground);
button.setOpaque(false);
}
}
private void initButton() {
button = new UIButton(BaseUtils.readIcon(getBtnIconUrl())) {
public Dimension getPreferredSize() { public Dimension getPreferredSize() {
return new Dimension(TAB_WIDTH, TAB_WIDTH); return new Dimension(TAB_BUTTON_WIDTH, TAB_BUTTON_WIDTH);
}
@Override
public void paintComponent(Graphics g) {
super.paintComponent(g);
} }
}; };
button.set4LargeToolbarButton(); button.set4LargeToolbarButton();
originBtnBackground = button.getBackground();
button.addActionListener(new ActionListener() { button.addActionListener(new ActionListener() {
@Override @Override
public void actionPerformed(ActionEvent e) { public void actionPerformed(ActionEvent e) {
@ -558,6 +593,11 @@ public class EastRegionContainerPane extends UIEastResizableContainer {
} else { } else {
popupFixedPane(); popupFixedPane();
} }
resetPropertyIcons();
iconSuffix = ICON_SUFFIX_SELECTED;
button.setIcon(BaseUtils.readIcon(getBtnIconUrl()));
button.setBackground(selectedBtnBackground);
button.setOpaque(true);
} }
}); });
} }

Loading…
Cancel
Save