cvs diff api\doc\changes\apichanges.xml src\org\openide\text\EditorSupportLineSet.java src\org\openide\text\Line.java openide-spec-vers.properties src\org\openide\windows\TopComponent.java src\org\openide\windows\WindowManager.java (in directory D:\projects\nb\openide\)
Index: api/doc/changes/apichanges.xml
===================================================================
RCS file: /cvs/openide/api/doc/changes/apichanges.xml,v
retrieving revision 1.236
diff -r1.236 apichanges.xml
116a117,151
>
>
>
> Added a new SHOW_TOFRONT constant to the org.openide.text.Line
class.
>
>
>
>
> The new constant is used in the EditorSupportLineSet
and brings
> editor's parent Window
to be fronted above all other top-level windows.
>
>
>
>
>
>
>
>
> Added the TopComponent
ability to bring their parent
> Window
to front of other windows.
>
>
>
>
> The TopComponent
class has a new method toFront()
> that attempts to bring the parent Window
of the TopComponent to
> front of other top-level windows.
> The method is implemented in the WindowManager
class
> using AWT's java.awt.Window#toFront()
.
>
>
>
>
>
>
6490c6525
<
---
>
Index: src/org/openide/text/EditorSupportLineSet.java
===================================================================
RCS file: /cvs/openide/src/org/openide/text/EditorSupportLineSet.java,v
retrieving revision 1.41
diff -r1.41 EditorSupportLineSet.java
81c81,84
< editor.getComponent ().requestActive();
---
> editor.getComponent().requestActive();
> } else if (kind == SHOW_TOFRONT) {
> editor.getComponent().toFront();
> editor.getComponent().requestActive();
82a86
>
Index: src/org/openide/text/Line.java
===================================================================
RCS file: /cvs/openide/src/org/openide/text/Line.java,v
retrieving revision 1.30
diff -r1.30 Line.java
80a81,89
>
> /** Same as SHOW_GOTO except that the Window Manager attempts to front the
> * editor window (i.e. make it the top most window).
> * @see #show(int) show
> * @see org.openide.windows.TopComponent#toFront()
> * @since 5.8
> */
> public final static int SHOW_TOFRONT = 3;
>
User saubrecht doesn't have access to project openide-spec-vers.properties
Index: src/org/openide/windows/TopComponent.java
===================================================================
RCS file: /cvs/openide/src/org/openide/windows/TopComponent.java,v
retrieving revision 1.138
diff -r1.138 TopComponent.java
555a556,564
> /**
> * Attempts to bring the parent Window
or Frame
> * of this TopComponent to front of other windows.
> * @since 5.8
> */
> public void toFront() {
> WindowManager.getDefault().topComponentToFront(this);
> }
>
Index: src/org/openide/windows/WindowManager.java
===================================================================
RCS file: /cvs/openide/src/org/openide/windows/WindowManager.java,v
retrieving revision 1.48
diff -r1.48 WindowManager.java
17a18
> import java.awt.Frame;
18a20
> import java.awt.Window;
21a24
> import javax.swing.SwingUtilities;
379a383,402
> }
>
> /**
> * Attempts to bring the parent Window
of the given TopComponent
> * to front of other windows.
> * @see java.awt.Window#toFront()
> * @since 5.8
> */
> protected void topComponentToFront(TopComponent tc) {
> Window parentWindow = SwingUtilities.getWindowAncestor( tc );
> // be defensive, although w probably will always be non-null here
> if( null != parentWindow ) {
> if( parentWindow instanceof Frame ) {
> Frame parentFrame = (Frame)parentWindow;
> int state = parentFrame.getExtendedState();
> if( (state & Frame.ICONIFIED) > 0 )
> parentFrame.setExtendedState( state & ~Frame.ICONIFIED );
> }
> parentWindow.toFront();
> }
***** CVS exited normally with code 1 *****