Source Code Cross Referenced for IAntivirusService.java in  » Net » hyperpool-0.4.0 » vicazh » hyperpool » stream » net » http » html » 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 » Net » hyperpool 0.4.0 » vicazh.hyperpool.stream.net.http.html 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        package vicazh.hyperpool.stream.net.http.html;
002:
003:        import javax.swing.*;
004:        import org.jfree.report.event.*;
005:        import java.awt.*;
006:        import java.awt.event.*;
007:        import java.beans.*;
008:        import java.util.logging.*;
009:        import vicazh.hyperpool.Start;
010:        import vicazh.hyperpool.stream.*;
011:
012:        /**
013:         * The graphic antivirus service
014:         * 
015:         * @author Victor Zhigunov
016:         * @version 0.4.0
017:         */
018:        public class IAntivirusService extends IReportService implements 
019:                AntivirusServiceMBean, ActionListener, PropertyChangeListener {
020:            private JDialog dialog;
021:
022:            private JOptionPane optionPane;
023:
024:            private JTextField textDir;
025:
026:            private JFormattedTextField textDate;
027:
028:            private JTextField textDelimiter;
029:
030:            private JTextField textServer;
031:
032:            private JFormattedTextField textPort;
033:
034:            private JFormattedTextField textBuffer;
035:
036:            private DefaultComboBoxModel themeModel;
037:
038:            /**
039:             * @param name
040:             *            service name
041:             * @param buttonClear
042:             *            clear button
043:             * @param dialogClear
044:             *            clear dialog
045:             * @param buttonStart
046:             *            start date range button
047:             * @param buttonEnd
048:             *            end date range button
049:             * @param box
050:             *            time period value combo box
051:             * @param dialogDate
052:             *            date select dialog
053:             * @param b1
054:             *            period radio button
055:             * @param b2
056:             *            range radio button
057:             * @param buttonCreate
058:             *            create button
059:             * @param buttonPrint
060:             *            print button
061:             * @param buttonExport
062:             *            export button
063:             * @param names
064:             *            columns names
065:             * @param container
066:             *            report container
067:             * @param model
068:             *            type model
069:             * @param boxzoom
070:             *            zoom combo box
071:             * @param boxpage
072:             *            page combo box
073:             * @param listener
074:             *            repagination listener
075:             * @param component
076:             *            repagination component
077:             * @param chooser
078:             *            file chooser
079:             * @param parent
080:             *            parent component
081:             * @param dialogReplace
082:             *            replace dialog
083:             * @param reportModel
084:             *            report model
085:             * @param dialog
086:             *            options dialog
087:             * @param textDir
088:             *            directory value field
089:             * @param textDate
090:             *            date value field
091:             * @param textDelimiter
092:             *            delimiter value field
093:             * @param textServer
094:             *            ClamAV server value field
095:             * @param textPort
096:             *            ClamAV port value field
097:             * @param textBuffer
098:             *            buffer size value field
099:             * @param themeModel
100:             *            theme model
101:             */
102:            public IAntivirusService(String name, JButton buttonClear,
103:                    JDialog dialogClear, JButton buttonStart,
104:                    JButton buttonEnd, JComboBox box, JDialog dialogDate,
105:                    AbstractButton b1, AbstractButton b2, JButton buttonCreate,
106:                    JButton buttonPrint, JButton buttonExport, Object[] names,
107:                    Container container, DefaultComboBoxModel model,
108:                    JComboBox boxzoom, JComboBox boxpage,
109:                    RepaginationListener listener, Component component,
110:                    JFileChooser chooser, Component parent,
111:                    JDialog dialogReplace, IReportModel reportModel,
112:                    JDialog dialog, JTextField textDir,
113:                    JFormattedTextField textDate, JTextField textDelimiter,
114:                    JTextField textServer, JFormattedTextField textPort,
115:                    JFormattedTextField textBuffer,
116:                    DefaultComboBoxModel themeModel) {
117:                super (AntivirusServiceMBean.class, name, buttonClear,
118:                        dialogClear, buttonStart, buttonEnd, box, dialogDate,
119:                        b1, b2, buttonCreate, buttonPrint, buttonExport, names,
120:                        container, model, boxzoom, boxpage, listener,
121:                        component, chooser, parent, dialogReplace, reportModel);
122:                this .dialog = dialog;
123:                optionPane = (JOptionPane) dialog.getContentPane();
124:                optionPane.addPropertyChangeListener(this );
125:                this .textDir = textDir;
126:                this .textDate = textDate;
127:                this .textDelimiter = textDelimiter;
128:                this .textServer = textServer;
129:                this .textPort = textPort;
130:                this .textBuffer = textBuffer;
131:                this .themeModel = themeModel;
132:                updateUI();
133:            }
134:
135:            public void actionPerformed(ActionEvent e) {
136:                dialog.setLocationRelativeTo(dialog.getOwner());
137:                dialog.setVisible(true);
138:                Object value = optionPane.getValue();
139:                if (value == JOptionPane.UNINITIALIZED_VALUE)
140:                    return;
141:                optionPane.setValue(JOptionPane.UNINITIALIZED_VALUE);
142:                if (((Integer) value).intValue() != JOptionPane.OK_OPTION)
143:                    return;
144:                AntivirusService s = new AntivirusService();
145:                s.setDir(textDir.getText());
146:                s.setDate((Integer) textDate.getValue());
147:                s.setDelimiter(textDelimiter.getText());
148:                s.setHost(textServer.getText());
149:                s.setPort((Integer) textPort.getValue());
150:                s.setBuffer((Integer) textBuffer.getValue());
151:                IMessageTheme t = (IMessageTheme) themeModel.getSelectedItem();
152:                s.setTheme(t.theme);
153:                s.setUrl(t.transformer);
154:                try {
155:                    setAttribute(FileServiceMBean.OPTIONS, s);
156:                } catch (Exception ex) {
157:                    Start.logger.log(Level.SEVERE, ex.getMessage(), ex);
158:                }
159:            }
160:
161:            public void updateUI() {
162:                SwingUtilities.updateComponentTreeUI(dialog);
163:                super .updateUI();
164:            }
165:
166:            protected void otherNotification(String type, Object value) {
167:                if (type.equals(FileServiceMBean.OPTIONS)) {
168:                    textDir.setText(((FileService) value).getDir());
169:                    textDate.setValue(((ReportService) value).getDate());
170:                    textDelimiter.setText(((ReportService) value)
171:                            .getDelimiter());
172:                    textServer.setText(((AntivirusService) value).getHost());
173:                    textPort.setValue(((AntivirusService) value).getPort());
174:                    textBuffer.setValue(((AntivirusService) value).getBuffer());
175:                    for (int i = 0; i < themeModel.getSize(); i++) {
176:                        Object o = themeModel.getElementAt(i);
177:                        if (((IMessageTheme) o).theme
178:                                .equals(((AntivirusService) value).getTheme())) {
179:                            themeModel.setSelectedItem(o);
180:                            break;
181:                        }
182:                    }
183:                }
184:                super.otherNotification(type, value);
185:            }
186:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.