@ -137,43 +137,22 @@ public class FormSpacingLineDrawer {
GraphDrawHelper . drawString ( g2d , text , labelX , labelY ) ;
}
private boolean isSelectedParaComponent ( ) {
return designer . getParaComponent ( ) = = selectedCreator ;
}
private boolean isSelectedRootComponent ( ) {
return designer . isRoot ( selectedCreator ) ;
}
private boolean isSelectedForm ( ) {
return selectedCreator . getParent ( ) = = null ;
}
private boolean isNeedExtendedLine ( AbstractFormParallelLine [ ] nearestSides ) {
return nearestSides [ 0 ] . isVerticalCenterLineBeforeTheParallelLine ( nearestSides [ 1 ] ) | | nearestSides [ 0 ] . isVerticalCenterLineBehindTheParallelLine ( nearestSides [ 1 ] ) ;
}
private boolean isSelectedRootPane ( ) {
// form、body、para这三个选中了,都不要画任何间距线
return isSelectedForm ( ) | | isSelectedRootComponent ( ) | | isSelectedParaComponent ( ) ;
}
// 当前组件是否在参数面板里面
private boolean isCompInBody ( XCreator creator ) {
private boolean isComponentInBody ( XCreator creator ) {
XLayoutContainer container = XCreatorUtils . getHotspotContainer ( creator ) ;
return container ! = null & & ! container . acceptType ( XWParameterLayout . class ) ;
}
private boolean isSelectedCompInBody ( ) {
return isCompInBody ( selectedCreator ) ;
}
private boolean isHoveredCompInBody ( ) {
return isCompInBody ( hoverCreator ) ;
private boolean isSelectedComponentInBody ( ) {
return isComponentInBody ( selectedCreator ) ;
}
private boolean isCompInBody ( ) {
return isSelected CompInBody ( ) & & isHoveredCompInBody ( ) ;
private boolean isHoveredComponentInBody ( ) {
return isComponentInBody ( hoverCreator ) ;
}
private boolean isBodyAbsoluteLayout ( ) {
@ -185,7 +164,7 @@ public class FormSpacingLineDrawer {
}
private boolean isDrawSpacingLine ( ) {
return isInAbsoluteLayout ( ) & & ! isSelectedRootPane ( ) & & isCompInBody ( ) ;
return isInAbsoluteLayout ( ) & & isSelectedComponentInBody ( ) & & isHovered Component InBody ( ) ;
}
private AbstractFormParallelLine [ ] getNearestHorizontalSide ( ) {