Optimize the codes of PositionCheckBoxView.