|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.awt.Component
java.awt.Canvas
com.sshtools.ui.awt.ImageTextLabel
A label that can display both graphics and text, somewhat similar to swings JLabel.
| Nested Class Summary |
| Nested classes inherited from class java.awt.Canvas |
java.awt.Canvas.AccessibleAWTCanvas |
| Nested classes inherited from class java.awt.Component |
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy |
| Field Summary | |
static int |
EMPTY
Empty space (takes up 2 pixels) |
static int |
LOWERED_BEVEL
Lowered bevel border (takes up 2 pixels) |
static int |
NONE
No border. |
static int |
RAISED_BEVEL
Raised bevel border (takes up 2 pixels) |
| 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 | |
ImageTextLabel()
|
|
ImageTextLabel(java.awt.Image image,
java.lang.String text)
|
|
| Method Summary | |
void |
addNotify()
|
void |
doLayout()
|
java.awt.Color |
getBorderColor()
|
java.awt.Image |
getImage()
Get the image |
java.awt.Insets |
getInsets()
Return insets sufficient for bevel and label drawing space. |
java.awt.Insets |
getMargin()
|
java.awt.Dimension |
getMinimumSize()
|
java.awt.Dimension |
getPreferredSize()
|
java.lang.String |
getText()
Get the text to display |
int |
getTextImageGap()
Get the gap (in pixels) between the image and text. |
boolean |
isTextVisible()
Get whether or not the text is visible |
void |
paint(java.awt.Graphics g1)
|
void |
paintBorder(java.awt.Graphics g)
|
void |
setBorderColor(java.awt.Color borderColor)
|
void |
setBorderType(int borderType)
Set the border type. |
void |
setImage(java.awt.Image image)
Set the image |
void |
setMargin(java.awt.Insets margin)
|
void |
setText(java.lang.String text)
Set the text to display |
void |
setTextImageGap(int textImageGap)
Set the gap (in pixels) between the image and text. |
void |
setTextVisible(boolean textVisible)
Set whether or not the text is visible |
void |
update(java.awt.Graphics g)
|
| Methods inherited from class java.awt.Canvas |
createBufferStrategy, createBufferStrategy, getAccessibleContext, getBufferStrategy |
| Methods inherited from class java.awt.Component |
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, deliverEvent, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, getAlignmentX, getAlignmentY, getBackground, getBounds, getBounds, getColorModel, getComponentAt, getComponentAt, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeys, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getListeners, getLocale, getLocation, getLocation, getLocationOnScreen, getMaximumSize, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, invalidate, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusCycleRoot, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isOpaque, isShowing, isValid, isVisible, keyDown, keyUp, layout, list, list, list, list, list, locate, location, lostFocus, minimumSize, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, paramString, postEvent, preferredSize, prepareImage, prepareImage, print, printAll, processComponentEvent, processEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, reshape, resize, resize, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeys, setFocusTraversalKeysEnabled, setFont, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, setVisible, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle, validate |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
public static final int NONE
public static final int LOWERED_BEVEL
public static final int RAISED_BEVEL
public static final int EMPTY
| Constructor Detail |
public ImageTextLabel()
public ImageTextLabel(java.awt.Image image,
java.lang.String text)
| Method Detail |
public void addNotify()
public void setTextVisible(boolean textVisible)
textVisible - text visiblepublic boolean isTextVisible()
public void setMargin(java.awt.Insets margin)
public java.awt.Insets getMargin()
public void paint(java.awt.Graphics g1)
public void doLayout()
public void setTextImageGap(int textImageGap)
textImageGap - gap in pixels between text and imagepublic int getTextImageGap()
public java.awt.Image getImage()
public void setImage(java.awt.Image image)
image - imagepublic java.awt.Color getBorderColor()
public void setBorderColor(java.awt.Color borderColor)
public void setText(java.lang.String text)
text - textpublic java.lang.String getText()
public void setBorderType(int borderType)
ImageTextLabel.NONEImageTextLabel.LOWEREDImageTextLabel.RAISED
borderType - border typepublic java.awt.Insets getInsets()
public void paintBorder(java.awt.Graphics g)
public void update(java.awt.Graphics g)
public java.awt.Dimension getPreferredSize()
public java.awt.Dimension getMinimumSize()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||