|
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.JbcCircularSlider
public class JbcCircularSlider
This slider is rotating. It looks like an amplifier button.
It may be used to increase or reduce sound volume for a multimedia application,
or used with applications that require angle data. It may also offer a simple way
for indicating a direction such as North, South, East...
If bound to hardware equipment (such as an amplifier, a sound card),
this slider may be secured to avoid that user changes value too quickly. The sizes
of tracker and associated minibuttons, the arbitrary position of zero, as well as
the maximum value accepted by the slider, may be customized, in accordance with
the developer's choice.
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 java.awt.image.ImageObserver |
---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
---|---|
JbcCircularSlider()
Default JbcCircularSlider constructor. |
Method Summary | |
---|---|
void |
addChangeListener(javax.swing.event.ChangeListener l)
Adds a ChangeListener to the list that is
notified each time the circular slider's value has changed. |
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.Color |
getForeground()
Gets the foreground color of this component. |
int |
getMaximum()
Returns the maximum value supported by the circular slider. |
int |
getMiniButtonsSize()
Gets the size of the mini buttons. |
int |
getPositionOfZero()
Returns the position of zero property. |
int |
getTrackerSize()
Gets the size of the tracker. |
int |
getValue()
Returns the current value of the circular slider. |
boolean |
isCircularBorder()
Returns true if the circular border is active. |
boolean |
isPaintTicks()
Returns true whether the ticks should be painted. |
boolean |
isSafe()
Returns true if the component is
safe. |
boolean |
isTrackerRaised()
Returns true if the tracker is
raised beveled. |
boolean |
isValuePrinted()
Returns true if the value is printed inside the component. |
void |
paint(java.awt.Graphics g)
Paints this component. |
void |
paintInterface(java.awt.Graphics g)
|
void |
removeChangeListener(javax.swing.event.ChangeListener l)
Removes a ChangeListener from the list that's notified each
time the circular slider's value has changed. |
void |
repaint()
This method repaints the component and its children. |
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 v)
Sets the size of the bevel. |
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 |
setCircularBorder(boolean b)
Sets the circular border active or not. |
void |
setEnabled(boolean b)
Sets the enabled state of the object. |
void |
setForeground(java.awt.Color color)
Sets the foreground color of this component. |
void |
setMaximum(int value)
Sets the maximum property. |
void |
setMiniButtonsSize(int v)
Sets the size of the mini buttons. |
void |
setPaintTicks(boolean b)
Sets whether the ticks should be painted or not. |
void |
setPositionOfZero(int value)
Sets the position of zero property. |
void |
setSafe(boolean b)
Sets whether the component ide be safe. |
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 |
setTrackerRaised(boolean b)
Sets the tracker raised if the parameter is true ,
otherwise sets the tracker lowered. |
void |
setTrackerSize(int v)
Sets the size of the tracker. |
void |
setValue(int value)
Sets the current value of the circular slider. |
void |
setValuePrinted(boolean b)
Sets whether the value is printed inside the component. |
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, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, 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, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setFocusTraversalKeys, setFont, 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, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, 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, 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 JbcCircularSlider()
Creates a JbcCircularSlider
instance.
Method Detail |
---|
public void setAbout(java.lang.String text)
public java.lang.String getAbout()
public 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.setSize(int, int)
,
setSize(java.awt.Dimension)
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.setSize(int, int)
,
setSize(java.awt.Dimension)
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.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.setBounds(int, int, int, int)
public void setEnabled(boolean b)
setEnabled
in class javax.swing.JComponent
b
- if true, enables this object; otherwise, disables itpublic 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 void updateUI()
updateUI
in class javax.swing.JComponent
JComponent.updateUI()
public void repaint()
repaint
in class java.awt.Component
public final void paintInterface(java.awt.Graphics g)
public void paint(java.awt.Graphics g)
paint
in class javax.swing.JComponent
g
- The graphics context to use for painting.public void setValue(int value)
value
- the value of the circular slidergetValue()
public int getValue()
setValue(int)
public int getMaximum()
setMaximum(int)
public void setMaximum(int value)
value
- the maximum value of the circular slidergetMaximum()
public int getPositionOfZero()
setPositionOfZero(int)
public void setPositionOfZero(int value)
value
- the position of zero of the circular slidergetPositionOfZero()
public boolean isTrackerRaised()
true
if the tracker is
raised beveled.
Otherwise, it returns false
if the tracker is
lowered beveled.
setTrackerRaised(boolean)
public void setTrackerRaised(boolean b)
true
,
otherwise sets the tracker lowered.
b
- true if the tracker should be raised beveled, false otherwiseisTrackerRaised()
public boolean isPaintTicks()
true
whether the ticks should be painted.
Otherwise, it returns false
.
setPaintTicks(boolean)
public void setPaintTicks(boolean b)
b
- if true the ticks should be painted, false otherwiseisPaintTicks()
public boolean isSafe()
true
if the component is
safe.
Otherwise, it returns false
setSafe(boolean)
public void setSafe(boolean b)
the default value is true
isSafe()
public boolean isValuePrinted()
true
if the value is printed inside the component.
Otherwise, it returns false
.
if
- true the value should be painted, false otherwisesetValuePrinted(boolean)
public void setValuePrinted(boolean b)
b
- if true the value should be painted, false otherwiseisValuePrinted()
public boolean isCircularBorder()
true
if the circular border is active.
Otherwise, it returns false
.
if
- true the circular border should be painted, false otherwisesetCircularBorder(boolean)
public void setCircularBorder(boolean b)
b
- if true the circular border should be painted, false otherwiseisCircularBorder()
public void setBevelSize(int v)
v
- the bevel size of the circular slidergetBevelSize()
public int getBevelSize()
setBevelSize(int)
public void setTrackerSize(int v)
v
- the tracker size of the circular slidergetTrackerSize()
public int getTrackerSize()
setTrackerSize(int)
public void setMiniButtonsSize(int v)
v
- the mini buttons size of the circular slidergetMiniButtonsSize()
public int getMiniButtonsSize()
setMiniButtonsSize(int)
public void addChangeListener(javax.swing.event.ChangeListener l)
ChangeListener
to the list that is
notified each time the circular slider's value has changed.
l
- the ChangeListener
to addremoveChangeListener(javax.swing.event.ChangeListener)
public void removeChangeListener(javax.swing.event.ChangeListener l)
ChangeListener
from the list that's notified each
time the circular slider's value has changed.
l
- the ChangeListener
to removeaddChangeListener(javax.swing.event.ChangeListener)
|
JBCSolutions - JbcBeans v1.5 | |||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |