JBCSolutions - JbcBeans v1.5

This document is the API specification for the JbcBeans, version 1.5


jbc.beans
Class JbcBevelText

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by javax.swing.JComponent
              extended by jbc.beans.JbcBevelText
All Implemented Interfaces:
java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, javax.swing.SwingConstants

public class JbcBevelText
extends javax.swing.JComponent
implements javax.swing.SwingConstants

A display area for a short 3D text string.

With this bean, a developer may create raised or lowered bevel texts.
It may be used to adorn dialog boxes, create splash screens, generaly titles.

Author:
Copyright © 1999-2004, JBC. All Rights Reserved.
Licensed Materials - Property of JBC.
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class javax.swing.JComponent
javax.swing.JComponent.AccessibleJComponent
 
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
JbcBevelText()
          Default JbcBevelText constructor.
JbcBevelText(java.lang.String text)
          JbcBevelText constructor with a string.
 
Method Summary
 java.lang.String getAbout()
          Application code will not use these methods explicitly.
 java.awt.Color getBackground()
          Gets the background color of this component.
 int getDepthX()
          Gets the horizontal depth that will determine shades or highlights.
 int getDepthY()
          Gets the vertical depth that will determine shades or highlights.
 java.awt.Font getFont()
          Gets the font of this component.
 java.awt.Color getForeground()
          Gets the foreground color of this component.
 int getHorizontalAlignment()
          Returns the alignment of the component's contents along the X axis.
 java.awt.Dimension getMinimumSize()
          If the minimum size has been set to a non-null value just returns it.
 java.awt.Dimension getPreferredSize()
          If the preferredSize has been set to a non-null value just returns it.
 java.lang.String getText()
          Returns the text string that the component displays.
 int getVerticalAlignment()
          Returns the alignment of the component's contents along the Y axis.
 boolean isRaisedBevel()
          Returns true if the component is raised beveled.
 void paint(java.awt.Graphics g)
          Paints this component.
 void paintInterface(java.awt.Graphics g)
           
 void setAbout(java.lang.String text)
          Application code will not use these methods explicitly.
 void setBackground(java.awt.Color color)
          Sets the background color of this component.
 void setBorder(javax.swing.border.Border border)
          Sets the border of this component.
 void setBounds(int x, int y, int width, int height)
          Moves and resizes this component.
 void setBounds(java.awt.Rectangle r)
          Moves and resizes this component to conform to the new bounding rectangle r.
 void setDepthX(int x)
          Sets the horizontal depth that will determine shades or highlights.
 void setDepthY(int y)
          Sets the vertical depth that will determine shades or highlights.
 void setEnabled(boolean b)
          Enables or disables this component, depending on the value of the parameter b.
 void setFont(java.awt.Font f)
          Sets the font of this component.
 void setForeground(java.awt.Color color)
          Sets the foreground color of this component.
 void setHorizontalAlignment(int alignment)
          Sets the alignment of the component's contents along the X axis.
 void setOpaque(boolean b)
          If true the component paints every pixel within its bounds.
 void setRaisedBevel(boolean b)
          Sets a raised beveled edge, using brighter shades of the component's current background color for highlighting, and darker shading for shadows.
 void setSize(java.awt.Dimension d)
          Resizes this component so that it has width d.width and height d.height.
 void setSize(int width, int height)
          Resizes this component so that it has width width and height height.
 void setText(java.lang.String text)
          Defines the single line of text this component will display.
 void setToolTipText(java.lang.String text)
          Registers the text to display in a tool tip.
 void setVerticalAlignment(int alignment)
          Sets the alignment of the component's contents along the Y axis.
 void setVisible(boolean b)
          Makes the component visible or invisible.
 void updateUI()
          Notification from the UIFactory that the L&F has changed.
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, getAccessibleContext, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBorder, getBounds, getClientProperty, 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, getUIClassID, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paintImmediately, paintImmediately, print, printAll, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setFocusTraversalKeys, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setPreferredSize, setRequestFocusEnabled, setTransferHandler, setVerifyInputWhenFocusTarget, 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, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, 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, imageUpdate, 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, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, show, show, size, toString, transferFocus, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

JbcBevelText

public JbcBevelText()
Default JbcBevelText constructor.

Creates a JbcBevelText instance with a default string for the title.


JbcBevelText

public JbcBevelText(java.lang.String text)
JbcBevelText constructor with a string.

Creates a JbcBevelText instance with a string for the title.

Method Detail

setAbout

public void setAbout(java.lang.String text)
Application code will not use these methods explicitly.


getAbout

public java.lang.String getAbout()
Application code will not use these methods explicitly.


setToolTipText

public void setToolTipText(java.lang.String text)
Registers the text to display in a tool tip. The text displays when the cursor lingers over the component.

Overrides:
setToolTipText in class javax.swing.JComponent
Parameters:
text - the string to display; if the text is null, the tool tip is turned off for this component

updateUI

public void updateUI()
Notification from the UIFactory that the L&F has changed.

Overrides:
updateUI in class javax.swing.JComponent
See Also:
JComponent.updateUI()

setRaisedBevel

public void setRaisedBevel(boolean b)
Sets a raised beveled edge, using brighter shades of the component's current background color for highlighting, and darker shading for shadows.
In a raised border, highlights are on top and shadows are underneath. In a lowered border, shadows are on top and highlights are underneath.

Parameters:
b - true if the component should be raised beveled, false otherwise
See Also:
isRaisedBevel()

isRaisedBevel

public boolean isRaisedBevel()
Returns true if the component is raised beveled. Otherwise, it returns false

Returns:
true if the component should be raised beveled, false otherwise
See Also:
setRaisedBevel(boolean)

setDepthX

public void setDepthX(int x)
Sets the horizontal depth that will determine shades or highlights.

Parameters:
x - value for depth.
See Also:
getDepthX()

getDepthX

public int getDepthX()
Gets the horizontal depth that will determine shades or highlights.

Returns:
value for depth.
See Also:
setDepthX(int)

setDepthY

public void setDepthY(int y)
Sets the vertical depth that will determine shades or highlights.

Parameters:
y - value for depth.
See Also:
getDepthY()

getDepthY

public int getDepthY()
Gets the vertical depth that will determine shades or highlights.

Returns:
value for depth.
See Also:
setDepthY(int)

getBackground

public java.awt.Color getBackground()
Gets the background color of this component.

Overrides:
getBackground in class java.awt.Component
Returns:
This component's background color. If this component does not have a background color, the default background color is returned.
See Also:
setBackground(java.awt.Color)

setBackground

public void setBackground(java.awt.Color color)
Sets the background color of this component.

Overrides:
setBackground in class javax.swing.JComponent
Parameters:
color - The color to become this component's background color. If this parameter is null then this component will inherit the default background.
See Also:
getBackground()

getForeground

public java.awt.Color getForeground()
Gets the foreground color of this component.

Overrides:
getForeground in class java.awt.Component
Returns:
This component's foreground color. If this component does not have a foreground color, the default foreground color is returned.
See Also:
setForeground(java.awt.Color)

setForeground

public void setForeground(java.awt.Color color)
Sets the foreground color of this component.

Overrides:
setForeground in class javax.swing.JComponent
Parameters:
color - The color to become this component's foreground color. If this parameter is null then this component will inherit the default foreground.
See Also:
getForeground()

getFont

public java.awt.Font getFont()
Gets the font of this component.

Specified by:
getFont in interface java.awt.MenuContainer
Overrides:
getFont in class java.awt.Component
Returns:
This component's font. If a font has not been set for this component, the font of its parent is returned.
See Also:
setFont(java.awt.Font)

setFont

public void setFont(java.awt.Font f)
Sets the font of this component.

Overrides:
setFont in class javax.swing.JComponent
Parameters:
f - The font to become this component's font. If this parameter is null then this component will inherit the font of its parent.
See Also:
Component.getFont()

setEnabled

public void setEnabled(boolean b)
Enables or disables this component, depending on the value of the parameter b. An enabled component can respond to user input and generate events. Components are enabled initially by default.

Overrides:
setEnabled in class javax.swing.JComponent
Parameters:
b - If true, this component is enabled; otherwise this component is disabled.

setOpaque

public void setOpaque(boolean b)
If true the component paints every pixel within its bounds. Otherwise, the component may not paint some or all of its pixels, allowing the underlying pixels to show through.

Overrides:
setOpaque in class javax.swing.JComponent
See Also:
JComponent.isOpaque()

setVisible

public void setVisible(boolean b)
Makes the component visible or invisible. Overrides Component.setVisible.

Overrides:
setVisible in class javax.swing.JComponent
Parameters:
aFlag - true to make the component visible

setText

public void setText(java.lang.String text)
Defines the single line of text this component will display. If the value of text is null or empty string, nothing is displayed.

The default value of this property is "JBC".

See Also:
getText()

getText

public java.lang.String getText()
Returns the text string that the component displays.

Returns:
a string of this component
See Also:
setText(java.lang.String)

getPreferredSize

public java.awt.Dimension getPreferredSize()
If the preferredSize has been set to a non-null value just returns it. If the UI delegate's getPreferredSize() method returns a non null value then return that; otherwise defer to the component's layout manager.

Overrides:
getPreferredSize in class javax.swing.JComponent
Returns:
the value of the preferredSize property

getMinimumSize

public java.awt.Dimension getMinimumSize()
If the minimum size has been set to a non-null value just returns it. If the UI delegate's getMinimumSize() method returns a non-null value then return that; otherwise defer to the component's layout manager.

Overrides:
getMinimumSize in class javax.swing.JComponent
Returns:
the value of the minimumSize property

setBorder

public void setBorder(javax.swing.border.Border border)
Sets the border of this component. The Border object is responsible for defining the insets for the component.

Overrides:
setBorder in class javax.swing.JComponent
Parameters:
border - the border to be rendered for this component

setBounds

public void setBounds(int x,
                      int y,
                      int width,
                      int height)
Moves and resizes this component. The new location of the top-left corner is specified by x and y, and the new size is specified by width and height.

Overrides:
setBounds in class java.awt.Component
Parameters:
x - The new x-coordinate of this component.
y - The new y-coordinate of this component.
width - The new width of this component.
height - The new height of this component.

setBounds

public void setBounds(java.awt.Rectangle r)
Moves and resizes this component to conform to the new bounding rectangle r. This component's new position is specified by r.x and r.y, and its new size is specified by r.width and r.height

Overrides:
setBounds in class java.awt.Component
Parameters:
r - The new bounding rectangle for this component.

setSize

public void setSize(int width,
                    int height)
Resizes this component so that it has width width and height height.

Overrides:
setSize in class java.awt.Component
Parameters:
width - The new width of this component in pixels.
height - The new height of this component in pixels.
See Also:
JComponent.getSize(java.awt.Dimension), setBounds(int, int, int, int)

setSize

public void setSize(java.awt.Dimension d)
Resizes this component so that it has width d.width and height d.height.

Overrides:
setSize in class java.awt.Component
Parameters:
d - The dimension specifying the new size of this component.
See Also:
JComponent.getSize(java.awt.Dimension), setBounds(int, int, int, int)

paintInterface

public final void paintInterface(java.awt.Graphics g)

paint

public void paint(java.awt.Graphics g)
Paints this component. This method is called when the contents of the component should be painted.

Overrides:
paint in class javax.swing.JComponent

setHorizontalAlignment

public void setHorizontalAlignment(int alignment)
Sets the alignment of the component's contents along the X axis.

Parameters:
alignment - One of the following constants defined in SwingConstants: LEFT, CENTER (the default), RIGHT, LEADING or TRAILING.
See Also:
SwingConstants, getHorizontalAlignment()

getHorizontalAlignment

public int getHorizontalAlignment()
Returns the alignment of the component's contents along the X axis.

Returns:
The value of the horizontalAlignment property, one of the following constants defined in SwingConstants: LEFT, CENTER, RIGHT, LEADING or TRAILING.
See Also:
setHorizontalAlignment(int), SwingConstants

setVerticalAlignment

public void setVerticalAlignment(int alignment)
Sets the alignment of the component's contents along the Y axis.

The default value of this property is CENTER.

Parameters:
alignment - One of the following constants defined in SwingConstants: TOP, CENTER (the default), or BOTTOM.
See Also:
SwingConstants, getVerticalAlignment()

getVerticalAlignment

public int getVerticalAlignment()
Returns the alignment of the component's contents along the Y axis.

Returns:
The value of the verticalAlignment property, one of the following constants defined in SwingConstants: TOP, CENTER, or BOTTOM.
See Also:
SwingConstants, setVerticalAlignment(int)

JBCSolutions - JbcBeans v1.5

JBCSolutions - JbcBeans v1.5