@ -18,7 +18,9 @@ import com.fr.design.designer.creator.XCreatorUtils;
import com.fr.design.designer.creator.XEditorHolder ;
import com.fr.design.designer.creator.XEditorHolder ;
import com.fr.design.designer.creator.XElementCase ;
import com.fr.design.designer.creator.XElementCase ;
import com.fr.design.designer.creator.XLayoutContainer ;
import com.fr.design.designer.creator.XLayoutContainer ;
import com.fr.design.designer.creator.XWAbsoluteLayout ;
import com.fr.design.designer.creator.XWFitLayout ;
import com.fr.design.designer.creator.XWFitLayout ;
import com.fr.design.designer.creator.XWTitleLayout ;
import com.fr.design.designer.creator.cardlayout.XCardAddButton ;
import com.fr.design.designer.creator.cardlayout.XCardAddButton ;
import com.fr.design.designer.creator.cardlayout.XCardSwitchButton ;
import com.fr.design.designer.creator.cardlayout.XCardSwitchButton ;
import com.fr.design.designer.creator.cardlayout.XWCardLayout ;
import com.fr.design.designer.creator.cardlayout.XWCardLayout ;
@ -383,6 +385,14 @@ public class EditingMouseListener extends MouseInputAdapter {
}
}
private boolean isEditButton ( MouseEvent e , XCreator component , Insets insets ) {
private boolean isEditButton ( MouseEvent e , XCreator component , Insets insets ) {
// 不显示编辑按钮 鼠标格式
if ( component . getParent ( ) instanceof XCreator ) {
XCreator parent = ( XCreator ) component . getParent ( ) ;
if ( parent . acceptType ( XWTitleLayout . class ) | | component . acceptType ( XWCardMainBorderLayout . class , XWAbsoluteLayout . class ) ) {
return false ;
}
}
int innerWidth = component . getWidth ( ) - insets . left - insets . right ;
int innerWidth = component . getWidth ( ) - insets . left - insets . right ;
int innerHeight = component . getHeight ( ) - insets . top - insets . bottom ;
int innerHeight = component . getHeight ( ) - insets . top - insets . bottom ;
@ -458,10 +468,7 @@ public class EditingMouseListener extends MouseInputAdapter {
if ( designer . getCursor ( ) . getType ( ) = = Cursor . HAND_CURSOR ) {
if ( designer . getCursor ( ) . getType ( ) = = Cursor . HAND_CURSOR ) {
designer . setCursor ( Cursor . getPredefinedCursor ( Cursor . DEFAULT_CURSOR ) ) ;
designer . setCursor ( Cursor . getPredefinedCursor ( Cursor . DEFAULT_CURSOR ) ) ;
}
}
if ( isShareConfigButton ( e , component , insets ) ) {
if ( isEditButton ( e , component , insets ) ) {
designer . setCursor ( Cursor . getPredefinedCursor ( Cursor . HAND_CURSOR ) ) ;
component . setHelpBtnOnFocus ( true ) ;
} else if ( isEditButton ( e , component , insets ) ) {
designer . setCursor ( Cursor . getPredefinedCursor ( Cursor . HAND_CURSOR ) ) ;
designer . setCursor ( Cursor . getPredefinedCursor ( Cursor . HAND_CURSOR ) ) ;
}
}
}
}