Class FixedTransformComponentPainter
java.lang.Object
net.infonode.gui.componentpainter.AbstractComponentPainter
net.infonode.gui.componentpainter.AbstractComponentPainterWrapper
net.infonode.gui.componentpainter.FixedTransformComponentPainter
- All Implemented Interfaces:
Serializable,ComponentPainter
A painter that paints its wrapped painter using the same fixed values for direction, horizontal flip and
vertical flip.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionFixedTransformComponentPainter(ComponentPainter painter, Direction direction) FixedTransformComponentPainter(ComponentPainter painter, Direction direction, boolean horizontalFlip, boolean verticalFlip) -
Method Summary
Modifier and TypeMethodDescriptionvoidPaints an area of a component.voidpaint(Component component, Graphics g, int x, int y, int width, int height, Direction direction, boolean horizontalFlip, boolean verticalFlip) Paints an area in a specific direction and optinally flipped horizontally and/or vertically.Methods inherited from class net.infonode.gui.componentpainter.AbstractComponentPainterWrapper
getColor, getPainter, isOpaque
-
Constructor Details
-
FixedTransformComponentPainter
-
FixedTransformComponentPainter
-
FixedTransformComponentPainter
public FixedTransformComponentPainter(ComponentPainter painter, Direction direction, boolean horizontalFlip, boolean verticalFlip)
-
-
Method Details
-
paint
Description copied from interface:ComponentPainterPaints an area of a component. The area should be painted the same way as for direction Direction.RIGHT without any flipping.- Specified by:
paintin interfaceComponentPainter- Overrides:
paintin classAbstractComponentPainter- Parameters:
component- the component to paint ong- the graphics to paint onx- the x-coordinatey- the y-coordinatewidth- the widthheight- the height
-
paint
public void paint(Component component, Graphics g, int x, int y, int width, int height, Direction direction, boolean horizontalFlip, boolean verticalFlip) Description copied from interface:ComponentPainterPaints an area in a specific direction and optinally flipped horizontally and/or vertically. The flips are performed before the rotation is applied.- Specified by:
paintin interfaceComponentPainter- Overrides:
paintin classAbstractComponentPainterWrapper- Parameters:
component- the component to paint ong- the graphics to paint onx- the x-coordinatey- the y-coordinatewidth- the widthheight- the heightdirection- the direction, Direction.RIGHT is the normal directionhorizontalFlip- flip the painted graphics horizontallyverticalFlip- flip the painted graphics vertically
-