|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.awt.Component java.awt.Container javax.swing.JComponent javax.swing.JLabel com.alee.laf.label.WebLabel com.alee.extended.label.WebLinkLabel
public class WebLinkLabel
This custom component provides a link functionality together with default label options. Link could be an internet address, e-mail or some file. You can also specify a custom link action by passing a runnable. Link can also be styled by default using custom L&F icons and default naming.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class javax.swing.JLabel |
---|
javax.swing.JLabel.AccessibleJLabel |
Nested classes/interfaces inherited from class javax.swing.JComponent |
---|
javax.swing.JComponent.AccessibleJComponent |
Nested classes/interfaces inherited from class java.awt.Container |
---|
java.awt.Container.AccessibleAWTContainer |
Nested classes/interfaces inherited from class java.awt.Component |
---|
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BaselineResizeBehavior, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy |
Field Summary | |
---|---|
protected java.util.List<java.awt.event.ActionListener> |
actionListeners
Link activation listeners. |
protected java.lang.String |
actualText
|
protected boolean |
colorVisited
|
static javax.swing.ImageIcon |
EMAIL_ICON
|
protected java.util.concurrent.ExecutorService |
executorService
ExecutorService to limit simultaneously running threads. |
protected java.awt.Color |
foreground
|
protected boolean |
highlight
Style settings. |
protected java.lang.Runnable |
link
Link settings. |
static javax.swing.ImageIcon |
LINK_ICON
Used icons. |
protected boolean |
mouseover
Runtime variables. |
protected boolean |
onPressAction
|
protected java.awt.Color |
visitedForeground
|
protected boolean |
visitedOnce
|
Fields inherited from class javax.swing.JLabel |
---|
labelFor |
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 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 | |
---|---|
WebLinkLabel()
|
|
WebLinkLabel(javax.swing.Icon image)
|
|
WebLinkLabel(javax.swing.Icon image,
int horizontalAlignment)
|
|
WebLinkLabel(java.lang.String text)
|
|
WebLinkLabel(java.lang.String text,
javax.swing.Icon icon,
int horizontalAlignment)
|
|
WebLinkLabel(java.lang.String text,
int horizontalAlignment)
|
Method Summary | |
---|---|
void |
addActionListener(java.awt.event.ActionListener actionListener)
Link action listeners |
protected java.lang.Runnable |
createAddressLink(java.lang.String address)
|
protected java.lang.Runnable |
createEmailLink(java.lang.String email)
|
protected java.lang.Runnable |
createFileLink(java.io.File file)
|
protected void |
fireActionPerformed()
|
java.lang.String |
getActualText()
Link text settings |
java.lang.Runnable |
getLink()
|
java.awt.Color |
getUnvisitedForeground()
Link foreground settings |
java.awt.Color |
getVisitedForeground()
|
protected void |
initializeSettings()
Link label settings initialization |
boolean |
isHighlight()
|
boolean |
isOnPressAction()
|
boolean |
isVisitedOnce()
Link settings |
void |
removeActionListener(java.awt.event.ActionListener actionListener)
|
void |
setEmailLink(java.lang.String email)
|
void |
setEmailLink(java.lang.String email,
boolean setupView)
|
void |
setEmailLink(java.lang.String text,
java.lang.String email)
|
void |
setEmailLink(java.lang.String text,
java.lang.String email,
boolean setupView)
|
void |
setFileLink(java.io.File file)
|
void |
setFileLink(java.io.File file,
boolean setupView)
|
void |
setFileLink(java.lang.String text,
java.io.File file)
|
void |
setFileLink(java.lang.String text,
java.io.File file,
boolean setupView)
|
void |
setForeground(java.awt.Color foreground)
|
void |
setHighlight(boolean highlight)
|
void |
setLink(java.lang.Runnable link)
|
void |
setLink(java.lang.String address)
|
void |
setLink(java.lang.String address,
boolean setupView)
|
void |
setLink(java.lang.String text,
java.lang.Runnable link)
|
void |
setLink(java.lang.String text,
java.lang.Runnable link,
boolean setupView)
|
void |
setLink(java.lang.String text,
java.lang.String address)
|
void |
setLink(java.lang.String text,
java.lang.String address,
boolean setupView)
|
void |
setOnPressAction(boolean onPressAction)
|
void |
setText(java.lang.String text)
|
void |
setUnvisitedForeground(java.awt.Color foreground)
|
void |
setVisitedForeground(java.awt.Color visitedForeground)
|
protected void |
updateForeground()
|
protected void |
updateText()
|
Methods inherited from class javax.swing.JLabel |
---|
checkHorizontalKey, 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, setUI, setVerticalAlignment, setVerticalTextPosition |
Methods inherited from class javax.swing.JComponent |
---|
addAncestorListener, 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, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, 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, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update |
Methods inherited from class java.awt.Container |
---|
add, 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, transferFocusBackward, transferFocusDownCycle, validate, validateTree |
Methods inherited from class java.awt.Component |
---|
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, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, 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, 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 |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface com.alee.managers.language.LanguageMethods |
---|
isLanguageSet, removeLanguage, removeLanguageUpdater, setLanguage, setLanguageUpdater, updateLanguage, updateLanguage |
Field Detail |
---|
public static final javax.swing.ImageIcon LINK_ICON
public static final javax.swing.ImageIcon EMAIL_ICON
protected java.util.concurrent.ExecutorService executorService
protected java.util.List<java.awt.event.ActionListener> actionListeners
protected boolean highlight
protected boolean onPressAction
protected boolean colorVisited
protected java.awt.Color foreground
protected java.awt.Color visitedForeground
protected java.lang.Runnable link
protected java.lang.String actualText
protected boolean mouseover
protected boolean visitedOnce
Constructor Detail |
---|
public WebLinkLabel()
public WebLinkLabel(javax.swing.Icon image)
public WebLinkLabel(javax.swing.Icon image, int horizontalAlignment)
public WebLinkLabel(java.lang.String text)
public WebLinkLabel(java.lang.String text, int horizontalAlignment)
public WebLinkLabel(java.lang.String text, javax.swing.Icon icon, int horizontalAlignment)
Method Detail |
---|
protected void initializeSettings()
public java.awt.Color getUnvisitedForeground()
public void setUnvisitedForeground(java.awt.Color foreground)
public void setForeground(java.awt.Color foreground)
setForeground
in class javax.swing.JComponent
public java.awt.Color getVisitedForeground()
public void setVisitedForeground(java.awt.Color visitedForeground)
protected void updateForeground()
public java.lang.String getActualText()
public void setText(java.lang.String text)
setText
in class javax.swing.JLabel
protected void updateText()
public boolean isVisitedOnce()
public java.lang.Runnable getLink()
public void setLink(java.lang.Runnable link)
public void setLink(java.lang.String text, java.lang.Runnable link)
public void setLink(java.lang.String address)
public void setLink(java.lang.String address, boolean setupView)
public void setLink(java.lang.String text, java.lang.String address)
public void setLink(java.lang.String text, java.lang.String address, boolean setupView)
public void setLink(java.lang.String text, java.lang.Runnable link, boolean setupView)
public void setEmailLink(java.lang.String email)
public void setEmailLink(java.lang.String email, boolean setupView)
public void setEmailLink(java.lang.String text, java.lang.String email)
public void setEmailLink(java.lang.String text, java.lang.String email, boolean setupView)
public void setFileLink(java.io.File file)
public void setFileLink(java.io.File file, boolean setupView)
public void setFileLink(java.lang.String text, java.io.File file)
public void setFileLink(java.lang.String text, java.io.File file, boolean setupView)
public boolean isHighlight()
public void setHighlight(boolean highlight)
public boolean isOnPressAction()
public void setOnPressAction(boolean onPressAction)
public void addActionListener(java.awt.event.ActionListener actionListener)
public void removeActionListener(java.awt.event.ActionListener actionListener)
protected void fireActionPerformed()
protected java.lang.Runnable createAddressLink(java.lang.String address)
protected java.lang.Runnable createEmailLink(java.lang.String email)
protected java.lang.Runnable createFileLink(java.io.File file)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |