RichComponentpublic class ReflectedImageLabel extends javax.swing.JLabel implements RichComponent
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BaselineResizeBehavior, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategyjava.awt.Container.AccessibleAWTContaineraccessibleContext, BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENTABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH| Constructor | Description |
|---|---|
ReflectedImageLabel(java.awt.Image image,
int width,
int height) |
Deprecated.
This function will be removed, use setNeutralWidth() on JCarousel instead.
|
ReflectedImageLabel(java.awt.Image image,
java.lang.String text) |
Creates a new instance of a reflected label using the supplied image and text
|
ReflectedImageLabel(java.awt.Image image,
java.lang.String text,
int width,
int height) |
Deprecated.
This function will be removed, use setNeutralWidth() on JCarousel instead.
|
ReflectedImageLabel(java.lang.String imageURL) |
See constructor for image label, this version of the constructor takes an image URL instead
of the image object (the URL can be in string format).
|
ReflectedImageLabel(java.lang.String imageURL,
int width,
int height) |
Deprecated.
This function will be removed, use setNeutralWidth() on JCarousel instead.
|
ReflectedImageLabel(java.lang.String imageURL,
java.lang.String text,
int width,
int height) |
Deprecated.
This function will be removed, use setNeutralWidth() on JCarousel instead.
|
| Modifier and Type | Method | Description |
|---|---|---|
java.awt.Dimension |
getPreferredSize() |
Overrides the default getPreferedSize() which has been controlled by the created image and adds 50% onto the height to allow for the reflection.
|
java.lang.String |
getRichText() |
See interface definition
|
void |
paintComponent(java.awt.Graphics graphics) |
Paints the component
|
void |
prePaintImage() |
See interface definition
|
void |
setAlpha(float alphaLevel) |
Sets the transparency of the component
|
void |
setImage(java.awt.Image image) |
Deprecated.
Please use setRichImage() instead from the RichComponent interface
|
void |
setLabel(java.lang.String text) |
Deprecated.
Use setRichText() instead
|
void |
setRichImage(java.awt.Image image) |
See interface definition
|
void |
setRichImage(java.io.File image) |
See interface definition
|
void |
setRichImage(java.net.URL image) |
Assigns an image to the component, the width and height taken from the supplied image
|
void |
setRichText(java.lang.String text) |
See interface definition
|
protected void |
setupImage(java.awt.Image image) |
Adds a reflection to the supplied image
|
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setMixingCutoutShape, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycleadd, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusDownCycle, validate, validateTreeaddAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, hide, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingOrigin, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, updatecheckHorizontalKey, checkVerticalKey, getAccessibleContext, getDisabledIcon, getDisplayedMnemonic, getDisplayedMnemonicIndex, getHorizontalAlignment, getHorizontalTextPosition, getIcon, getIconTextGap, getLabelFor, getText, getUI, getUIClassID, getVerticalAlignment, getVerticalTextPosition, imageUpdate, paramString, setDisabledIcon, setDisplayedMnemonic, setDisplayedMnemonic, setDisplayedMnemonicIndex, setHorizontalAlignment, setHorizontalTextPosition, setIcon, setIconTextGap, setLabelFor, setText, setUI, setVerticalAlignment, setVerticalTextPosition, updateUIpublic ReflectedImageLabel(java.awt.Image image,
int width,
int height)
image - The Image objectwidth - The prefered width of the image when rendered by a rich containerheight - The prefered heightof the image when rendered by a rich containerpublic ReflectedImageLabel(java.awt.Image image,
java.lang.String text,
int width,
int height)
image - The imagetext - The text labelwidth - The prefered width of the image when rendered by a rich containerheight - The prefered height of the image when rendered by a rich containerpublic ReflectedImageLabel(java.awt.Image image,
java.lang.String text)
image - The image to be usedtext - The text to be displayedpublic ReflectedImageLabel(java.lang.String imageURL)
imageURL - A URL (in string form) of the image.public ReflectedImageLabel(java.lang.String imageURL,
int width,
int height)
imageURL - The URL of the image (String form)width - The prefered width of the image when rendered by a rich containerheight - The prefered height of the image when rendered by a rich containerpublic ReflectedImageLabel(java.lang.String imageURL,
java.lang.String text,
int width,
int height)
imageURL - The URL of the image in text formtext - The RichText to be displayedwidth - The prefered width of the image when rendered by a rich containerheight - The prefered height of the image when rendered by a rich containerpublic void setLabel(java.lang.String text)
text - The rich textprotected void setupImage(java.awt.Image image)
image - The image object to use to pre-render the reflectionpublic void setAlpha(float alphaLevel)
setAlpha in interface RichComponentalphaLevel - The alpha level of the objectRichComponentpublic void setImage(java.awt.Image image)
image - An image object to use (reflection will be added)RichComponentpublic java.awt.Dimension getPreferredSize()
getPreferredSize in class javax.swing.JComponentpublic void paintComponent(java.awt.Graphics graphics)
paintComponent in class javax.swing.JComponentgraphics - The graphics contextpublic void setRichImage(java.net.URL image)
setRichImage in interface RichComponentimage - The URL of the imagepublic void setRichImage(java.io.File image)
setRichImage in interface RichComponentimage - See interface definitionRichComponentpublic void setRichImage(java.awt.Image image)
setRichImage in interface RichComponentimage - See interface definitionRichComponentpublic void prePaintImage()
prePaintImage in interface RichComponentRichComponentpublic void setRichText(java.lang.String text)
setRichText in interface RichComponenttext - See interface definitionRichComponentpublic java.lang.String getRichText()
getRichText in interface RichComponentRichComponent