org.kemet.lf.components.basic
Class CJLabel

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by javax.swing.JComponent
              extended by javax.swing.JLabel
                  extended by org.kemet.lf.components.basic.CJLabel
All Implemented Interfaces:
java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, javax.accessibility.Accessible, javax.swing.SwingConstants

public class CJLabel
extends javax.swing.JLabel

Since:
0.3
Author:
fabricemaupin

CJLabel : extension of label component.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class javax.swing.JComponent
javax.swing.JComponent.AccessibleJComponent
 
Nested classes/interfaces inherited from class java.awt.Component
java.awt.Component.BaselineResizeBehavior
 
Field Summary
 
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, 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
CJLabel(java.lang.String text, java.awt.Font font, int width, int height, javax.swing.border.Border border, java.awt.Color foreground, java.awt.Color background)
           create custom label (text, font, width, height, border, color for foreground, color for background, horizontal/vertical text position).
CJLabel(java.lang.String text, int width, int height)
           create custom label (text, width, height).
CJLabel(java.lang.String text, int width, int height, javax.swing.border.Border border)
           create custom label (text, width, height, border).
CJLabel(java.lang.String text, int width, int height, javax.swing.border.Border border, java.awt.Color foreground, java.awt.Color background)
           create custom label (text, width, height, border, color for foreground, color for background).
 
Method Summary
 int getHeight()
           return the height of the component.
 int getWidth()
           return the width of the component.
 void setHeight(int height)
           set the height of the component.
 void setHorizontalTextPosition(int position)
           set the horizontal text position.
 void setVerticalTextPosition(int position)
           set the vertical text position.
 void setWidth(int width)
           set the width of the component.
 
Methods inherited from class javax.swing.JLabel
getAccessibleContext, getDisabledIcon, getDisplayedMnemonic, getDisplayedMnemonicIndex, getHorizontalAlignment, getHorizontalTextPosition, getIcon, getIconTextGap, getLabelFor, getText, getUI, getUIClassID, getVerticalAlignment, getVerticalTextPosition, imageUpdate, setDisabledIcon, setDisplayedMnemonic, setDisplayedMnemonic, setDisplayedMnemonicIndex, setHorizontalAlignment, setIcon, setIconTextGap, setLabelFor, setText, setUI, setVerticalAlignment, updateUI
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintImmediately, paintImmediately, print, printAll, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, 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, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusBackward, transferFocusDownCycle, validate
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, contains, createImage, createImage, createVolatileImage, createVolatileImage, dispatchEvent, enable, enableInputMethods, 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, 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
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CJLabel

public CJLabel(java.lang.String text,
               int width,
               int height)

create custom label (text, width, height).

Parameters:
text - text of the label
width - width of the component
height - height of the component
Since:
0.3

CJLabel

public CJLabel(java.lang.String text,
               int width,
               int height,
               javax.swing.border.Border border)

create custom label (text, width, height, border).

Parameters:
text - text of the label
width - width of the component
height - height of the component
border - custom border
Since:
0.4

CJLabel

public CJLabel(java.lang.String text,
               int width,
               int height,
               javax.swing.border.Border border,
               java.awt.Color foreground,
               java.awt.Color background)

create custom label (text, width, height, border, color for foreground, color for background).

Parameters:
text - text of the label
border - custom border
foreground - foreground color of text
background - background color of text
Since:
0.5

CJLabel

public CJLabel(java.lang.String text,
               java.awt.Font font,
               int width,
               int height,
               javax.swing.border.Border border,
               java.awt.Color foreground,
               java.awt.Color background)

create custom label (text, font, width, height, border, color for foreground, color for background, horizontal/vertical text position).

Parameters:
text - text of the label
font - font used for the label
border - custom border
foreground - foreground color of text
background - background color of text
Since:
0.5
Method Detail

setHorizontalTextPosition

public void setHorizontalTextPosition(int position)

set the horizontal text position.

Overrides:
setHorizontalTextPosition in class javax.swing.JLabel
Parameters:
position - position of the text
Since:
0.5

setVerticalTextPosition

public void setVerticalTextPosition(int position)

set the vertical text position.

Overrides:
setVerticalTextPosition in class javax.swing.JLabel
Parameters:
position - position of the text
Since:
0.5

getWidth

public int getWidth()

return the width of the component.

Overrides:
getWidth in class javax.swing.JComponent
Returns:
width of the component
Since:
0.3

getHeight

public int getHeight()

return the height of the component.

Overrides:
getHeight in class javax.swing.JComponent
Returns:
height of the component
Since:
0.3

setWidth

public void setWidth(int width)

set the width of the component.

Parameters:
width - width of the component
Since:
0.4

setHeight

public void setHeight(int height)

set the height of the component.

Parameters:
height - height of the component
Since:
0.4


Copyright © 2008 F. MAUPIN. All Rights Reserved.