/* * * FileName: OvalButton.java * * * $Author: konki $ * Author(s): konki * * * Objective: extend WBButton to be able to draw a Oval in it * * * $Log: OvalButton.java,v $ # Revision 1.1 1996/03/11 20:57:13 konki # Initial revision # * Change Log: * Created on Sat Mar 9 14:02:23 EST 1996 * Changes: Date Initials * * Notes: * $Id: OvalButton.java,v 1.1 1996/03/11 20:57:13 konki Exp $ * */ package wb; import java.awt.*; /** * Oval Button extends WBButton and draws an oval. */ public class OvalButton extends WBButton { /** * Creates an instance of OvalButton with its label string used * for display on the status bar * @param name String containing the label of this button * @param above the WBDrawPanel which holds this button and * understands the type "OVALS" and displays the * label in its status line */ public OvalButton(String name, WBDrawPanel above) { super( name, above, false); type = OVALS; } /** * Creates an instance of OvalButton with its label string used * for display on the status bar * @param name String containing the label of this button * @param above the WBDrawPanel which holds this button and * understands the type "OVALS" and displays the * label in its status line * @param displaytext boolean to show the label */ public OvalButton(String name, WBDrawPanel above, boolean displaytext) { super( name, above, displaytext); type = OVALS; } /** * Overides the parents draw method to draw the required in the * rectangular region. In this case it draw an Oval * @param g Graphics */ protected void draw( Graphics g ) { g.setColor(Color.blue); g.drawOval( 10, 10, 20, 10); } } /* * End of File: OvalButton.java */