Source Code Cross Referenced for BasePopup.java in  » UML » jrefactory » org » acm » seguin » completer » popup » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » UML » jrefactory » org.acm.seguin.completer.popup 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        package org.acm.seguin.completer.popup;
002:
003:        import org.acm.seguin.ide.jedit.Navigator.NavigatorLogger; //import anthelper.utils.ReflectUtils;
004:        import org.acm.seguin.completer.Completer;
005:
006:        import java.awt.*;
007:        import java.awt.event.*;
008:        import java.util.*;
009:        import javax.swing.*;
010:        import javax.swing.BoxLayout;
011:        import javax.swing.event.*;
012:        import org.gjt.sp.jedit.*;
013:        import org.gjt.sp.jedit.View;
014:        import org.gjt.sp.jedit.gui.KeyEventWorkaround;
015:        import org.gjt.sp.jedit.textarea.*;
016:
017:        /**
018:         * The base popup
019:         *
020:         * @author    btateyama@yahoo.com
021:         * @created   December 10, 2002
022:         */
023:        public abstract class BasePopup extends JWindow {
024:            final static NavigatorLogger logger = Completer
025:                    .getLogger(BasePopup.class);
026:
027:            /**
028:             * Description of the Field
029:             */
030:            protected View _view = null;
031:
032:            /**
033:             * Description of the Field
034:             */
035:            protected JEditTextArea _textArea = null;
036:            /**
037:             * Description of the Field
038:             */
039:            protected Buffer _buffer = null;
040:
041:            /**
042:             * Constructor for the BasePopup object
043:             *
044:             * @param argView  Description of the Parameter
045:             */
046:            protected BasePopup(View argView) {
047:                super (argView);
048:                _view = argView;
049:                _buffer = argView.getBuffer();
050:                _textArea = argView.getTextArea();
051:            }
052:
053:            JScrollPane createScrollPane(JList argList) {
054:                // stupid scrollbar policy is an attempt to work around
055:                // bugs people have been seeing with IBM's JDK -- 7 Sep 2000
056:                JScrollPane scroller = new JScrollPane(argList,
057:                        JScrollPane.VERTICAL_SCROLLBAR_ALWAYS,
058:                        JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);
059:                //JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);
060:
061:                return scroller;
062:            }
063:
064:            protected JPanel createMainPanel() {
065:                return new JPanel(new BorderLayout()) {
066:                    /**
067:                     * Returns if this component can be traversed by pressing the
068:                     * Tab key. This returns false.
069:                     *
070:                     * @return   The managingFocus value
071:                     */
072:                    public boolean isManagingFocus() {
073:                        return true;
074:                        //false;
075:                    }
076:
077:                    /**
078:                     * Makes the tab key work in Java 1.4.
079:                     *
080:                     * @return   The focusTraversalKeysEnabled value
081:                     */
082:                    public boolean getFocusTraversalKeysEnabled() {
083:                        return false;
084:                    }
085:                };
086:            }
087:
088:            /**
089:             * Called after super.show if popup is to be shown (i.e. no other visible popups)
090:             */
091:            protected abstract void postShow();
092:
093:            /**
094:             * Description of the Method
095:             */
096:            public void show() {
097:                Completer dc = Completer.getDotCompleterForView(_view);
098:                if (dc.lockPopup(this )) {
099:                    super .show();
100:                    postShow();
101:                } else {
102:                    super .dispose();
103:                }
104:            }
105:
106:            /**
107:             * Dispose and unlock the popup
108:             */
109:            public void dispose() {
110:                super .dispose();
111:                try {
112:                    Completer dc = Completer.getDotCompleterForView(_view);
113:                    if (dc != null) {
114:                        // it will be null during final window closing
115:                        dc.unlockPopup(this );
116:                    } else {
117:                        logger.warning("DC for view (" + _view.getName()
118:                                + ") could not be found");
119:                    }
120:                    //DotCompletePlugin.getDotCompleterForView(_view).unlockPopup(this);
121:                } catch (Exception e) {
122:                    logger.error("Error while disposing popup!", e);
123:                } finally {
124:                    // do this last in finally since it can mess up focus if not done.
125:                    _view.setKeyEventInterceptor(null);
126:                    PopupUtils.requestFocusOnTextArea(_textArea);
127:                }
128:            }
129:
130:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.