JgoRectange - Resize Handles

Currently I have am using JgoRectangle and I want to only allow the user to expand the rectangle left and right. So I need to make it so that only the Left and the Right resize handles appear. I am overriding the gainedselection method in my subclass and I have been able to remove all the resize handles by using JGoSelection.deleteHandles(JGoObject). I am trying to use JGoSelection.addHandle() to only add the left and right resize handles but I’ve been unable to get it to work. Does anyone have an idea of how I can solve this problem.

protected void gainedSelection(JGoSelection selection) {
if (!isResizable()) {
Rectangle rect = getBoundingRect();
int y2 = rect.y + (rect.height/2);
selection.createResizeHandle(this, rect.x, y2, LeftCenter, true);
selection.createResizeHandle(this, rect.x+rect.width, y2, RightCenter, true);

Thanks, it worked great.