public class JBLabel extends javax.swing.JLabel implements AnchorableComponent, JBComponent<JBLabel>
javax.swing.JLabel.AccessibleJLabel
javax.swing.JComponent.AccessibleJComponent
listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
accessibleContext, BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
Constructor and Description |
---|
JBLabel() |
JBLabel(javax.swing.Icon image) |
JBLabel(javax.swing.Icon image,
int horizontalAlignment) |
JBLabel(java.lang.String text) |
JBLabel(java.lang.String text,
javax.swing.Icon icon,
int horizontalAlignment) |
JBLabel(java.lang.String text,
int horizontalAlignment) |
JBLabel(java.lang.String text,
UIUtil.ComponentStyle componentStyle) |
JBLabel(java.lang.String text,
UIUtil.ComponentStyle componentStyle,
UIUtil.FontColor fontColor) |
JBLabel(UIUtil.ComponentStyle componentStyle) |
Modifier and Type | Method and Description |
---|---|
JBLabel |
andOpaque() |
JBLabel |
andTransparent() |
protected javax.swing.event.HyperlinkListener |
createHyperlinkListener()
This listener will be used in 'copyable' mode when a link is updated (clicked, entered, etc.).
|
javax.swing.JComponent |
getAnchor() |
UIUtil.ComponentStyle |
getComponentStyle() |
UIUtil.FontColor |
getFontColor() |
java.awt.Color |
getForeground() |
java.awt.Dimension |
getMinimumSize() |
java.awt.Dimension |
getPreferredSize() |
protected void |
paintComponent(java.awt.Graphics g) |
JBLabel |
setAllowAutoWrapping(boolean allowAutoWrapping)
In 'copyable' mode auto-wrapping is disabled by default.
|
void |
setAnchor(javax.swing.JComponent anchor) |
void |
setBounds(int x,
int y,
int width,
int height) |
void |
setComponentStyle(UIUtil.ComponentStyle componentStyle) |
JBLabel |
setCopyable(boolean copyable)
In 'copyable' mode JBLabel has the same appearance but user can select text with mouse and copy it to clipboard with standard shortcut.
|
void |
setFocusable(boolean focusable) |
void |
setFont(java.awt.Font font) |
void |
setFontColor(UIUtil.FontColor fontColor) |
void |
setForeground(java.awt.Color fg) |
void |
setIcon(javax.swing.Icon icon) |
void |
setIconTextGap(int iconTextGap) |
void |
setIconWithAlignment(javax.swing.Icon icon,
int horizontalAlignment,
int verticalAlignment) |
void |
setText(java.lang.String text) |
void |
setVerticalTextPosition(int textPosition) |
protected void |
updateLayout() |
void |
updateUI() |
JBLabel |
withBorder(javax.swing.border.Border border) |
JBLabel |
withFont(JBFont font) |
checkHorizontalKey, checkVerticalKey, getAccessibleContext, getDisabledIcon, getDisplayedMnemonic, getDisplayedMnemonicIndex, getHorizontalAlignment, getHorizontalTextPosition, getIcon, getIconTextGap, getLabelFor, getText, getUI, getUIClassID, getVerticalAlignment, getVerticalTextPosition, imageUpdate, paramString, setDisabledIcon, setDisplayedMnemonic, setDisplayedMnemonic, setDisplayedMnemonicIndex, setHorizontalAlignment, setHorizontalTextPosition, setLabelFor, setUI, setVerticalAlignment
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, 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, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
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, transferFocusDownCycle, validate, validateTree
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, 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, setComponentOrientation, setCursor, setDropTarget, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setMixingCutoutShape, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
public JBLabel()
public JBLabel(UIUtil.ComponentStyle componentStyle)
public JBLabel(javax.swing.Icon image)
public JBLabel(java.lang.String text)
public JBLabel(java.lang.String text, UIUtil.ComponentStyle componentStyle)
public JBLabel(java.lang.String text, UIUtil.ComponentStyle componentStyle, UIUtil.FontColor fontColor)
public JBLabel(java.lang.String text, int horizontalAlignment)
public JBLabel(javax.swing.Icon image, int horizontalAlignment)
public JBLabel(java.lang.String text, javax.swing.Icon icon, int horizontalAlignment)
public void setComponentStyle(UIUtil.ComponentStyle componentStyle)
public UIUtil.ComponentStyle getComponentStyle()
public UIUtil.FontColor getFontColor()
public void setFontColor(UIUtil.FontColor fontColor)
public java.awt.Color getForeground()
getForeground
in class java.awt.Component
public void setForeground(java.awt.Color fg)
setForeground
in class javax.swing.JComponent
public void setAnchor(javax.swing.JComponent anchor)
setAnchor
in interface AnchorableComponent
public javax.swing.JComponent getAnchor()
getAnchor
in interface AnchorableComponent
public java.awt.Dimension getPreferredSize()
getPreferredSize
in class javax.swing.JComponent
public java.awt.Dimension getMinimumSize()
getMinimumSize
in class javax.swing.JComponent
protected void paintComponent(java.awt.Graphics g)
paintComponent
in class javax.swing.JComponent
public void setText(java.lang.String text)
setText
in class javax.swing.JLabel
public void setIcon(javax.swing.Icon icon)
setIcon
in class javax.swing.JLabel
public void setIconWithAlignment(javax.swing.Icon icon, int horizontalAlignment, int verticalAlignment)
public void setFocusable(boolean focusable)
setFocusable
in class java.awt.Component
public void setFont(java.awt.Font font)
setFont
in class javax.swing.JComponent
public void setIconTextGap(int iconTextGap)
setIconTextGap
in class javax.swing.JLabel
public void setBounds(int x, int y, int width, int height)
setBounds
in class java.awt.Component
public void setVerticalTextPosition(int textPosition)
setVerticalTextPosition
in class javax.swing.JLabel
protected void updateLayout()
public void updateUI()
updateUI
in class javax.swing.JLabel
protected javax.swing.event.HyperlinkListener createHyperlinkListener()
public JBLabel setCopyable(boolean copyable)
public JBLabel setAllowAutoWrapping(boolean allowAutoWrapping)
public JBLabel withBorder(javax.swing.border.Border border)
withBorder
in interface JBComponent<JBLabel>
public JBLabel withFont(JBFont font)
withFont
in interface JBComponent<JBLabel>
public JBLabel andTransparent()
andTransparent
in interface JBComponent<JBLabel>
public JBLabel andOpaque()
andOpaque
in interface JBComponent<JBLabel>