@ -6,8 +6,6 @@ import com.fr.base.Parameter;
import com.fr.base.Releasable ;
import com.fr.base.Releasable ;
import com.fr.base.extension.FileExtension ;
import com.fr.base.extension.FileExtension ;
import com.fr.base.iofile.attr.ExtendSharableAttrMark ;
import com.fr.base.iofile.attr.ExtendSharableAttrMark ;
import com.fr.base.theme.FineColorGather ;
import com.fr.base.theme.FineColorManager ;
import com.fr.base.theme.FineColorSynchronizer ;
import com.fr.base.theme.FineColorSynchronizer ;
import com.fr.base.theme.FormTheme ;
import com.fr.base.theme.FormTheme ;
import com.fr.base.theme.TemplateTheme ;
import com.fr.base.theme.TemplateTheme ;
@ -17,8 +15,8 @@ import com.fr.base.vcs.DesignerMode;
import com.fr.design.DesignModelAdapter ;
import com.fr.design.DesignModelAdapter ;
import com.fr.design.DesignState ;
import com.fr.design.DesignState ;
import com.fr.design.DesignerEnvManager ;
import com.fr.design.DesignerEnvManager ;
import com.fr.design.actions.FormMobileAttrAction ;
import com.fr.design.actions.FormECParallelCalAction ;
import com.fr.design.actions.FormECParallelCalAction ;
import com.fr.design.actions.FormMobileAttrAction ;
import com.fr.design.actions.TemplateParameterAction ;
import com.fr.design.actions.TemplateParameterAction ;
import com.fr.design.actions.core.WorkBookSupportable ;
import com.fr.design.actions.core.WorkBookSupportable ;
import com.fr.design.actions.file.export.EmbeddedFormExportExportAction ;
import com.fr.design.actions.file.export.EmbeddedFormExportExportAction ;
@ -56,8 +54,8 @@ import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.mainframe.form.FormECCompositeProvider ;
import com.fr.design.mainframe.form.FormECCompositeProvider ;
import com.fr.design.mainframe.form.FormECDesignerProvider ;
import com.fr.design.mainframe.form.FormECDesignerProvider ;
import com.fr.design.mainframe.reuse.ComponentReuseNotificationInfo ;
import com.fr.design.mainframe.reuse.ComponentReuseNotificationInfo ;
import com.fr.design.mainframe.share.collect.ComponentCollector ;
import com.fr.design.mainframe.share.ComponentShareUtil ;
import com.fr.design.mainframe.share.ComponentShareUtil ;
import com.fr.design.mainframe.share.collect.ComponentCollector ;
import com.fr.design.mainframe.template.info.JFormProcessInfo ;
import com.fr.design.mainframe.template.info.JFormProcessInfo ;
import com.fr.design.mainframe.template.info.TemplateProcessInfo ;
import com.fr.design.mainframe.template.info.TemplateProcessInfo ;
import com.fr.design.mainframe.theme.dialog.TemplateThemeUsingDialog ;
import com.fr.design.mainframe.theme.dialog.TemplateThemeUsingDialog ;
@ -71,7 +69,6 @@ import com.fr.design.parameter.ParameterPropertyPane;
import com.fr.design.preview.FormPreview ;
import com.fr.design.preview.FormPreview ;
import com.fr.design.preview.MobilePreview ;
import com.fr.design.preview.MobilePreview ;
import com.fr.design.roleAuthority.RolesAlreadyEditedPane ;
import com.fr.design.roleAuthority.RolesAlreadyEditedPane ;
import com.fr.design.ui.util.UIUtil ;
import com.fr.design.utils.gui.LayoutUtils ;
import com.fr.design.utils.gui.LayoutUtils ;
import com.fr.file.FILE ;
import com.fr.file.FILE ;
import com.fr.file.FILEChooserPane ;
import com.fr.file.FILEChooserPane ;
@ -110,7 +107,14 @@ import javax.swing.JComponent;
import javax.swing.JPanel ;
import javax.swing.JPanel ;
import javax.swing.SwingConstants ;
import javax.swing.SwingConstants ;
import javax.swing.tree.TreePath ;
import javax.swing.tree.TreePath ;
import java.awt.* ;
import java.awt.BorderLayout ;
import java.awt.CardLayout ;
import java.awt.Color ;
import java.awt.Component ;
import java.awt.Dimension ;
import java.awt.Font ;
import java.awt.Insets ;
import java.awt.Rectangle ;
import java.awt.event.ActionEvent ;
import java.awt.event.ActionEvent ;
import java.awt.event.ActionListener ;
import java.awt.event.ActionListener ;
import java.awt.image.BufferedImage ;
import java.awt.image.BufferedImage ;
@ -1266,46 +1270,48 @@ public class JForm extends JTemplate<Form, FormUndoState> implements BaseJForm<F
private void refreshTarget ( Form form ) {
private void refreshTarget ( Form form ) {
setTarget ( form ) ;
setTarget ( form ) ;
if ( HistoryTemplateListCache . getInstance ( ) . getCurrentEditingTemplate ( ) = = this ) {
if ( HistoryTemplateListCache . getInstance ( ) . getCurrentEditingTemplate ( ) ! = this ) {
if ( this . index = = FORM_TAB ) {
return ;
// save state
}
FormArea formArea = formDesign . getArea ( ) ;
// save state
int horizontalValue = formArea . getHorizontalValue ( ) ;
FormArea formArea = formDesign . getArea ( ) ;
int verticalValue = formArea . getVerticalValue ( ) ;
int horizontalValue = formArea . getHorizontalValue ( ) ;
Dimension areaSize = formArea . getAreaSize ( ) ;
int verticalValue = formArea . getVerticalValue ( ) ;
double widthValue = formArea . getWidthPaneValue ( ) ;
Dimension areaSize = formArea . getAreaSize ( ) ;
double heightValue = formArea . getHeightPaneValue ( ) ;
double widthValue = formArea . getWidthPaneValue ( ) ;
double slideValue = formArea . getSlideValue ( ) ;
double heightValue = formArea . getHeightPaneValue ( ) ;
Widget [ ] selectedWidgets = formArea . getFormEditor ( ) . getSelectionModel ( ) . getSelection ( ) . getSelectedWidgets ( ) ;
double slideValue = formArea . getSlideValue ( ) ;
Widget [ ] selectedWidgets = formArea . getFormEditor ( ) . getSelectionModel ( ) . getSelection ( ) . getSelectedWidgets ( ) ;
// refresh ui
JForm . this . refreshRoot ( ) ;
// refresh ui
JForm . this . refreshRoot ( ) ;
// restore state
formDesign . getArea ( ) . setAreaSize ( areaSize , horizontalValue , verticalValue , widthValue , heightValue , slideValue ) ;
// restore state
formDesign . getArea ( ) . undoFixLayoutState ( formArea . isFixLayout ( ) ) ;
formDesign . getArea ( ) . setAreaSize ( areaSize , horizontalValue , verticalValue , widthValue , heightValue , slideValue ) ;
this . formDesign . getSelectionModel ( ) . setSelectedCreators ( FormSelectionUtils . rebuildSelection ( formDesign . getRootComponent ( ) ,
formDesign . getArea ( ) . undoFixLayoutState ( formArea . isFixLayout ( ) ) ;
formDesign . getRootComponent ( ) = = selectedBodyLayout ( ) ? selectedWidgets : new Widget [ ] { selectedBodyLayout ( ) . toData ( ) } ) ) ;
this . formDesign . getSelectionModel ( ) . setSelectedCreators ( FormSelectionUtils . rebuildSelection ( formDesign . getRootComponent ( ) ,
formDesign . getRootComponent ( ) = = selectedBodyLayout ( ) ? selectedWidgets : new Widget [ ] { selectedBodyLayout ( ) . toData ( ) } ) ) ;
refreshToolArea ( ) ;
refreshToolArea ( ) ;
// 停止编辑 恢复浮层展示
// 停止编辑 恢复浮层展示
TreePath [ ] treePaths = FormHierarchyTreePane . getInstance ( formDesign ) . getComponentTree ( ) . getSelectedTreePath ( ) ;
TreePath [ ] treePaths = FormHierarchyTreePane . getInstance ( formDesign ) . getComponentTree ( ) . getSelectedTreePath ( ) ;
if ( treePaths ! = null ) {
if ( treePaths ! = null ) {
for ( TreePath path : treePaths ) {
for ( TreePath path : treePaths ) {
if ( path ! = null ) {
if ( path ! = null ) {
formDesign . stopEditing ( path ) ;
formDesign . stopEditing ( path ) ;
}
}
}
}
} else {
String widgetName = this . formDesign . getElementCaseContainerName ( ) ;
FormElementCaseProvider dataTable = form . getElementCaseByName ( widgetName ) ;
this . reportComposite . setSelectedWidget ( dataTable ) ;
formDesign . setElementCase ( dataTable ) ;
}
}
TableDataTreePane . getInstance ( DesignModelAdapter . getCurrentModelAdapter ( ) ) . refreshDockingView ( ) ;
}
}
if ( this . index ! = FORM_TAB ) {
String widgetName = this . formDesign . getElementCaseContainerName ( ) ;
FormElementCaseProvider dataTable = form . getElementCaseByName ( widgetName ) ;
this . reportComposite . setSelectedWidget ( dataTable ) ;
formDesign . setElementCase ( dataTable ) ;
}
TableDataTreePane . getInstance ( DesignModelAdapter . getCurrentModelAdapter ( ) ) . refreshDockingView ( ) ;
}
}
@Override
@Override