@Override
	protected void setTextPosition(Graphics2D g2d) {
	    /**
	     * Get the font metrics and the bounding rectangle for the component's text
	     * for use calculating the text position.
	     */
		FontMetrics fm = g2d.getFontMetrics();
		fm.stringWidth(componentText);		
		Rectangle2D r = fm.getStringBounds(componentText, g2d);
				
	    /**
	     * Mask the LCARS style with <code>ES_SHAPE</code> to extract the corner shape.
	     */
	    int shape = LCARS.getShape(style);
	    
		switch(shape) {
		case LCARS.ES_SHAPE_NE: 
		case LCARS.ES_SHAPE_NW: 
			textY = (int)(scaledArea.getBounds().height - textInsetY*scaleFactor);
			break;
		case LCARS.ES_SHAPE_SE: 
		case LCARS.ES_SHAPE_SW: 
			textY = (int)(scaledArea.getBounds().y + r.getHeight());
			break;
		default:
			break;

		}
		
		switch(shape) {
		case LCARS.ES_SHAPE_NE: 
		case LCARS.ES_SHAPE_SE: 
			textX = (int)(scaledArea.getBounds().width - barV*scaleFactor + textInsetX*scaleFactor);
			break;
		case LCARS.ES_SHAPE_NW: 
		case LCARS.ES_SHAPE_SW: 
			textX = (int)(barV*scaleFactor - r.getWidth() - textInsetX*scaleFactor);
			break;
		default:
			break;

		}
	}