|
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
javax.swing.AbstractButton
javax.swing.JToggleButton
jbc.beans.JbcMetallicToggleButton
public class JbcMetallicToggleButton
This bean is a toggle button allowing to create nice, metallic, elliptic or
circular buttons. Its functionalities are identical to a normal toggle button.
It may be usefully used for multimedia applications, or any application or
applet that should be carefully done.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class javax.swing.JToggleButton |
---|
javax.swing.JToggleButton.ToggleButtonModel |
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 | |
---|---|
JbcMetallicToggleButton()
Creates a metallic toggle button with no set text or icon. |
|
JbcMetallicToggleButton(javax.swing.Action a)
Creates a metallic toggle button where properties are taken from the Action supplied. |
|
JbcMetallicToggleButton(javax.swing.Icon icon)
Creates a metallic toggle button with an icon. |
|
JbcMetallicToggleButton(java.lang.String text)
Creates a metallic toggle button with text. |
|
JbcMetallicToggleButton(java.lang.String text,
javax.swing.Icon icon)
Creates a metallic toggle 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. |
java.awt.Color |
getBackground()
Gets the background color of this component. |
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. |
java.awt.Color |
getSelectedColor()
Gets the selected color of this component. |
boolean |
isContrastBorderPainted()
Returns whether the 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 the 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 |
setBackground(java.awt.Color color)
Sets the background color of this component. |
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 |
setSelectedColor(java.awt.Color color)
Sets the selected color of this component. |
void |
updateUI()
Notification from the UIFactory that the L&F has changed. |
Methods inherited from class javax.swing.JToggleButton |
---|
getAccessibleContext, getUIClassID |
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, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, 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, 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 |
---|
public JbcMetallicToggleButton()
public JbcMetallicToggleButton(java.lang.String text, javax.swing.Icon icon)
text
- the text of the button.icon
- the Icon image to display on the buttonpublic JbcMetallicToggleButton(javax.swing.Icon icon)
icon
- the Icon image to display on the buttonpublic JbcMetallicToggleButton(java.lang.String text)
text
- the text of the buttonpublic JbcMetallicToggleButton(javax.swing.Action a)
Method Detail |
---|
public void setAbout(java.lang.String text)
public java.lang.String getAbout()
public java.awt.Dimension getPreferredSize()
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.
getPreferredSize
in class javax.swing.JComponent
preferredSize
propertysetPreferredSize(java.awt.Dimension)
,
ComponentUI
public void setPreferredSize(java.awt.Dimension preferredSize)
preferredSize
is null
, the UI will
be asked for the preferred size.
setPreferredSize
in class javax.swing.JComponent
public final void paintInterface(java.awt.Graphics g)
public void paint(java.awt.Graphics g)
paint
in class javax.swing.JComponent
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 getSelectedColor()
setSelectedColor(java.awt.Color)
public void setSelectedColor(java.awt.Color color)
color
- The color to become this component's
selected color.
If this parameter is null then this component will inherit
the default selected.getSelectedColor()
public java.awt.Color getRollOverColor()
setRollOverColor(java.awt.Color)
public void setRollOverColor(java.awt.Color color)
color
- The color to become this component's
rollover color.
If this parameter is null then this component will inherit
the default rollover.getRollOverColor()
public boolean contains(int x, int y)
x
and y
are defined to be
relative to the coordinate system of this component.
contains
in class javax.swing.JComponent
x
- the x coordinate of the point.y
- the y coordinate of the point.public void updateUI()
updateUI
in class javax.swing.JToggleButton
JComponent.updateUI()
public void setOpaque(boolean opaque)
setOpaque
in class javax.swing.JComponent
JComponent.isOpaque()
public void setContentAreaFilled(boolean contentAreaFilled)
ContentAreaFilled
property
to false
.
setContentAreaFilled
in class javax.swing.AbstractButton
public boolean isContrastBorderPainted()
setContrastBorderPainted(boolean)
public void setContrastBorderPainted(boolean b)
b
- if true the contrast border is painted, false otherwiseisContrastBorderPainted()
public boolean isRaised()
setRaised(boolean)
public void setRaised(boolean b)
b
- if true the raised border is painted, false otherwiseisRaised()
public boolean isFlat()
setFlat(boolean)
public void setFlat(boolean b)
b
- if true a flat button is painted, false otherwiseisFlat()
public boolean isElliptic()
setElliptic(boolean)
public void setElliptic(boolean b)
b
- if true an elliptic button is painted, false otherwiseisElliptic()
public boolean isContrasted()
setContrasted(boolean)
public void setContrasted(boolean b)
b
- if true the component is contrasted, false otherwiseisContrasted()
public void setBevelSize(int size)
size
- the size of the bevel.getBevelSize()
public int getBevelSize()
setBevelSize(int)
|
JBCSolutions - JbcBeans v1.5 | |||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |