public class EGraphics
extends java.lang.Object
implements java.io.Serializable
Modifier and Type | Class and Description |
---|---|
static class |
EGraphics.J3DTransparencyOption |
static class |
EGraphics.Outline
Class to define the type of outline around a stipple pattern.
|
Modifier and Type | Field and Description |
---|---|
static int |
BLACK
Describes the color black.
|
static int |
BLUE
Describes the color blue.
|
static int |
BROWN
Describes the color brown.
|
static int |
CELLOUT
Describes the cell outline.
|
static int |
CELLTXT
Describes the cell and port names.
|
static int |
CURSOR
Describes the cursor color.
|
static int |
CYAN
Describes the color cyan.
|
static int |
DBLUE
Describes the color dark blue.
|
static double |
DEFAULT_FACTOR |
static EGraphics.J3DTransparencyOption |
DEFAULT_MODE |
static int |
DGRAY
Describes the color dark gray.
|
static int |
DGREEN
Describes the color dark green.
|
static int |
DRED
Describes the color dark red.
|
static int |
FULLRGBBIT
Describes the full RGB escape bit.
|
static int |
GRAY
Describes the color gray.
|
static int |
GREEN
Describes the color green.
|
static int |
HMENBOR
Describes the highlighted menu border color.
|
static int |
HWINBOR
Describes the highlighted window border color.
|
static int |
LAYERT1
Describes transparent layer 1.
|
static int |
LAYERT10
Describes transparent layer 10.
|
static int |
LAYERT11
Describes transparent layer 11.
|
static int |
LAYERT12
Describes transparent layer 12.
|
static int |
LAYERT2
Describes transparent layer 2.
|
static int |
LAYERT3
Describes transparent layer 3.
|
static int |
LAYERT4
Describes transparent layer 4.
|
static int |
LAYERT5
Describes transparent layer 5.
|
static int |
LAYERT6
Describes transparent layer 6.
|
static int |
LAYERT7
Describes transparent layer 7.
|
static int |
LAYERT8
Describes transparent layer 8.
|
static int |
LAYERT9
Describes transparent layer 9.
|
static int |
LBLUE
Describes the color light blue.
|
static int |
LGRAY
Describes the color light gray.
|
static int |
LGREEN
Describes the color light green.
|
static int |
LRED
Describes the color light red.
|
static int |
MAGENTA
Describes the color magenta.
|
static int |
MENBOR
Describes the menu border color.
|
static int |
MENGLY
Describes the menu glyph color.
|
static int |
MENTXT
Describes the menu text color.
|
static int |
OPAQUEBIT
Describes opaque color escape bit.
|
static int |
ORANGE
Describes the color orange.
|
static int |
PURPLE
Describes the color purple.
|
static int |
RED
Describes the color red.
|
static int |
TRANSPARENT_1
defines the 1st transparent layer.
|
static int |
TRANSPARENT_10
defines the 10th transparent layer.
|
static int |
TRANSPARENT_11
defines the 11th transparent layer.
|
static int |
TRANSPARENT_12
defines the 12th transparent layer.
|
static int |
TRANSPARENT_2
defines the 2nd transparent layer.
|
static int |
TRANSPARENT_3
defines the 3rd transparent layer.
|
static int |
TRANSPARENT_4
defines the 4th transparent layer.
|
static int |
TRANSPARENT_5
defines the 5th transparent layer.
|
static int |
TRANSPARENT_6
defines the 6th transparent layer.
|
static int |
TRANSPARENT_7
defines the 7th transparent layer.
|
static int |
TRANSPARENT_8
defines the 8th transparent layer.
|
static int |
TRANSPARENT_9
defines the 9th transparent layer.
|
static int |
WHITE
Describes the color white.
|
static int |
WINBOR
Describes the window border color.
|
static int |
YELLOW
Describes the color yellow.
|
Constructor and Description |
---|
EGraphics(boolean displayPatterned,
boolean printPatterned,
EGraphics.Outline outlineWhenPatterned,
int transparentLayer,
int red,
int green,
int blue,
double opacity,
boolean foreground,
int[] pattern)
Method to create a graphics object.
|
EGraphics(boolean displayPatterned,
boolean printPatterned,
EGraphics.Outline outlineWhenPatterned,
int transparentLayer,
int red,
int green,
int blue,
double opacity,
boolean foreground,
int[] pattern,
EGraphics.J3DTransparencyOption transparencyMode,
double transparencyFactor)
Method to create a graphics object.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object o) |
static int |
findColorIndex(java.lang.String name)
Method to find the index of a color, given its name.
|
java.awt.Color |
getAlphaColor()
Method to return the color associated with this EGraphics.
|
java.awt.Color |
getColor()
Method to return the color associated with this EGraphics.
|
java.awt.Color |
getColor(java.awt.Color[] transparentColors)
Method to return the color associated with this EGraphics considering
Colors of transparentLayers.
|
static java.awt.Color |
getColorFromIndex(int colorIndex)
Method to convert a color index into a Color.
|
static java.lang.String |
getColorIndexName(int colorIndex)
Method to tell the name of the color with a given index.
|
static int[] |
getColorIndices()
Method to return the array of color indices.
|
boolean |
getForeground()
Method to get whether this EGraphics should be drawn in the foreground.
|
double |
getOpacity()
Method to get the opacity of this EGraphics.
|
EGraphics.Outline |
getOutlined()
Method to tell the type of outline pattern.
|
int[] |
getPattern()
Method to get the stipple pattern of this EGraphics.
|
java.lang.String |
getPatternString()
Method to get the String representation of the stipple pattern of this EGraphics.
|
int[] |
getReversedPattern()
Method to get the reversed stipple pattern of this EGraphics.
|
int |
getRGB()
Returns the RGB value representing the color associated with this EGraphics.
|
double |
getTransparencyFactor()
Method to return the transparency factor of this EGraphics.
|
EGraphics.J3DTransparencyOption |
getTransparencyMode()
Method to return the transparency mode of this EGraphics for the 3D View.
|
static int[] |
getTransparentColorIndices()
Method to return the array of transparent color indices.
|
int |
getTransparentLayer()
Method to return the transparent layer number associated with this EGraphics.
|
int |
hashCode() |
boolean |
isPatternedOnDisplay()
Method describes how this EGraphics appears on a display.
|
boolean |
isPatternedOnPrinter()
Method describes how this EGraphics appears on a printer.
|
static int |
makeIndex(java.awt.Color color)
Method to convert a Color to a color index.
|
static int |
makeIndex(int transparentLayer)
Method to convert a transparent layer to a color index.
|
EGraphics |
withColor(java.awt.Color color)
Method returns EGraphics which differs from this EGraphics by to the associated color.
|
EGraphics |
withColorIndex(int colorIndex)
Method returns EGraphics which differs from this EGraphics by a "color index".
|
EGraphics |
withForeground(boolean f)
Method returns EGraphics which differs from this EGraphics that it should be drawn in the foreground.
|
EGraphics |
withOpacity(double opacity)
Method returns EGraphics which differs from this EGraphics by opacity.
|
EGraphics |
withOutlined(EGraphics.Outline o)
Method returns EGraphics which differs from this EGraphics by Outline pattern
When the EGraphics is drawn as a pattern, the outline can be defined more clearly by drawing a line around the edge.
|
EGraphics |
withPattern(int[] pattern)
Method returns EGraphics which differs from this EGraphics by stipple pattern.
|
EGraphics |
withPattern(java.lang.String patternStr)
Method returns EGraphics which differs from this EGraphics by stipple pattern.
|
EGraphics |
withPatternedOnDisplay(boolean p)
Method returns EGraphics which differs from this EGraphics by appearance on a display.
|
EGraphics |
withPatternedOnPrinter(boolean p)
Method returns EGraphics which differs from this EGraphics by appearance on a printer.
|
EGraphics |
withTransparencyFactor(double factor)
Method returns EGraphics which differs from this EGraphics by transparency factor.
|
EGraphics |
withTransparencyMode(EGraphics.J3DTransparencyOption mode)
Method returns EGraphics which differs form this EGraphics by transparency mode.
|
EGraphics |
withTransparentLayer(int transparentLayer)
Method returns EGraphics which differs from this EGraphics by transparent Layer.
|
public static final EGraphics.J3DTransparencyOption DEFAULT_MODE
public static final double DEFAULT_FACTOR
public static final int FULLRGBBIT
public static final int OPAQUEBIT
public static final int WHITE
public static final int BLACK
public static final int RED
public static final int BLUE
public static final int GREEN
public static final int CYAN
public static final int MAGENTA
public static final int YELLOW
public static final int CELLTXT
public static final int CELLOUT
public static final int WINBOR
public static final int HWINBOR
public static final int MENBOR
public static final int HMENBOR
public static final int MENTXT
public static final int MENGLY
public static final int CURSOR
public static final int GRAY
public static final int ORANGE
public static final int PURPLE
public static final int BROWN
public static final int LGRAY
public static final int DGRAY
public static final int LRED
public static final int DRED
public static final int LGREEN
public static final int DGREEN
public static final int LBLUE
public static final int DBLUE
public static final int LAYERT1
public static final int LAYERT2
public static final int LAYERT3
public static final int LAYERT4
public static final int LAYERT5
public static final int LAYERT6
public static final int LAYERT7
public static final int LAYERT8
public static final int LAYERT9
public static final int LAYERT10
public static final int LAYERT11
public static final int LAYERT12
public static final int TRANSPARENT_1
public static final int TRANSPARENT_2
public static final int TRANSPARENT_3
public static final int TRANSPARENT_4
public static final int TRANSPARENT_5
public static final int TRANSPARENT_6
public static final int TRANSPARENT_7
public static final int TRANSPARENT_8
public static final int TRANSPARENT_9
public static final int TRANSPARENT_10
public static final int TRANSPARENT_11
public static final int TRANSPARENT_12
public EGraphics(boolean displayPatterned, boolean printPatterned, EGraphics.Outline outlineWhenPatterned, int transparentLayer, int red, int green, int blue, double opacity, boolean foreground, int[] pattern)
displayPatterned
- true if drawn with a pattern on the display.printPatterned
- true if drawn with a pattern on a printer.outlineWhenPatterned
- the outline texture to use when patterned.transparentLayer
- the transparent layer number (0 for none).red
- the red component of this EGraphics.green
- the green component of this EGraphics.blue
- the blue component of this EGraphics.opacity
- the opacity of this EGraphics (1 for opaque, 0 for transparent).foreground
- the foreground factor of this EGraphics (1 for to be in foreground).pattern
- the 16x16 stipple pattern of this EGraphics (16 integers).public EGraphics(boolean displayPatterned, boolean printPatterned, EGraphics.Outline outlineWhenPatterned, int transparentLayer, int red, int green, int blue, double opacity, boolean foreground, int[] pattern, EGraphics.J3DTransparencyOption transparencyMode, double transparencyFactor)
displayPatterned
- true if drawn with a pattern on the display.printPatterned
- true if drawn with a pattern on a printer.outlineWhenPatterned
- the outline texture to use when patterned.transparentLayer
- the transparent layer number (0 for none).red
- the red component of this EGraphics.green
- the green component of this EGraphics.blue
- the blue component of this EGraphics.opacity
- the opacity of this EGraphics (1 for opaque, 0 for transparent).foreground
- the foreground factor of this EGraphics (1 for to be in foreground).pattern
- the 16x16 stipple pattern of this EGraphics (16 integers).transparencyMode
- 3D transparency modetransparencyFactor
- 3D transparency factorpublic boolean isPatternedOnDisplay()
public EGraphics withPatternedOnDisplay(boolean p)
p
- true to draw this EGraphics patterned on a display.
False to draw this EGraphics as a solid fill on a display.public boolean isPatternedOnPrinter()
public EGraphics withPatternedOnPrinter(boolean p)
p
- true to draw this EGraphics patterned on a printer.
False to draw this EGraphics as a solid fill on a printer.public EGraphics.Outline getOutlined()
public EGraphics withOutlined(EGraphics.Outline o)
o
- the outline pattern.public int getTransparentLayer()
public EGraphics withTransparentLayer(int transparentLayer)
transparentLayer
- the transparent layer number associated with this EGraphics.
A value of zero means that this EGraphics is not drawn transparently.
Then, use the "setColor()" method to set its solid color.public int[] getPattern()
public int[] getReversedPattern()
public java.lang.String getPatternString()
public EGraphics withPattern(int[] pattern)
pattern
- the stipple pattern of this EGraphics.public EGraphics withPattern(java.lang.String patternStr)
patternStr
- text representation of the stipple pattern of this EGraphics.public double getOpacity()
public EGraphics withOpacity(double opacity)
opacity
- the opacity of this EGraphics.public boolean getForeground()
public EGraphics withForeground(boolean f)
f
- true if this EGraphics should be drawn in the foreground.public java.awt.Color getAlphaColor()
public java.awt.Color getColor()
public java.awt.Color getColor(java.awt.Color[] transparentColors)
transparentColors
- Colors of transparentLayers.public int getRGB()
public EGraphics withColor(java.awt.Color color)
color
- the color to set.public static java.awt.Color getColorFromIndex(int colorIndex)
colorIndex
- the color index to convert.public EGraphics withColorIndex(int colorIndex)
colorIndex
- the color index to set.public static int makeIndex(java.awt.Color color)
color
- a Color objectpublic static int makeIndex(int transparentLayer)
transparentLayer
- the transparent layer number.public static int findColorIndex(java.lang.String name)
name
- the name of the color.public static java.lang.String getColorIndexName(int colorIndex)
colorIndex
- the color number.public static int[] getColorIndices()
public static int[] getTransparentColorIndices()
public EGraphics.J3DTransparencyOption getTransparencyMode()
public EGraphics withTransparencyMode(EGraphics.J3DTransparencyOption mode)
mode
- the transparency mode of this layer.public double getTransparencyFactor()
public EGraphics withTransparencyFactor(double factor)
factor
- the transparency factor of this layer.public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object