Oracle™ Business Intelligence Beans Java API Reference
Release 10
g (9.0.4)
Part number B12159_01


oracle.dss.util.gui
Class ViewLabel

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Container
              |
              +--javax.swing.JComponent
                    |
                    +--javax.swing.JLabel
                          |
                          +--oracle.dss.util.gui.ViewLabel
All Implemented Interfaces:
javax.accessibility.Accessible, java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, javax.swing.SwingConstants

public class ViewLabel
extends javax.swing.JLabel

JLabel that supports underline, double underline, and strike through font. Extra font attributes work for text only, not for images.

See Also:
Serialized Form

Inner classes inherited from class javax.swing.JComponent
javax.swing.JComponent.AccessibleJComponent

 

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, NORTH, NORTH_EAST, NORTH_WEST, 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
ViewLabel()
          Default constructor.
ViewLabel(javax.swing.Icon image)
          Constructor that sets the image.
ViewLabel(javax.swing.Icon image, int horizontalAlignment)
          Constructor that sets the image and the alignment.
ViewLabel(java.lang.String text)
          Constructor that sets the text.
ViewLabel(java.lang.String text, javax.swing.Icon icon, int horizontalAlignment)
          Constructor that specifies text, icon, and alignment.
ViewLabel(java.lang.String text, int horizontalAlignment)
          Constructor that sets the text and the horizontal alignment.

 

Method Summary
 boolean isDoubleUnderline()
          Indicates whether the label has a double underline.
 boolean isStrikeThrough()
          Indicates whether the label has a line through it.
 boolean isUnderline()
          Indicates whether the label is underlined.
 void paintComponent(java.awt.Graphics g)
          Paints the label.
 void setDoubleUnderline(boolean b)
          Specifies whether to double-underline the label text.
 void setStrikeThrough(boolean b)
          Specifies whether to strike through the label text.
 void setUnderline(boolean b)
          Specifies whether to underline the label text.

 

Methods inherited from class javax.swing.JLabel
getAccessibleContext, getDisabledIcon, getDisplayedMnemonic, getHorizontalAlignment, getHorizontalTextPosition, getIcon, getIconTextGap, getLabelFor, getText, getUI, getUIClassID, getVerticalAlignment, getVerticalTextPosition, imageUpdate, setDisabledIcon, setDisplayedMnemonic, setDisplayedMnemonic, setHorizontalAlignment, setHorizontalTextPosition, setIcon, setIconTextGap, setLabelFor, setText, setUI, setVerticalAlignment, setVerticalTextPosition, updateUI

 

Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAutoscrolls, getBorder, getBounds, getClientProperty, getConditionForKeyStroke, getDebugGraphicsOptions, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getVerifyInputWhenFocusTarget, getVisibleRect, getWidth, getX, getY, grabFocus, hasFocus, hide, isDoubleBuffered, isFocusCycleRoot, isFocusTraversable, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paint, paintImmediately, paintImmediately, print, printAll, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setDebugGraphicsOptions, setDoubleBuffered, setEnabled, setFont, setForeground, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update

 

Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getLayout, insets, invalidate, isAncestorOf, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, remove, remove, removeAll, removeContainerListener, setLayout, validate

 

Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, bounds, checkImage, checkImage, contains, createImage, createImage, dispatchEvent, enable, enableInputMethods, getBackground, getBounds, getColorModel, getComponentOrientation, getCursor, getDropTarget, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getInputContext, getInputMethodRequests, getLocale, getLocation, getLocationOnScreen, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, inside, isDisplayable, isEnabled, isLightweight, 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, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus

 

Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait

 

Constructor Detail

ViewLabel

public ViewLabel(java.lang.String text,
                 javax.swing.Icon icon,
                 int horizontalAlignment)
Constructor that specifies text, icon, and alignment. The label is centered vertically in its display area. The text is on the trailing edge of the image.
Parameters:
text - The text to be displayed by the label.
icon - The image to be displayed by the label.
horizontalAlignment - One of the following constants defined in SwingConstants:
  • LEFT
  • CENTER
  • RIGHT
  • LEADING
  • TRAILING

ViewLabel

public ViewLabel(java.lang.String text,
                 int horizontalAlignment)
Constructor that sets the text and the horizontal alignment. The label is centered vertically in its display area.
Parameters:
text - The text to be displayed by the label.
horizontalAlignment - One of the following constants defined in SwingConstants:
  • LEFT
  • CENTER
  • RIGHT
  • LEADING
  • TRAILING

ViewLabel

public ViewLabel(java.lang.String text)
Constructor that sets the text. The label is aligned against the leading edge of its display area, and centered vertically.
Parameters:
text - The text to be displayed by the label.

ViewLabel

public ViewLabel(javax.swing.Icon image,
                 int horizontalAlignment)
Constructor that sets the image and the alignment. The label is centered vertically in its display area.
Parameters:
icon - The image to be displayed by the label.
horizontalAlignment - One of the following constants defined in SwingConstants:
  • LEFT
  • CENTER
  • RIGHT
  • LEADING
  • TRAILING

ViewLabel

public ViewLabel(javax.swing.Icon image)
Constructor that sets the image. The label is centered vertically and horizontally in its display area.
Parameters:
icon - The image to be displayed by the label.

ViewLabel

public ViewLabel()
Default constructor. The ViewLabel will have no image. The text will be an empty string. The label is centered vertically in its display area. The label's contents, once set, will be displayed on the leading edge of the label's display area.
Method Detail

paintComponent

public void paintComponent(java.awt.Graphics g)
Paints the label.
Parameters:
g - The graphics context.

isUnderline

public boolean isUnderline()
Indicates whether the label is underlined.
Returns:
true if the label is underlined, false if it is not underlined. The default is false.

isDoubleUnderline

public boolean isDoubleUnderline()
Indicates whether the label has a double underline.
Returns:
true if the label has a double underline, false if it not. The default is false.

isStrikeThrough

public boolean isStrikeThrough()
Indicates whether the label has a line through it.
Returns:
true if the label has a line throught it false if it not. The default is false.

setUnderline

public void setUnderline(boolean b)
Specifies whether to underline the label text.
Parameters:
b - true to underline the text, false to remove underlining.

setDoubleUnderline

public void setDoubleUnderline(boolean b)
Specifies whether to double-underline the label text.
Parameters:
b - true to double-underline the text, false to remove underlining.

setStrikeThrough

public void setStrikeThrough(boolean b)
Specifies whether to strike through the label text.
Parameters:
b - true to place a line through the text, false to remove the line.

Oracle™ Business Intelligence Beans Java API Reference
Release 10
g (9.0.4)
Part number B12159_01


Copyright © 2003, Oracle. All Rights Reserved.