|
||||||||||
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 java.awt.Window javax.swing.JWindow com.dlsc.flexgantt.swing.selector.Selector
public class Selector
A selector is a window without any decorations that contains a single component and a title. The window can be animated depending on the Java version and platform used (requires Java 6 or higher). The selector is hooked to a 'parent' component and will be shown on the top, or the bottom, or to the left or to the right of this parent component.
The animation behaviour of selectors can be controlled globally via static method calls. This way the animation can be turned off if not desired.
Nested Class Summary | |
---|---|
static class |
Selector.Location
An enumator used for indicating where the selector window will be shown. |
Nested classes/interfaces inherited from class javax.swing.JWindow |
---|
javax.swing.JWindow.AccessibleJWindow |
Nested classes/interfaces inherited from class java.awt.Window |
---|
java.awt.Window.AccessibleAWTWindow |
Nested classes/interfaces inherited from class java.awt.Container |
---|
java.awt.Container.AccessibleAWTContainer |
Nested classes/interfaces inherited from class java.awt.Component |
---|
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy |
Field Summary |
---|
Fields inherited from class javax.swing.JWindow |
---|
accessibleContext, rootPane, rootPaneCheckingEnabled |
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 | |
---|---|
Selector(java.lang.String title,
javax.swing.JComponent parentComponent,
javax.swing.JComponent contentComponent,
Selector.Location location)
Constructs a new selector window. |
|
Selector(java.lang.String title,
javax.swing.JComponent parentComponent,
Selector.Location location)
Constructs a new selector window without specifying a content component. |
Method Summary | |
---|---|
void |
addLayoutComponent(java.lang.String name,
java.awt.Component comp)
|
javax.swing.JLabel |
getCloseSelectorLabel()
Returns the label used for closing the selector. |
javax.swing.JComponent |
getContentComponent()
Returns the component that is shown as the selector 'content'. |
javax.swing.JPanel |
getFooterPanel()
Returns the panel used as a footer in the bottom of the selector. |
static int |
getGlobalAnimationDuration()
Returns the duration used for the show / hide animation. |
javax.swing.JPanel |
getHeaderPanel()
Returns the panel that contains the title label and the close icon. |
javax.swing.JComponent |
getParentComponent()
Returns the parent component, which is the component to which the selector window gets hooked. |
Selector.Location |
getSelectorLocation()
Returns the location where the selector will appear (above, below, to the left, or to the right of the parent component). |
javax.swing.JLabel |
getTitleLabel()
Returns the label used for displaying the title of the selector window. |
boolean |
isAnimationEnabled()
Returns the flag that individually determines whether the selector will use an animation to show or hide itself. |
static boolean |
isGlobalAnimationEnabled()
Returns the (global) flag for signalling whether all selectors will use an animation when showing up or hiding. |
void |
layoutContainer(java.awt.Container parent)
|
java.awt.Dimension |
minimumLayoutSize(java.awt.Container parent)
|
java.awt.Dimension |
preferredLayoutSize(java.awt.Container parent)
|
void |
removeLayoutComponent(java.awt.Component comp)
|
void |
setAnimationEnabled(boolean enabled)
Sets the flag that individually determines whether the selector will use an animation to show or hide itself. |
void |
setContentComponent(javax.swing.JComponent comp)
Sets the content of the selector window. |
static void |
setGlobalAnimationDuration(int duration)
Sets the duration used for the show / hide animation. |
static void |
setGlobalAnimationEnabled(boolean enabled)
Specifies whether the selector windows will use animations when showing or hiding themselves. |
void |
setVisible(boolean b)
Overrides the standard method in order to implement a nice looking animation (slide in / out) of the selector window. |
Methods inherited from class javax.swing.JWindow |
---|
addImpl, createRootPane, getAccessibleContext, getContentPane, getGlassPane, getLayeredPane, getRootPane, isRootPaneCheckingEnabled, paramString, remove, setContentPane, setGlassPane, setLayeredPane, setLayout, setRootPane, setRootPaneCheckingEnabled, update, windowInit |
Methods inherited from class java.awt.Window |
---|
addNotify, addPropertyChangeListener, addPropertyChangeListener, addWindowFocusListener, addWindowListener, addWindowStateListener, applyResourceBundle, applyResourceBundle, createBufferStrategy, createBufferStrategy, dispose, finalize, getBufferStrategy, getFocusableWindowState, getFocusCycleRootAncestor, getFocusOwner, getFocusTraversalKeys, getGraphicsConfiguration, getInputContext, getListeners, getLocale, getMostRecentFocusOwner, getOwnedWindows, getOwner, getToolkit, getWarningString, getWindowFocusListeners, getWindowListeners, getWindowStateListeners, hide, isActive, isAlwaysOnTop, isFocusableWindow, isFocusCycleRoot, isFocused, isLocationByPlatform, isShowing, pack, postEvent, processEvent, processWindowEvent, processWindowFocusEvent, processWindowStateEvent, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, setAlwaysOnTop, setBounds, setCursor, setFocusableWindowState, setFocusCycleRoot, setLocationByPlatform, setLocationRelativeTo, show, toBack, toFront |
Methods inherited from class java.awt.Container |
---|
add, add, add, add, add, addContainerListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalPolicy, getInsets, getLayout, getMaximumSize, getMinimumSize, getMousePosition, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paint, paintComponents, preferredSize, print, printComponents, processContainerEvent, remove, removeAll, removeContainerListener, removeNotify, setComponentZOrder, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setFont, 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, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isPreferredSizeSet, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, reshape, resize, resize, setBackground, setBounds, setComponentOrientation, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize, setMinimumSize, setName, setPreferredSize, setSize, setSize, show, size, toString, transferFocus, transferFocusUpCycle |
Methods inherited from class java.lang.Object |
---|
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Selector(java.lang.String title, javax.swing.JComponent parentComponent, javax.swing.JComponent contentComponent, Selector.Location location)
title
- the title of the selector windowparentComponent
- the parent component to which the selector gets hookedcontentComponent
- the content component that will be shown inside the selectorlocation
- the location where the selector window will be shownpublic Selector(java.lang.String title, javax.swing.JComponent parentComponent, Selector.Location location)
setContentComponent(JComponent)
to set the component before
the selector gets shown for the first time.
title
- the title of the selector windowparentComponent
- the parent component to which the selector gets hookedlocation
- the location where the selector window will be shownMethod Detail |
---|
public void setContentComponent(javax.swing.JComponent comp)
comp
- the content componentpublic javax.swing.JComponent getContentComponent()
public void setVisible(boolean b)
setVisible
in class java.awt.Component
setAnimationEnabled(boolean)
,
setGlobalAnimationEnabled(boolean)
public boolean isAnimationEnabled()
public void setAnimationEnabled(boolean enabled)
enabled
- if TRUE if the selector window uses an animation to show or
hide itselfpublic javax.swing.JComponent getParentComponent()
public void addLayoutComponent(java.lang.String name, java.awt.Component comp)
addLayoutComponent
in interface java.awt.LayoutManager
public void layoutContainer(java.awt.Container parent)
layoutContainer
in interface java.awt.LayoutManager
public java.awt.Dimension minimumLayoutSize(java.awt.Container parent)
minimumLayoutSize
in interface java.awt.LayoutManager
public java.awt.Dimension preferredLayoutSize(java.awt.Container parent)
preferredLayoutSize
in interface java.awt.LayoutManager
public void removeLayoutComponent(java.awt.Component comp)
removeLayoutComponent
in interface java.awt.LayoutManager
public Selector.Location getSelectorLocation()
public javax.swing.JLabel getTitleLabel()
public javax.swing.JPanel getHeaderPanel()
public static boolean isGlobalAnimationEnabled()
public static void setGlobalAnimationEnabled(boolean enabled)
enabled
- if TRUE all selectors will use animationspublic static int getGlobalAnimationDuration()
public static void setGlobalAnimationDuration(int duration)
duration
- the duration of the show / hide animationpublic javax.swing.JPanel getFooterPanel()
public javax.swing.JLabel getCloseSelectorLabel()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |