ilog.views.util.java2d
Class IlvPattern

java.lang.Object
  extended by java.awt.TexturePaint
      extended by ilog.views.util.java2d.IlvPattern
All Implemented Interfaces:
Paint, Transparency
Direct Known Subclasses:
IlvPattern

public class IlvPattern
extends TexturePaint

A pattern is a predefined texture used to fill a shape.
An IlvPattern is a subclass of java.awt.TexturePaint. Available patterns are:

Since:
JViews 5.5
See Also:
IlvTexture

Field Summary
static int ALTERNATE_DIAGONAL
          Alternated diagonals
static int ALTERNATE_DOTS
          Alternate dots pattern
static int ARCHES
          Arches pattern
static int AZTEC
          Aztec style
protected  Color background
          This field is for internal use only.
static int BALLS
          Balls pattern
static int BRICKS_DIAGONAL
          Diagonal bricks
static int BRICKS_HORIZONTAL
          Horizontal bricks
static int BRICKS_VERTICAL
          Vertical bricks
static int CIRCLE_DOT
          Circle and dotes pattern
static int COBBLE_DIAGONAL
          Diagonal brick cobble
static int DARK_HORIZONTAL
          Thick horizontal pattern
static int DARK_SAND
          Dark sand pattern
static int DARK_VERTICAL
          Thick vertical pattern
static int DIAGONAL_GRID
          A 45 degrees rotated grid
static int DIAGONAL_TILES
          Diagonal roof tiles
static int DOT_QUILT
          Dot quilt pattern
static int DOWN_BLACK_DIAGONAL
          Black downward diagonal
static int DOWN_DARK_DIAGONAL
          Dark downward diagonal pattern
static int DOWN_DASHED_DIAGONAL
          Dashed downward diagonal pattern
static int DOWN_DIAGONAL
          Downward diagonal pattern
static int DOWN_LIGHT_DIAGONAL
          Light downward diagonal pattern
static int DOWN_THICK_DIAGONAL
          Downward thick diagonal pattern
protected  Color foreground
          This field is for internal use only.
static int GRAY_10
          10% gray pattern
static int GRAY_20
          20% gray pattern
static int GRAY_25
          25% gray pattern
static int GRAY_30
          30% gray pattern
static int GRAY_40
          40% gray pattern
static int GRAY_5
          5% gray pattern
static int GRAY_50
          50% gray pattern
static int GRAY_60
          60% gray pattern
static int GRAY_70
          70% gray pattern
static int GRAY_75
          75% gray pattern
static int GRAY_80
          80% gray pattern
static int GRAY_90
          90% gray pattern
static int HORIZONTAL
          Horizontal pattern
static int HORIZONTAL_DASH
          Dashed horizontal pattern
static int LARGE_DARK_GRID
          Large dark grid
static int LARGE_GRID
          Large grid pattern
static int LAST_USED
          Last used index
static int LIGHT_HORIZONTAL
          Light horizontal pattern
static int LIGHT_LOSANGES
          Light losanges pattern
static int LIGHT_SAND
          Light sand pattern
static int LIGHT_VERTICAL
          Light vertical pattern
static int NARROW_DARK_HORIZONTAL
          Thick narrow horizontal pattern
static int NARROW_DARK_VERTICAL
          Thick narrow vertical pattern
static int NARROW_HORIZONTAL
          Narrow horizontal pattern
static int NARROW_VERTICAL
          Narrow vertical pattern
static int OBLIQUE_TILES
          Oblique 3d tiles
static int SCALES
          Horizontal fish-scale pattern
static int SMALL_CHESSBOARD
          Small chess board
static int SMALL_DARK_GRID
          Small dark grid
static int SMALL_DIAGONAL_GRID
          A small 45 degrees rotated small grid
static int SMALL_GRID
          Small grid pattern
static int SMALL_STIPPLE
          A small grid with points
static int STIPPLE
          A grid with points
static int THATCHES
          Thatches pattern
static int THICK_DIAGONAL_GRID
          A 45 degrees rotated grid with thick lines
static int TINY_GRID
          A tiny grid.
static int TINY_STIPPLE
          A tiny grid with points
protected  int type
          This field is for internal use only.
static int UP_BLACK_DIAGONAL
          Black upward diagonal
static int UP_DARK_DIAGONAL
          Dark upward diagonal pattern
static int UP_DASHED_DIAGONAL
          Dashed upward diagonal pattern
static int UP_DIAGONAL
          Upward diagonal pattern
static int UP_LIGHT_DIAGONAL
          Light upward diagonal pattern
static int UP_THICK_DIAGONAL
          Upward thick diagonal pattern
static int VERTICAL
          Vertical pattern
static int VERTICAL_DASH
          Dashed vertical pattern
static int VSHAPE
          V-Shape pattern
static int WAFFER
          Waffer pattern
static int WAVES
          Waves pattern
 
Fields inherited from interface java.awt.Transparency
BITMASK, OPAQUE, TRANSLUCENT
 
Constructor Summary
protected IlvPattern(BufferedImage img)
          This constructor is for internal use only.
  IlvPattern(int type, Color foreground, Color background)
          Creates a new IlvPattern of the specified type.
 
Method Summary
protected static BufferedImage createImage(int w, int h, Color background)
          This method is for internal use only.
 boolean equals(Object obj)
          Tests the equality of two patterns.
 Color getBackground()
          Returns the background color of the pattern, or null if the background is transparent.
 Color getForeground()
          Returns the foreground color of the pattern.
 int getType()
          Returns the type of the pattern.
protected static BufferedImage makeImage(int type, Color foreground, Color background)
          This method is for internal use only.
 
Methods inherited from class java.awt.TexturePaint
createContext, getAnchorRect, getImage, getTransparency
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

GRAY_5

public static final int GRAY_5
5% gray pattern

See Also:
Constant Field Values

GRAY_10

public static final int GRAY_10
10% gray pattern

See Also:
Constant Field Values

GRAY_20

public static final int GRAY_20
20% gray pattern

See Also:
Constant Field Values

GRAY_25

public static final int GRAY_25
25% gray pattern

See Also:
Constant Field Values

GRAY_30

public static final int GRAY_30
30% gray pattern

See Also:
Constant Field Values

GRAY_40

public static final int GRAY_40
40% gray pattern

See Also:
Constant Field Values

GRAY_50

public static final int GRAY_50
50% gray pattern

See Also:
Constant Field Values

GRAY_60

public static final int GRAY_60
60% gray pattern

See Also:
Constant Field Values

GRAY_70

public static final int GRAY_70
70% gray pattern

See Also:
Constant Field Values

GRAY_75

public static final int GRAY_75
75% gray pattern

See Also:
Constant Field Values

GRAY_80

public static final int GRAY_80
80% gray pattern

See Also:
Constant Field Values

GRAY_90

public static final int GRAY_90
90% gray pattern

See Also:
Constant Field Values

DOWN_LIGHT_DIAGONAL

public static final int DOWN_LIGHT_DIAGONAL
Light downward diagonal pattern

See Also:
Constant Field Values

DOWN_DARK_DIAGONAL

public static final int DOWN_DARK_DIAGONAL
Dark downward diagonal pattern

See Also:
Constant Field Values

UP_LIGHT_DIAGONAL

public static final int UP_LIGHT_DIAGONAL
Light upward diagonal pattern

See Also:
Constant Field Values

UP_DARK_DIAGONAL

public static final int UP_DARK_DIAGONAL
Dark upward diagonal pattern

See Also:
Constant Field Values

LIGHT_VERTICAL

public static final int LIGHT_VERTICAL
Light vertical pattern

See Also:
Constant Field Values

NARROW_VERTICAL

public static final int NARROW_VERTICAL
Narrow vertical pattern

See Also:
Constant Field Values

LIGHT_HORIZONTAL

public static final int LIGHT_HORIZONTAL
Light horizontal pattern

See Also:
Constant Field Values

NARROW_HORIZONTAL

public static final int NARROW_HORIZONTAL
Narrow horizontal pattern

See Also:
Constant Field Values

DOWN_DASHED_DIAGONAL

public static final int DOWN_DASHED_DIAGONAL
Dashed downward diagonal pattern

See Also:
Constant Field Values

UP_DASHED_DIAGONAL

public static final int UP_DASHED_DIAGONAL
Dashed upward diagonal pattern

See Also:
Constant Field Values

HORIZONTAL_DASH

public static final int HORIZONTAL_DASH
Dashed horizontal pattern

See Also:
Constant Field Values

VERTICAL_DASH

public static final int VERTICAL_DASH
Dashed vertical pattern

See Also:
Constant Field Values

SMALL_GRID

public static final int SMALL_GRID
Small grid pattern

See Also:
Constant Field Values

LARGE_GRID

public static final int LARGE_GRID
Large grid pattern

See Also:
Constant Field Values

HORIZONTAL

public static final int HORIZONTAL
Horizontal pattern

See Also:
Constant Field Values

DARK_HORIZONTAL

public static final int DARK_HORIZONTAL
Thick horizontal pattern

See Also:
Constant Field Values

NARROW_DARK_HORIZONTAL

public static final int NARROW_DARK_HORIZONTAL
Thick narrow horizontal pattern

See Also:
Constant Field Values

VERTICAL

public static final int VERTICAL
Vertical pattern

See Also:
Constant Field Values

DARK_VERTICAL

public static final int DARK_VERTICAL
Thick vertical pattern

See Also:
Constant Field Values

NARROW_DARK_VERTICAL

public static final int NARROW_DARK_VERTICAL
Thick narrow vertical pattern

See Also:
Constant Field Values

UP_DIAGONAL

public static final int UP_DIAGONAL
Upward diagonal pattern

See Also:
Constant Field Values

UP_THICK_DIAGONAL

public static final int UP_THICK_DIAGONAL
Upward thick diagonal pattern

See Also:
Constant Field Values

DOWN_DIAGONAL

public static final int DOWN_DIAGONAL
Downward diagonal pattern

See Also:
Constant Field Values

DOWN_THICK_DIAGONAL

public static final int DOWN_THICK_DIAGONAL
Downward thick diagonal pattern

See Also:
Constant Field Values

LARGE_DARK_GRID

public static final int LARGE_DARK_GRID
Large dark grid

See Also:
Constant Field Values

SMALL_DARK_GRID

public static final int SMALL_DARK_GRID
Small dark grid

See Also:
Constant Field Values

ALTERNATE_DOTS

public static final int ALTERNATE_DOTS
Alternate dots pattern

See Also:
Constant Field Values

TINY_GRID

public static final int TINY_GRID
A tiny grid.

See Also:
Constant Field Values

DIAGONAL_GRID

public static final int DIAGONAL_GRID
A 45 degrees rotated grid

See Also:
Constant Field Values

THICK_DIAGONAL_GRID

public static final int THICK_DIAGONAL_GRID
A 45 degrees rotated grid with thick lines

See Also:
Constant Field Values

SMALL_DIAGONAL_GRID

public static final int SMALL_DIAGONAL_GRID
A small 45 degrees rotated small grid

See Also:
Constant Field Values

DOWN_BLACK_DIAGONAL

public static final int DOWN_BLACK_DIAGONAL
Black downward diagonal

See Also:
Constant Field Values

UP_BLACK_DIAGONAL

public static final int UP_BLACK_DIAGONAL
Black upward diagonal

See Also:
Constant Field Values

TINY_STIPPLE

public static final int TINY_STIPPLE
A tiny grid with points

See Also:
Constant Field Values

SMALL_STIPPLE

public static final int SMALL_STIPPLE
A small grid with points

See Also:
Constant Field Values

STIPPLE

public static final int STIPPLE
A grid with points

See Also:
Constant Field Values

WAVES

public static final int WAVES
Waves pattern

See Also:
Constant Field Values

WAFFER

public static final int WAFFER
Waffer pattern

See Also:
Constant Field Values

BRICKS_HORIZONTAL

public static final int BRICKS_HORIZONTAL
Horizontal bricks

See Also:
Constant Field Values

BRICKS_VERTICAL

public static final int BRICKS_VERTICAL
Vertical bricks

See Also:
Constant Field Values

BRICKS_DIAGONAL

public static final int BRICKS_DIAGONAL
Diagonal bricks

See Also:
Constant Field Values

DOT_QUILT

public static final int DOT_QUILT
Dot quilt pattern

See Also:
Constant Field Values

BALLS

public static final int BALLS
Balls pattern

See Also:
Constant Field Values

THATCHES

public static final int THATCHES
Thatches pattern

See Also:
Constant Field Values

LIGHT_LOSANGES

public static final int LIGHT_LOSANGES
Light losanges pattern

See Also:
Constant Field Values

VSHAPE

public static final int VSHAPE
V-Shape pattern

See Also:
Constant Field Values

DARK_SAND

public static final int DARK_SAND
Dark sand pattern

See Also:
Constant Field Values

LIGHT_SAND

public static final int LIGHT_SAND
Light sand pattern

See Also:
Constant Field Values

SCALES

public static final int SCALES
Horizontal fish-scale pattern

See Also:
Constant Field Values

OBLIQUE_TILES

public static final int OBLIQUE_TILES
Oblique 3d tiles

See Also:
Constant Field Values

DIAGONAL_TILES

public static final int DIAGONAL_TILES
Diagonal roof tiles

See Also:
Constant Field Values

AZTEC

public static final int AZTEC
Aztec style

See Also:
Constant Field Values

ALTERNATE_DIAGONAL

public static final int ALTERNATE_DIAGONAL
Alternated diagonals

See Also:
Constant Field Values

CIRCLE_DOT

public static final int CIRCLE_DOT
Circle and dotes pattern

See Also:
Constant Field Values

SMALL_CHESSBOARD

public static final int SMALL_CHESSBOARD
Small chess board

See Also:
Constant Field Values

ARCHES

public static final int ARCHES
Arches pattern

See Also:
Constant Field Values

COBBLE_DIAGONAL

public static final int COBBLE_DIAGONAL
Diagonal brick cobble

See Also:
Constant Field Values

LAST_USED

public static final int LAST_USED
Last used index

See Also:
Constant Field Values

type

protected int type
This field is for internal use only.

Since:
JViews 6.0

foreground

protected Color foreground
This field is for internal use only.

Since:
JViews 6.0

background

protected Color background
This field is for internal use only.

Since:
JViews 6.0
Constructor Detail

IlvPattern

public IlvPattern(int type,
                  Color foreground,
                  Color background)
Creates a new IlvPattern of the specified type.

Parameters:
type - The type of the pattern.
foreground - The foreground color of the pattern.
background - The background color of the pattern or null for a transparent background.

IlvPattern

protected IlvPattern(BufferedImage img)
This constructor is for internal use only.

Since:
JViews 6.0
Method Detail

getType

public int getType()
Returns the type of the pattern.


getForeground

public Color getForeground()
Returns the foreground color of the pattern.


getBackground

public Color getBackground()
Returns the background color of the pattern, or null if the background is transparent.


createImage

protected static BufferedImage createImage(int w,
                                           int h,
                                           Color background)
This method is for internal use only.

Since:
JViews 6.0

makeImage

protected static BufferedImage makeImage(int type,
                                         Color foreground,
                                         Color background)
This method is for internal use only.

Since:
JViews 6.0

equals

public boolean equals(Object obj)
Tests the equality of two patterns.

Overrides:
equals in class Object


Copyright © 1996-2007 ILOG S.A. All rights reserved.   Documentation homepage.   . All Rights Reserved.