Squiz Matrix  4.12.2
 All Data Structures Namespaces Functions Variables Pages
CompoundIcon Class Reference
Inheritance diagram for CompoundIcon:

Public Member Functions

 CompoundIcon ()
 
 CompoundIcon (Icon mainIcon, Icon decorator, int xAlignment, int yAlignment)
 
boolean isLegalValue (int value, int[] legal)
 
Icon getDisabledIcon ()
 
int getIconWidth ()
 
int getIconHeight ()
 
void paintIcon (Component c, Graphics g, int x, int y)
 

Protected Attributes

Icon mainIcon
 
int yAlignment = BOTTOM
 
int xAlignment = LEFT
 

Static Protected Attributes

static final int[] VALID_X = {LEFT, RIGHT, CENTER}
 
static final int[] VALID_Y = {TOP, BOTTOM, CENTER}
 

Detailed Description

The compond icon can be used to take an existing icon and overlay another smaller icon over it.

Author
Marc McIntyre mmcin.nosp@m.tyre.nosp@m.@squi.nosp@m.z.ne.nosp@m.t

Definition at line 28 of file CompoundIcon.java.

Constructor & Destructor Documentation

CompoundIcon ( )
inline

Constructor with empty args so that the class can be extended

Definition at line 51 of file CompoundIcon.java.

CompoundIcon ( Icon  mainIcon,
Icon  decorator,
int  xAlignment,
int  yAlignment 
)
inline

Constructs a conpound icon

Parameters
mainIconthe main icon which will be on the bottom layer
decoratorthe decorator icon which will be on the top layer
xAlignmentthe x alignment
yAlignmentthe y alignment

Definition at line 63 of file CompoundIcon.java.

Member Function Documentation

Icon getDisabledIcon ( )
inline

Returns an icon that can be used in disabled JLabels

Returns
the disabled icon

Definition at line 111 of file CompoundIcon.java.

int getIconHeight ( )
inline

Returns the icon height, which is the same as the main icon height

Returns
the icon height

Definition at line 131 of file CompoundIcon.java.

int getIconWidth ( )
inline

Returns the icon with of the compond icon, wchich is the sam with as the main icon

Returns
the width

Definition at line 122 of file CompoundIcon.java.

boolean isLegalValue ( int  value,
int[]  legal 
)
inline

Returns TRUE if the specified value is legal

Parameters
valuethe value to check
legalthe legal values
Returns

Definition at line 98 of file CompoundIcon.java.

void paintIcon ( Component  c,
Graphics  g,
int  x,
int  y 
)
inline

Paints the compound icon

Parameters
cthe component
gthe graphics set
xthe x co-ordinate
ythe y co-ordiate

Definition at line 143 of file CompoundIcon.java.

Field Documentation

Icon mainIcon
protected

The main and decorator icons

Definition at line 39 of file CompoundIcon.java.

final int [] VALID_X = {LEFT, RIGHT, CENTER}
staticprotected

The valid x positions

Definition at line 32 of file CompoundIcon.java.

final int [] VALID_Y = {TOP, BOTTOM, CENTER}
staticprotected

The valid y positions

Definition at line 36 of file CompoundIcon.java.

int xAlignment = LEFT
protected

The x alignment

Definition at line 45 of file CompoundIcon.java.

int yAlignment = BOTTOM
protected

The y alignment

Definition at line 42 of file CompoundIcon.java.


The documentation for this class was generated from the following file: