@ -4,7 +4,10 @@ import com.fr.design.designer.creator.XCreator;
import com.fr.design.designer.creator.XLayoutContainer ;
import com.fr.design.designer.creator.XLayoutContainer ;
import com.fr.design.designer.creator.cardlayout.XWCardTagLayout ;
import com.fr.design.designer.creator.cardlayout.XWCardTagLayout ;
import com.fr.design.dialog.FineJOptionPane ;
import com.fr.design.dialog.FineJOptionPane ;
import com.fr.design.file.HistoryTemplateListPane ;
import com.fr.design.form.layout.FRBorderLayout ;
import com.fr.design.form.layout.FRBorderLayout ;
import com.fr.design.mainframe.JTemplate ;
import com.fr.design.ui.util.UIUtil ;
import com.fr.general.ComparatorUtils ;
import com.fr.general.ComparatorUtils ;
import java.awt.BorderLayout ;
import java.awt.BorderLayout ;
@ -61,7 +64,22 @@ public class FRCardMainBorderLayoutAdapter extends FRBorderLayoutAdapter {
private boolean isBeyondMinConstraint ( int minConstraint , int value ) {
private boolean isBeyondMinConstraint ( int minConstraint , int value ) {
if ( minConstraint > value ) {
if ( minConstraint > value ) {
FineJOptionPane . showMessageDialog ( null , com . fr . design . i18n . Toolkit . i18nText ( "Fine-Design_Form_Beyond_Tablayout_Bounds" ) ) ;
FineJOptionPane . showMessageDialog ( null , com . fr . design . i18n . Toolkit . i18nText ( "Fine-Design_Form_Beyond_Tablayout_Bounds" ) ) ;
if ( container . getBackupBound ( ) ! = null ) {
// 手动拖动导致变矮的场景
container . setSize ( container . getBackupBound ( ) . getSize ( ) ) ;
container . setSize ( container . getBackupBound ( ) . getSize ( ) ) ;
} else {
// 自适应布局平分高度导致变矮的场景
UIUtil . invokeLaterIfNeeded ( new Runnable ( ) {
@Override
public void run ( ) {
JTemplate < ? , ? > jt = HistoryTemplateListPane . getInstance ( ) . getCurrentEditingTemplate ( ) ;
if ( jt ! = null ) {
jt . undo ( ) ;
}
}
} ) ;
}
return true ;
return true ;
} else {
} else {
return false ;
return false ;