Browse Source

Merge branch 'release/9.0' of http://www.finedevelop.com:2015/scm/~vito/design into release/9.0

master
vito 7 years ago
parent
commit
8e3a2a8c0d
  1. 5
      designer/src/com/fr/design/actions/cell/CellAttributeAction.java
  2. 2
      designer/src/com/fr/design/actions/edit/HyperlinkAction.java
  3. 29
      designer/src/com/fr/grid/selection/CellSelection.java
  4. 4
      designer_base/src/com/fr/design/menu/KeySetUtils.java
  5. 4
      designer_form/src/com/fr/design/widget/FormWidgetDefinePaneFactoryBase.java

5
designer/src/com/fr/design/actions/cell/CellAttributeAction.java

@ -1,5 +1,6 @@
package com.fr.design.actions.cell;
import com.fr.base.BaseUtils;
import com.fr.design.menu.KeySetUtils;
import com.fr.general.Inter;
@ -9,9 +10,9 @@ import com.fr.general.Inter;
public class CellAttributeAction extends CellAttributeTableAction {
public CellAttributeAction() {
this.setMenuKeySet(KeySetUtils.CELL_OTHER_ATTR);
this.setName(getMenuKeySet().getMenuKeySetName()+ "...");
this.setName(getMenuKeySet().getMenuKeySetName());
this.setMnemonic(getMenuKeySet().getMnemonic());
// this.setSmallIcon(BaseUtils.readIcon("/com/fr/design/images/m_format/cellAttr.png"));
this.setSmallIcon(BaseUtils.readIcon("/com/fr/design/images/m_format/cellAttr.png"));
}
@Override

2
designer/src/com/fr/design/actions/edit/HyperlinkAction.java

@ -17,7 +17,7 @@ public class HyperlinkAction extends UpdateAction {
public HyperlinkAction() {
this.setMenuKeySet(KeySetUtils.HYPER_LINK);
this.setName(getMenuKeySet().getMenuKeySetName() + "...");
this.setName(getMenuKeySet().getMenuKeySetName());
this.setMnemonic(getMenuKeySet().getMnemonic());
this.setSmallIcon(BaseUtils.readIcon("/com/fr/design/images/m_insert/hyperLink.png"));
}

29
designer/src/com/fr/grid/selection/CellSelection.java

@ -36,6 +36,7 @@ import com.fr.report.cell.cellattr.CellGUIAttr;
import com.fr.report.elementcase.TemplateElementCase;
import com.fr.stable.ColumnRow;
import com.fr.stable.StableUtils;
import com.fr.stable.StringUtils;
import com.fr.stable.unit.FU;
import javax.swing.*;
@ -257,6 +258,7 @@ public class CellSelection extends Selection {
* @param ePane 区域
* @return 成功返回true
*/
@Override
public boolean pasteCellElementsClip(CellElementsClip ceClip, ElementCasePane ePane) {
TemplateElementCase ec = ePane.getEditingElementCase();
CellSelection cs = ceClip.pasteAt(ec, column, row);
@ -273,6 +275,7 @@ public class CellSelection extends Selection {
* @param ePane 区域
* @return 成功返回true
*/
@Override
public boolean pasteString(String str, ElementCasePane ePane) {
// 主要需要处理Excel当中的类型.
// Excel 的剪贴板格式
@ -297,7 +300,7 @@ public class CellSelection extends Selection {
ec.setCellValue(column + c, row + r, number);
} else {
// alex:对于100,000,000这种数值,先做一个取巧的解决方法
String newStr = Utils.replaceAllString(lineTextArray[c], ",", "");
String newStr = Utils.replaceAllString(lineTextArray[c], ",", StringUtils.EMPTY);
number = Utils.string2Number(newStr);
if (number != null) {
ec.setCellValue(column + c, row + r, Utils.string2Number(newStr));
@ -320,6 +323,7 @@ public class CellSelection extends Selection {
* @param ePane 区域
* @return 成功返回true
*/
@Override
public boolean pasteOtherType(Object ob, ElementCasePane ePane) {
TemplateElementCase ec = ePane.getEditingElementCase();
@ -341,6 +345,7 @@ public class CellSelection extends Selection {
* @param ePane 区域
* @return 是则返回true
*/
@Override
public boolean canMergeCells(ElementCasePane ePane) {
return !this.isSelectedOneCell(ePane);
@ -351,6 +356,7 @@ public class CellSelection extends Selection {
* @param ePane 区域
* @return 成功返回true
*/
@Override
public boolean mergeCells(ElementCasePane ePane) {
TemplateElementCase ec = ePane.getEditingElementCase();
@ -373,6 +379,7 @@ public class CellSelection extends Selection {
* @param ePane 区域
* @return 是则返回true
*/
@Override
public boolean canUnMergeCells(ElementCasePane ePane) {
TemplateElementCase ec = ePane.getEditingElementCase();
@ -393,6 +400,7 @@ public class CellSelection extends Selection {
* @param ePane 区域
* @return 成功返回true
*/
@Override
public boolean unMergeCells(ElementCasePane ePane) {
TemplateElementCase ec = ePane.getEditingElementCase();
@ -434,9 +442,10 @@ public class CellSelection extends Selection {
popup.add(new CleanAuthorityAction(ePane).createMenuItem());
return popup;
}
popup.add(DeprecatedActionManager.getCellMenu(ePane).createJMenu());
popup.add(new EditCellAction(ePane).createMenuItem());
popup.add(DeprecatedActionManager.getCellMenu(ePane).createJMenu());
// richer:add global style menu
popup.add(new CellExpandAttrAction().createMenuItem());
if (!ConfigManager.getProviderInstance().hasStyle()) {
UIMenu styleMenu = new UIMenu(KeySetUtils.GLOBAL_STYLE.getMenuName());
styleMenu.setIcon(BaseUtils.readIcon("/com/fr/design/images/m_format/cell.png"));
@ -455,13 +464,12 @@ public class CellSelection extends Selection {
} else {
popup.add(new StyleAction().createMenuItem());
}
popup.add(DeprecatedActionManager.getPresentMenu(ePane).createJMenu());
popup.add(new CellAttributeAction().createMenuItem());
JTemplate jTemplate = HistoryTemplateListPane.getInstance().getCurrentEditingTemplate();
if (jTemplate.isJWorkBook()){ //表单中报表块编辑屏蔽掉 控件设置
popup.add(new CellWidgetAttrAction().createMenuItem());
}
popup.add(new CellExpandAttrAction().createMenuItem());
popup.add(DeprecatedActionManager.getPresentMenu(ePane).createJMenu());
popup.add(new CellAttributeAction().createMenuItem());
popup.add(new ConditionAttributesAction().createMenuItem());
popup.add(new HyperlinkAction().createMenuItem());
// cut, copy and paste
@ -483,17 +491,18 @@ public class CellSelection extends Selection {
* @param ePane 区域
* @return 成功返回true
*/
@Override
public boolean clear(Clear type, ElementCasePane ePane) {
TemplateElementCase ec = ePane.getEditingElementCase();
boolean isClear = true;
int cellRectangleCount = getCellRectangleCount();
for (int rect = 0; rect < cellRectangleCount; rect++) {
isClear = clearCell(type, ec, rect);
isClear = hasclearCell(type, ec, rect);
}
return isClear;
}
private boolean clearCell(Clear type, TemplateElementCase ec, int rect) {
private boolean hasclearCell(Clear type, TemplateElementCase ec, int rect) {
List<CellElement> removeElementList = new ArrayList<CellElement>();
Rectangle cellRectangle = getCellRectangle(rect);
column = cellRectangle.x;
@ -541,6 +550,8 @@ public class CellSelection extends Selection {
((TemplateCellElement) element).setWidget(null);
}
break;
default:
break;
}
return true;
}
@ -608,6 +619,7 @@ public class CellSelection extends Selection {
* @param ePane 区域
* @return 成功返回true
*/
@Override
public boolean triggerDeleteAction(ElementCasePane ePane) {
final TemplateElementCase ec = ePane.getEditingElementCase();
final RowColumnPane rcPane = new RowColumnPane();
@ -638,6 +650,7 @@ public class CellSelection extends Selection {
* @param cr 行列
* @return 包含返回true
*/
@Override
public boolean containsColumnRow(ColumnRow cr) {
return new Rectangle(column, row, columnSpan, rowSpan).contains(cr.column, cr.row);
}
@ -678,7 +691,7 @@ public class CellSelection extends Selection {
if (cellElement != null && b) {
value = cellElement.getValue();
}
value = value == null ? "" : value;
value = value == null ? StringUtils.EMPTY : value;
//之前是少了个bigInteger,刚kunsnat又发现少了个bigDecimal,数字类型的都用stringEditor,没必要那个样子
QuickEditor editor = ActionFactory.getCellEditor((value instanceof Number) ? (Number.class) : (value.getClass()));
if (editor == null) {

4
designer_base/src/com/fr/design/menu/KeySetUtils.java

@ -756,7 +756,7 @@ public class KeySetUtils {
@Override
public String getMenuName() {
return Inter.getLocText("ExpandD-Cell_Expand_Attributes");
return Inter.getLocText("FR-Designer_Expand");
}
@Override
@ -978,7 +978,7 @@ public class KeySetUtils {
@Override
public String getMenuName() {
return Inter.getLocText("M_Format_A-Cell_Attributes");
return Inter.getLocText("FR-Designer_Other");
}
@Override

4
designer_form/src/com/fr/design/widget/FormWidgetDefinePaneFactoryBase.java

@ -54,8 +54,8 @@ public class FormWidgetDefinePaneFactoryBase {
defineMap.put(FormSubmitButton.class, new Appearance(FreeButtonDefinePane.class, WidgetConstants.BUTTON + ""));
defineMap.put(WFitLayout.class, new Appearance(FRFitLayoutDefinePane.class, "wFitLayout"));
defineMap.put(WCardMainBorderLayout.class, new Appearance(WCardMainLayoutDefinePane.class, "wCardMainBorderLayout"));
if (StableFactory.getMarkedClass(BridgeMark.Chart_Editor, AbstractBorderStyleWidget.class) != null) {
defineMap.put(StableFactory.getMarkedClass(BridgeMark.Chart_Editor, AbstractBorderStyleWidget.class), new Appearance(BorderStyleWidgetDefinePane.class, "chartEditor"));
if (StableFactory.getMarkedClass(BridgeMark.CHART_EDITOR, AbstractBorderStyleWidget.class) != null) {
defineMap.put(StableFactory.getMarkedClass(BridgeMark.CHART_EDITOR, AbstractBorderStyleWidget.class), new Appearance(BorderStyleWidgetDefinePane.class, "chartEditor"));
}
defineMap.put(WAbsoluteLayout.class, new Appearance(FRAbsoluteLayoutDefinePane.class, "wAbsoluteLayout"));

Loading…
Cancel
Save