Browse Source

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

master
juhaoyu 7 years ago
parent
commit
67650d6bfd
  1. 28
      designer/src/com/fr/design/mainframe/CellWidgetPropertyPane.java
  2. 11
      designer/src/com/fr/design/widget/WidgetPane.java
  3. 2
      designer_base/src/com/fr/design/actions/file/OpenTemplateAction.java
  4. 2
      designer_base/src/com/fr/design/gui/controlpane/JListControlPane.java
  5. 2
      designer_base/src/com/fr/design/gui/controlpane/UIListControlPane.java
  6. 2
      designer_base/src/com/fr/design/gui/icontainer/UIScrollPaneUI.java
  7. BIN
      designer_base/src/com/fr/design/images/control/down.png
  8. 2
      designer_base/src/com/fr/design/mainframe/DesignerFrameFileDealerPane.java
  9. 4
      designer_form/src/com/fr/design/parameter/RootDesignDefinePane.java

28
designer/src/com/fr/design/mainframe/CellWidgetPropertyPane.java

@ -102,16 +102,32 @@ public class CellWidgetPropertyPane extends BasicPane {
} }
public void update() { public void update() {
if (cellElement == null) {// 利用默认的CellElement. if (cellElement == null || !cellEditorDefPane.isShouldFireSelectedEvent()) {
return; return;
} }
final CellSelection finalCS = (CellSelection) ePane.getSelection(); final CellSelection finalCS = (CellSelection) ePane.getSelection();
final TemplateElementCase tplEC = ePane.getEditingElementCase(); final TemplateElementCase tplEC = ePane.getEditingElementCase();
if(finalCS.isSelectedOneCell(ePane)){
if(tplEC.getTemplateCellElement(cellElement.getColumn(), cellElement.getRow())== null){//cellElement未加入到report中时要添加进去
tplEC.addCellElement(cellElement);
}
setCellWidget(cellElement);
}else{
ReportActionUtils.actionIterateWithCellSelection(finalCS, tplEC, new ReportActionUtils.IterAction() { ReportActionUtils.actionIterateWithCellSelection(finalCS, tplEC, new ReportActionUtils.IterAction() {
public void dealWith(CellElement editCellElement) { public void dealWith(CellElement editCellElement) {
Widget cellWidget = cellEditorDefPane.update();
// p:最后把这个cellEditorDef设置到CellGUIAttr. // p:最后把这个cellEditorDef设置到CellGUIAttr.
TemplateCellElement cellElement = (TemplateCellElement) editCellElement; TemplateCellElement templateCellElement = (TemplateCellElement) editCellElement;
setCellWidget(templateCellElement);
}
});
}
if(DesignerContext.getDesignerFrame().getSelectedJTemplate() != null){
DesignerContext.getDesignerFrame().getSelectedJTemplate().fireTargetModified();
}
}
private void setCellWidget(TemplateCellElement cellElement){
Widget cellWidget = cellEditorDefPane.update();
if (cellWidget instanceof NoneWidget) { if (cellWidget instanceof NoneWidget) {
cellElement.setWidget(null); cellElement.setWidget(null);
} else { } else {
@ -121,12 +137,6 @@ public class CellWidgetPropertyPane extends BasicPane {
cellElement.setWidget(cellWidget); cellElement.setWidget(cellWidget);
} }
} }
});
if(DesignerContext.getDesignerFrame().getSelectedJTemplate() != null){
DesignerContext.getDesignerFrame().getSelectedJTemplate().fireTargetModified();
}
}
public void reInitAllListener(){ public void reInitAllListener(){
cellEditorDefPane.registerListener(); cellEditorDefPane.registerListener();

11
designer/src/com/fr/design/widget/WidgetPane.java

@ -47,6 +47,12 @@ public class WidgetPane extends AbstractAttrNoScrollPane implements ItemListener
this.initComponents(pane); this.initComponents(pane);
} }
public boolean isShouldFireSelectedEvent(){
return shouldFireSelectedEvent;
}
protected void initComponents(ElementCasePane pane) { protected void initComponents(ElementCasePane pane) {
this.setLayout(FRGUIPaneFactory.createBorderLayout()); this.setLayout(FRGUIPaneFactory.createBorderLayout());
this.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0)); this.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0));
@ -136,8 +142,8 @@ public class WidgetPane extends AbstractAttrNoScrollPane implements ItemListener
String name = ((NameWidget) widget).getName(); String name = ((NameWidget) widget).getName();
shouldFireSelectedEvent = false; shouldFireSelectedEvent = false;
editorTypeComboBox.setSelectedItem(new Item(name, name)); editorTypeComboBox.setSelectedItem(new Item(name, name));
shouldFireSelectedEvent = true;
cellEditorCardPane.populate(widget); cellEditorCardPane.populate(widget);
shouldFireSelectedEvent = true;
} }
// 内置组件 // 内置组件
else { else {
@ -145,10 +151,9 @@ public class WidgetPane extends AbstractAttrNoScrollPane implements ItemListener
if (ArrayUtils.contains(ButtonConstants.CLASSES4BUTTON, clazz)) { if (ArrayUtils.contains(ButtonConstants.CLASSES4BUTTON, clazz)) {
clazz = Button.class; clazz = Button.class;
} }
cellEditorCardPane.populate(widget);
shouldFireSelectedEvent = false; shouldFireSelectedEvent = false;
editorTypeComboBox.setSelectedItemByWidgetClass(clazz); editorTypeComboBox.setSelectedItemByWidgetClass(clazz);
cellEditorCardPane.populate(widget);
shouldFireSelectedEvent = true; shouldFireSelectedEvent = true;
} }
removeAttributeChangeListener(); removeAttributeChangeListener();

2
designer_base/src/com/fr/design/actions/file/OpenTemplateAction.java

@ -22,7 +22,7 @@ public class OpenTemplateAction extends UpdateAction {
this.setMenuKeySet(KeySetUtils.OPEN_TEMPLATE); this.setMenuKeySet(KeySetUtils.OPEN_TEMPLATE);
this.setName(getMenuKeySet().getMenuKeySetName()); this.setName(getMenuKeySet().getMenuKeySetName());
this.setMnemonic(getMenuKeySet().getMnemonic()); this.setMnemonic(getMenuKeySet().getMnemonic());
this.setSmallIcon(BaseUtils.readIcon("/com/fr/design/images/m_file/open.png")); this.setSmallIcon(BaseUtils.readIcon("/com/fr/design/images/buttonicon/open.png"));
this.setAccelerator(getMenuKeySet().getKeyStroke()); this.setAccelerator(getMenuKeySet().getKeyStroke());
} }

2
designer_base/src/com/fr/design/gui/controlpane/JListControlPane.java

@ -360,7 +360,7 @@ public abstract class JListControlPane extends JControlPane {
this.creator = creators[0]; this.creator = creators[0];
this.setName(Inter.getLocText("FR-Action_Add")); this.setName(Inter.getLocText("FR-Action_Add"));
this.setMnemonic('A'); this.setMnemonic('A');
this.setSmallIcon(BaseUtils.readIcon("/com/fr/base/images/cell/control/add.png")); this.setSmallIcon(BaseUtils.readIcon("/com/fr/design/images/buttonicon/add.png"));
} }
@Override @Override

2
designer_base/src/com/fr/design/gui/controlpane/UIListControlPane.java

@ -447,7 +447,7 @@ public abstract class UIListControlPane extends UIControlPane {
this.creator = creators[0]; this.creator = creators[0];
this.setName(Inter.getLocText("FR-Action_Add")); this.setName(Inter.getLocText("FR-Action_Add"));
this.setMnemonic('A'); this.setMnemonic('A');
this.setSmallIcon(BaseUtils.readIcon("/com/fr/base/images/cell/control/add.png")); this.setSmallIcon(BaseUtils.readIcon("/com/fr/design/images/buttonicon/add.png"));
} }
/** /**

2
designer_base/src/com/fr/design/gui/icontainer/UIScrollPaneUI.java

@ -36,13 +36,11 @@ public class UIScrollPaneUI extends MetalScrollPaneUI implements PropertyChangeL
// Note: It never happened before Java 1.5 that scrollbar is null // Note: It never happened before Java 1.5 that scrollbar is null
JScrollBar sb = scrollpane.getHorizontalScrollBar(); JScrollBar sb = scrollpane.getHorizontalScrollBar();
if (sb != null) { if (sb != null) {
sb.setBackground(Color.red);
sb.putClientProperty(MetalScrollBarUI.FREE_STANDING_PROP, Boolean.FALSE); sb.putClientProperty(MetalScrollBarUI.FREE_STANDING_PROP, Boolean.FALSE);
} }
sb = scrollpane.getVerticalScrollBar(); sb = scrollpane.getVerticalScrollBar();
if (sb != null) { if (sb != null) {
sb.setBackground(Color.red);
sb.putClientProperty(MetalScrollBarUI.FREE_STANDING_PROP, Boolean.FALSE); sb.putClientProperty(MetalScrollBarUI.FREE_STANDING_PROP, Boolean.FALSE);
} }
} }

BIN
designer_base/src/com/fr/design/images/control/down.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 222 B

After

Width:  |  Height:  |  Size: 278 B

2
designer_base/src/com/fr/design/mainframe/DesignerFrameFileDealerPane.java

@ -171,7 +171,7 @@ public class DesignerFrameFileDealerPane extends JPanel implements FileToolbarSt
public OpenReportAction() { public OpenReportAction() {
this.setName(KeySetUtils.OPEN_TEMPLATE.getMenuKeySetName()); this.setName(KeySetUtils.OPEN_TEMPLATE.getMenuKeySetName());
this.setSmallIcon(BaseUtils.readIcon("/com/fr/design/images/m_file/open.png")); this.setSmallIcon(BaseUtils.readIcon("/com/fr/design/images/buttonicon/open.png"));
} }
@Override @Override

4
designer_form/src/com/fr/design/parameter/RootDesignDefinePane.java

@ -21,7 +21,7 @@ import com.fr.design.widget.ui.designer.AbstractDataModify;
import com.fr.form.ui.container.WParameterLayout; import com.fr.form.ui.container.WParameterLayout;
import com.fr.general.Background; import com.fr.general.Background;
import com.fr.general.Inter; import com.fr.general.Inter;
import com.fr.stable.Constants; import com.fr.report.stable.FormConstants;
import javax.swing.*; import javax.swing.*;
import java.awt.*; import java.awt.*;
@ -82,7 +82,7 @@ public class RootDesignDefinePane extends AbstractDataModify<WParameterLayout> {
Icon[] hAlignmentIconArray = {BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/h_left_normal.png"), Icon[] hAlignmentIconArray = {BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/h_left_normal.png"),
BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/h_center_normal.png"), BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/h_center_normal.png"),
BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/h_right_normal.png"),}; BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/h_right_normal.png"),};
Integer[] hAlignment = new Integer[]{Constants.LEFT, Constants.CENTER, Constants.RIGHT}; Integer[] hAlignment = new Integer[]{FormConstants.LEFTPOSITION, FormConstants.CENTERPOSITION, FormConstants.RIGHTPOSITION};
hAlignmentPane = new UIButtonGroup<Integer>(hAlignmentIconArray, hAlignment); hAlignmentPane = new UIButtonGroup<Integer>(hAlignmentIconArray, hAlignment);
hAlignmentPane.setAllToolTips(new String[]{Inter.getLocText("FR-Designer-StyleAlignment_Left") hAlignmentPane.setAllToolTips(new String[]{Inter.getLocText("FR-Designer-StyleAlignment_Left")
, Inter.getLocText("FR-Designer-StyleAlignment_Center"), Inter.getLocText("FR-Designer-StyleAlignment_Right")}); , Inter.getLocText("FR-Designer-StyleAlignment_Center"), Inter.getLocText("FR-Designer-StyleAlignment_Right")});

Loading…
Cancel
Save