Browse Source

Merge pull request #202 in DESIGN/design from ~MATA.LI/designrel:release/10.0 to release/10.0

* commit '2b94751138d810caa781d200c93c397076de8226':
  REPORT-9512 & REPORT-9297
master
Mata.Li 7 years ago
parent
commit
c568c9d917
  1. 21
      designer-base/src/com/fr/design/mainframe/DesignerFrame.java
  2. 30
      designer-realize/src/com/fr/design/mainframe/CellWidgetPropertyPane.java
  3. 6
      designer-realize/src/com/fr/design/widget/WidgetEventPane.java

21
designer-base/src/com/fr/design/mainframe/DesignerFrame.java

@ -375,18 +375,18 @@ public class DesignerFrame extends JFrame implements JTemplateActionListener, Ta
final JPanel northEastPane = FRGUIPaneFactory.createBorderLayout_S_Pane();
//优先级为-1,保证最后全面刷新一次
GeneralContext.listenPluginRunningChanged(new PluginEventListener(-1) {
@Override
public void on(PluginEvent event) {
refreshNorthEastPane(northEastPane, ad);
DesignUtils.refreshDesignerFrame();
}
}, new PluginFilter() {
@Override
public boolean accept(PluginContext context) {
return context.contain(PluginModule.ExtraDesign);
}
});
@ -469,16 +469,16 @@ public class DesignerFrame extends JFrame implements JTemplateActionListener, Ta
// 下面的虚线
downDottedLine = new DottedLine(UIScrollBar.HORIZONTAL, centerWidth);
downDottedLine.setBounds(WestRegionContainerPane.getInstance().getContainerWidth(), contentHeight - 3,
centerWidth, 3);
centerWidth, 3);
// 左边的虚线
leftDottedLine = new DottedLine(UIScrollBar.VERTICAL, contentHeight - MENU_HEIGHT);
leftDottedLine.setBounds(WestRegionContainerPane.getInstance().getContainerWidth(), MENU_HEIGHT, 3,
contentHeight - MENU_HEIGHT);
contentHeight - MENU_HEIGHT);
rightDottedLine = new DottedLine(UIScrollBar.VERTICAL, contentHeight - MENU_HEIGHT);
rightDottedLine.setBounds(contentWidth - EastRegionContainerPane.getInstance().getContainerWidth() - 3,
MENU_HEIGHT, 3, contentHeight - MENU_HEIGHT);
MENU_HEIGHT, 3, contentHeight - MENU_HEIGHT);
}
@ -719,7 +719,12 @@ public class DesignerFrame extends JFrame implements JTemplateActionListener, Ta
String envName = DesignerEnvManager.getEnvManager().getCurEnvName();
Workspace workspace = WorkContext.getCurrent();
DesignerWorkspaceInfo info = DesignerEnvManager.getEnvManager().getWorkspaceInfo(envName);
defaultTitleSB.append(info.getName()).append("@").append(envName).append("[").append(workspace.getDescription()).append("]");
String username = null;
if (info != null){
username = info.getName();
}
defaultTitleSB.append(username).append("@").append(envName).append("[").append(workspace.getDescription()).append("]");
if (editingTemplate != null) {
String path = editingTemplate.getEditingFILE().getPath();
if (!editingTemplate.getEditingFILE().exists()) {

30
designer-realize/src/com/fr/design/mainframe/CellWidgetPropertyPane.java

@ -108,6 +108,36 @@ public class CellWidgetPropertyPane extends BasicPane {
final CellSelection finalCS = (CellSelection) ePane.getSelection();
final TemplateElementCase tplEC = ePane.getEditingElementCase();
final Widget cellWidget = cellEditorDefPane.update();
if (finalCS.isSelectedOneCell(ePane)) {
if (tplEC.getTemplateCellElement(cellElement.getColumn(), cellElement.getRow()) == null) {//cellElement未加入到report中时要添加进去
tplEC.addCellElement(cellElement);
}
setCellWidget(cellWidget, cellElement);
} else {
ReportActionUtils.actionIterateWithCellSelection(finalCS, tplEC, new ReportActionUtils.IterAction() {
public void dealWith(CellElement editCellElement) {
// p:最后把这个cellEditorDef设置到CellGUIAttr.
TemplateCellElement templateCellElement = (TemplateCellElement) editCellElement;
try {
setCellWidget((Widget) cellWidget.clone(), templateCellElement);
} catch (CloneNotSupportedException e) {
FRContext.getLogger().error("InternalError: " + e.getMessage());
}
}
});
}
if (DesignerContext.getDesignerFrame().getSelectedJTemplate() != null) {
DesignerContext.getDesignerFrame().getSelectedJTemplate().fireTargetModified();
}
}
public void update(Selection selection) {
if (cellElement == null || !cellEditorDefPane.isShouldFireSelectedEvent()) {
return;
}
final CellSelection finalCS = (CellSelection) selection;
final TemplateElementCase tplEC = ePane.getEditingElementCase();
final Widget cellWidget = cellEditorDefPane.update();
if(finalCS.isSelectedOneCell(ePane)){
if(tplEC.getTemplateCellElement(cellElement.getColumn(), cellElement.getRow())== null){//cellElement未加入到report中时要添加进去
tplEC.addCellElement(cellElement);

6
designer-realize/src/com/fr/design/widget/WidgetEventPane.java

@ -18,6 +18,7 @@ import com.fr.design.mainframe.ElementCasePane;
import com.fr.design.mainframe.JTemplate;
import com.fr.form.event.Listener;
import com.fr.form.ui.Widget;
import com.fr.grid.selection.Selection;
import com.fr.log.FineLoggerFactory;
import com.fr.general.Inter;
import com.fr.general.NameObject;
@ -34,9 +35,12 @@ import javax.swing.*;
public class WidgetEventPane extends ObjectUIControlPane {
private Selection selection;
public WidgetEventPane(ElementCasePane pane) {
super(pane);
this.setNameListEditable(false);
selection = pane.getSelection();
setBorder(BorderFactory.createEmptyBorder(10, 0, 15, 0));
}
@ -57,7 +61,7 @@ public class WidgetEventPane extends ObjectUIControlPane {
@Override
public void saveSettings() {
CellWidgetPropertyPane.getInstance().update();
CellWidgetPropertyPane.getInstance().update(selection);
}
@Override

Loading…
Cancel
Save