net.sourceforge.mlf.metouia.borders
Class MetouiaDots

java.lang.Object
  extended bynet.sourceforge.mlf.metouia.borders.MetouiaDots
All Implemented Interfaces:
javax.swing.Icon

public class MetouiaDots
extends java.lang.Object
implements javax.swing.Icon

This class implements the dots used throughout the Metouia Look and Feel.


Field Summary
protected  net.sourceforge.mlf.metouia.borders.MetouiaDotsBuffer buffer
          The dots buffer that can be reused for painting dots.
protected  int xDots
          The horizontal dots count.
protected  int yDots
          The vertical dots count.
 
Constructor Summary
MetouiaDots(int width, int height)
          This constructor creates a dots area with the given size.
 
Method Summary
 int getIconHeight()
          Returns the icon's height.
 int getIconWidth()
          Returns the icon's width.
 void paintIcon(java.awt.Component c, java.awt.Graphics g, int x, int y)
          Draws the dots area at the specified location.
 void setDotsArea(int width, int height)
          Sets the dots area to the given size.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

xDots

protected int xDots
The horizontal dots count.


yDots

protected int yDots
The vertical dots count.


buffer

protected net.sourceforge.mlf.metouia.borders.MetouiaDotsBuffer buffer
The dots buffer that can be reused for painting dots.

Constructor Detail

MetouiaDots

public MetouiaDots(int width,
                   int height)
This constructor creates a dots area with the given size.

Parameters:
width - The width of the dots area.
height - The height of the dots area.
Method Detail

setDotsArea

public void setDotsArea(int width,
                        int height)
Sets the dots area to the given size.

Parameters:
width - The width of the dots area.
height - The height of the dots area.

paintIcon

public void paintIcon(java.awt.Component c,
                      java.awt.Graphics g,
                      int x,
                      int y)
Draws the dots area at the specified location.

Specified by:
paintIcon in interface javax.swing.Icon
Parameters:
c - The component to draw on.
g - The graphics context.
x - The x coordinate of the top left corner.
y - The y coordinate of the top left corner.

getIconWidth

public int getIconWidth()
Returns the icon's width.

Specified by:
getIconWidth in interface javax.swing.Icon
Returns:
An int specifying the fixed width of the icon.

getIconHeight

public int getIconHeight()
Returns the icon's height.

Specified by:
getIconHeight in interface javax.swing.Icon
Returns:
An int specifying the fixed height of the icon.