question: protected void cutSelectedBean ( ) { if ( Debug . debugging ( "beanbox" ) ) Debug . output ( "Enter> cutSelectedBean" ) ; if ( selectedBean == null || selectedBeanLocation == null ) { if ( Debug . debugging ( "beanbox" ) ) Debug . output ( "selectedBean=" + selectedBean ) ; if ( Debug . debugging ( "beanbox" ) ) Debug . output ( "selectedBeanLocation=" + selectedBeanLocation ) ; clearSelection ( ) ; return ; } try { serBean = new ByteArrayOutputStream ( ) ; ObjectOutputStream oos = new ObjectOutputStream ( serBean ) ; oos . writeObject ( selectedBean ) ; } catch ( Exception e ) { e . printStackTrace ( ) ; clearSelection ( ) ; if ( Debug . debugging ( "beanbox" ) ) Debug . output ( "Exit> copySelectedBean" ) ; return ; } cutBean = selectedBean ; selectedBeanBox . showCut ( selectedBean ) ; if ( Debug . debugging ( "beanbox" ) ) Debug . output ( "Exit> cutSelectedBean" ) ; }
target:  This method is called when the user chooses to cut a bean by some means such by by pressing Ctrl-X. This method tries to serialize the selected bean. If no bean is selected or the bean is not serializable, this method is a no-op.