private void setDrawBounds() {
		//The drawing area must be square if we're concerned about having actual branch lengths that are proportional
		//to the branch lengths specified by the tree. This is only a concern for non-SquareTrees, so if the tree
		//is an EqualAngleTree adjust the padding appropriately
		if (tree instanceof EqualAngleTree) {
			topPadding = 0;
			bottomPadding = 0;		
			leftPadding = 0;
			rightPadding = 0;
			labelSpace = 0;
			
			int drawWidth = getWidth();
			int drawHeight = getHeight();

			if ( drawWidth > drawHeight ) {

				int dif = drawWidth-drawHeight;
				leftPadding += dif/2;
				rightPadding += dif/2;
			}
			else {
				int dif = drawHeight-drawWidth;
				topPadding +=  dif/2;
				bottomPadding += dif/2;
			}
			//System.out.println("Width: " + getDrawingWidth() + " Height: " + getDrawingHeight());
			//int y = translateTreeToPixelY(0);
			//System.out.println("SetDrawBounds: toppadding : " + topPadding + " leftPadding : " + leftPadding);
			//System.out.println("Drawable width : " + (getWidth()-leftPadding-rightPadding) + " draw height : " + (getHeight()-topPadding-bottomPadding));
		}
		else {
			
			if (tree.getOrientation()==Direction.UP || tree.getOrientation()==Direction.DOWN) {
				leftPadding = 60; //Leave some space for the scale axis
			}
			else
				leftPadding = 20;
			
			//LeaveBottomSpace is used by TreeFigure, which draws its own scale bar and axis, and 
			//therefore requires this thing to leave a bit of extra space at the bottom
			if (drawScaleAxis || drawScaleBar || leaveBottomSpace)
				bottomPadding = 40;
			else
				bottomPadding = 20;
			topPadding = 15;
			rightPadding = 15;
			
			if (tree instanceof SquareTree) {
				((SquareTree)tree).rescale();
			}

		}
		
		scaleBarCalculated = false;
		
	}