|
||||||||||
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
com.sibvisions.rad.ui.swing.ext.JVxIcon
public class JVxIcon
The JVxIcon
is a simple component with an image. The
image can be aligned or stretched.
Nested Class Summary |
---|
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 |
---|
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 com.sibvisions.rad.ui.swing.ext.JVxConstants |
---|
STRETCH |
Fields inherited from interface javax.swing.SwingConstants |
---|
BOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NEXT, NORTH, NORTH_EAST, NORTH_WEST, PREVIOUS, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WEST |
Fields inherited from interface java.awt.image.ImageObserver |
---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
---|---|
JVxIcon()
Creates a new instance of JVxIcon without an image. |
|
JVxIcon(Image pImage)
Creates a new instance of JVxIcon based on an Image . |
Method Summary | |
---|---|
int |
getHorizontalAlignment()
Gets the horizontal alignment of the icon. |
Dimension |
getPreferredSize()
Gets the preferred size of the icon dependent of the configured alignments. |
int |
getVerticalAlignment()
Gets the vertical alignment of the icon. |
void |
paintComponent(Graphics pGraphics)
|
void |
setHorizontalAlignment(int pAlignment)
Sets the horizontal alignment of the icon. |
void |
setImage(Image pImage)
Sets the image for the icon. |
void |
setVerticalAlignment(int pAlignment)
Sets the vertical alignment of the icon. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public JVxIcon()
JVxIcon
without an image.
public JVxIcon(Image pImage)
JVxIcon
based on an Image
.
pImage
- the imageMethod Detail |
---|
public void paintComponent(Graphics pGraphics)
paintComponent
in class JComponent
public Dimension getPreferredSize()
JVxConstants.STRETCH
then the
size of the component will be used. Otherwise the size
of the image will be used.
getPreferredSize
in class JComponent
public void setImage(Image pImage)
pImage
- the imagepublic void setHorizontalAlignment(int pAlignment)
pAlignment
- the alignmentJVxConstants
public int getHorizontalAlignment()
JVxConstants
public void setVerticalAlignment(int pAlignment)
pAlignment
- the alignmentJVxConstants
public int getVerticalAlignment()
JVxConstants
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |