Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## charvax.swing
Class JLabel

    java.lang.Object
      charva.awt.Component
          charvax.swing.JComponent
              charvax.swing.JLabel

public class JLabel
extends JComponent

A display area for a short text string. A label cannot react to keyboard events and cannot receive the keyboard focus.

Field Summary

Fields inherited from class charvax.swing.JComponent
`_border`

Fields inherited from class charva.awt.Component
`_alignmentX, _alignmentY, _background, _cursesColor, _enabled, _focusListeners, _foreground, _keyListeners, _origin, _parent, _visible, BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT`

Constructor Summary
`JLabel()` Construct an empty label.
`JLabel(java.lang.String text_)` Construct a JLabel with the specified text.
`JLabel(java.lang.String text_, int align_)` Use this constructor if you want to set the alignment to something other than left-aligned.

Method Summary
`void` | `debug(int level_)`
`void` | `draw()` Draws the border of the component (if there is one).
`int` | `getHeight()`
`Dimension` | `getSize()` This may be wrong, but it'll do for now.
`java.lang.String` | `getText()`
`int` | `getWidth()`
`boolean` | `isFocusTraversable()` This component will not receive focus when Tab or Shift-Tab is pressed.
`Dimension` | `minimumSize()`
`void` | `processKeyEvent(KeyEvent ke_)` The JLabel class ignores key events.
`void` | `requestFocus()` The JLabel component never gets the keyboard input focus.
`void` | `setLength(int length_)`
`void` | `setText(java.lang.String label_)`
`java.lang.String` | `toString()`

Methods inherited from class charvax.swing.JComponent
`getBorder, getInsets, setBorder`

Methods inherited from class charva.awt.Component
`addFocusListener, addKeyListener, contains, contains, getAlignmentX, getAlignmentY, getAncestorWindow, getBackground, getBounds, getCursesColor, getForeground, getLocation, getLocationOnScreen, getName, getParent, hasFocus, hide, invalidate, isDisplayed, isEnabled, isTotallyObscured, isValid, isVisible, processEvent, processFocusEvent, processMouseEvent, repaint, requestSync, setBackground, setBounds, setBounds, setBounds, setEnabled, setForeground, setLocation, setLocation, setName, setParent, setVisible, show, validate, validateCursesColor`

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

Constructor Detail

### JLabel

    public JLabel()

  Construct an empty label.

### JLabel

    public JLabel(java.lang.String text_)

  Construct a JLabel with the specified text.

### JLabel

    public JLabel(java.lang.String text_,
                  int align_)

  Use this constructor if you want to set the alignment to something other than left-aligned.

Method Detail

### setLength

    public void setLength(int length_)

### minimumSize

    public Dimension minimumSize()

  Specified by:
    `minimumSize` in class `Component`

### draw

    public void draw()

  Description copied from class: `JComponent`
  Draws the border of the component (if there is one).

  Overrides:
    `draw` in class `JComponent`

### getSize

    public Dimension getSize()

  This may be wrong, but it'll do for now.

  Specified by:
    `getSize` in class `Component`

### getWidth

    public int getWidth()

  Specified by:
    `getWidth` in class `Component`

### getHeight

    public int getHeight()

  Specified by:
    `getHeight` in class `Component`

### setText

    public void setText(java.lang.String label_)

### getText

    public java.lang.String getText()

### isFocusTraversable

    public boolean isFocusTraversable()

  This component will not receive focus when Tab or Shift-Tab is pressed.

  Overrides:
    `isFocusTraversable` in class `Component`

### processKeyEvent

    public void processKeyEvent(KeyEvent ke_)

  The JLabel class ignores key events. A JLabel should never have input focus anyway.

  Overrides:
    `processKeyEvent` in class `Component`

### requestFocus

    public void requestFocus()

  The JLabel component never gets the keyboard input focus.

  Overrides:
    `requestFocus` in class `Component`

### debug

    public void debug(int level_)

  Specified by:
    `debug` in class `Component`

### toString

    public java.lang.String toString()

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD