📄 oval.java
字号:
//********************************************************************
// Oval.java Author: Lewis and Loftus / Peter DePasquale
//
// Refinement #2
//
// Represents and oval shape in the PaintBox application.
//********************************************************************
import java.io.*;
import java.awt.*;
public class Oval extends BoundedShape
{
//-----------------------------------------------------------------
// Sets up the oval's color, position, and size.
//-----------------------------------------------------------------
public Oval (Color color, Point corner, int wide, int high)
{
super (color, corner, wide, high);
}
//-----------------------------------------------------------------
// Draws the oval.
//-----------------------------------------------------------------
public void draw (Graphics page)
{
page.setColor (strokeColor);
page.drawOval (upperLeft.x, upperLeft.y, width, height);
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -