|
JBCSolutions - JbcBeans v1.5 This document is the API specification for the JbcBeans, version 1.5 |
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
jbc.beans.JbcBevelText
public class JbcBevelText
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.
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 |
---|
public JbcBevelText()
Creates a JbcBevelText
instance
with a default string for the title.
public JbcBevelText(java.lang.String text)
Creates a JbcBevelText
instance
with a string for the title.
Method Detail |
---|
public void setAbout(java.lang.String text)
public java.lang.String getAbout()
public void setToolTipText(java.lang.String text)
setToolTipText
in class javax.swing.JComponent
text
- the string to display; if the text is null,
the tool tip is turned off for this componentpublic void updateUI()
updateUI
in class javax.swing.JComponent
JComponent.updateUI()
public void setRaisedBevel(boolean b)
b
- true if the component should be raised beveled, false otherwiseisRaisedBevel()
public boolean isRaisedBevel()
true
if the component is
raised beveled.
Otherwise, it returns false
setRaisedBevel(boolean)
public void setDepthX(int x)
x
- value for depth.getDepthX()
public int getDepthX()
setDepthX(int)
public void setDepthY(int y)
y
- value for depth.getDepthY()
public int getDepthY()
setDepthY(int)
public java.awt.Color getBackground()
getBackground
in class java.awt.Component
setBackground(java.awt.Color)
public void setBackground(java.awt.Color color)
setBackground
in class javax.swing.JComponent
color
- The color to become this component's
background color.
If this parameter is null then this component will inherit
the default background.getBackground()
public java.awt.Color getForeground()
getForeground
in class java.awt.Component
setForeground(java.awt.Color)
public void setForeground(java.awt.Color color)
setForeground
in class javax.swing.JComponent
color
- The color to become this component's
foreground color.
If this parameter is null then this component will inherit
the default foreground.getForeground()
public java.awt.Font getFont()
getFont
in interface java.awt.MenuContainer
getFont
in class java.awt.Component
setFont(java.awt.Font)
public void setFont(java.awt.Font f)
setFont
in class javax.swing.JComponent
f
- The font to become this component's font.
If this parameter is null then this component will inherit
the font of its parent.Component.getFont()
public void setEnabled(boolean b)
b
. An enabled component can respond to user
input and generate events. Components are enabled initially by default.
setEnabled
in class javax.swing.JComponent
b
- If true
, this component is
enabled; otherwise this component is disabled.public void setOpaque(boolean b)
setOpaque
in class javax.swing.JComponent
JComponent.isOpaque()
public void setVisible(boolean b)
Component.setVisible
.
setVisible
in class javax.swing.JComponent
aFlag
- true to make the component visiblepublic void setText(java.lang.String text)
The default value of this property is "JBC".
getText()
public java.lang.String getText()
setText(java.lang.String)
public java.awt.Dimension getPreferredSize()
getPreferredSize
in class javax.swing.JComponent
public java.awt.Dimension getMinimumSize()
getMinimumSize
in class javax.swing.JComponent
public void setBorder(javax.swing.border.Border border)
setBorder
in class javax.swing.JComponent
border
- the border to be rendered for this componentpublic void setBounds(int x, int y, int width, int height)
x
and y
, and the
new size is specified by width
and height
.
setBounds
in class java.awt.Component
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.public void setBounds(java.awt.Rectangle r)
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
setBounds
in class java.awt.Component
r
- The new bounding rectangle for this component.public void setSize(int width, int height)
width
and height height
.
setSize
in class java.awt.Component
width
- The new width of this component in pixels.height
- The new height of this component in pixels.JComponent.getSize(java.awt.Dimension)
,
setBounds(int, int, int, int)
public void setSize(java.awt.Dimension d)
d.width
and height d.height
.
setSize
in class java.awt.Component
d
- The dimension specifying the new size of this component.JComponent.getSize(java.awt.Dimension)
,
setBounds(int, int, int, int)
public final void paintInterface(java.awt.Graphics g)
public void paint(java.awt.Graphics g)
paint
in class javax.swing.JComponent
public void setHorizontalAlignment(int alignment)
alignment
- One of the following constants
defined in SwingConstants
:
LEFT
,
CENTER
(the default),
RIGHT
,
LEADING
or
TRAILING
.SwingConstants
,
getHorizontalAlignment()
public int getHorizontalAlignment()
SwingConstants
:
LEFT
,
CENTER
,
RIGHT
,
LEADING
or
TRAILING
.setHorizontalAlignment(int)
,
SwingConstants
public void setVerticalAlignment(int alignment)
The default value of this property is CENTER.
alignment
- One of the following constants
defined in SwingConstants
:
TOP
,
CENTER
(the default), or
BOTTOM
.SwingConstants
,
getVerticalAlignment()
public int getVerticalAlignment()
SwingConstants
:
TOP
,
CENTER
, or
BOTTOM
.SwingConstants
,
setVerticalAlignment(int)
|
JBCSolutions - JbcBeans v1.5 | |||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |