|
Components |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
com.sas.visuals.Part
public class Part
Part is an extension of Rectangle that provides a notion of ultra-lightweight components. The functionality mimics Component as close as possible.
Field Summary | |
---|---|
protected java.awt.Color |
_bg
the background color of the Part |
protected BorderInterface |
_border
|
protected int |
_borderStyle
the border style of the Part |
protected java.awt.Color |
_fg
the foreground color of the Part |
protected java.awt.Font |
_font
the font associated with the Part |
protected java.awt.Component |
_parent
the parent of the Part |
protected java.lang.Boolean |
_transparent
|
protected boolean |
_visible
the visibility flag of the Part |
Constructor Summary | |
---|---|
protected |
Part()
The default constructor of the Part |
|
Part(java.awt.Component parent)
Creates an Part with the specified parent |
|
Part(java.awt.Component parent,
java.awt.Dimension size)
Creates an Part with the specified parent and Dimension |
|
Part(java.awt.Component parent,
java.awt.Rectangle size)
Creates an Part with the specified parent and Rectangle |
|
Part(Part p)
|
Method Summary | |
---|---|
boolean |
equals(java.lang.Object obj)
Two Parts are only equal if they are == |
java.awt.Color |
getBackground()
Gets the background color of the Part. |
BorderInterface |
getBorder()
|
java.awt.Font |
getFont()
Gets the font associated with the Part. |
java.awt.Color |
getForeground()
Gets the foreground color of the Part. |
java.awt.Insets |
getInsets()
Gets the insets of the Part. |
java.awt.Dimension |
getMaximumSize()
Gets the maximum size of the Part |
java.awt.Dimension |
getMinimumSize()
Gets the minimum size of the Part |
java.awt.Component |
getParent()
Gets the parent of the Part |
java.awt.Dimension |
getPreferredSize()
Gets the preferred size for the Part |
java.awt.Dimension |
getPreferredSize(java.awt.Graphics g)
Gets the preferred size for the Part |
int |
getWindowBorderStyle()
|
int |
hashCode()
Returns a hash code value for the object |
boolean |
isTransparent()
|
boolean |
isVisible()
Gets the visible attribute of the Part |
void |
paint(java.awt.Component component,
java.awt.Graphics g,
int x,
int y,
int width,
int height)
|
void |
paint(java.awt.Graphics g)
Called to paint the properties of the Part. |
protected void |
paintBackground(java.awt.Graphics g)
|
protected void |
paintView(java.awt.Graphics g)
Called to paint the properties of the Part. |
protected void |
printView(java.awt.PrintGraphics g)
Called to print the properties of the Part. |
void |
repaint()
Repaints the Part |
void |
setBackground(java.awt.Color c)
Sets the background color of the Part |
void |
setBorder(BorderInterface border)
|
void |
setFont(java.awt.Font font)
Sets the font for the Part |
void |
setForeground(java.awt.Color c)
Sets the foreground color of the Part |
void |
setParent(java.awt.Component parent)
Sets the Part to have the specified parent |
void |
setTransparent(boolean transparent)
|
void |
setVisible(boolean visible)
Sets the visible attribute of the Part |
void |
setWindowBorderStyle(int s)
|
Field Detail |
---|
protected java.awt.Component _parent
protected int _borderStyle
protected java.awt.Color _fg
protected java.awt.Color _bg
protected java.awt.Font _font
protected boolean _visible
protected java.lang.Boolean _transparent
protected BorderInterface _border
Constructor Detail |
---|
protected Part()
public Part(java.awt.Component parent)
parent
- the parent of the Partpublic Part(java.awt.Component parent, java.awt.Dimension size)
parent
- the parent of the Partsize
- the initial size of the Partpublic Part(java.awt.Component parent, java.awt.Rectangle size)
parent
- the parent of the Partsize
- the initial size of the Partpublic Part(Part p)
Method Detail |
---|
public java.awt.Component getParent()
public void setParent(java.awt.Component parent)
parent
- the parent of the Partpublic void repaint()
public void paint(java.awt.Graphics g)
g
- the Graphics associated with the Partpublic void paint(java.awt.Component component, java.awt.Graphics g, int x, int y, int width, int height)
paint
in interface com.sas.visuals.PainterInterface
protected void paintView(java.awt.Graphics g)
g
- the Graphics associated with the Partprotected void paintBackground(java.awt.Graphics g)
protected void printView(java.awt.PrintGraphics g)
g
- the PrintGraphics associated with the Partpublic void setWindowBorderStyle(int s)
public int getWindowBorderStyle()
public BorderInterface getBorder()
public void setBorder(BorderInterface border)
public java.awt.Insets getInsets()
getInsets
in interface com.sas.visuals.PainterInterface
public java.awt.Dimension getPreferredSize()
public java.awt.Dimension getPreferredSize(java.awt.Graphics g)
g
- the Graphics associated with the Part
public java.awt.Dimension getMinimumSize()
public java.awt.Dimension getMaximumSize()
public void setBackground(java.awt.Color c)
c
- the background colorpublic java.awt.Color getBackground()
public void setForeground(java.awt.Color c)
c
- the foreground colorpublic java.awt.Color getForeground()
public void setFont(java.awt.Font font)
font
- the desired fontpublic java.awt.Font getFont()
public void setVisible(boolean visible)
visible
- the visible attributepublic boolean isVisible()
public void setTransparent(boolean transparent)
public boolean isTransparent()
public boolean equals(java.lang.Object obj)
equals
in class java.awt.Rectangle
obj
- the object to compare to.public int hashCode()
hashCode
in class java.awt.geom.Rectangle2D
|
Components |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |