|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Object
|
+--java.awt.Component
|
+--java.awt.Container
|
+--javax.swing.JComponent
|
+--javax.swing.JPanel
|
+--com.smardec.asc.sliderpanel.JSliderPanel
JSliderPanel provides API to create sliding panels. It has various settings and can be easily
customized to fit any application's needs.
| Field Summary | |
static int |
BOTTOM_PANEL
The bottom orientation constraint (south side of parent component). |
static int |
LEFT_PANEL
The left orientation constraint (west side of parent component). |
static int |
MENU_BAR_POSITION_BOTTOM
The bottom menubar orientation constraint (south side of JSliderPanel) |
static int |
MENU_BAR_POSITION_TOP
The top menubar orientation constraint (north side of JSliderPanel) |
static int |
MODE_ANIMATE
The animate paint mode constraint. |
static int |
MODE_DEFAULT
The default paint mode constraint. |
static int |
RIGHT_PANEL
The right orientation constraint (east side of parent component). |
static int |
TOP_PANEL
The top orientation constraint (north side of parent component). |
| Fields inherited from class javax.swing.JComponent |
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, 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 | |
JSliderPanel(int sliderOrientation,
javax.swing.JComponent parent)
Constructs a JSliderPanel with the specified orientation and parent component. |
|
| Method Summary | |
java.awt.Component |
add(java.awt.Component comp)
Throws UnsupportedOperationException. |
java.awt.Component |
add(java.awt.Component comp,
int index)
Throws UnsupportedOperationException. |
void |
add(java.awt.Component comp,
java.lang.Object constraints)
Throws UnsupportedOperationException. |
void |
add(java.awt.Component comp,
java.lang.Object constraints,
int index)
Throws UnsupportedOperationException. |
java.awt.Component |
add(java.lang.String name,
java.awt.Component comp)
Throws UnsupportedOperationException. |
void |
addSliderContent(javax.swing.JComponent sliderContentComponent)
Adds the specified component to the JSliderPanel. |
void |
addSliderListener(SliderListener listener)
Adds a SliderListener listener. |
int |
getDefaultHideMode()
Returns the current default hide mode of this JSliderPanel. |
int |
getDefaultShowMode()
Returns the current default show mode of this JSliderPanel. |
int |
getMenuBarPosition()
Returns the position of this JSliderPanel's menubar. |
java.awt.Container |
getParentComponent()
Returns the parent component of this JSliderPanel. |
java.lang.String |
getSliderCaption()
Returns the text string that this JSliderPanel's menubar displays. |
int |
getSliderHeight()
Returns the current height of this JSliderPanel. |
int |
getSliderOrientation()
Returns the orientation of this JSliderPanel. |
int |
getSliderWidth()
Returns the current width of this JSliderPanel. |
void |
hideSliderPanel()
Hides this JSliderPanel using default hide mode. |
void |
hideSliderPanel(int mode)
Hides this JSliderPanel using hide mode mode. |
boolean |
isBlockEvents()
Specifies whether this JSliderPanel should block mouse and keyboard events during animation. |
boolean |
isDock()
Specifies whether this JSliderPanel is dock. |
boolean |
isHideSliderWhenLostFocus()
Specifies whether this JSliderPanel hides when it looses focus. |
boolean |
isMenuBarVisible()
Determines whether menubar should be visible when JSliderPanel is visible. |
boolean |
isPin()
Specifies whether this JSliderPanel is pin. |
boolean |
isSliderHiding()
Specifies whether this JSliderPanel is showing now. |
boolean |
isSliderShowing()
Specifies whether this JSliderPanel is showing now. |
void |
paint(java.awt.Graphics g)
Paints SliderListener. |
void |
remove(java.awt.Component comp)
Throws UnsupportedOperationException. |
void |
remove(int index)
Throws UnsupportedOperationException. |
void |
removeAll()
Throws UnsupportedOperationException. |
void |
removeSliderContent()
Removes the content component from this JSliderPanel. |
void |
removeSliderListener(SliderListener listener)
Removes a SliderListener listener. |
void |
requestFocus()
Requests that this JSliderPanel get the input focus. |
void |
setBlockEvents(boolean blockEvents)
Specifies whether this JSliderPanel should block mouse and keyboard events during animation
depending on the value of parameter blockEvents. |
void |
setBorder(javax.swing.border.Border border)
Sets the border of this JSliderPanel. |
void |
setDefaultHideMode(int defaultHideMode)
Specifies the default hide mode of this JSliderPanel. |
void |
setDefaultShowMode(int defaultShowMode)
Specifies the default show mode of this JSliderPanel. |
void |
setDock(boolean dock)
Dock or undock this JSliderPanel depending on the value of parameter dock. |
void |
setHideSliderWhenLostFocus(boolean hideSliderWhenLostFocus)
Specifies whether this JSliderPanel hides when it looses focus depending on the value
of parameter hideSliderWhenLostFocus. |
void |
setMenuBarPosition(int menuBarPosition)
Specifies the position of this JSliderPanel's menubar position. |
void |
setMenuBarVisible(boolean menuBarVisible)
Makes the menubar visible or invisible. |
void |
setPin(boolean pin)
Pin or unpin this JSliderPanel depending on the value of parameter pin. |
void |
setSliderCaption(java.lang.String sliderCaption)
Specifies the single line text that JSliderPanel's menubar will display. |
void |
setSliderHeight(int sliderHeight)
Resizes this JSliderPanel so that it has height sliderHeight. |
void |
setSliderWidth(int sliderWidth)
Resizes this JSliderPanel so that it has width sliderWidth. |
void |
setVisible(boolean aFlag)
Shows/Hides this JSliderPanel using showSliderPanel() or hideSliderPanel() |
void |
showSliderPanel()
Shows this JSliderPanel using default show mode. |
void |
showSliderPanel(int mode)
Shows this JSliderPanel using show mode mode. |
| Methods inherited from class javax.swing.JPanel |
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI |
| Methods inherited from class javax.swing.JComponent |
addAncestorListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPreferredSize, getPropertyChangeListeners, getPropertyChangeListeners, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFont, setForeground, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, unregisterKeyboardAction, update |
| Methods inherited from class java.awt.Container |
addContainerListener, addImpl, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, removeContainerListener, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setLayout, transferFocusBackward, transferFocusDownCycle, validate, validateTree |
| Methods inherited from class java.awt.Component |
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, 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 |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
public static final int LEFT_PANEL
public static final int RIGHT_PANEL
public static final int TOP_PANEL
public static final int BOTTOM_PANEL
public static final int MODE_DEFAULT
showSliderPanel(int),
hideSliderPanel(int),
Constant Field Valuespublic static final int MODE_ANIMATE
showSliderPanel(int),
hideSliderPanel(int),
Constant Field Valuespublic static final int MENU_BAR_POSITION_TOP
JSliderPanel)
public static final int MENU_BAR_POSITION_BOTTOM
JSliderPanel)
| Constructor Detail |
public JSliderPanel(int sliderOrientation,
javax.swing.JComponent parent)
JSliderPanel with the specified orientation and parent component.
sliderOrientation - the orientation of this JSliderPanel, one of the
following constants defined in JSliderPanel:
LEFT_PANEL,
RIGHT_PANEL,
TOP_PANEL or
BOTTOM_PANEL.parent - the parent component of this JSliderPanel that specifies where this JSliderPanel is located on.| Method Detail |
public java.lang.String getSliderCaption()
JSliderPanel's menubar displays.
setSliderCaption(java.lang.String)public void setSliderCaption(java.lang.String sliderCaption)
JSliderPanel's menubar will display. If
the value of text is null or empty string, nothing is displayed.
The default value of this property is null.
sliderCaption - JSliderPanel's menubar captiongetSliderCaption()public boolean isPin()
JSliderPanel is pin. If JSliderPanel is pin it automatically hides when it looses focus.
true if this JSliderPanel is pin, false otherwisesetPin(boolean),
isHideSliderWhenLostFocus(),
setHideSliderWhenLostFocus(boolean)public void setPin(boolean pin)
JSliderPanel depending on the value of parameter pin.
If JSliderPanel is pin it automatically hides when it looses focus.
pin - if true this JSliderPanel is pin, false otherwiseisPin(),
isHideSliderWhenLostFocus(),
setHideSliderWhenLostFocus(boolean)public boolean isDock()
JSliderPanel is dock. If JSliderPanel is dock it shares parent component's bounds.
Note: if JSliderPanel is dock only MODE_DEFAULT is available.
true if this JSliderPanel is dock, false otherwisesetDock(boolean)public void setDock(boolean dock)
JSliderPanel depending on the value of parameter dock.
If JSliderPanel is dock it shares parent component's bounds.
Note: if JSliderPanel is dock only MODE_DEFAULT is available.
dock - if true this JSliderPanel is dock, false otherwiseisDock(),
MODE_DEFAULTpublic boolean isHideSliderWhenLostFocus()
JSliderPanel hides when it looses focus.
true if this JSliderPanel hides when it looses focus, false otherwisesetHideSliderWhenLostFocus(boolean),
isPin(),
setPin(boolean)public void setHideSliderWhenLostFocus(boolean hideSliderWhenLostFocus)
JSliderPanel hides when it looses focus depending on the value
of parameter hideSliderWhenLostFocus.
hideSliderWhenLostFocus - if true this JSliderPanel hides when it looses focus,
false otherwiseisHideSliderWhenLostFocus(),
isPin(),
setPin(boolean)public int getMenuBarPosition()
JSliderPanel's menubar.
JSliderPanel:
MENU_BAR_POSITION_TOP or MENU_BAR_POSITION_BOTTOMsetMenuBarPosition(int)public void setMenuBarPosition(int menuBarPosition)
JSliderPanel's menubar position. You must specify one of the following choices:
MENU_BAR_POSITION_TOP or MENU_BAR_POSITION_BOTTOM
menuBarPosition - the position of the menubargetMenuBarPosition()public boolean isMenuBarVisible()
JSliderPanel is visible.
true if the menubar is visiblepublic void setMenuBarVisible(boolean menuBarVisible)
menuBarVisible - true to make the menubar visiblepublic void addSliderContent(javax.swing.JComponent sliderContentComponent)
sliderContentComponent - the component to be addedpublic void removeSliderContent()
public int getSliderOrientation()
JSliderPanel.
JSliderPanel:
LEFT_PANEL,
RIGHT_PANEL,
TOP_PANEL or
BOTTOM_PANEL.JSliderPanel(int, javax.swing.JComponent)public java.awt.Container getParentComponent()
JSliderPanel.
JSliderPanelJSliderPanel(int, javax.swing.JComponent)public int getSliderWidth()
JSliderPanel.
JSliderPanelsetSliderWidth(int)public int getSliderHeight()
JSliderPanel.
JSliderPanelsetSliderHeight(int)public void setSliderWidth(int sliderWidth)
JSliderPanel so that it has width sliderWidth.
JSliderPanel's width cannot be less then border width or greater then parent's width.
Note: Setting the width of JSliderPanel has no affect if it has TOP_PANEL or
BOTTOM_PANEL orientation. In this case JSliderPanel's width always equals to parent's width.
sliderWidth - the new width of this JSliderPanel in pixelsgetSliderWidth(),
getSliderOrientation(),
JSliderPanel(int, javax.swing.JComponent),
getParentComponent()public void setSliderHeight(int sliderHeight)
JSliderPanel so that it has height sliderHeight.
JSliderPanel's height cannot be less then border width or greater then parent's height.
Note: Setting the height of JSliderPanel has no affect if it has LEFT_PANEL or
RIGHT_PANEL orientation. In this case JSliderPanel's height always equals to parent's height.
sliderHeight - the new height of this JSliderPanel in pixelsgetSliderHeight(),
getSliderOrientation(),
JSliderPanel(int, javax.swing.JComponent),
getParentComponent()public int getDefaultShowMode()
JSliderPanel.
JSliderPanelsetDefaultShowMode(int),
showSliderPanel()public void setDefaultShowMode(int defaultShowMode)
JSliderPanel. You must specify one of the following choices:
MODE_DEFAULT or MODE_ANIMATE.
defaultShowMode - the default show mode of this JSliderPanel
public void showSliderPanel(int mode)
throws java.lang.Exception
JSliderPanel using show mode mode. You must specify one of the following modes:
MODE_DEFAULT or MODE_ANIMATE.
mode - indicates how JSliderPanel will be shown
java.lang.Exception - when JSliderPanel created directly and is docksetDefaultShowMode(int),
JSliderPanelContainer.showPanelLeft(javax.swing.JPanel),
JSliderPanelContainer.showPanelRight(javax.swing.JPanel),
JSliderPanelContainer.showPanelTop(javax.swing.JPanel),
JSliderPanelContainer.showPanelBottom(javax.swing.JPanel)
public void showSliderPanel()
throws java.lang.Exception
JSliderPanel using default show mode.
java.lang.Exception - when JSliderPanel created directly and is docksetDefaultShowMode(int),
JSliderPanelContainer.showPanelLeft(javax.swing.JPanel),
JSliderPanelContainer.showPanelRight(javax.swing.JPanel),
JSliderPanelContainer.showPanelTop(javax.swing.JPanel),
JSliderPanelContainer.showPanelBottom(javax.swing.JPanel)public int getDefaultHideMode()
JSliderPanel.
JSliderPanelsetDefaultHideMode(int),
hideSliderPanel()public void setDefaultHideMode(int defaultHideMode)
JSliderPanel. You must specify one of the following choices:
MODE_DEFAULT or MODE_ANIMATE.
defaultHideMode - the default hide mode of this JSliderPanel
public void hideSliderPanel(int mode)
throws java.lang.Exception
JSliderPanel using hide mode mode. You must specify one of the following modes:
MODE_DEFAULT or MODE_ANIMATE.
mode - indicates how JSliderPanel will be hidden
java.lang.Exception - when JSliderPanel created directly and is docksetDefaultHideMode(int),
JSliderPanelContainer.hidePanelLeft(),
JSliderPanelContainer.hidePanelRight(),
JSliderPanelContainer.hidePanelTop(),
JSliderPanelContainer.hidePanelBottom()
public void hideSliderPanel()
throws java.lang.Exception
JSliderPanel using default hide mode.
java.lang.Exception - when JSliderPanel created directly and is docksetDefaultHideMode(int),
JSliderPanelContainer.showPanelLeft(javax.swing.JPanel),
JSliderPanelContainer.showPanelRight(javax.swing.JPanel),
JSliderPanelContainer.showPanelTop(javax.swing.JPanel),
JSliderPanelContainer.showPanelBottom(javax.swing.JPanel)public boolean isSliderShowing()
JSliderPanel is showing now.
true if JSliderPanel is showing now, false otherwisepublic boolean isSliderHiding()
JSliderPanel is showing now.
true if JSliderPanel is hiding now, false otherwisepublic void addSliderListener(SliderListener listener)
SliderListener listener.
listener - a SliderListener objectpublic void removeSliderListener(SliderListener listener)
SliderListener listener.
listener - a SliderListener objectaddSliderListener(com.smardec.asc.sliderpanel.SliderListener)public void paint(java.awt.Graphics g)
SliderListener.
paint in class javax.swing.JComponentg - Graphicspublic void requestFocus()
JSliderPanel get the input focus. If JSliderPanel is showing or hiding
using MODE_ANIMATE animation is stoped.
requestFocus in class javax.swing.JComponentpublic void setBorder(javax.swing.border.Border border)
JSliderPanel. The border must be instanceof SliderPanelBorder
setBorder in class javax.swing.JComponentborder - the border to be rendered for this componentpublic void setVisible(boolean aFlag)
JSliderPanel using showSliderPanel() or hideSliderPanel()
setVisible in class javax.swing.JComponentaFlag - true to show this JSliderPanel, false to hide this JSliderPanelpublic boolean isBlockEvents()
JSliderPanel should block mouse and keyboard events during animation.
The default is true.
true if this JSliderPanel block mouse and keyboard events during animation,
false otherwisesetBlockEvents(boolean)public void setBlockEvents(boolean blockEvents)
JSliderPanel should block mouse and keyboard events during animation
depending on the value of parameter blockEvents. The default is true.
blockEvents - if true this JSliderPanel block mouse and keyboard
events during animation, false otherwiseisBlockEvents()public java.awt.Component add(java.awt.Component comp)
addSliderContent(JComponent) instead.
add in class java.awt.Containercomp - not used
public void add(java.awt.Component comp,
java.lang.Object constraints)
addSliderContent(JComponent) instead.
add in class java.awt.Containercomp - not usedconstraints - undefined
public void add(java.awt.Component comp,
java.lang.Object constraints,
int index)
addSliderContent(JComponent) instead.
add in class java.awt.Containercomp - not usedconstraints - not usedindex - not used
public java.awt.Component add(java.awt.Component comp,
int index)
addSliderContent(JComponent) instead.
add in class java.awt.Containercomp - not usedindex - not used
public java.awt.Component add(java.lang.String name,
java.awt.Component comp)
addSliderContent(JComponent) instead.
add in class java.awt.Containername - not usedcomp - not used
public void remove(java.awt.Component comp)
removeSliderContent() instead.
remove in class java.awt.Containercomp - not usedpublic void remove(int index)
removeSliderContent() instead.
remove in class java.awt.Containerindex - not usedpublic void removeAll()
removeSliderContent() instead.
removeAll in class java.awt.Container
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||