|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sourceforge.nite.tools.videolabeler.SelfSelectingFrames
public class SelfSelectingFrames
With this class you can make an internal frame self-selecting or make all frames in a desktop pane self-selecting. That means that an internal frame will be selected when the mouse is moved over the frame or any of its contents. This will also work for any components that are added to the frame later and for any frames that are added to the desktop later.
The functionality for an internal frame is implemented with two listeners. A mouse listener for the frame and all its components, and a container listener for all containers in the frame. When the user moves the mouse over the frame or a component in the frame, the mouse listener will be activated, which will select the frame. If a component is added to a container in the frame, the mouse listener and container listener (if possible) will be added to the new component. When a component is removed from a container, the mouse listener and container listener will be removed from that component.
The functionality for a desktop pane is implemented with a container listener. When a frame is added to the desktop, it will be made self-selecting as described above. When a frame is removed from the desktop, the self-selecting functionality will be removed from the frame.
Constructor Summary | |
---|---|
SelfSelectingFrames()
|
Method Summary | |
---|---|
static void |
setFramesSelfSelecting(javax.swing.JDesktopPane desktop,
boolean set)
Makes all internal frames on the specified desktop self-selecting or removes the self-selecting function from all frames. |
static void |
setSelfSelecting(javax.swing.JInternalFrame frame,
boolean set)
Makes an internal frame self-selecting or removes the self-selecting function. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SelfSelectingFrames()
Method Detail |
---|
public static void setFramesSelfSelecting(javax.swing.JDesktopPane desktop, boolean set)
Makes all internal frames on the specified desktop self-selecting or removes the self-selecting function from all frames.
desktop
- the desktopset
- true if the frames should become self-selecting, false if they
should not be self-selecting anymorepublic static void setSelfSelecting(javax.swing.JInternalFrame frame, boolean set)
Makes an internal frame self-selecting or removes the self-selecting function.
frame
- the frameset
- true if the frame should become self-selecting, false if it
should not be self-selecting anymore
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |