|
Components |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
com.sas.visuals.DrawingSupport
public class DrawingSupport
This class contains static methods used for drawing.
Field Summary |
---|
Constructor Summary | |
---|---|
DrawingSupport()
|
Method Summary | |
---|---|
static java.applet.Applet |
appletFromComponent(java.awt.Component component)
Gets the applet in which the component resides |
static void |
clearRect(java.awt.Graphics g,
java.awt.Rectangle rectangle)
Clear the specified rectangle |
static void |
draw3DRect(java.awt.Graphics g,
java.awt.Rectangle rectangle,
boolean raised)
Draw a 3-D rectangle |
static void |
draw3DRoundRect(java.awt.Graphics g,
java.awt.Rectangle rectangle,
int arcWidth,
int arcHeight,
int style)
Draw a 3-D rectangle with rounded corners |
static void |
drawArc(java.awt.Graphics g,
java.awt.Rectangle rectangle,
int startAngle,
int arcAngle)
Draw an arc |
static void |
drawBasicBorderRect(java.awt.Graphics g,
int x,
int y,
int width,
int height,
java.awt.Color c,
java.awt.Color topLeft,
java.awt.Color bottomRight)
Draw a Windows95 basic window border |
static void |
drawBasicBorderRect(java.awt.Graphics g,
int x,
int y,
int width,
int height,
int style)
Draw a Windows95 basic window border |
static void |
drawBasicBorderRect(java.awt.Graphics g,
java.awt.Rectangle rectangle,
int style)
Draw a Windows95 basic window border |
static void |
drawBasicButtonBorderRect(java.awt.Graphics g,
int x,
int y,
int width,
int height,
int style)
Draw a Windows95 basic button border |
static void |
drawBasicButtonBorderRect(java.awt.Graphics g,
java.awt.Rectangle rectangle,
int style)
Draw a basic Windows95 button border |
static void |
drawButtonBorderRect(java.awt.Graphics g,
int x,
int y,
int width,
int height,
int style)
Draw a Windows95 basic button border |
static void |
drawButtonBorderRect(java.awt.Graphics g,
java.awt.Rectangle rectangle,
int style)
Draw a Windows95 push button border |
static void |
drawColoredBorderRect(java.awt.Graphics g,
int x,
int y,
int width,
int height,
int style,
java.awt.Color c)
Draw a colored border |
static void |
drawColoredBorderRect(java.awt.Graphics g,
java.awt.Rectangle rectangle,
int style,
java.awt.Color c)
Draw a colored border |
static boolean |
drawDisabledImage(java.awt.Graphics g,
java.awt.Image img,
int x,
int y,
java.awt.image.ImageObserver observer)
Draw an image with a disabled appearance |
static boolean |
drawDisabledImage(java.awt.Graphics g,
java.awt.Image img,
int x,
int y,
java.awt.image.ImageObserver observer,
boolean cache)
|
static void |
drawDisabledString(java.awt.Graphics g,
java.lang.String[] text,
int x,
int y,
int drawStringMask)
Draw a vector of Strings with a disabled appearance |
static void |
drawDisabledString(java.awt.Graphics g,
java.lang.String[] text,
int x,
int y,
int drawStringMask,
java.awt.Color opaque)
Draw a vector of Strings with a disabled appearance |
static void |
drawDisabledString(java.awt.Graphics g,
java.lang.String text,
int x,
int y)
Draw a String with a disabled appearance |
static void |
drawDisabledString(java.awt.Graphics g,
java.lang.String text,
int x,
int y,
int drawStringMask)
Draw a vector of Strings with a disabled appearance |
static void |
drawDisabledString(java.awt.Graphics g,
java.lang.String text,
int x,
int y,
int drawStringMask,
java.awt.Color opaque)
Draw a String with a disabled appearance |
static void |
drawDottedLine(java.awt.Graphics g,
int x1,
int y1,
int x2,
int y2)
Draws a dotted line between two points |
static void |
drawDottedLine(java.awt.Graphics g,
java.awt.Point point1,
java.awt.Point point2)
Draws a dotted line between two points |
static void |
drawDottedRect(java.awt.Graphics g,
int x,
int y,
int width,
int height)
|
static void |
drawDottedRect(java.awt.Graphics g,
int x,
int y,
int width,
int height,
boolean XOR)
|
static void |
drawDottedRect(java.awt.Graphics g,
java.awt.Rectangle rectangle)
|
static void |
drawFieldBorderRect(java.awt.Graphics g,
int x,
int y,
int width,
int height)
Draw a Windows95 field border |
static void |
drawFieldBorderRect(java.awt.Graphics g,
java.awt.Rectangle rectangle)
Draw a Windows95 field border |
static void |
drawFocusRect(java.awt.Graphics g,
int x,
int y,
int width,
int height)
Draw a Windows95 focus rectangle |
static void |
drawFocusRect(java.awt.Graphics g,
java.awt.Rectangle rectangle)
Draw a Windows95 focus rectangle |
static void |
drawGroupBorderRect(java.awt.Graphics g,
int x,
int y,
int width,
int height)
Draw a Windows95 grouping border |
static void |
drawGroupBorderRect(java.awt.Graphics g,
java.awt.Rectangle rectangle)
Draw a Windows95 grouping border |
static void |
drawLine(java.awt.Graphics g,
java.awt.Point point1,
java.awt.Point point2)
Draws a line between two points |
static boolean |
drawMixedImage(java.awt.Graphics g,
java.awt.Image img,
int x,
int y,
java.awt.Color c,
java.awt.image.ImageObserver observer)
Draw an image mixed with a specified color |
static boolean |
drawMixedImage(java.awt.Graphics g,
java.awt.Image img,
int x,
int y,
java.awt.Color c,
java.awt.image.ImageObserver observer,
boolean cache)
|
static void |
drawRect(java.awt.Graphics g,
java.awt.Rectangle rectangle)
Draw the specified rectangle |
static void |
drawRoundRect(java.awt.Graphics g,
java.awt.Rectangle rectangle,
int arcWidth,
int arcHeight)
Draw a rectangle with rounded corners |
static void |
drawStatusFieldBorderRect(java.awt.Graphics g,
int x,
int y,
int width,
int height)
Draw a Windows95 status field border |
static void |
drawStatusFieldBorderRect(java.awt.Graphics g,
java.awt.Rectangle rectangle)
Draw a Windows95 status field border |
static void |
drawString(java.awt.Graphics g,
java.lang.String[] text,
int x,
int y,
int drawStringMask)
Draw a vector of Strings |
static void |
drawString(java.awt.Graphics g,
java.lang.String[] text,
int x,
int y,
int drawStringMask,
java.awt.Color opaque)
Draw a vector of Strings |
static void |
drawString(java.awt.Graphics g,
java.lang.String text,
int x,
int y,
int drawStringMask)
Draw a String |
static void |
drawString(java.awt.Graphics g,
java.lang.String text,
int x,
int y,
int drawStringMask,
java.awt.Color opaque)
Draw a String |
static boolean |
drawTransparentImage(java.awt.Graphics g,
java.awt.Image img,
int x,
int y,
java.awt.Color c,
java.awt.image.ImageObserver observer)
|
static boolean |
drawTransparentImage(java.awt.Graphics g,
java.awt.Image img,
int x,
int y,
java.awt.Color c,
java.awt.image.ImageObserver observer,
boolean cache)
|
static void |
drawWindowBorderRect(java.awt.Graphics g,
int x,
int y,
int width,
int height)
Draw a Windows95 window border |
static void |
drawWindowBorderRect(java.awt.Graphics g,
java.awt.Rectangle rectangle)
Draw a Windows95 window border |
static void |
fill3DRect(java.awt.Graphics g,
java.awt.Rectangle rectangle,
boolean raised)
Fill a 3-D rectangle |
static void |
fillArc(java.awt.Graphics g,
java.awt.Rectangle rectangle,
int startAngle,
int arcAngle)
Fill an arc |
static void |
fillRect(java.awt.Graphics g,
java.awt.Rectangle rectangle)
Fill the specified rectangle |
static void |
fillRoundRect(java.awt.Graphics g,
java.awt.Rectangle rectangle,
int arcWidth,
int arcHeight)
Fill a rectangle with rounded corners |
static java.awt.Frame |
frameFromComponent(java.awt.Component component)
Gets the frame in which a component resides |
static java.awt.Dimension |
getImageSize(java.awt.Graphics g,
java.awt.Image image,
java.awt.Component component)
Get the demension of a specified image |
static int |
getStringAscent(java.awt.Graphics g)
Get the ascent of an arbitrary String |
static int |
getStringAscent(java.awt.Graphics g,
java.awt.Font font)
Get the ascent of an arbitrary String |
static int |
getStringDescent(java.awt.Graphics g)
Get the descent of an arbitrary String |
static int |
getStringDescent(java.awt.Graphics g,
java.awt.Font font)
Get the descent of an arbitrary String |
static java.awt.Dimension |
getStringSize(java.awt.Graphics g,
java.lang.String text)
Gets the dimension of a specified String |
static java.awt.Dimension |
getStringSize(java.awt.Graphics g,
java.lang.String[] text)
Gets the dimension of a specified array of Strings |
static java.awt.Dimension |
getStringSize(java.awt.Graphics g,
java.lang.String[] text,
java.awt.Font font)
Gets the dimension of a specified array of Strings |
static java.awt.Dimension |
getStringSize(java.awt.Graphics g,
java.lang.String text,
java.awt.Font font)
Gets the dimension of a specified String |
static java.awt.Point |
relativePoint(java.awt.Component srcComponent,
java.awt.Component destComponent,
java.awt.Point point)
Returns a point relative to a srcComponent as a point relative destComponent |
static java.awt.Point |
screenPoint(java.awt.Component component,
java.awt.Point point)
Returns a point relative to the screen coordinates |
Constructor Detail |
---|
public DrawingSupport()
Method Detail |
---|
public static final void drawDottedLine(java.awt.Graphics g, int x1, int y1, int x2, int y2)
g
- the Graphics to usex1
- the first x coordinatey1
- the first y coordinatex2
- the second x coordinatey2
- the second y coordinatepublic static final void drawDottedLine(java.awt.Graphics g, java.awt.Point point1, java.awt.Point point2)
g
- the Graphics to usepoint1
- the first pointpoint2
- the second pointpublic static final void drawLine(java.awt.Graphics g, java.awt.Point point1, java.awt.Point point2)
g
- the Graphics to usepoint1
- the first pointpoint2
- the second pointpublic static final void fillRect(java.awt.Graphics g, java.awt.Rectangle rectangle)
g
- the Graphics to userectangle
- the rectangle to fillpublic static final void drawRect(java.awt.Graphics g, java.awt.Rectangle rectangle)
g
- the Graphics to userectangle
- the rectangle to drawpublic static final void clearRect(java.awt.Graphics g, java.awt.Rectangle rectangle)
g
- the Graphics to userectangle
- the rectangle to clearpublic static final void drawRoundRect(java.awt.Graphics g, java.awt.Rectangle rectangle, int arcWidth, int arcHeight)
g
- the Graphics to userectangle
- the bounding rectanglearcWidth
- the width of the arcarcHeight
- the height of the arcpublic static final void fillRoundRect(java.awt.Graphics g, java.awt.Rectangle rectangle, int arcWidth, int arcHeight)
g
- the Graphics to userectangle
- the bounding rectanglearcWidth
- the width of the arcarcHeight
- the height of the arcpublic static final void draw3DRoundRect(java.awt.Graphics g, java.awt.Rectangle rectangle, int arcWidth, int arcHeight, int style)
g
- the Graphics to userectangle
- the bounding rectanglearcWidth
- the width of the arcarcHeight
- the height of the arcstyle
- the border style to usepublic static final void draw3DRect(java.awt.Graphics g, java.awt.Rectangle rectangle, boolean raised)
g
- the Graphics to userectangle
- the rectangle to drawrasied
- the state of the rectanglepublic static final void fill3DRect(java.awt.Graphics g, java.awt.Rectangle rectangle, boolean raised)
g
- the Graphics to userectangle
- the rectangle to fillrasied
- the state of the rectanglepublic static final void drawArc(java.awt.Graphics g, java.awt.Rectangle rectangle, int startAngle, int arcAngle)
g
- the Graphics to userectangle
- the bounding rectanglestartAngle
- the starting anglearcAngle
- the angle to drawpublic static final void fillArc(java.awt.Graphics g, java.awt.Rectangle rectangle, int startAngle, int arcAngle)
g
- the Graphics to userectangle
- the bounding rectanglestartAngle
- the starting anglearcAngle
- the angle to fillpublic static final void drawBasicBorderRect(java.awt.Graphics g, java.awt.Rectangle rectangle, int style)
g
- the Graphics to userectangle
- the bounding rectanglestyle
- the border style to usepublic static final void drawBasicBorderRect(java.awt.Graphics g, int x, int y, int width, int height, int style)
g
- the Graphics to usex
- the x coordinatey
- the y coordinatewidth
- the width of the bounding regionheight
- the height of the bounding regionstyle
- the border style to usepublic static final void drawColoredBorderRect(java.awt.Graphics g, java.awt.Rectangle rectangle, int style, java.awt.Color c)
g
- the Graphics to userectangle
- the bounding rectanglestyle
- the border style to usec
- the Color to usepublic static final void drawColoredBorderRect(java.awt.Graphics g, int x, int y, int width, int height, int style, java.awt.Color c)
g
- the Graphics to usex
- the x coordinatey
- the y coordinatewidth
- the width of the bounding regionheight
- the height of the bounding regionstyle
- the border style to usec
- the Color to usepublic static final void drawBasicBorderRect(java.awt.Graphics g, int x, int y, int width, int height, java.awt.Color c, java.awt.Color topLeft, java.awt.Color bottomRight)
g
- the Graphics to usex
- the x coordinatey
- the y coordinatewidth
- the width of the bounding regionheight
- the height of the bounding regionc
- the background colortopLeft
- the top-left border colorbottomRight
- the bottom-right border colorpublic static final void drawWindowBorderRect(java.awt.Graphics g, java.awt.Rectangle rectangle)
g
- the Graphics to userectangle
- the bounding regionpublic static final void drawWindowBorderRect(java.awt.Graphics g, int x, int y, int width, int height)
g
- the Graphics to usex
- the x coordinatey
- the y coordinatewidth
- the width of the bounding regionheight
- the height of the bounding regionpublic static final void drawBasicButtonBorderRect(java.awt.Graphics g, java.awt.Rectangle rectangle, int style)
g
- the Graphics to userectangle
- the bounding regionstyle
- the border style to usepublic static final void drawBasicButtonBorderRect(java.awt.Graphics g, int x, int y, int width, int height, int style)
g
- the Graphics to usex
- the x coordinatey
- the y coordinatewidth
- the width of the bounding regionheight
- the height of the bounding regionstyle
- the border style to usepublic static final void drawButtonBorderRect(java.awt.Graphics g, java.awt.Rectangle rectangle, int style)
g
- the Graphics to userectangle
- the bounding regionstyle
- the border style to use (BS_PRESSED, BS_NORMAL, BS_SELECTED)public static final void drawButtonBorderRect(java.awt.Graphics g, int x, int y, int width, int height, int style)
g
- the Graphics to usex
- the x coordinatey
- the y coordinatewidth
- the width of the bounding regionheight
- the height of the bounding regionstyle
- the border style to use (BS_PRESSED, BS_NORMAL, BS_SELECTED)public static final void drawFieldBorderRect(java.awt.Graphics g, java.awt.Rectangle rectangle)
g
- the Graphics to userectangle
- the bounding rectanglepublic static final void drawFieldBorderRect(java.awt.Graphics g, int x, int y, int width, int height)
g
- the Graphics to usex
- the x coordinatey
- the y coordinatewidth
- the width of the bounding regionheight
- the height of the bounding regionpublic static final void drawStatusFieldBorderRect(java.awt.Graphics g, java.awt.Rectangle rectangle)
g
- the Graphics to userectangle
- the bounding rectanglepublic static final void drawStatusFieldBorderRect(java.awt.Graphics g, int x, int y, int width, int height)
g
- the Graphics to usex
- the x coordinatey
- the y coordinatewidth
- the width of the bounding regionheight
- the height of the bounding regionpublic static final void drawGroupBorderRect(java.awt.Graphics g, java.awt.Rectangle rectangle)
g
- the Graphics to userectangle
- the bounding rectanglepublic static final void drawGroupBorderRect(java.awt.Graphics g, int x, int y, int width, int height)
g
- the Graphics to usex
- the x coordinatey
- the y coordinatewidth
- the width of the bounding regionheight
- the height of the bounding regionpublic static final void drawFocusRect(java.awt.Graphics g, java.awt.Rectangle rectangle)
g
- the Graphics to userectangle
- the bounding rectanglepublic static final void drawDottedRect(java.awt.Graphics g, java.awt.Rectangle rectangle)
public static final void drawFocusRect(java.awt.Graphics g, int x, int y, int width, int height)
g
- the Graphics to usex
- the x coordinatey
- the y coordinatewidth
- the width of the bounding regionheight
- the height of the bounding regionpublic static final void drawDottedRect(java.awt.Graphics g, int x, int y, int width, int height)
public static final void drawDottedRect(java.awt.Graphics g, int x, int y, int width, int height, boolean XOR)
public static final void drawString(java.awt.Graphics g, java.lang.String[] text, int x, int y, int drawStringMask)
g
- the Graphics to usetext
- the array of Strings to drawx
- the x coordinatey
- the y coordinatedrawStringMask
- the drawStringMaskpublic static final void drawString(java.awt.Graphics g, java.lang.String[] text, int x, int y, int drawStringMask, java.awt.Color opaque)
g
- the Graphics to usetext
- the array of Strings to drawx
- the x coordinatey
- the y coordinatedrawStringMask
- the drawStringMaskopaque
- the opaque color. This value is ignored unless drawStringMask
contains the DT_OPAQUE maskpublic static final void drawString(java.awt.Graphics g, java.lang.String text, int x, int y, int drawStringMask)
g
- the Graphics to usetext
- the String to drawx
- the x coordinatey
- the y coordinatedrawStringMask
- the drawStringMaskpublic static final void drawString(java.awt.Graphics g, java.lang.String text, int x, int y, int drawStringMask, java.awt.Color opaque)
g
- the Graphics to usetext
- the String to drawx
- the x coordinatey
- the y coordinatedrawStringMask
- the drawStringMaskopaque
- the opaque color. This value is ignored unless drawStringMask
contains the DT_OPAQUE maskpublic static final void drawDisabledString(java.awt.Graphics g, java.lang.String[] text, int x, int y, int drawStringMask)
g
- the Graphics to usetext
- the array of Strings to drawx
- the x coordinatey
- the y coordinatedrawStringMask
- the drawStringMaskpublic static final void drawDisabledString(java.awt.Graphics g, java.lang.String[] text, int x, int y, int drawStringMask, java.awt.Color opaque)
g
- the Graphics to usetext
- the String to drawx
- the x coordinatey
- the y coordinatedrawStringMask
- the drawStringMaskopaque
- the opaque color. This value is ignored unless drawStringMask
contains the DT_OPAQUE maskpublic static final void drawDisabledString(java.awt.Graphics g, java.lang.String text, int x, int y)
g
- the Graphics to usetext
- the String to drawx
- the x coordinatey
- the y coordinatepublic static final void drawDisabledString(java.awt.Graphics g, java.lang.String text, int x, int y, int drawStringMask)
g
- the Graphics to usetext
- the array of Strings to drawx
- the x coordinatey
- the y coordinatedrawStringMask
- the drawStringMaskpublic static final void drawDisabledString(java.awt.Graphics g, java.lang.String text, int x, int y, int drawStringMask, java.awt.Color opaque)
g
- the Graphics to usetext
- the String to drawx
- the x coordinatey
- the y coordinatedrawStringMask
- the drawStringMaskopaque
- the opaque color. This value is ignored unless drawStringMask
contains the DT_OPAQUE maskpublic static final boolean drawDisabledImage(java.awt.Graphics g, java.awt.Image img, int x, int y, java.awt.image.ImageObserver observer)
g
- the Graphics to useimg
- the image to usex
- the x coordinatey
- the y coordinateobserver
- the image observerpublic static final boolean drawDisabledImage(java.awt.Graphics g, java.awt.Image img, int x, int y, java.awt.image.ImageObserver observer, boolean cache)
public static final boolean drawMixedImage(java.awt.Graphics g, java.awt.Image img, int x, int y, java.awt.Color c, java.awt.image.ImageObserver observer)
g
- the Graphics to useimg
- the image to usex
- the x coordinatey
- the y coordinatec
- the color to mixobserver
- the image observerpublic static final boolean drawMixedImage(java.awt.Graphics g, java.awt.Image img, int x, int y, java.awt.Color c, java.awt.image.ImageObserver observer, boolean cache)
public static final boolean drawTransparentImage(java.awt.Graphics g, java.awt.Image img, int x, int y, java.awt.Color c, java.awt.image.ImageObserver observer)
public static final boolean drawTransparentImage(java.awt.Graphics g, java.awt.Image img, int x, int y, java.awt.Color c, java.awt.image.ImageObserver observer, boolean cache)
public static final java.awt.Dimension getStringSize(java.awt.Graphics g, java.lang.String[] text)
g
- the Graphics to usetext
- the array of Strings
public static final java.awt.Dimension getStringSize(java.awt.Graphics g, java.lang.String[] text, java.awt.Font font)
g
- the Graphics to usetext
- the array of Stringsfont
- the font to use when rendering
public static final java.awt.Dimension getStringSize(java.awt.Graphics g, java.lang.String text)
g
- the Graphics to usetext
- the String
public static final java.awt.Dimension getStringSize(java.awt.Graphics g, java.lang.String text, java.awt.Font font)
g
- the Graphics to usetext
- the Stringfont
- the font to use when rendering
public static final int getStringAscent(java.awt.Graphics g)
g
- the Graphics to use
public static final int getStringDescent(java.awt.Graphics g)
g
- the Graphics to use
public static final int getStringAscent(java.awt.Graphics g, java.awt.Font font)
g
- the Graphics to usefont
- the font to use when rendering
public static final int getStringDescent(java.awt.Graphics g, java.awt.Font font)
g
- the Graphics to usefont
- the font to use when rendering
public static final java.awt.Dimension getImageSize(java.awt.Graphics g, java.awt.Image image, java.awt.Component component) throws java.lang.NullPointerException
g
- the Graphics to useimage
- the image to usecomponent
- the component where the image will be rendered
java.lang.NullPointerException
public static java.applet.Applet appletFromComponent(java.awt.Component component)
component
- the component that resides in an applet
public static java.awt.Frame frameFromComponent(java.awt.Component component)
component
- the component that resides in a frame
public static java.awt.Point relativePoint(java.awt.Component srcComponent, java.awt.Component destComponent, java.awt.Point point)
srcComponent
- the source componentdestComponent
- the destination componentpoint
- the point in question in the srcComponent coordinates
public static java.awt.Point screenPoint(java.awt.Component component, java.awt.Point point)
component
- the component where the point residespoint
- the point in question relative to the component
|
Components |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |