|
ehsbe CommonsTM Version 1.1.0rc3 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JPanel
com.ehsbe.commons.gui.wizard.BannerPanel
public class BannerPanel
The banner panel used by a wizard.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class javax.swing.JPanel |
---|
JPanel.AccessibleJPanel |
Nested classes/interfaces inherited from class javax.swing.JComponent |
---|
JComponent.AccessibleJComponent |
Nested classes/interfaces inherited from class java.awt.Container |
---|
Container.AccessibleAWTContainer |
Nested classes/interfaces inherited from class java.awt.Component |
---|
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy |
Field Summary | |
---|---|
static String |
DEFAULT_IMAGE
name of the default image to show |
protected org.jdesktop.swingx.JXImagePanel |
imgPanel
the image panel |
protected JLabel |
title
the title panel |
protected JxTextPanel |
txtPanel
the description panel |
Fields inherited from class javax.swing.JComponent |
---|
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW |
Fields inherited from class java.awt.Component |
---|
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
Fields inherited from interface java.awt.image.ImageObserver |
---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
---|---|
BannerPanel(String title,
String description,
Image image)
Create a new banner pannel |
|
BannerPanel(String title,
String description,
String imagePath)
Create a new banner pannel |
Method Summary | |
---|---|
void |
set(String title,
String description,
Image image)
Convinience function to update the content of the banner panel at once. |
void |
setBackground(Color bg)
|
void |
setDescription(String text)
Set the text of the description panel. |
void |
setForeground(Color fg)
|
void |
setImage(Image img)
Set the image of the image panel. |
void |
setImage(String imagePath)
Set the image, which should be shown on the rght side of the pannel. |
void |
setTitle(String title)
Set the text of the title panel. |
Methods inherited from class javax.swing.JPanel |
---|
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected JxTextPanel txtPanel
protected JLabel title
protected org.jdesktop.swingx.JXImagePanel imgPanel
public static String DEFAULT_IMAGE
Constructor Detail |
---|
public BannerPanel(String title, String description, String imagePath)
title
- title to setdescription
- description to setimagePath
- resource path of the image to set.public BannerPanel(String title, String description, Image image)
title
- title to setdescription
- description to setimage
- image to set.Method Detail |
---|
public void setBackground(Color bg)
setBackground
in class JComponent
public void setForeground(Color fg)
setForeground
in class JComponent
public void setImage(String imagePath)
NOTE: The path gets not tracked and thus causes always the image to be loaded, even if it is the same, which is already set!
imagePath
- a resource path, i.e. which can be fetched via current
ClassLoader.getResourceAsStream(String)
. If null
a default image gets loaded.public void setImage(Image img)
img
- the image to set.public void setTitle(String title)
title
- text to set.public void setDescription(String text)
text
- text to set.public void set(String title, String description, Image image)
title
- title to setdescription
- description to showimage
- image to set
|
ehsbe CommonsTM Version 1.1.0rc3 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |