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