|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectechopoint.tabbedpane.DefaultTabImageRenderer
public class DefaultTabImageRenderer
DefaultTabImageRenderer is a default implementation
of TabImageRenderer that uses a "background template image"
and TextImageReference to return "dynamic" tab image representations.
| Field Summary | |
|---|---|
static Insets |
DEFAULT_INSETS
The default insets used by the DefaultTabImageRenderer |
| Constructor Summary | |
|---|---|
DefaultTabImageRenderer()
Constructs a DefaultTabImageRenderer with default
background tab images. |
|
DefaultTabImageRenderer(java.awt.Image activeTabImage,
java.awt.Image inactiveTabImage)
Constructs a DefaultTabImageRenderer with the specified
background tab images. |
|
| Method Summary | |
|---|---|
java.awt.Image |
getActiveTabImage()
Returns the current active tab java.awt.Image |
Color |
getImageBorderColor()
This is called the indicate the color of any border around the image. |
int |
getImageBorderWidth()
This is called the indicate the width of any border around the image. |
java.awt.Image |
getInactiveTabImage()
Returns the current inactive tab java.awt.Image |
Insets |
getInsets()
Returns the image insets that will be appplied to any TextImageReferences returned. |
static DefaultTabImageRenderer |
getInstance()
This helper method will construct a DefaultTabImageRenderer with default colors of 0xC0C0C0 for the active tabs, 0xE0E0E0 for the inactive tabs and a border color of 0x000000 and a tab placement of EchoConstants.TOP |
static DefaultTabImageRenderer |
getInstance(Color activeTabColor,
Color inactiveTabColor,
Color borderColor,
int tabPlacement)
This helper method will construct a DefaultTabImageRenderer using some template background images. |
static DefaultTabImageRenderer |
getInstance(int tabPlacement)
This helper method will construct a DefaultTabImageRenderer with default colors of 0xC0C0C0 for the active tabs, 0xE0E0E0 for the inactive tabs and a border color of 0x000000. |
ImageReference |
getLeadInImage()
Returns the current lead in ImageReference |
ImageReference |
getLeadInImage(TabbedPane tp)
This returns a "lead in" image that will be place to the left of all tab images. |
ImageReference |
getLeadOutImage()
Returns the current lead out ImageReference |
ImageReference |
getLeadOutImage(TabbedPane tp)
This returns a "lead out" image that will be place to the right of all tab images. |
ImageReference |
getTabImage(TabbedPane tp,
int tabIndex,
java.lang.String tabText,
boolean isActive)
This returns an ImageReference to be used as the tab's representation. |
void |
prime(TabbedPane tp)
This will set properties in the TabbedPane that are sutiable for this TabImageRenderer. |
void |
setActiveTabImage(java.awt.Image image)
Sets the java.awt.Image to be used as a background for active tabs. |
void |
setBorderColor(Color color)
Sets the border color that may be around any of the tab images |
void |
setBorderWidth(int i)
Sets the border width that may be around any of the tab images |
void |
setInactiveTabImage(java.awt.Image image)
Sets the java.awt.Image to be used as a background for inactive tabs. |
void |
setInsets(Insets insets)
Sets the image insets that will be appplied to aby TextImageReferences returned. |
void |
setLeadInImage(ImageReference reference)
Sets the ImageReference to be used for the lead in image |
void |
setLeadOutImage(ImageReference reference)
Sets the ImageReference to be used for the lead out image |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final Insets DEFAULT_INSETS
| Constructor Detail |
|---|
public DefaultTabImageRenderer()
DefaultTabImageRenderer with default
background tab images.
public DefaultTabImageRenderer(java.awt.Image activeTabImage,
java.awt.Image inactiveTabImage)
DefaultTabImageRenderer with the specified
background tab images. The leadIn andleadOut ImageReferences will
be null.
activeTabImage - - the java.awt.Image to be used for active tabsinactiveTabImage - - the java.awt.Image to be used for inactive tabs| Method Detail |
|---|
public ImageReference getLeadInImage(TabbedPane tp)
TabImageRenderer
getLeadInImage in interface TabImageRenderertp - the TabbedPane in question
TabImageRenderer.getLeadInImage(echopoint.TabbedPane)public ImageReference getLeadOutImage(TabbedPane tp)
TabImageRenderer
getLeadOutImage in interface TabImageRenderertp - the TabbedPane in question
TabImageRenderer.getLeadOutImage(echopoint.TabbedPane)
public ImageReference getTabImage(TabbedPane tp,
int tabIndex,
java.lang.String tabText,
boolean isActive)
TabImageRenderer
getTabImage in interface TabImageRenderertp - the TabbedPane in questiontabIndex - - the index of the current tabisActive - - true if the tab is active
TabImageRenderer.getTabImage(TabbedPane, int, String, boolean)public int getImageBorderWidth()
TabImageRenderer
getImageBorderWidth in interface TabImageRendererTabImageRenderer.getImageBorderWidth()public Color getImageBorderColor()
TabImageRenderer
getImageBorderColor in interface TabImageRendererTabImageRenderer.getImageBorderColor()public java.awt.Image getActiveTabImage()
public java.awt.Image getInactiveTabImage()
public ImageReference getLeadInImage()
public ImageReference getLeadOutImage()
public void setActiveTabImage(java.awt.Image image)
image - - the java.awt.Image to be used as a background for
active tabspublic void setInactiveTabImage(java.awt.Image image)
image - - the java.awt.Image to be used as a background for
inactive tabspublic void setLeadInImage(ImageReference reference)
reference - the ImageReference to be used for the lead in imagepublic void setLeadOutImage(ImageReference reference)
reference - the ImageReference to be used for the lead out imagepublic Insets getInsets()
public void setInsets(Insets insets)
insets - public void setBorderColor(Color color)
color - - the border color that may be around any of the tab imagespublic void setBorderWidth(int i)
i - - the border width that may be around any of the tab imagespublic void prime(TabbedPane tp)
This method is best used if you created the DefaultTabImageRenderer with the getInstance() methods.
tp - the TabbedPane tgo be primed with valuespublic static DefaultTabImageRenderer getInstance()
public static DefaultTabImageRenderer getInstance(int tabPlacement)
tabPlacement - - can be EchoConstants.TOP or EchoConstants.BOTTOM
public static DefaultTabImageRenderer getInstance(Color activeTabColor,
Color inactiveTabColor,
Color borderColor,
int tabPlacement)
activeTabColor - - the desired active tab colorinactiveTabColor - - the desired inactive tab colorborderColor - - the desired border colortabPlacement - - can be EchoConstants.TOP or EchoConstants.BOTTOM
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||