public class JMultiLineLabel
extends oracle.bali.ewt.text.MultiLineLabel
JMultiLineLabel
is a subclass of MultiLineLabel
that is intended to be used as a label that wraps.
By default, labels will be left justified, and will wrap on word
boundaries. javax.swing.JComponent.AccessibleJComponent
ALIGNMENT_CENTER, ALIGNMENT_DEFAULT, ALIGNMENT_LEFT, ALIGNMENT_RIGHT, ASPECTRATIO_NONE, NOT_SET, PROPERTY_TEXT
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
Constructor and Description |
---|
JMultiLineLabel()
Constructs a new empty
JMultiLineLabel . |
JMultiLineLabel(java.lang.String text)
Constructs a new
JMultiLineLabel with the
given text. |
Modifier and Type | Method and Description |
---|---|
boolean |
isFocusable()
Overriden to make it conditional whether the label should take focus or not
|
void |
setAllowFocus(boolean allowFocus)
Normally a label should not allow focus, but if a multi-line label is the
only thing in a dialog or has enough text that scrolling becomes necessary
it's advisable to let it take focus for ADA purposes.
|
addNotify, createToolTip, doLayout, getAccessibleContext, getForeground, getMaximumColumns, getMaximumRows, getMaximumSize, getMinimumColumns, getMinimumRows, getMinimumSize, getPreferredAspectRatio, getPreferredColumns, getPreferredRows, getPreferredScrollableViewportSize, getScrollableTracksViewportWidth, getText, getTextWrapper, getVMaximum, getVOffsetOfValue, getVValueOfOffset, isForceWrapping, isFullyJustified, isHScrollable, isVerticalShrinking, isVScrollable, layoutCanvas, paintCanvasInterior, setFont, setForceWrapping, setForeground, setFullJustification, setLocale, setMaximumColumns, setMaximumRows, setMaximumSize, setMinimumColumns, setMinimumRows, setMinimumSize, setPreferredAspectRatio, setPreferredColumns, setPreferredRows, setText, setTextWrapper, setVerticalShrinking, updateUI
autoscroll, clipCanvasToParents, convertCanvasToOuter, convertInnerToOuterSize, convertInnerToOuterSize, convertInteriorToOuter, convertOuterToCanvas, convertOuterToInterior, getAutoscrollInsets, getCanvasBounds, getCanvasGraphics, getCanvasHeight, getCanvasOrigin, getCanvasOriginX, getCanvasOriginY, getCanvasSize, getCanvasWidth, getDocumentSize, getHMaximum, getHOffsetOfValue, getHValueOfOffset, getInnerBounds, getInnerHeight, getInnerOrigin, getInnerSize, getInnerWidth, getPreferredSize, getScrollableBlockIncrement, getScrollableTracksViewportHeight, getScrollableUnitIncrement, getScrollParent, getViewport, invalidateCanvas, layout, makeCanvasGraphics, paintComponent, paintImmediateCanvas, printPage, removeNotify, repaintCanvas, setCanvasBounds, setCanvasOrigin, setCanvasSize, setPreferredSize
clipToParents, freezeRepaints, getActualAlignment, getActualReadingDirection, getAlignment, getBorderInsets, getFill, getPageBounds, getPrintPaintContext, isFocusTraversable, paintChildren, paintImmediateInterior, paintImmediateInterior, paintImmediately, paintOverChildren, processEvent, processEventImpl, repaint, repaintInterior, repaintInterior, setAlignment, setFill, unfreezeRepaints
getBorderContext, getPaintContext, getPaintData, getPaintState, getUIDefaults, setUI
addAncestorListener, addVetoableChangeListener, computeVisibleRect, contains, 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, getNextFocusableComponent, getPopupLocation, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getUIClassID, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, hide, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingOrigin, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintImmediately, paramString, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeVetoableChangeListener, 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, setNextFocusableComponent, setOpaque, setRequestFocusEnabled, setToolTipText, setTransferHandler, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, 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, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, 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, 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, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
public JMultiLineLabel()
JMultiLineLabel
.public JMultiLineLabel(java.lang.String text)
JMultiLineLabel
with the
given text.text
- the text to display as the labelpublic void setAllowFocus(boolean allowFocus)
allowFocus
- true if the label can take focus; false otherwisepublic boolean isFocusable()
isFocusable
in class java.awt.Component