glass.eclipse.theme.utils
Class COutlineHelper

java.lang.Object
  extended by glass.eclipse.theme.utils.COutlineHelper

public class COutlineHelper
extends Object

COutlineHelper.java Creates the basic shapes for the tab painter. Thomas Hilbert 02.03.2010


Field Summary
static AffineTransform atRot90SclX
           
static AffineTransform tRot90CCW
           
static AffineTransform tRot90CW
           
static AffineTransform tSclY
           
 
Constructor Summary
COutlineHelper()
           
 
Method Summary
static Shape CreateSelectedTabShape(int cornerRadius, int w, int h, boolean firstTab)
          Creates the selected tab shape with round edge at left and curve at right side.
static Shape CreateUnselectedTabShape(int cornerRadius, int w, int h, boolean firstTab, boolean forClip, boolean beforeSelected)
          Creates the shape of an unselected tab for clipping and for border painting.
static Shape Modify4BottomSide(Shape src)
          Modifies the shape for bottom side.
static Shape Modify4LeftSide(Shape src)
          Modifies the shape for left side.
static Shape Modify4RightSide(Shape src)
          Modifies the shape for right side.
static Shape TranslateShapeTo(int x, int y, Shape s)
          Translates the specified shape.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

tRot90CW

public static AffineTransform tRot90CW

tRot90CCW

public static AffineTransform tRot90CCW

atRot90SclX

public static AffineTransform atRot90SclX

tSclY

public static AffineTransform tSclY
Constructor Detail

COutlineHelper

public COutlineHelper()
Method Detail

CreateSelectedTabShape

public static Shape CreateSelectedTabShape(int cornerRadius,
                                           int w,
                                           int h,
                                           boolean firstTab)
Creates the selected tab shape with round edge at left and curve at right side. _____________________________ / -_ | \_ | -_ | -_ | --__

Parameters:
cornerRadius -
w -
h -
firstTab - Shape without the left edge and rounded corner (if true)
Returns:

CreateUnselectedTabShape

public static Shape CreateUnselectedTabShape(int cornerRadius,
                                             int w,
                                             int h,
                                             boolean firstTab,
                                             boolean forClip,
                                             boolean beforeSelected)
Creates the shape of an unselected tab for clipping and for border painting. If the tab is left of the selected, it will have a rounded edge left. Otherwise right. If the shape is not for clipping, only the needed border path is created. before selected: _________________________________________ / | | | | | after selected: _________________________________________ \ | | | | |

Parameters:
w -
h -
firstTab -
forClip -
beforeSelected -
Returns:

TranslateShapeTo

public static Shape TranslateShapeTo(int x,
                                     int y,
                                     Shape s)
Translates the specified shape.

Parameters:
x - Distance on x-axis to translate.
y - Distance on y-axis to translate.
s -
Returns:

Modify4LeftSide

public static Shape Modify4LeftSide(Shape src)
Modifies the shape for left side.

Parameters:
src - The top side shape.
Returns:

Modify4RightSide

public static Shape Modify4RightSide(Shape src)
Modifies the shape for right side.

Parameters:
src - The top side shape.
Returns:

Modify4BottomSide

public static Shape Modify4BottomSide(Shape src)
Modifies the shape for bottom side.

Parameters:
src - The top side shape.
Returns: