|
LEONARDI Application Composer - 8.9.0.40 by W4 S.A. | ||||||||
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.JLabel
leon.view.win.swing.component.LyJHRefComponent
public class LyJHRefComponent
This class implements a simple label with an image.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class javax.swing.JComponent |
---|
javax.swing.JComponent.AccessibleJComponent |
Nested classes/interfaces inherited from class java.awt.Component |
---|
java.awt.Component.BaselineResizeBehavior |
Field Summary | |
---|---|
static java.lang.String |
__VERSION
|
static java.awt.Cursor |
LY_OVER_CURSOR
Mouse cursor when over HRef links. |
int |
MIN_HEIGHT
Minimum height, in pixels. |
static boolean |
SEPARATE_HIGHLIGHT
Separates highlighting of image and label. |
static boolean |
USE_GRAYED_IMAGE
Image is grayed and may be highlighted when mouse is over. |
Fields inherited from class javax.swing.JComponent |
---|
TOOL_TIP_TEXT_KEY, 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 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 | |
---|---|
LyJHRefComponent()
Sole constructor. |
|
LyJHRefComponent(java.lang.String label,
java.awt.Image image,
java.awt.Font font,
boolean visited,
boolean sensitive,
java.lang.Object userData)
Creates a href component with the specified attributes. |
Method Summary | |
---|---|
void |
activateLink()
Does this action when link has been activate. |
void |
addNotify()
(non-Javadoc). |
void |
focusGained(java.awt.event.FocusEvent e)
Refreshes the component when focus is gained. |
void |
focusLost(java.awt.event.FocusEvent e)
Refreshes the component when focus is lost. |
LyActionTransmitter |
getActionTransmitter()
(non-Javadoc). |
java.awt.Dimension |
getPreferredSize()
(non-Javadoc). |
LySelectionTransmitter |
getSelectionTransmitter()
(non-Javadoc). |
java.lang.Object |
getUserData()
Returns user data. |
void |
highlightImage(boolean status)
Uses the highlighted or grayed images on the component depending on the status. |
void |
highlightLabel(boolean status)
Highligts the text label depending on the status and the mouse position, and sets the corresponding cursor. |
boolean |
isFocusTraversable()
This component can always gain focus. |
void |
keyPressed(java.awt.event.KeyEvent e)
Does nothing when a key is pressed. |
void |
keyReleased(java.awt.event.KeyEvent e)
Does nothing when a key is released. |
void |
keyTyped(java.awt.event.KeyEvent e)
(non-Javadoc). |
void |
mouseClicked(java.awt.event.MouseEvent e)
Does nothing. |
void |
mouseDragged(java.awt.event.MouseEvent e)
Does nothing. |
void |
mouseEntered(java.awt.event.MouseEvent e)
Does nothing. |
void |
mouseExited(java.awt.event.MouseEvent e)
(non-Javadoc). |
void |
mouseMoved(java.awt.event.MouseEvent e)
(non-Javadoc). |
void |
mousePressed(java.awt.event.MouseEvent e)
(non-Javadoc). |
void |
mouseReleased(java.awt.event.MouseEvent e)
Does nothing. |
void |
paintComponent(java.awt.Graphics g)
Highlights the text. |
void |
setDefaultColor(java.awt.Color color)
Sets the default color. |
void |
setDisableColor(java.awt.Color color)
Sets the disabled color. |
void |
setFont(java.awt.Font f)
Sets the font and gets its associated font metrics. |
void |
setHighlightColor(java.awt.Color color)
Sets the highlight color. |
void |
setIdle(boolean status)
Sets the idle mode. |
void |
setImage(java.awt.Image img)
Sets the new image and initializes the icon image with the same value. |
void |
setLabel(java.lang.String label)
(non-Javadoc). |
void |
setMinimumWidth(int minimumWidth)
Set the minimum width of this component. |
void |
setSensitive(boolean sensitive)
Sets the sensitivity. |
void |
setUserData(java.lang.Object userData)
Sets the user data. |
void |
setVisited(boolean visited)
Sets the visited status. |
void |
setVisitedColor(java.awt.Color color)
Sets the visited color. |
Methods inherited from class javax.swing.JLabel |
---|
getAccessibleContext, getDisabledIcon, getDisplayedMnemonic, getDisplayedMnemonicIndex, getHorizontalAlignment, getHorizontalTextPosition, getIcon, getIconTextGap, getLabelFor, getText, getUI, getUIClassID, getVerticalAlignment, getVerticalTextPosition, imageUpdate, setDisabledIcon, setDisplayedMnemonic, setDisplayedMnemonic, setDisplayedMnemonicIndex, setHorizontalAlignment, setHorizontalTextPosition, setIcon, setIconTextGap, setLabelFor, setText, setUI, setVerticalAlignment, setVerticalTextPosition, updateUI |
Methods inherited from class javax.swing.JComponent |
---|
addAncestorListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, 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, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintImmediately, paintImmediately, print, printAll, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update |
Methods inherited from class java.awt.Container |
---|
add, add, add, add, add, addContainerListener, 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, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusBackward, transferFocusDownCycle, validate |
Methods inherited from class java.awt.Component |
---|
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, contains, createImage, createImage, createVolatileImage, createVolatileImage, dispatchEvent, enable, enableInputMethods, 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, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, 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, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusUpCycle |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String __VERSION
public static boolean USE_GRAYED_IMAGE
public static boolean SEPARATE_HIGHLIGHT
public static java.awt.Cursor LY_OVER_CURSOR
public int MIN_HEIGHT
Constructor Detail |
---|
public LyJHRefComponent()
public LyJHRefComponent(java.lang.String label, java.awt.Image image, java.awt.Font font, boolean visited, boolean sensitive, java.lang.Object userData)
label
- the text labelimage
- the icon imagefont
- the font of this href componentvisited
- Indicates if this href component is visited.sensitive
- Indicates if this href component is sensitive.userData
- the user datasMethod Detail |
---|
public java.lang.Object getUserData()
setUserData(Object)
public boolean isFocusTraversable()
isFocusTraversable
in class java.awt.Component
true
Component.isFocusTraversable()
public void paintComponent(java.awt.Graphics g)
paintComponent
in class javax.swing.JComponent
JComponent.paintComponent(java.awt.Graphics)
public void mouseDragged(java.awt.event.MouseEvent e)
mouseDragged
in interface java.awt.event.MouseMotionListener
MouseMotionListener.mouseDragged(java.awt.event.MouseEvent)
public void mouseMoved(java.awt.event.MouseEvent e)
mouseMoved
in interface java.awt.event.MouseMotionListener
MouseMotionListener.mouseMoved(java.awt.event.MouseEvent)
public void mousePressed(java.awt.event.MouseEvent e)
mousePressed
in interface java.awt.event.MouseListener
MouseListener.mousePressed(java.awt.event.MouseEvent)
public void mouseClicked(java.awt.event.MouseEvent e)
mouseClicked
in interface java.awt.event.MouseListener
MouseListener.mouseClicked(java.awt.event.MouseEvent)
public void mouseExited(java.awt.event.MouseEvent e)
mouseExited
in interface java.awt.event.MouseListener
MouseListener.mouseExited(java.awt.event.MouseEvent)
public void mouseReleased(java.awt.event.MouseEvent e)
mouseReleased
in interface java.awt.event.MouseListener
MouseListener.mouseReleased(java.awt.event.MouseEvent)
public void mouseEntered(java.awt.event.MouseEvent e)
mouseEntered
in interface java.awt.event.MouseListener
MouseListener.mouseEntered(java.awt.event.MouseEvent)
public void activateLink()
public void highlightLabel(boolean status)
status
- the new statuspublic void highlightImage(boolean status)
status
- the new statuspublic void focusGained(java.awt.event.FocusEvent e)
focusGained
in interface java.awt.event.FocusListener
FocusListener.focusGained(java.awt.event.FocusEvent)
public void focusLost(java.awt.event.FocusEvent e)
focusLost
in interface java.awt.event.FocusListener
FocusListener.focusLost(java.awt.event.FocusEvent)
public void keyPressed(java.awt.event.KeyEvent e)
keyPressed
in interface java.awt.event.KeyListener
KeyListener.keyPressed(java.awt.event.KeyEvent)
public void keyReleased(java.awt.event.KeyEvent e)
keyReleased
in interface java.awt.event.KeyListener
KeyListener.keyReleased(java.awt.event.KeyEvent)
public void keyTyped(java.awt.event.KeyEvent e)
keyTyped
in interface java.awt.event.KeyListener
KeyListener.keyTyped(java.awt.event.KeyEvent)
public LyActionTransmitter getActionTransmitter()
getActionTransmitter
in interface LyEventTransmitter
LyEventTransmitter.getActionTransmitter()
public LySelectionTransmitter getSelectionTransmitter()
getSelectionTransmitter
in interface LyEventTransmitter
LyEventTransmitter.getSelectionTransmitter()
public void setLabel(java.lang.String label)
setLabel
in interface LySetLabelInterface
label
- new labelLySetLabelInterface.setLabel(java.lang.String)
public void setUserData(java.lang.Object userData)
userData
- the new user datagetUserData()
public void setMinimumWidth(int minimumWidth)
minimumWidth
- the new minimum width of the component (a negative value means that
there is no minimum width).public java.awt.Dimension getPreferredSize()
getPreferredSize
in class javax.swing.JComponent
Component.getPreferredSize()
public void addNotify()
addNotify
in class javax.swing.JComponent
Component.addNotify()
public void setDisableColor(java.awt.Color color)
color
- the new disabled colorpublic void setDefaultColor(java.awt.Color color)
color
- the new default colorpublic void setHighlightColor(java.awt.Color color)
color
- the new highlight colorpublic void setVisitedColor(java.awt.Color color)
color
- the new visited colorpublic void setFont(java.awt.Font f)
setFont
in class javax.swing.JComponent
Component.setFont(java.awt.Font)
public void setImage(java.awt.Image img)
img
- the new imagepublic void setSensitive(boolean sensitive)
sensitive
- Indicates if the component is sensitive or not.public void setVisited(boolean visited)
visited
- Indicates if the component is visited or not.public void setIdle(boolean status)
status
- the new idle status
|
(c) January 2013 - W4 S.A. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |