请问哪有类说明的详解。(10分)

  • 主题发起人 主题发起人 lpacec
  • 开始时间 开始时间
L

lpacec

Unregistered / Unconfirmed
GUEST, unregistred user!
请问哪有类说明的详解。(指各个类下面的方法)
如:
  public void paint(Graphics g)
  {
    Color c=new Color(m_color);
    g.setColor(c);
    Font f=new Font("",1,m_fontsize);
    g.setFont(f);
    g.drawString(m_text, 10, 100);
  }
  这Graphics里倒底有多少方法,请哪位大侠给个详解
(还有别的类。。。。)
谢谢!
 
看jdk的文档。
 
Graphics 应该是一个类(接口),用来画图的。
 
abstract void clearRect(int x, int y, int width, int height)
Clears the specified rectangle by filling it with the background color of the current drawing surface.
abstract void clipRect(int x, int y, int width, int height)
Intersects the current clip with the specified rectangle.
abstract void copyArea(int x, int y, int width, int height, int dx, int dy)
Copies an area of the component by a distance specified by dx and dy.
abstractGraphics create()
Creates a new Graphics object that is a copy of this Graphics object.
Graphics create(int x, int y, int width, int height)
Creates a new Graphics object based on this Graphics object, but with a new translation and clip area.
abstract void dispose()
Disposes of this graphics context and releases any system resources that it is using.
void draw3DRect(int x, int y, int width, int height, boolean raised)
Draws a 3-D highlighted outline of the specified rectangle.
abstract void drawArc(int x, int y, int width, int height, int startAngle, int arcAngle)
Draws the outline of a circular or elliptical arc covering the specified rectangle.
void drawBytes(byte[] data, int offset, int length, int x, int y)
Draws the text given by the specified byte array, using this graphics context's current font and color.
void drawChars(char[] data, int offset, int length, int x, int y)
Draws the text given by the specified character array, using this graphics context's current font and color.
abstractboolean drawImage(Image img, int x, int y, Color bgcolor, ImageObserver observer)
Draws as much of the specified image as is currently available.
abstractboolean drawImage(Image img, int x, int y, ImageObserver observer)
Draws as much of the specified image as is currently available.
abstractboolean drawImage(Image img, int x, int y, int width, int height, Color bgcolor, ImageObserver observer)
Draws as much of the specified image as has already been scaled to fit inside the specified rectangle.
abstractboolean drawImage(Image img, int x, int y, int width, int height, ImageObserver observer)
Draws as much of the specified image as has already been scaled to fit inside the specified rectangle.
abstractboolean drawImage(Image img, int dx1, int dy1, int dx2, int dy2, int sx1, int sy1, int sx2, int sy2, Color bgcolor, ImageObserver observer)
Draws as much of the specified area of the specified image as is currently available, scaling it on the fly to fit inside the specified area of the destination drawable surface.
abstractboolean drawImage(Image img, int dx1, int dy1, int dx2, int dy2, int sx1, int sy1, int sx2, int sy2, ImageObserver observer)
Draws as much of the specified area of the specified image as is currently available, scaling it on the fly to fit inside the specified area of the destination drawable surface.
abstract void drawLine(int x1, int y1, int x2, int y2)
Draws a line, using the current color, between the points (x1, y1) and (x2, y2) in this graphics context's coordinate system.
abstract void drawOval(int x, int y, int width, int height)
Draws the outline of an oval.
abstract void drawPolygon(int[] xPoints, int[] yPoints, int nPoints)
Draws a closed polygon defined by arrays of x and y coordinates.
void drawPolygon(Polygon p)
Draws the outline of a polygon defined by the specified Polygon object.
abstract void drawPolyline(int[] xPoints, int[] yPoints, int nPoints)
Draws a sequence of connected lines defined by arrays of x and y coordinates.
void drawRect(int x, int y, int width, int height)
Draws the outline of the specified rectangle.
abstract void drawRoundRect(int x, int y, int width, int height, int arcWidth, int arcHeight)
Draws an outlined round-cornered rectangle using this graphics context's current color.
abstract void drawString(AttributedCharacterIterator iterator, int x, int y)
Draws the text given by the specified iterator, using this graphics context's current color.
abstract void drawString(String str, int x, int y)
Draws the text given by the specified string, using this graphics context's current font and color.
void fill3DRect(int x, int y, int width, int height, boolean raised)
Paints a 3-D highlighted rectangle filled with the current color.
abstract void fillArc(int x, int y, int width, int height, int startAngle, int arcAngle)
Fills a circular or elliptical arc covering the specified rectangle.
abstract void fillOval(int x, int y, int width, int height)
Fills an oval bounded by the specified rectangle with the current color.
abstract void fillPolygon(int[] xPoints, int[] yPoints, int nPoints)
Fills a closed polygon defined by arrays of x and y coordinates.
void fillPolygon(Polygon p)
Fills the polygon defined by the specified Polygon object with the graphics context's current color.
abstract void fillRect(int x, int y, int width, int height)
Fills the specified rectangle.
abstract void fillRoundRect(int x, int y, int width, int height, int arcWidth, int arcHeight)
Fills the specified rounded corner rectangle with the current color.
void finalize()
Disposes of this graphics context once it is no longer referenced.
abstractShape getClip()
Gets the current clipping area.
abstractRectangle getClipBounds()
Returns the bounding rectangle of the current clipping area.
Rectangle getClipBounds(Rectangle r)
Returns the bounding rectangle of the current clipping area.
Rectangle getClipRect()
Deprecated. As of JDK version 1.1, replaced by getClipBounds().
abstractColor getColor()
Gets this graphics context's current color.
abstract Font getFont()
Gets the current font.
FontMetrics getFontMetrics()
Gets the font metrics of the current font.
abstractFontMetrics getFontMetrics(Font f)
Gets the font metrics for the specified font.
boolean hitClip(int x, int y, int width, int height)
Returns true if the specified rectangular area might intersect the current clipping area.
abstract void setClip(int x, int y, int width, int height)
Sets the current clip to the rectangle specified by the given coordinates.
abstract void setClip(Shape clip)
Sets the current clipping area to an arbitrary clip shape.
abstract void setColor(Color c)
Sets this graphics context's current color to the specified color.
abstract void setFont(Font font)
Sets this graphics context's font to the specified font.
abstract void setPaintMode()
Sets the paint mode of this graphics context to overwrite the destination with this graphics context's current color.
abstract void setXORMode(Color c1)
Sets the paint mode of this graphics context to alternate between this graphics context's current color and the new specified color.
String toString()
Returns a String object representing this Graphics object's value.
abstract void translate(int x, int y)
Translates the origin of the graphics context to the point (x, y) in the current coordinate system.
 
有JAVA API文档或JAVA网站!
 
sun.java.com
api
 
去下一个jdk的文档把 上面很全的
 
JDK文档,很全的!!
 
http://www.java-cn.net/
http://www.java-cn.net/book/index.jsp
http://download.cnjsp.com/index.htm
 

Similar threads

S
回复
0
查看
1K
SUNSTONE的Delphi笔记
S
S
回复
0
查看
900
SUNSTONE的Delphi笔记
S
D
回复
0
查看
1K
DelphiTeacher的专栏
D
后退
顶部