|
|
@ -2,7 +2,6 @@ package com.fr.design.mainframe.form; |
|
|
|
|
|
|
|
|
|
|
|
import com.fr.base.DynamicUnitList; |
|
|
|
import com.fr.base.DynamicUnitList; |
|
|
|
import com.fr.base.ScreenResolution; |
|
|
|
import com.fr.base.ScreenResolution; |
|
|
|
import com.fr.common.inputevent.InputEventBaseOnOS; |
|
|
|
|
|
|
|
import com.fr.design.cell.bar.DynamicScrollBar; |
|
|
|
import com.fr.design.cell.bar.DynamicScrollBar; |
|
|
|
import com.fr.design.event.TargetModifiedEvent; |
|
|
|
import com.fr.design.event.TargetModifiedEvent; |
|
|
|
import com.fr.design.event.TargetModifiedListener; |
|
|
|
import com.fr.design.event.TargetModifiedListener; |
|
|
@ -11,9 +10,11 @@ import com.fr.design.mainframe.BaseJForm; |
|
|
|
import com.fr.design.mainframe.DesignerContext; |
|
|
|
import com.fr.design.mainframe.DesignerContext; |
|
|
|
import com.fr.design.mainframe.DesignerUIModeConfig; |
|
|
|
import com.fr.design.mainframe.DesignerUIModeConfig; |
|
|
|
import com.fr.design.mainframe.ElementCasePane; |
|
|
|
import com.fr.design.mainframe.ElementCasePane; |
|
|
|
|
|
|
|
import com.fr.design.mainframe.JDashboard; |
|
|
|
|
|
|
|
import com.fr.design.mainframe.JForm; |
|
|
|
import com.fr.design.mainframe.JFormSliderPane; |
|
|
|
import com.fr.design.mainframe.JFormSliderPane; |
|
|
|
import com.fr.design.mainframe.ReportComponent; |
|
|
|
import com.fr.design.mainframe.JTemplate; |
|
|
|
import com.fr.design.mainframe.ReportComponentCompositeMouseWheelHandler; |
|
|
|
import com.fr.design.mainframe.JTemplateProvider; |
|
|
|
import com.fr.design.mainframe.toolbar.ToolBarMenuDockPlus; |
|
|
|
import com.fr.design.mainframe.toolbar.ToolBarMenuDockPlus; |
|
|
|
import com.fr.form.FormElementCaseContainerProvider; |
|
|
|
import com.fr.form.FormElementCaseContainerProvider; |
|
|
|
import com.fr.form.FormElementCaseProvider; |
|
|
|
import com.fr.form.FormElementCaseProvider; |
|
|
@ -24,11 +25,11 @@ import com.fr.report.worksheet.FormElementCase; |
|
|
|
import com.fr.stable.AssistUtils; |
|
|
|
import com.fr.stable.AssistUtils; |
|
|
|
import com.fr.stable.Constants; |
|
|
|
import com.fr.stable.Constants; |
|
|
|
|
|
|
|
|
|
|
|
import javax.swing.*; |
|
|
|
import javax.swing.JComponent; |
|
|
|
|
|
|
|
import javax.swing.JPanel; |
|
|
|
import javax.swing.event.ChangeEvent; |
|
|
|
import javax.swing.event.ChangeEvent; |
|
|
|
import javax.swing.event.ChangeListener; |
|
|
|
import javax.swing.event.ChangeListener; |
|
|
|
import java.awt.*; |
|
|
|
import java.awt.BorderLayout; |
|
|
|
import java.awt.event.*; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* 整个FormElementCase编辑区域 包括滚动条、中间的grid或者聚合块、下面的sheetTab |
|
|
|
* 整个FormElementCase编辑区域 包括滚动条、中间的grid或者聚合块、下面的sheetTab |
|
|
@ -40,19 +41,19 @@ public class FormReportComponentComposite extends JComponent implements TargetMo |
|
|
|
private static final int MIN = 10; |
|
|
|
private static final int MIN = 10; |
|
|
|
private static final int DIR = 10; |
|
|
|
private static final int DIR = 10; |
|
|
|
private static final double MIN_TIME = 0.4; |
|
|
|
private static final double MIN_TIME = 0.4; |
|
|
|
public FormElementCaseDesigner elementCaseDesigner; |
|
|
|
public final FormElementCaseDesigner elementCaseDesigner; |
|
|
|
private BaseJForm jForm; |
|
|
|
private final JTemplateProvider jTemplate; |
|
|
|
|
|
|
|
|
|
|
|
private FormTabPane sheetNameTab; |
|
|
|
private final FormTabPane sheetNameTab; |
|
|
|
private JPanel hbarContainer; |
|
|
|
private JPanel hbarContainer; |
|
|
|
private JFormSliderPane jSliderContainer; |
|
|
|
private JFormSliderPane jSliderContainer; |
|
|
|
|
|
|
|
|
|
|
|
public FormReportComponentComposite(BaseJForm jform, FormElementCaseDesigner elementCaseDesign, FormElementCaseContainerProvider ecContainer) { |
|
|
|
public FormReportComponentComposite(JTemplateProvider jTemplate, JDashboard jDashboard, FormElementCaseDesigner<?,?,?> elementCaseDesign, String ecContainerName) { |
|
|
|
this.jForm = jform; |
|
|
|
this.jTemplate = jTemplate; |
|
|
|
this.setLayout(FRGUIPaneFactory.createBorderLayout()); |
|
|
|
this.setLayout(FRGUIPaneFactory.createBorderLayout()); |
|
|
|
this.elementCaseDesigner = elementCaseDesign; |
|
|
|
this.elementCaseDesigner = elementCaseDesign; |
|
|
|
this.add(elementCaseDesigner, BorderLayout.CENTER); |
|
|
|
this.add(elementCaseDesigner, BorderLayout.CENTER); |
|
|
|
sheetNameTab = new FormTabPane(ecContainer, jform); |
|
|
|
sheetNameTab = new FormTabPane(ecContainerName, jDashboard); |
|
|
|
this.add(createSouthControlPane(), BorderLayout.SOUTH); |
|
|
|
this.add(createSouthControlPane(), BorderLayout.SOUTH); |
|
|
|
jSliderContainer.addValueChangeListener(showValSpinnerChangeListener); |
|
|
|
jSliderContainer.addValueChangeListener(showValSpinnerChangeListener); |
|
|
|
this.elementCaseDesigner.elementCasePane.getGrid().addMouseWheelListener(new FormReportComponentCompositeMouseWheelHandler(this)); |
|
|
|
this.elementCaseDesigner.elementCasePane.getGrid().addMouseWheelListener(new FormReportComponentCompositeMouseWheelHandler(this)); |
|
|
@ -60,6 +61,10 @@ public class FormReportComponentComposite extends JComponent implements TargetMo |
|
|
|
this.jSliderContainer.setShowValue((ScreenResolution.getScreenResolution() * HUND) / Constants.DEFAULT_WEBWRITE_AND_SCREEN_RESOLUTION); |
|
|
|
this.jSliderContainer.setShowValue((ScreenResolution.getScreenResolution() * HUND) / Constants.DEFAULT_WEBWRITE_AND_SCREEN_RESOLUTION); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public FormReportComponentComposite(BaseJForm jform, FormElementCaseDesigner elementCaseDesign, FormElementCaseContainerProvider ecContainer) { |
|
|
|
|
|
|
|
this(jform, jform, elementCaseDesign, ecContainer.getElementCaseContainerName()); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
ChangeListener showValSpinnerChangeListener = new ChangeListener() { |
|
|
|
ChangeListener showValSpinnerChangeListener = new ChangeListener() { |
|
|
|
@Override |
|
|
|
@Override |
|
|
|
public void stateChanged(ChangeEvent e) { |
|
|
|
public void stateChanged(ChangeEvent e) { |
|
|
@ -167,7 +172,7 @@ public class FormReportComponentComposite extends JComponent implements TargetMo |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public void setComposite() { |
|
|
|
public void setComposite() { |
|
|
|
DesignerContext.getDesignerFrame().resetToolkitByPlus((ToolBarMenuDockPlus) jForm); |
|
|
|
DesignerContext.getDesignerFrame().resetToolkitByPlus((ToolBarMenuDockPlus) jTemplate); |
|
|
|
this.validate(); |
|
|
|
this.validate(); |
|
|
|
this.repaint(40); |
|
|
|
this.repaint(40); |
|
|
|
} |
|
|
|
} |
|
|
@ -182,7 +187,7 @@ public class FormReportComponentComposite extends JComponent implements TargetMo |
|
|
|
* 模板更新 |
|
|
|
* 模板更新 |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
public void fireTargetModified() { |
|
|
|
public void fireTargetModified() { |
|
|
|
jForm.fireTargetModified(); |
|
|
|
jTemplate.fireTargetModified(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public JFormSliderPane getSliderContainer() { |
|
|
|
public JFormSliderPane getSliderContainer() { |
|
|
|