Source Code Cross Referenced for StatusBar.java in  » Database-Client » PKLite-SQL-Client » com » pk » 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 » Database Client » PKLite SQL Client » com.pk 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        // Class defining a status bar
002:        package com.pk;
003:
004:        import javax.swing.*;
005:        import javax.swing.border.*;
006:        import java.awt.*;
007:
008:        class StatusBar extends JPanel implements  Constants {
009:            /**
010:             * 
011:             */
012:            private static final long serialVersionUID = -4915779892342583217L;
013:
014:            // Constructor
015:            public StatusBar() {
016:                setLayout(new FlowLayout(FlowLayout.LEFT, 10, 3));
017:                setBackground(Color.lightGray);
018:                setBorder(BorderFactory.createLineBorder(Color.darkGray));
019:                setUserPane(DEFAULT_ELEMENT_USER);
020:                setElapsedTimePane("");
021:                setMessagePane("");
022:                add(userPane); // Add color pane to status bar
023:                add(elapsedTimePane);
024:                add(messagePane); // Add type pane to status bar
025:            }
026:
027:            // Set type pane label
028:            public void setElapsedTimePane(String text) {
029:                elapsedTimePane.setText(text);
030:            }
031:
032:            public void setMessagePane(String text) {
033:                messagePane.setText(text); // Set the pane text
034:            }
035:
036:            public void setUserPane(String text) {
037:                userPane.setText(text); // Set the pane text
038:            }
039:
040:            // Panes in the status bar
041:            public StatusPane messagePane = new StatusPane("");
042:            public StatusPaneTime elapsedTimePane = new StatusPaneTime("");
043:            private StatusPaneSmall userPane = new StatusPaneSmall("");
044:
045:            // Class defining a status bar pane
046:            class StatusPane extends JLabel {
047:                /**
048:                 * 
049:                 */
050:                private static final long serialVersionUID = 3513784308329811461L;
051:
052:                public StatusPane(String text) {
053:                    setBackground(Color.lightGray); // Set background color
054:                    setForeground(Color.black);
055:                    //setFont(paneFont);                   // Set the fixed font
056:                    setHorizontalAlignment(CENTER); // Center the pane text 
057:                    setBorder(BorderFactory
058:                            .createBevelBorder(BevelBorder.LOWERED));
059:                    //setPreferredSize(new Dimension(400,20));
060:                    setHorizontalAlignment(LEFT);
061:                    setText(text); // Set the text in the pane
062:                }
063:                // Font for pane text
064:                //private Font paneFont = new Font("Serif", Font.PLAIN, 12);
065:            }
066:
067:            class StatusPaneTime extends JLabel {
068:                /**
069:                 * 
070:                 */
071:                private static final long serialVersionUID = -6145213924965322048L;
072:
073:                public StatusPaneTime(String text) {
074:                    setBackground(Color.lightGray); // Set background color
075:                    setForeground(Color.black);
076:                    //setFont(paneFont);                   // Set the fixed font
077:                    setHorizontalAlignment(CENTER); // Center the pane text 
078:                    setBorder(BorderFactory
079:                            .createBevelBorder(BevelBorder.LOWERED));
080:                    //setPreferredSize(new Dimension(400,20));
081:                    setHorizontalAlignment(LEFT);
082:                    setText(text); // Set the text in the pane
083:                }
084:                // Font for pane text
085:                //private Font paneFont = new Font("Serif", Font.PLAIN, 12);
086:            }
087:
088:            class StatusPaneSmall extends JLabel {
089:                /**
090:                 * 
091:                 */
092:                private static final long serialVersionUID = -2250303985616849791L;
093:
094:                public StatusPaneSmall(String text) {
095:                    setBackground(Color.lightGray); // Set background color
096:                    setForeground(Color.black);
097:                    //setFont(paneFont);                   // Set the fixed font
098:                    setHorizontalAlignment(CENTER); // Center the pane text 
099:                    setBorder(BorderFactory
100:                            .createBevelBorder(BevelBorder.LOWERED));
101:                    //setPreferredSize(new Dimension(100,20));
102:                    setHorizontalAlignment(LEFT);
103:                    setText(text); // Set the text in the pane
104:                }
105:
106:                // Font for pane text
107:                //private Font paneFont = new Font("Serif", Font.PLAIN, 12);
108:                //private Font paneFont = new Font("Default", Font.PLAIN, 12);
109:            }
110:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.