borland.jbcl Packages borland.jbcl Class Hierarchy borland.jbcl.control
java.lang.Object +----java.awt.Component +----borland.jbcl.control.ShapeControl
Variables Constructors Properties Methods Event Listeners
Implements MenuContainer, ImageObserver, Serializable
Draws graphics shapes, such as rectangles with rounded corners. You can place ShapeControl objects on any container, such as a panel or canvas. When you drop a ShapeControl from the Component Palette onto the UI Designer, the shape defaults to a filled rectangle. You can then change the shape to any of the following:
The edgeColor and drawEdge properties enable you to put a colored border on a shape. To control layering, in the UI Designer, right-click and choose Move To First or Move To Last.
public static final int CIRCLE = 5Indicates that the shape object is a circle.
public static final int ELLIPSE = 4Indicates that the shape object is an ellipse.
public static final int HORZ_LINE = 6Indicates that the shape object is a horizontal line.
public static final int NEG_SLOPE_LINE = 9Indicates that the shape object is a line sloping from the upper left corner of the specified region to the lower right corner.
public static final int POS_SLOPE_LINE = 8Indicates that the shape object is a line sloping from the lower left corner of the specified region to the upper right corner.
public static final int RECTANGLE = 0Indicates that the shape object is a rectangle.
public static final int ROUND_RECT = 1Indicates that the shape object is a rectangle with rounded corners.
public static final int ROUND_SQUARE = 3Indicates that the shape object is a square with rounded corners.
public static final int SQUARE = 2Indicates that the shape object is a square.
public static final int VERT_LINE = 7Indicates that the shape object is a vertical line.
public ShapeControl()Constructs a ShapeControl 100 pixels by 100 pixels, with a white foreground fill and a black edge.
public ShapeControl(int type)Constructs a ShapeControl of the specified type, such as circle or square. Like the default constructor, this constructor defaults to 100 pixels by 100 pixels, with a white foreground fill and a black edge.
public boolean isDrawEdge() public void setDrawEdge(boolean drawEdge)The drawEdge property stores whether to show a colored edge marking the edge of the shape object.
public Color getEdgeColor() public void setEdgeColor(java.awt.Color edgeColor)The edgeColor property stores the color of the line that marks the edge of the shape object. By default, black.
public boolean isFill() public void setFill(boolean fill)The fill property stores whether to fill the shape with a foreground color. If false, the shape is filled with the color of the container on which the shape object is placed.
public void setForeground(java.awt.Color color)The foreground property stores the foreground color of the shape object. This is the color used to fill the shape if the fill property is true.
public Dimension getMinimumSize()The minimumSize property stores the minimum size that you will allow a layout manager to use for this shape control.
public Dimension getPreferredSize()The preferredSize property stores the size that you would prefer that a layout manager use to display this shape control.
public int getType() public void setType(int type)The type property stores the type of shape, such as circle or square.
public void paint(java.awt.Graphics g)Calls super.paint() to let other objects paint the background region, then draws the graphics object.
Parameters:
Overrides: java.awt.Component.paint(Graphics)
public synchronized void addComponentListener(java.awt.event.ComponentListener l) public synchronized void removeComponentListener(java.awt.event.ComponentListener l)
public synchronized void addFocusListener(java.awt.event.FocusListener l) public synchronized void removeFocusListener(java.awt.event.FocusListener l)
public synchronized void addKeyListener(java.awt.event.KeyListener l) public synchronized void removeKeyListener(java.awt.event.KeyListener l)
public synchronized void addMouseListener(java.awt.event.MouseListener l) public synchronized void removeMouseListener(java.awt.event.MouseListener l)
public synchronized void addMouseMotionListener(java.awt.event.MouseMotionListener l) public synchronized void removeMouseMotionListener(java.awt.event.MouseMotionListener l)