JBCSolutions - JbcBeans v1.5

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


jbc.beans
Class JbcMetallicPushButton

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by javax.swing.JComponent
              extended by javax.swing.AbstractButton
                  extended by javax.swing.JButton
                      extended by jbc.beans.JbcMetallicPushButton
All Implemented Interfaces:
java.awt.image.ImageObserver, java.awt.ItemSelectable, java.awt.MenuContainer, java.io.Serializable, javax.accessibility.Accessible, javax.swing.SwingConstants
Direct Known Subclasses:
JbcEllipticPushButton

public class JbcMetallicPushButton
extends javax.swing.JButton

This bean is a push button allowing to create nice, metallic, elliptic or circular buttons. Its functionalities are identical to a normal push button. It may be usefully used for multimedia applications, or any application or applet that should be carefully done.

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.AbstractButton
BORDER_PAINTED_CHANGED_PROPERTY, CONTENT_AREA_FILLED_CHANGED_PROPERTY, DISABLED_ICON_CHANGED_PROPERTY, DISABLED_SELECTED_ICON_CHANGED_PROPERTY, FOCUS_PAINTED_CHANGED_PROPERTY, HORIZONTAL_ALIGNMENT_CHANGED_PROPERTY, HORIZONTAL_TEXT_POSITION_CHANGED_PROPERTY, ICON_CHANGED_PROPERTY, MARGIN_CHANGED_PROPERTY, MNEMONIC_CHANGED_PROPERTY, MODEL_CHANGED_PROPERTY, PRESSED_ICON_CHANGED_PROPERTY, ROLLOVER_ENABLED_CHANGED_PROPERTY, ROLLOVER_ICON_CHANGED_PROPERTY, ROLLOVER_SELECTED_ICON_CHANGED_PROPERTY, SELECTED_ICON_CHANGED_PROPERTY, TEXT_CHANGED_PROPERTY, VERTICAL_ALIGNMENT_CHANGED_PROPERTY, VERTICAL_TEXT_POSITION_CHANGED_PROPERTY
 
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
JbcMetallicPushButton()
          Creates a metallic push button with no set text or icon.
JbcMetallicPushButton(javax.swing.Action a)
          Creates a metallic push button where properties are taken from the Action supplied.
JbcMetallicPushButton(javax.swing.Icon icon)
          Creates a metallic push button with an icon.
JbcMetallicPushButton(java.lang.String text)
          Creates a metallic push button with text.
JbcMetallicPushButton(java.lang.String text, javax.swing.Icon icon)
          Creates a metallic push button with initial text and an icon.
 
Method Summary
 boolean contains(int x, int y)
          Checks whether this component "contains" the specified point, where x and y are defined to be relative to the coordinate system of this component.
 java.lang.String getAbout()
          Application code will not use these methods explicitly.
 int getBevelSize()
          Gets the size of the bevel.
 java.awt.Dimension getPreferredSize()
          If the preferredSize has been set to a non-null value just returns it.
 java.awt.Color getRollOverColor()
          Gets the rollover color of this component.
 boolean isContrastBorderPainted()
          Returns whether a contrast border should be painted.
 boolean isContrasted()
          Returns whether the component should be contrasted.
 boolean isElliptic()
          Returns whether an elliptic button should be painted.
 boolean isFlat()
          Returns whether a flat button should be painted.
 boolean isRaised()
          Returns whether a raised border should be painted.
 void paint(java.awt.Graphics g)
           
 void paintInterface(java.awt.Graphics g)
           
 void setAbout(java.lang.String text)
          Application code will not use these methods explicitly.
 void setBevelSize(int size)
          Sets the size of the bevel.
 void setContentAreaFilled(boolean contentAreaFilled)
          For this component, this method forces the ContentAreaFilled property to false.
 void setContrastBorderPainted(boolean b)
          Sets whether the contrast border should be painted.
 void setContrasted(boolean b)
          Sets whether the component should be contrasted
 void setElliptic(boolean b)
          Sets whether an elliptic button should be painted.
 void setFlat(boolean b)
          Sets whether a flat button should be painted.
 void setOpaque(boolean opaque)
          If true the component paints every pixel within its bounds.
 void setPreferredSize(java.awt.Dimension preferredSize)
          Sets the preferred size of this component.
 void setRaised(boolean b)
          Sets whether the raised border should be painted.
 void setRollOverColor(java.awt.Color color)
          Sets the rollover color of this component.
 void updateUI()
          Notification from the UIFactory that the L&F has changed.
 
Methods inherited from class javax.swing.JButton
getAccessibleContext, getUIClassID, isDefaultButton, isDefaultCapable, removeNotify, setDefaultCapable
 
Methods inherited from class javax.swing.AbstractButton
addActionListener, addChangeListener, addItemListener, doClick, doClick, getAction, getActionCommand, getActionListeners, getChangeListeners, getDisabledIcon, getDisabledSelectedIcon, getDisplayedMnemonicIndex, getHorizontalAlignment, getHorizontalTextPosition, getIcon, getIconTextGap, getItemListeners, getLabel, getMargin, getMnemonic, getModel, getMultiClickThreshhold, getPressedIcon, getRolloverIcon, getRolloverSelectedIcon, getSelectedIcon, getSelectedObjects, getText, getUI, getVerticalAlignment, getVerticalTextPosition, imageUpdate, isBorderPainted, isContentAreaFilled, isFocusPainted, isRolloverEnabled, isSelected, removeActionListener, removeChangeListener, removeItemListener, setAction, setActionCommand, setBorderPainted, setDisabledIcon, setDisabledSelectedIcon, setDisplayedMnemonicIndex, setEnabled, setFocusPainted, setHorizontalAlignment, setHorizontalTextPosition, setIcon, setIconTextGap, setLabel, setLayout, setMargin, setMnemonic, setMnemonic, setModel, setMultiClickThreshhold, setPressedIcon, setRolloverEnabled, setRolloverIcon, setRolloverSelectedIcon, setSelected, setSelectedIcon, setText, setUI, setVerticalAlignment, setVerticalTextPosition
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, 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, getMinimumSize, getNextFocusableComponent, getPopupLocation, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paintImmediately, paintImmediately, print, printAll, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, 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, 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

JbcMetallicPushButton

public JbcMetallicPushButton()
Creates a metallic push button with no set text or icon.


JbcMetallicPushButton

public JbcMetallicPushButton(java.lang.String text,
                             javax.swing.Icon icon)
Creates a metallic push button with initial text and an icon.

Parameters:
text - the text of the button.
icon - the Icon image to display on the button

JbcMetallicPushButton

public JbcMetallicPushButton(javax.swing.Icon icon)
Creates a metallic push button with an icon.

Parameters:
icon - the Icon image to display on the button

JbcMetallicPushButton

public JbcMetallicPushButton(java.lang.String text)
Creates a metallic push button with text.

Parameters:
text - the text of the button

JbcMetallicPushButton

public JbcMetallicPushButton(javax.swing.Action a)
Creates a metallic push button where properties are taken from the Action supplied.

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.


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
See Also:
setPreferredSize(java.awt.Dimension), ComponentUI

setPreferredSize

public void setPreferredSize(java.awt.Dimension preferredSize)
Sets the preferred size of this component. If preferredSize is null, the UI will be asked for the preferred size.

Overrides:
setPreferredSize in class javax.swing.JComponent

getRollOverColor

public java.awt.Color getRollOverColor()
Gets the rollover color of this component.

Returns:
This component's rollover color. If this component does not have a rollover color, the default rollover color is returned.
See Also:
setRollOverColor(java.awt.Color)

setRollOverColor

public void setRollOverColor(java.awt.Color color)
Sets the rollover color of this component.

Parameters:
color - The color to become this component's rollover color. If this parameter is null then this component will inherit the default rollover.
See Also:
getRollOverColor()

paintInterface

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

paint

public void paint(java.awt.Graphics g)
Overrides:
paint in class javax.swing.JComponent

contains

public boolean contains(int x,
                        int y)
Checks whether this component "contains" the specified point, where x and y are defined to be relative to the coordinate system of this component.

Overrides:
contains in class javax.swing.JComponent
Parameters:
x - the x coordinate of the point.
y - the y coordinate of the point.

updateUI

public void updateUI()
Notification from the UIFactory that the L&F has changed. Called to replace the UI with the latest version from the UIFactory.

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

setOpaque

public void setOpaque(boolean opaque)
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()

setContentAreaFilled

public void setContentAreaFilled(boolean contentAreaFilled)
For this component, this method forces the ContentAreaFilled property to false.

Overrides:
setContentAreaFilled in class javax.swing.AbstractButton

isContrastBorderPainted

public boolean isContrastBorderPainted()
Returns whether a contrast border should be painted.

Returns:
true if a contrast border should be painted, false otherwise
See Also:
setContrastBorderPainted(boolean)

setContrastBorderPainted

public void setContrastBorderPainted(boolean b)
Sets whether the contrast border should be painted.

Parameters:
b - if true the contrast border is painted, false otherwise
See Also:
isContrastBorderPainted()

isRaised

public boolean isRaised()
Returns whether a raised border should be painted.

Returns:
true if a raised border should be painted, false otherwise
See Also:
setRaised(boolean)

setRaised

public void setRaised(boolean b)
Sets whether the raised border should be painted.

Parameters:
b - if true the raised border is painted, false otherwise
See Also:
isRaised()

isFlat

public boolean isFlat()
Returns whether a flat button should be painted.

Returns:
true if a flat button should be painted, false otherwise
See Also:
setFlat(boolean)

setFlat

public void setFlat(boolean b)
Sets whether a flat button should be painted.

Parameters:
b - if true a flat button is painted, false otherwise
See Also:
isFlat()

isElliptic

public boolean isElliptic()
Returns whether an elliptic button should be painted.

Returns:
true if an elliptic button should be painted, false otherwise
See Also:
setElliptic(boolean)

setElliptic

public void setElliptic(boolean b)
Sets whether an elliptic button should be painted.

Parameters:
b - if true an elliptic button is painted, false otherwise
See Also:
isElliptic()

isContrasted

public boolean isContrasted()
Returns whether the component should be contrasted.

Returns:
true if the component should be contrasted, false otherwise
See Also:
setContrasted(boolean)

setContrasted

public void setContrasted(boolean b)
Sets whether the component should be contrasted

Parameters:
b - if true the component is contrasted, false otherwise
See Also:
isContrasted()

setBevelSize

public void setBevelSize(int size)
Sets the size of the bevel.

Parameters:
size - the size of the bevel
See Also:
getBevelSize()

getBevelSize

public int getBevelSize()
Gets the size of the bevel.

Returns:
the size of the bevel
See Also:
setBevelSize(int)

JBCSolutions - JbcBeans v1.5

JBCSolutions - JbcBeans v1.5