JavaDoc


001    /**
002     * Copyright (c) 2003 Daffodil Software Ltd all rights reserved,
003     * Modifications Copyright (c) 2008 Regiscope Digital Imaging Co, LLC, All rights reserved.
004     * This program is free software; you can redistribute it and/or modify
005     * it under the terms of version 2 of the GNU General Public License as
006     * published by the Free Software Foundation.
007     * There are special exceptions to the terms and conditions of the GPL
008     * as it is applied to this software. See the GNU General Public License for more details.
009     *
010     * This program is distributed in the hope that it will be useful,
011     * but WITHOUT ANY WARRANTY; without even the implied warranty of
012     * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
013     * GNU General Public License for more details.
014     *
015     * You should have received a copy of the GNU General Public License
016     * along with this program; if not, write to the Free Software
017     * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
018     */
019    
020    package org.dbreplicator.repconsole;
021    
022    import java.io.*;
023    import java.sql.*;
024    
025    import java.awt.*;
026    import java.awt.event.*;
027    import javax.swing.*;
028    import javax.swing.border.*;
029    import javax.swing.tree.*;
030    import org.dbreplicator.replication.*;
031    
032    /**
033     * <p>Title: </p>
034     * <p>Description: </p>
035     * <p>Copyright: Copyright (c) 2003</p>
036     * <p>Company: </p>
037     * @author not attributable
038     * @version 1.0
039     */
040    
041    public class MainFrame
042        extends JFrame {
043      Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
044      Dimension frameSize;
045      JPanel contentPane;
046      JMenuBar jMenuBar1 = new JMenuBar();
047      JLabel statusBar = new JLabel();
048      BorderLayout borderLayout1 = new BorderLayout();
049    
050      JMenu jMenuConsole = new JMenu();
051      JMenuItem jMenuConsole_Exit = new JMenuItem();
052      JMenuItem jMenuConsole_Refresh = new JMenuItem();
053      JMenu jMenuPublisher = new JMenu();
054      JMenu jMenuSubscription = new JMenu();
055      JMenu jMenuHelp = new JMenu();
056    
057      JMenuItem jMenuPub_Create = new JMenuItem();
058      JMenu jMenuPub_Update = new JMenu();
059      JMenuItem jMenuPub_Unpublish = new JMenuItem();
060      JMenuItem jMenuPub_addTable = new JMenuItem();
061      JMenuItem jMenuPub_dropTable = new JMenuItem();
062    
063      JMenuItem jMenuSub_Create = new JMenuItem();
064      JMenu jMenu_Snapshot = new JMenu();
065      JMenuItem jMenuSub_Snapshot = new JMenuItem();
066      JMenuItem jMenuSub_SnapshotAfterUpdate = new JMenuItem();
067      JMenuItem jMenuSub_synchronize = new JMenuItem();
068      JMenuItem jMenuSub_Pull = new JMenuItem();
069      JMenuItem jMenuSub_Push = new JMenuItem();
070      JMenuItem jMenuSub_Update = new JMenuItem();
071      JMenuItem jMenuHelp_aboutus = new JMenuItem();
072    
073      _ReplicationServer repServer;
074    
075      JPanel jPanel1 = new JPanel();
076      JTabbedPane jTabbedRepComponents = new JTabbedPane();
077    
078      TitledBorder titledBorder1;
079    
080      DefaultMutableTreeNode pubRootNode = new DefaultMutableTreeNode(
081          "publications");
082      DefaultMutableTreeNode subRootNode = new DefaultMutableTreeNode(
083          "subscriptions");
084      DefaultMutableTreeNode dataRootNode = new DefaultMutableTreeNode("datasource");
085    
086      JTree jTreePublications = new JTree(pubRootNode);
087      JTree jTreeSubscriptions = new JTree(subRootNode);
088      JTree jTreeDataSource = new JTree(dataRootNode);
089    
090      //POPUPS
091      JMenuItem jMenuSub_UnSubscribe = new JMenuItem();
092      JMenuItem jMenusynchronize = new JMenuItem();
093      JMenuItem jMenupull = new JMenuItem();
094      JMenuItem jMenupush = new JMenuItem();
095      JMenuItem jMenuUnSubscribe = new JMenuItem();
096      JMenu jMenuUpdatePub = new JMenu();
097      JMenuItem jMenuUnpublish = new JMenuItem();
098      JPopupMenu jpopUpMenu = new JPopupMenu();
099      JMenuItem jMenuUpdateSub = new JMenuItem();
100      JMenuItem jMenuUpdatePub_AddTable = new JMenuItem();
101      JMenuItem jMenuUpdatePub_DropTable = new JMenuItem();
102      JPopupMenu jpopUpMenu_Publication = new JPopupMenu();
103    
104      String subName, pubName;
105      String selectedserver;
106    
107      //Schedule
108      JMenu jMenu_AddRemoveSchedule = new JMenu();
109      JMenuItem jMenuSchedule_addSchedule = new JMenuItem();
110      JMenuItem jMenuSchedule_editSchedule = new JMenuItem();
111      JMenuItem jMenuSchedule_removeSchedule = new JMenuItem();
112    
113      JMenu jPopUpMenu_AddRemoveSchedule = new JMenu("Schedule...");
114      JMenuItem jPopUpMenuSchedule_addSchedule = new JMenuItem("Add Schedule");
115      JMenuItem jPopUpMenuSchedule_editSchedule = new JMenuItem("Edit Schedule");
116      JMenuItem jPopUpMenuSchedule_removeSchedule = new JMenuItem("Remove Schedule");
117    
118      JMenu jPopUpMenuSnapshot = new JMenu("SnapShot...");
119      JMenuItem jMenugetSnapShot = new JMenuItem("SnapShot After Subsribing...");
120      JMenuItem jMenugetSnapShotAfterUpdate = new JMenuItem(
121          "SnapShot After Updating Subscription...");
122    
123      String snapShotAfterSubscribing="AfterSubscribing";
124      String snapShotAfterUpdating="AfterUpdating";
125    
126    
127      public MainFrame() throws Exception {
128        jbInit(selectedserver);
129        show();
130      }
131    
132      public MainFrame(_ReplicationServer repServer0, String selectedserver) {
133        repServer = repServer0;
134        this.selectedserver = selectedserver;
135        enableEvents(AWTEvent.WINDOW_EVENT_MASK);
136        try {
137          FileOutputStream errorLogFile = new FileOutputStream(PathHandler.
138              getErrorFilePath(), true);
139          Date dt = new Date(System.currentTimeMillis());
140          errorLogFile.write( (dt + "\n").getBytes());
141          errorLogFile.close();
142        }
143        catch (IOException ex) {
144          JOptionPane.showMessageDialog(this, ex, "Error Message",
145                                        JOptionPane.ERROR_MESSAGE);
146        }
147        try {
148          jbInit(selectedserver);
149          initPubSubTree();
150        }
151        catch (Exception e) {
152          JOptionPane.showMessageDialog(this, e, "Error Message",
153                                        JOptionPane.ERROR_MESSAGE);
154          return;
155        }
156        setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
157      }
158    
159      //Component initialization
160      private void jbInit(String selectserver) throws Exception {
161        Dimension screen = java.awt.Toolkit.getDefaultToolkit().getScreenSize();
162        int width = (int) screen.getWidth();
163        int height = (int) screen.getHeight();
164        this.setBounds(0, 0, width, height);
165        this.setIconImage(new ImageIcon(getClass().getResource("/icons/rep.png")).
166                          getImage());
167        contentPane = (JPanel)this.getContentPane();
168        titledBorder1 = new TitledBorder("");
169        contentPane.setLayout(borderLayout1);
170        if (selectserver.equalsIgnoreCase("Pubserver")) {
171          this.setTitle("DBReplicator - Publication Server");
172        }
173        if (selectserver.equalsIgnoreCase("Subserver")) {
174          this.setTitle("DBReplicator - Subscription Server");
175        }
176        statusBar.setText(" ");
177    
178        jMenuConsole.setFont(new java.awt.Font("Dialog", 0, 12));
179        jMenuConsole.setText("Console");
180        jMenuConsole_Refresh.setFont(new java.awt.Font("Dialog", 0, 12));
181        jMenuConsole_Refresh.setAlignmentX( (float) 0.5);
182        jMenuConsole_Refresh.setText("Refresh");
183        jMenuConsole_Refresh.addActionListener(new
184            MainFrame_jMenuConsole_Refresh_actionAdapter(this));
185        jMenuConsole_Exit.setFont(new java.awt.Font("Dialog", 0, 12));
186        jMenuConsole_Exit.setAlignmentX( (float) 0.5);
187        jMenuConsole_Exit.setAction(null);
188        jMenuConsole_Exit.setActionCommand("");
189        jMenuConsole_Exit.setMnemonic('0');
190        jMenuConsole_Exit.setText("Exit");
191        jMenuConsole_Exit.setAccelerator(javax.swing.KeyStroke.getKeyStroke('X',
192            java.awt.event.KeyEvent.ALT_MASK, true));
193        jMenuConsole_Exit.addActionListener(new
194            MainFrame_jMenuConsole_Exit_actionAdapter(this));
195    
196        jMenuPublisher.setFont(new java.awt.Font("Dialog", 0, 12));
197        jMenuPublisher.setText("Publisher");
198        jMenuPub_Create.setFont(new java.awt.Font("Dialog", 0, 12));
199        jMenuPub_Create.setText("Create Publication...");
200        jMenuPub_Create.setAccelerator(javax.swing.KeyStroke.getKeyStroke('P',
201            java.awt.event.KeyEvent.CTRL_MASK, true));
202        jMenuPub_Create.addActionListener(new
203                                          MainFrame_jMenuPub_Create_actionAdapter(this));
204    
205        jMenuPub_Update.setFont(new java.awt.Font("Dialog", 0, 12));
206        jMenuPub_Update.setText("Update Publisher...");
207    
208        jMenuPub_Unpublish.setFont(new java.awt.Font("Dialog", 0, 12));
209        jMenuPub_Unpublish.setText("Drop Publication...");
210        jMenuPub_Unpublish.setAccelerator(javax.swing.KeyStroke.getKeyStroke('P',
211            java.awt.event.KeyEvent.ALT_MASK, false));
212        jMenuPub_Unpublish.addActionListener(new
213            MainFrame_jMenuPub_Unpublish_actionAdapter(this));
214    
215        jMenuPub_addTable.setFont(new java.awt.Font("Dialog", 0, 12));
216        jMenuPub_addTable.setText("Add Tables...");
217        jMenuPub_addTable.addActionListener(new
218            MainFrame_jMenuPub_addTable_actionAdapter(this));
219    
220        jMenuPub_dropTable.setFont(new java.awt.Font("Dialog", 0, 12));
221        jMenuPub_dropTable.setText("Drop Tables...");
222        jMenuPub_dropTable.addActionListener(new
223            MainFrame_jMenuPub_dropTable_actionAdapter(this));
224    
225        jMenuSubscription.setFont(new java.awt.Font("Dialog", 0, 12));
226        jMenuSubscription.setText("Subscriber");
227    
228        jMenuSub_Create.setFont(new java.awt.Font("Dialog", 0, 12));
229        jMenuSub_Create.setText("Create Subscription...");
230        jMenuSub_Create.setAccelerator(javax.swing.KeyStroke.getKeyStroke('S',
231            java.awt.event.KeyEvent.CTRL_MASK, true));
232        jMenuSub_Create.addActionListener(new
233                                          MainFrame_jMenuSub_Create_actionAdapter(this));
234    
235        jMenuSub_Update.setFont(new java.awt.Font("Dialog", 0, 12));
236        jMenuSub_Update.setText("Update Subscription...");
237        jMenuSub_Update.addActionListener(new
238                                          MainFrame_jMenuSub_Update_actionAdapter(this));
239    
240        jMenu_Snapshot.setFont(new java.awt.Font("Dialog", 0, 12));
241        jMenu_Snapshot.setText("SnapShot");
242    
243        jMenuSub_Snapshot.setFont(new java.awt.Font("Dialog", 0, 12));
244        jMenuSub_Snapshot.setText("Snapshot After Subscribing...");
245        jMenuSub_Snapshot.addActionListener(new
246            MainFrame_jMenuSub_Snapshot_actionAdapter(this,snapShotAfterSubscribing));
247    
248        jMenuSub_SnapshotAfterUpdate.setFont(new java.awt.Font("Dialog", 0, 12));
249        jMenuSub_SnapshotAfterUpdate.setText(
250            "SnapShot After Updating Subscription...");
251        jMenuSub_SnapshotAfterUpdate.addActionListener(new
252            MainFrame_jMenuSub_Snapshot_actionAdapter(this,snapShotAfterUpdating));
253    
254        jMenuSub_synchronize.setFont(new java.awt.Font("Dialog", 0, 12));
255        jMenuSub_synchronize.setText("Synchronize...");
256        jMenuSub_synchronize.addActionListener(new
257            MainFrame_jMenuSub_synchronize_actionAdapter(this));
258        jMenuSub_Pull.setFont(new java.awt.Font("Dialog", 0, 12));
259        jMenuSub_Pull.setText("Pull...");
260        jMenuSub_Pull.addActionListener(new MainFrame_jMenuSub_pull_actionAdapter(this));
261        jMenuSub_Push.setFont(new java.awt.Font("Dialog", 0, 12));
262        jMenuSub_Push.setText("Push...");
263        jMenuSub_Push.addActionListener(new MainFrame_jMenuSub_push_actionAdapter(this));
264        jMenuSub_UnSubscribe.setFont(new java.awt.Font("Dialog", 0, 12));
265        jMenuSub_UnSubscribe.setText("Drop Subscription...");
266        jMenuSub_UnSubscribe.setAccelerator(javax.swing.KeyStroke.getKeyStroke('S',
267            java.awt.event.KeyEvent.ALT_MASK, false));
268        jMenuSub_UnSubscribe.addActionListener(new
269            MainFrame_jMenuSub_UnSubscribe_actionAdapter(this));
270        jMenuHelp.setFont(new java.awt.Font("Dialog", 0, 12));
271        jMenuHelp.setText("Help");
272        jMenuHelp_aboutus.setFont(new java.awt.Font("Dialog", 0, 12));
273        jMenuHelp_aboutus.setText("About Replicator");
274        jMenuHelp_aboutus.setAccelerator(javax.swing.KeyStroke.getKeyStroke('H',
275            java.awt.event.KeyEvent.CTRL_MASK, false));
276        jMenuHelp_aboutus.addActionListener(new
277            MainFrame_jMenuHelp_aboutus_actionAdapter(this));
278    
279        jPanel1.setLayout(null);
280        jTabbedRepComponents.setTabPlacement(JTabbedPane.LEFT);
281        jTabbedRepComponents.setFont(new java.awt.Font("Dialog", 0, 12));
282        jTabbedRepComponents.setBorder(BorderFactory.createEtchedBorder());
283        jTabbedRepComponents.setDebugGraphicsOptions(0);
284        jTabbedRepComponents.setBounds(new Rectangle(5, 3, width - 25, height - 100));
285        contentPane.setMinimumSize(new Dimension(100, 400));
286        contentPane.setPreferredSize(new Dimension(200, 600));
287        jTreeSubscriptions.addMouseListener(new
288            MainFrame_jTreeSubscriptions_mouseAdapter(this));
289        jTreePublications.addMouseListener(new
290                                           MainFrame_jTreePublication_mouseAdapter(this));
291        jMenuBar1.setFont(new java.awt.Font("Dialog", 0, 12));
292        jpopUpMenu.setFont(new java.awt.Font("Dialog", 0, 12));
293        jpopUpMenu_Publication.setFont(new java.awt.Font("Dialog", 0, 12));
294        jMenuUnpublish.setFont(new java.awt.Font("Dialog", 0, 12));
295        jMenuUnSubscribe.setFont(new java.awt.Font("Dialog", 0, 12));
296        jMenusynchronize.setFont(new java.awt.Font("Dialog", 0, 12));
297        jMenupull.setFont(new java.awt.Font("Dialog", 0, 12));
298        jMenupush.setFont(new java.awt.Font("Dialog", 0, 12));
299        this.setJMenuBar(jMenuBar1);
300        contentPane.add(statusBar, BorderLayout.SOUTH);
301        contentPane.add(jPanel1, BorderLayout.CENTER);
302    
303    //      jMenuConsole_Exit.setAccelerator(KeyStroke.getKeyStroke());
304        JScrollPane jsp = new JScrollPane(jTreePublications);
305        JScrollPane jsp1 = new JScrollPane(jTreeSubscriptions);
306        JScrollPane jsp2 = new JScrollPane(jTreeDataSource);
307    //      jsp.setBounds(new Rectangle(5, 3, 740, 546));
308        jPanel1.add(jTabbedRepComponents, null);
309    
310        jTreeSubscriptions.setRootVisible(true);
311        jTreePublications.setRootVisible(true);
312    
313        if (selectserver.equalsIgnoreCase("Subserver")) {
314          jTabbedRepComponents.add(jsp1, "Subscriptions");
315        }
316        if (selectserver.equalsIgnoreCase("Pubserver")) {
317          jTabbedRepComponents.add(jsp, "Publications");
318        }
319        jTabbedRepComponents.add(jsp2, "DataSource");
320    
321        jMenuBar1.add(jMenuConsole);
322        if (selectserver.equalsIgnoreCase("Pubserver")) {
323          jMenuBar1.add(jMenuPublisher);
324        }
325        if (selectserver.equalsIgnoreCase("Subserver")) {
326          jMenuBar1.add(jMenuSubscription);
327        }
328        jMenuBar1.add(jMenuHelp);
329        jMenuConsole.add(jMenuConsole_Refresh);
330        jMenuConsole.add(jMenuConsole_Exit);
331    
332        jMenuPublisher.add(jMenuPub_Create);
333        jMenuPublisher.add(jMenuPub_Update);
334        jMenuPublisher.add(jMenuPub_Unpublish);
335    
336        jMenuSubscription.add(jMenuSub_Create);
337        jMenuSubscription.add(jMenuSub_Update);
338        jMenuSubscription.add(jMenu_Snapshot);
339        jMenu_Snapshot.add(jMenuSub_Snapshot);
340        jMenu_Snapshot.add(jMenuSub_SnapshotAfterUpdate);
341        jMenuSubscription.add(jMenuSub_synchronize);
342        jMenuSubscription.add(jMenuSub_Pull);
343        jMenuSubscription.add(jMenuSub_Push);
344        jMenuSubscription.add(jMenuSub_UnSubscribe);
345    
346        jMenuHelp.add(jMenuHelp_aboutus);
347        //Update Publisher
348        jMenuPub_Update.add(jMenuPub_addTable);
349        jMenuPub_Update.add(jMenuPub_dropTable);
350        //schedule
351        jMenu_AddRemoveSchedule.setFont(new java.awt.Font("Dialog", 0, 12));
352        jMenu_AddRemoveSchedule.setText("Schedule...");
353    
354        jMenuSchedule_addSchedule.setFont(new java.awt.Font("Dialog", 0, 12));
355        jMenuSchedule_addSchedule.setText("Add Schedule...");
356        jMenuSchedule_addSchedule.setAccelerator(javax.swing.KeyStroke.getKeyStroke(
357            'T', java.awt.event.KeyEvent.CTRL_MASK, true));
358        jMenuSchedule_addSchedule.addActionListener(new
359            MainFrame_jMenuSchedule_add_actionAdapter(this));
360    
361        jMenuSchedule_editSchedule.setFont(new java.awt.Font("Dialog", 0, 12));
362        jMenuSchedule_editSchedule.setText("Edit Schedule...");
363        jMenuSchedule_editSchedule.addActionListener(new
364            MainFrame_jMenuSchedule_edit_actionAdapter(this));
365    
366        jMenuSchedule_removeSchedule.setFont(new java.awt.Font("Dialog", 0, 12));
367        jMenuSchedule_removeSchedule.setText("Remove Schedule...");
368        jMenuSchedule_removeSchedule.setAccelerator(javax.swing.KeyStroke.
369                                                    getKeyStroke('U',
370            java.awt.event.KeyEvent.CTRL_MASK, true));
371        jMenuSchedule_removeSchedule.addActionListener(new
372            MainFrame_jMenuSchedule_remove_actionAdapter(this));
373    
374        jMenu_AddRemoveSchedule.add(jMenuSchedule_addSchedule);
375        jMenu_AddRemoveSchedule.add(jMenuSchedule_editSchedule);
376        jMenu_AddRemoveSchedule.add(jMenuSchedule_removeSchedule);
377    
378        jMenuSubscription.add(jMenu_AddRemoveSchedule);
379    
380        jMenugetSnapShot.addActionListener(new ActionListener() {
381          public void actionPerformed(ActionEvent e) {
382            jMenuSub_Snapshot_actionPerformed(e, subName,snapShotAfterSubscribing);
383          }
384        });
385    
386        jMenugetSnapShotAfterUpdate.addActionListener(new ActionListener() {
387          public void actionPerformed(ActionEvent e) {
388            jMenuSub_Snapshot_actionPerformed(e, subName,snapShotAfterUpdating);
389          }
390        });
391    
392        jMenuUpdatePub_AddTable.addActionListener(new ActionListener() {
393          public void actionPerformed(ActionEvent e) {
394            jMenuPub_Update_actionPerformed(e, pubName,
395                                            RepConstants.addTable_Publication);
396          }
397        });
398    
399        jMenuUpdatePub_DropTable.addActionListener(new ActionListener() {
400          public void actionPerformed(ActionEvent e) {
401            jMenuPub_Update_actionPerformed(e, pubName,
402                                            RepConstants.dropTable_Publication);
403          }
404        });
405        jPopUpMenuSchedule_addSchedule.addActionListener(new ActionListener() {
406          public void actionPerformed(ActionEvent e) {
407            jMenuSchedule_add_actionPerformed(e, subName);
408          }
409        });
410    
411        jPopUpMenuSchedule_editSchedule.addActionListener(new ActionListener() {
412          public void actionPerformed(ActionEvent e) {
413            jMenuSchedule_edit_actionPerformed(e, subName);
414          }
415        });
416    
417        jPopUpMenuSchedule_removeSchedule.addActionListener(new ActionListener() {
418          public void actionPerformed(ActionEvent e) {
419            jMenuSchedule_remove_actionPerformed(e, subName);
420          }
421        });
422      }
423    
424      //File | Exit action performed
425      public void jMenuConsoleExit_actionPerformed(ActionEvent e) {
426        System.exit(0);
427      }
428    
429      void jMenuConsole_Exit_actionPerformed(ActionEvent e) {
430        System.exit(00);
431      }
432    
433      void jMenuConsole_Refresh_actionPerformed(ActionEvent e) {
434        if (selectedserver.equalsIgnoreCase("Pubserver")) {
435          pubRootNode.removeAllChildren();
436          jpopUpMenu_Publication.removeAll();
437          ( (DefaultTreeModel) jTreePublications.getModel()).reload();
438        }
439        if (selectedserver.equalsIgnoreCase("subserver")) {
440          subRootNode.removeAllChildren();
441          jpopUpMenu.removeAll();
442          ( (DefaultTreeModel) jTreeSubscriptions.getModel()).reload();
443        }
444        dataRootNode.removeAllChildren();
445        ( (DefaultTreeModel) jTreeDataSource.getModel()).reload();
446        initPubSubTree();
447      }
448    
449      // Creating Publication
450      void jMenuPub_Create_actionPerformed(ActionEvent e) {
451        CreatePublication cp = new CreatePublication(repServer, pubRootNode,
452                                                     ( (DefaultTreeModel)
453                                                      jTreePublications.getModel()));
454        frameSize = new Dimension(390, 250);
455        cp.setBounds( (screenSize.width - frameSize.width) / 2,
456                     (screenSize.height - frameSize.height) / 2, 390, 250);
457        cp.show();
458      }
459    
460      // Creating Subscription
461      void jMenuSub_Create_actionPerformed(ActionEvent e) {
462        CreateSubscription cs = new CreateSubscription(repServer, subRootNode,
463            ( (DefaultTreeModel) jTreeSubscriptions.getModel()));
464        frameSize = new Dimension(400, 300);
465        cs.setBounds( (screenSize.width - frameSize.width) / 2,
466                     (screenSize.height - frameSize.height) / 2, 400, 300);
467        cs.show();
468      }
469    
470      void jMenuSub_Update_actionPerformed(ActionEvent e, String subName0) {
471        UpdateSubscription cp;
472        if (subName0 == null) {
473          cp = new UpdateSubscription(repServer, false);
474        }
475        else {
476          cp = new UpdateSubscription(repServer, subName0, false);
477    
478        }
479        frameSize = new Dimension(400, 300);
480        cp.setBounds( (screenSize.width - frameSize.width) / 2,
481                     (screenSize.height - frameSize.height) / 2, 400, 300);
482        cp.show();
483      }
484    
485      void jMenuSub_Snapshot_actionPerformed(ActionEvent e, String subName0,String snapShotType) {
486        GetSnapshot cp;
487        if (subName0 == null) {
488          cp = new GetSnapshot(repServer, false,snapShotType);
489        }
490        else {
491          cp = new GetSnapshot(repServer, subName0, false,snapShotType);
492    
493        }
494        frameSize = new Dimension(400, 300);
495        cp.setBounds( (screenSize.width - frameSize.width) / 2,
496                     (screenSize.height - frameSize.height) / 2, 400, 300);
497        cp.show();
498      }
499    
500      void jMenuSub_synchronize_actionPerformed(ActionEvent e, String subName0) {
501        Synchronize cp;
502        if (subName0 == null) {
503          cp = new Synchronize(repServer, false);
504        }
505        else {
506          cp = new Synchronize(repServer, subName0, false);
507    
508        }
509        frameSize = new Dimension(375, 275);
510        cp.setBounds( (screenSize.width - frameSize.width) / 2,
511                     (screenSize.height - frameSize.height) / 2, 375, 275);
512    //      System.out.println(" HELLO BEFORE SHOWING SYNCHRONIZE ");
513        cp.show();
514      }
515    
516      //Pull
517      void jMenuSub_pull_actionPerformed(ActionEvent e, String subName0) {
518        Pull cp;
519        if (subName0 == null) {
520          cp = new Pull(repServer, false);
521        }
522        else {
523          cp = new Pull(repServer, subName0, false);
524    
525        }
526        frameSize = new Dimension(375, 275);
527        cp.setBounds( (screenSize.width - frameSize.width) / 2,
528                     (screenSize.height - frameSize.height) / 2, 375, 275);
529    //      System.out.println(" HELLO BEFORE SHOWING PULL ");
530        cp.show();
531      }
532    
533      //push
534      void jMenuSub_push_actionPerformed(ActionEvent e, String subName0) {
535        Push cp;
536        if (subName0 == null) {
537          cp = new Push(repServer, false);
538        }
539        else {
540          cp = new Push(repServer, subName0, false);
541    
542        }
543        frameSize = new Dimension(375, 275);
544        cp.setBounds( (screenSize.width - frameSize.width) / 2,
545                     (screenSize.height - frameSize.height) / 2, 375, 275);
546    //      System.out.println(" HELLO BEFORE SHOWING PUSH ");
547        cp.show();
548      }
549    
550      // Updating Publication
551      void jMenuPub_Update_actionPerformed(ActionEvent e, String pubName0,
552                                           String operationType) {
553        pubName = pubName0;
554        UpdatePublication cp;
555        if (pubName == null) {
556          cp = new UpdatePublication(repServer, pubRootNode,
557                                     ( (DefaultTreeModel) jTreePublications.
558                                      getModel()), operationType);
559          frameSize = new Dimension(390, 250);
560          cp.setBounds( (screenSize.width - frameSize.width) / 2,
561                       (screenSize.height - frameSize.height) / 2, 390, 250);
562          cp.show();
563        }
564        else {
565          SelectTable st = new SelectTable( ( (DefaultTreeModel) jTreePublications.
566                                             getModel()),
567                                           pubRootNode, pubName,
568                                           repServer, null, null,
569                                           operationType);
570          Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
571          Dimension frameSize = new Dimension(440, 325);
572          st.setBounds( (screenSize.width - frameSize.width) / 2,
573                       (screenSize.height - frameSize.height) / 2, 535, 325);
574          st.show();
575        }
576    
577      }
578    
579      // init Pub tree node and sub tree node
580      void initPubSubTree() {
581        //For pub Node
582        ResultSet pubRS, subRS;
583        PreparedStatement pstRepTable;
584        Connection connection;
585        connection = repServer.getDefaultConnection();
586        if (selectedserver.equalsIgnoreCase("Pubserver")) {
587          initPubTreeStatements(connection);
588        }
589        else {
590          initSubTreeStatements(connection);
591        }
592        initDataTree();
593      }
594    
595      private void initDataTree() {
596        DefaultMutableTreeNode dataRootLitetral = new DefaultMutableTreeNode(
597            "DEFAULT");
598        dataRootNode.add(dataRootLitetral);
599        DefaultMutableTreeNode driver = new DefaultMutableTreeNode( ( (
600            ReplicationServer) repServer).driver);
601        DefaultMutableTreeNode URL = new DefaultMutableTreeNode( ( (
602            ReplicationServer) repServer).URL);
603        dataRootLitetral.add(driver);
604        dataRootLitetral.add(URL);
605      }
606    
607      private void initSubTreeStatements(Connection connection) {
608        initSubPopUpMenu();
609        ResultSet subRS = null;
610        Statement stmt = null;
611        try {
612          StringBuffer query = new StringBuffer();
613          query.append("Select ").append(RepConstants.subscription_subName1)
614              .append(" , ").append(RepConstants.subscription_pubName2)
615              .append(" from ").append(RepConstants.subscription_TableName);
616          stmt = connection.createStatement();
617          subRS = stmt.executeQuery(query.toString());
618          initSubTree(subRS);
619        }
620        catch (SQLException ex1) {
621    
622          try {
623            FileOutputStream errorLogFile = new FileOutputStream(PathHandler.
624                getErrorFilePath(), true);
625            errorLogFile.write("\n\n\n\n".getBytes());
626            errorLogFile.write(ex1.getMessage().getBytes());
627            errorLogFile.close();
628          }
629          catch (IOException ex2) {
630            JOptionPane.showMessageDialog(this, ex2, "Error Message",
631                                          JOptionPane.ERROR_MESSAGE);
632            return;
633          }
634    
635    //         JOptionPane.showMessageDialog(this, ex1, "Error Message", JOptionPane.ERROR_MESSAGE);
636    //         return;
637        }
638        finally {
639          try {
640            if (subRS != null) {
641              subRS.close();
642            }
643            if (stmt != null) {
644              stmt.close();
645            }
646          }
647          catch (SQLException ex) {
648          }
649    
650        }
651      }
652    
653      private void initPubPopUpMenu() {
654        jMenuUpdatePub.setText("Update Publisher...");
655        jpopUpMenu_Publication.add(jMenuUpdatePub);
656        jMenuUpdatePub_AddTable.setText("Add Tables...");
657        jMenuUpdatePub.add(jMenuUpdatePub_AddTable);
658        jMenuUpdatePub_DropTable.setText("Drop Tables...");
659        jMenuUpdatePub.add(jMenuUpdatePub_DropTable);
660        jMenuUnpublish = jpopUpMenu_Publication.add("Drop Publication...");
661    
662        jMenuUnpublish.addActionListener(new ActionListener() {
663          public void actionPerformed(ActionEvent e) {
664    //System.out.println("calling actionperformed");
665            jMenuPub_Unpublish_actionPerformed(e, pubName);
666          }
667        });
668    
669      }
670    
671      private void initSubPopUpMenu() {
672        jMenuUpdateSub = jpopUpMenu.add("Update Subscription...");
673        jMenusynchronize = jpopUpMenu.add("Synchronize...");
674        jMenupull = jpopUpMenu.add("Pull...");
675        jMenupush = jpopUpMenu.add("Push...");
676        jMenuUnSubscribe = jpopUpMenu.add("Drop Subscription...");
677    
678        jpopUpMenu.add(jPopUpMenuSnapshot);
679        jPopUpMenuSnapshot.add(jMenugetSnapShot);
680        jPopUpMenuSnapshot.add(jMenugetSnapShotAfterUpdate);
681    
682        jPopUpMenu_AddRemoveSchedule.add(jPopUpMenuSchedule_addSchedule);
683        jPopUpMenu_AddRemoveSchedule.add(jPopUpMenuSchedule_editSchedule);
684        jPopUpMenu_AddRemoveSchedule.add(jPopUpMenuSchedule_removeSchedule);
685        jpopUpMenu.add(jPopUpMenu_AddRemoveSchedule);
686    
687        jMenuUnSubscribe.addActionListener(new ActionListener() {
688          public void actionPerformed(ActionEvent e) {
689            jMenuSub_UnSubscribe_actionPerformed(e, subName);
690          }
691        });
692        jMenuUpdateSub.addActionListener(new ActionListener() {
693          public void actionPerformed(ActionEvent e) {
694            jMenuSub_Update_actionPerformed(e, subName);
695          }
696        });
697    
698        jMenusynchronize.addActionListener(new ActionListener() {
699          public void actionPerformed(ActionEvent e) {
700            jMenuSub_synchronize_actionPerformed(e, subName);
701          }
702        });
703        jMenupull.addActionListener(new ActionListener() {
704          public void actionPerformed(ActionEvent e) {
705            jMenuSub_pull_actionPerformed(e, subName);
706          }
707        });
708        jMenupush.addActionListener(new ActionListener() {
709          public void actionPerformed(ActionEvent e) {
710            jMenuSub_push_actionPerformed(e, subName);
711          }
712        });
713    
714      }
715    
716      private void initPubTreeStatements(Connection connection) {
717        initPubPopUpMenu();
718        ResultSet pubRS = null;
719        Statement stmt = null;
720        PreparedStatement pstRepTable;
721        StringBuffer query = new StringBuffer();
722        try {
723          query.append("Select ").append(RepConstants.publication_pubName1)
724              .append(" from ").append(RepConstants.publication_TableName);
725    
726    //         System.out.println(">>>>>>>>>>>>"+query);
727          stmt = connection.createStatement();
728          pubRS = stmt.executeQuery(query.toString());
729    //         pubRS = connection.createStatement().executeQuery(query.toString());
730    
731          query = new StringBuffer();
732          query.append(" Select  ").append(RepConstants.repTable_tableName2)
733              .append(" from ").append(RepConstants.rep_TableName)
734              .append(" where  ").append(RepConstants.repTable_pubsubName1)
735              .append(" =? ").append(" order by ").append(RepConstants.
736              repTable_tableId2);
737    //         System.out.println(">>>>>>>>>>>>"+query);
738          pstRepTable = connection.prepareStatement(query.toString());
739          initPubTree(pubRS, pstRepTable, connection);
740        }
741        catch (SQLException ex1) {
742          try {
743            FileOutputStream errorLogFile = new FileOutputStream(PathHandler.
744                getErrorFilePath(), true);
745            errorLogFile.write("\n\n\n\n".getBytes());
746            errorLogFile.write(ex1.getMessage().getBytes());
747            errorLogFile.close();
748          }
749          catch (IOException ex2) {
750            JOptionPane.showMessageDialog(this, ex2, "Error Message",
751                                          JOptionPane.ERROR_MESSAGE);
752            return;
753          }
754        }
755        finally {
756          try {
757            if (pubRS != null)
758              pubRS.close();
759            if (stmt != null)
760              stmt.close();
761          }
762          catch (SQLException ex) {
763          }
764        }
765      }
766    
767      private void initSubTree(ResultSet subRS) {
768        try {
769          while (subRS.next()) {
770            String subName = subRS.getString(1);
771            String pubName = subRS.getString(2);
772            DefaultMutableTreeNode subNode = new DefaultMutableTreeNode(subName);
773            subRootNode.add(subNode);
774            DefaultMutableTreeNode pubLiteralNode = new DefaultMutableTreeNode(
775                "PUBLICATION");
776            subNode.add(pubLiteralNode);
777            pubLiteralNode.add(new DefaultMutableTreeNode(pubName));
778          }
779        }
780        catch (SQLException ex1) {
781          try {
782            FileOutputStream errorLogFile = new FileOutputStream(PathHandler.
783                getErrorFilePath(), true);
784            errorLogFile.write("\n\n\n\n".getBytes());
785            errorLogFile.write(ex1.getMessage().getBytes());
786            errorLogFile.close();
787          }
788          catch (IOException ex2) {
789            JOptionPane.showMessageDialog(this, ex2, "Error Message",
790                                          JOptionPane.ERROR_MESSAGE);
791            return;
792          }
793          JOptionPane.showMessageDialog(this, ex1, "Error Message",
794                                        JOptionPane.ERROR_MESSAGE);
795    //      ex.printStackTrace();
796        }
797      }
798    
799      private void initPubTree(ResultSet pubRS, PreparedStatement pstTable,
800                               Connection connection) {
801        try {
802          while (pubRS.next()) {
803            String pubName = pubRS.getString(1);
804            DefaultMutableTreeNode pubNode = new DefaultMutableTreeNode(pubName);
805            pubRootNode.add(pubNode);
806            pstTable.setString(1, pubName);
807            ResultSet rsTable = pstTable.executeQuery();
808            DefaultMutableTreeNode tableLiteralNode = new DefaultMutableTreeNode(
809                "TABLES");
810            pubNode.add(tableLiteralNode);
811            while (rsTable.next()) {
812              String tableName = rsTable.getString(1);
813    
814              int lastIndex = tableName.lastIndexOf(".");
815              String schemaName=null; //=tableName.substring(0,lastIndex);
816              if (lastIndex != -1) {
817                 schemaName=tableName.substring(0,lastIndex);
818                tableName = tableName.substring(lastIndex + 1);
819    
820              }
821    
822              DefaultMutableTreeNode tableNode = new DefaultMutableTreeNode(
823                  tableName);
824              tableLiteralNode.add(tableNode);
825              ResultSet rsColumns = connection.getMetaData().getColumns(null, schemaName,
826                  tableName, "%");
827              DefaultMutableTreeNode columnLiteralNode = new DefaultMutableTreeNode(
828                  "COLUMNS");
829              tableNode.add(columnLiteralNode);
830              while (rsColumns.next()) {
831                String columnName= rsColumns.getString("COLUMN_NAME");
832                DefaultMutableTreeNode columnsNode = new DefaultMutableTreeNode(
833                    columnName);
834                columnLiteralNode.add(columnsNode);
835              }
836            }
837          }
838        }
839        catch (Exception ex1) {
840          ex1.printStackTrace();
841          try {
842            FileOutputStream errorLogFile = new FileOutputStream(PathHandler.
843                getErrorFilePath(), true);
844            errorLogFile.write("\n\n\n\n".getBytes());
845            errorLogFile.write(ex1.getMessage().getBytes());
846            errorLogFile.close();
847          }
848          catch (IOException ex2) {
849            JOptionPane.showMessageDialog(this, ex2, "Error Message",
850                                          JOptionPane.ERROR_MESSAGE);
851            return;
852          }
853          JOptionPane.showMessageDialog(this, ex1, "Error Message",
854                                        JOptionPane.ERROR_MESSAGE);
855    //         ex1.printStackTrace();
856        }
857      }
858    
859      void jMenuPub_Unpublish_actionPerformed(ActionEvent e, String pubName) {
860        UnPublish unPublish;
861        if (pubName == null) {
862          unPublish = new UnPublish(repServer, pubRootNode,
863                                    ( (DefaultTreeModel) jTreePublications.
864                                     getModel()));
865          frameSize = new Dimension(325, 205);
866          unPublish.setBounds( (screenSize.width - frameSize.width) / 2,
867                              (screenSize.height - frameSize.height) / 2, 325, 205);
868          unPublish.show();
869        }
870        else {
871          UnPublish.dropPublication(pubName, this, repServer, pubRootNode,
872                                    ( (DefaultTreeModel) jTreePublications.
873                                     getModel()));
874        }
875    //         unPublish = new UnPublish(repServer, pubRootNode,
876    //                                   ( (DefaultTreeModel) jTreePublications.
877    //                                    getModel()), pubName);
878    //
879    //      frameSize = new Dimension(350, 220);
880    //      unPublish.setBounds( (screenSize.width - frameSize.width) / 2,
881    //                          (screenSize.height - frameSize.height) / 2, 350, 220);
882    //      unPublish.show();
883      }
884    
885      void jMenuSub_UnSubscribe_actionPerformed(ActionEvent e, String subName) {
886        UnSubscribe unSubscribe;
887        if (subName == null) {
888          unSubscribe = new UnSubscribe(repServer, subRootNode,
889                                        ( (DefaultTreeModel)
890                                         jTreeSubscriptions.getModel()), false);
891        }
892        else {
893          unSubscribe = new UnSubscribe(repServer, subRootNode,
894                                        ( (DefaultTreeModel)
895                                         jTreeSubscriptions.getModel()), subName, false);
896    
897        }
898        frameSize = new Dimension(380, 290);
899        unSubscribe.setBounds( (screenSize.width - frameSize.width) / 2,
900                              (screenSize.height - frameSize.height) / 2, 380, 290);
901        unSubscribe.show();
902      }
903    
904      void jTreePublication_mouseClicked(MouseEvent e) {
905        if (e.BUTTON3 == e.getButton()) {
906          TreePath treePath = jTreePublications.getClosestPathForLocation(e.getX(),
907              e.getY());
908          jTreePublications.setSelectionPath(treePath);
909          if (jTreePublications.getSelectionCount() == 1) {
910            Object[] selectedPath = treePath.getPath();
911    //            System.out.println("PATH >>" + Arrays.asList(selectedPath));
912    //            System.out.println(" HELLO I AM HERE  ");
913            if (selectedPath.length == 2) {
914    //               System.out.println("CLASS GOT " + selectedPath[1].getClass());
915              pubName = (String) ( (DefaultMutableTreeNode) selectedPath[1]).
916                  getUserObject();
917              jpopUpMenu_Publication.show(jTreePublications, e.getX(), e.getY());
918            }
919          }
920        }
921      }
922    
923      void jTreeSubscriptions_mouseClicked(MouseEvent e) {
924        if (e.BUTTON3 == e.getButton()) {
925          TreePath treePath = jTreeSubscriptions.getClosestPathForLocation(e.getX(),
926              e.getY());
927          jTreeSubscriptions.setSelectionPath(treePath);
928          if (jTreeSubscriptions.getSelectionCount() == 1) {
929            Object[] selectedPath = treePath.getPath();
930    //            System.out.println("PATH >>" + Arrays.asList(selectedPath));
931    //            System.out.println(" HELLO I AM HERE  ");
932            if (selectedPath.length == 2) {
933    //               System.out.println("CLASS GOT " + selectedPath[1].getClass());
934              subName = (String) ( (DefaultMutableTreeNode) selectedPath[1]).
935                  getUserObject();
936              jpopUpMenu.show(jTreeSubscriptions, e.getX(), e.getY());
937            }
938          }
939        }
940      }
941    
942      void jMenuHelp_aboutus_actionPerformed(ActionEvent e) {
943        new AboutReplicator(this).Show();
944      }
945    
946    //Schedule Main methods...
947      void jMenuSchedule_add_actionPerformed(ActionEvent e, String subName) {
948        AddSchedule addSchedule;
949        if (subName == null) {
950          addSchedule = new AddSchedule(repServer, subRootNode,
951                                        ( (DefaultTreeModel) jTreeSubscriptions.
952                                         getModel()), false);
953        }
954        else {
955          addSchedule = new AddSchedule(repServer, subRootNode,
956                                        ( (DefaultTreeModel) jTreeSubscriptions.
957                                         getModel()), subName, false);
958        }
959        frameSize = new Dimension(375, 515);
960        addSchedule.setBounds( (screenSize.width - frameSize.width) / 2,
961                              (screenSize.height - frameSize.height) / 2, 375, 515);
962        addSchedule.show();
963      }
964    
965      void jMenuSchedule_edit_actionPerformed(ActionEvent e, String subName) {
966        EditSchedule editSchedule;
967        if (subName == null) {
968          editSchedule = new EditSchedule(repServer, false);
969        }
970        else {
971          editSchedule = new EditSchedule(repServer, subName, false);
972        }
973        frameSize = new Dimension(430, 390);
974        editSchedule.setBounds( (screenSize.width - frameSize.width) / 2,
975                               (screenSize.height - frameSize.height) / 2, 430, 390);
976        editSchedule.show();
977      }
978    
979      void jMenuSchedule_remove_actionPerformed(ActionEvent e, String subName) {
980        RemoveSchedule remSchedule;
981        if (subName == null) {
982          remSchedule = new RemoveSchedule(repServer, subRootNode,
983                                           ( (DefaultTreeModel) jTreeSubscriptions.
984                                            getModel()), false);
985        }
986        else {
987          remSchedule = new RemoveSchedule(repServer, subRootNode,
988                                           ( (DefaultTreeModel) jTreeSubscriptions.
989                                            getModel()), subName, false);
990        }
991        frameSize = new Dimension(380, 290);
992        remSchedule.setBounds( (screenSize.width - frameSize.width) / 2,
993                              (screenSize.height - frameSize.height) / 2, 375, 270);
994        remSchedule.show();
995      }
996    
997    } // main class.
998    
999    class MainFrame_jMenuConsole_Exit_actionAdapter
1000        implements java.awt.event.ActionListener {
1001      MainFrame adaptee;
1002    
1003      MainFrame_jMenuConsole_Exit_actionAdapter(MainFrame adaptee) {
1004        this.adaptee = adaptee;
1005      }
1006    
1007      public void actionPerformed(ActionEvent e) {
1008        adaptee.jMenuConsole_Exit_actionPerformed(e);
1009      }
1010    }
1011    
1012    class MainFrame_jMenuConsole_Refresh_actionAdapter
1013        implements java.awt.event.ActionListener {
1014      MainFrame adaptee;
1015    
1016      MainFrame_jMenuConsole_Refresh_actionAdapter(MainFrame adaptee) {
1017        this.adaptee = adaptee;
1018      }
1019    
1020      public void actionPerformed(ActionEvent e) {
1021        adaptee.jMenuConsole_Refresh_actionPerformed(e);
1022      }
1023    }
1024    
1025    class MainFrame_jMenuHelpAbout_actionAdapter
1026        implements java.awt.event.ActionListener {
1027      MainFrame adaptee;
1028    
1029      MainFrame_jMenuHelpAbout_actionAdapter(MainFrame adaptee) {
1030        this.adaptee = adaptee;
1031      }
1032    
1033      public void actionPerformed(ActionEvent e) {
1034        adaptee.jMenuConsole_Exit_actionPerformed(e);
1035      }
1036    }
1037    
1038    class MainFrame_jMenuPub_Create_actionAdapter
1039        implements java.awt.event.ActionListener {
1040      MainFrame adaptee;
1041    
1042      MainFrame_jMenuPub_Create_actionAdapter(MainFrame adaptee) {
1043        this.adaptee = adaptee;
1044      }
1045    
1046      public void actionPerformed(ActionEvent e) {
1047        adaptee.jMenuPub_Create_actionPerformed(e);
1048      }
1049    }
1050    
1051    class MainFrame_jMenuPub_addTable_actionAdapter
1052        implements java.awt.event.ActionListener {
1053      MainFrame adaptee;
1054    
1055      MainFrame_jMenuPub_addTable_actionAdapter(MainFrame adaptee) {
1056        this.adaptee = adaptee;
1057      }
1058    
1059      public void actionPerformed(ActionEvent e) {
1060        adaptee.jMenuPub_Update_actionPerformed(e, null,
1061                                                RepConstants.addTable_Publication);
1062      }
1063    }
1064    
1065    class MainFrame_jMenuPub_dropTable_actionAdapter
1066        implements java.awt.event.ActionListener {
1067      MainFrame adaptee;
1068    
1069      MainFrame_jMenuPub_dropTable_actionAdapter(MainFrame adaptee) {
1070        this.adaptee = adaptee;
1071      }
1072    
1073      public void actionPerformed(ActionEvent e) {
1074        adaptee.jMenuPub_Update_actionPerformed(e, null,
1075                                                RepConstants.dropTable_Publication);
1076      }
1077    }
1078    
1079    class MainFrame_jMenuSub_Create_actionAdapter
1080        implements java.awt.event.ActionListener {
1081      MainFrame adaptee;
1082    
1083      MainFrame_jMenuSub_Create_actionAdapter(MainFrame adaptee) {
1084        this.adaptee = adaptee;
1085      }
1086    
1087      public void actionPerformed(ActionEvent e) {
1088        adaptee.jMenuSub_Create_actionPerformed(e);
1089      }
1090    }
1091    
1092    class MainFrame_jMenuSub_Update_actionAdapter
1093        implements java.awt.event.ActionListener {
1094      MainFrame adaptee;
1095    
1096      MainFrame_jMenuSub_Update_actionAdapter(MainFrame adaptee) {
1097        this.adaptee = adaptee;
1098      }
1099    
1100      public void actionPerformed(ActionEvent e) {
1101        adaptee.jMenuSub_Update_actionPerformed(e, null);
1102      }
1103    }
1104    
1105    class MainFrame_jMenuSub_Snapshot_actionAdapter
1106        implements java.awt.event.ActionListener {
1107      MainFrame adaptee;
1108      String snapShotType;
1109    
1110      MainFrame_jMenuSub_Snapshot_actionAdapter(MainFrame adaptee,String snapShotType0) {
1111        this.adaptee = adaptee;
1112        snapShotType=snapShotType0;
1113      }
1114    
1115      public void actionPerformed(ActionEvent e) {
1116        adaptee.jMenuSub_Snapshot_actionPerformed(e, null,snapShotType);
1117      }
1118    }
1119    
1120    class MainFrame_jMenuSub_synchronize_actionAdapter
1121        implements java.awt.event.ActionListener {
1122      MainFrame adaptee;
1123    
1124      MainFrame_jMenuSub_synchronize_actionAdapter(MainFrame adaptee) {
1125        this.adaptee = adaptee;
1126      }
1127    
1128      public void actionPerformed(ActionEvent e) {
1129        adaptee.jMenuSub_synchronize_actionPerformed(e, null);
1130      }
1131    }
1132    
1133    class MainFrame_jMenuSub_pull_actionAdapter
1134        implements java.awt.event.ActionListener {
1135      MainFrame adaptee;
1136    
1137      MainFrame_jMenuSub_pull_actionAdapter(MainFrame adaptee) {
1138        this.adaptee = adaptee;
1139      }
1140    
1141      public void actionPerformed(ActionEvent e) {
1142        adaptee.jMenuSub_pull_actionPerformed(e, null);
1143      }
1144    }
1145    
1146    class MainFrame_jMenuSub_push_actionAdapter
1147        implements java.awt.event.ActionListener {
1148      MainFrame adaptee;
1149    
1150      MainFrame_jMenuSub_push_actionAdapter(MainFrame adaptee) {
1151        this.adaptee = adaptee;
1152      }
1153    
1154      public void actionPerformed(ActionEvent e) {
1155        adaptee.jMenuSub_push_actionPerformed(e, null);
1156      }
1157    }
1158    
1159    class MainFrame_jMenuPub_Unpublish_actionAdapter
1160        implements java.awt.event.ActionListener {
1161      MainFrame adaptee;
1162    
1163      MainFrame_jMenuPub_Unpublish_actionAdapter(MainFrame adaptee) {
1164        this.adaptee = adaptee;
1165      }
1166    
1167      public void actionPerformed(ActionEvent e) {
1168        adaptee.jMenuPub_Unpublish_actionPerformed(e, null);
1169      }
1170    }
1171    
1172    class MainFrame_jMenuSub_UnSubscribe_actionAdapter
1173        implements java.awt.event.ActionListener {
1174      MainFrame adaptee;
1175    
1176      MainFrame_jMenuSub_UnSubscribe_actionAdapter(MainFrame adaptee) {
1177        this.adaptee = adaptee;
1178      }
1179    
1180      public void actionPerformed(ActionEvent e) {
1181        adaptee.jMenuSub_UnSubscribe_actionPerformed(e, null);
1182      }
1183    }
1184    
1185    class MainFrame_jTreeSubscriptions_mouseAdapter
1186        extends java.awt.event.MouseAdapter {
1187      MainFrame adaptee;
1188    
1189      MainFrame_jTreeSubscriptions_mouseAdapter(MainFrame adaptee) {
1190        this.adaptee = adaptee;
1191      }
1192    
1193      public void mouseClicked(MouseEvent e) {
1194        adaptee.jTreeSubscriptions_mouseClicked(e);
1195      }
1196    }
1197    
1198    class MainFrame_jTreePublication_mouseAdapter
1199        extends java.awt.event.MouseAdapter {
1200      MainFrame adaptee;
1201    
1202      MainFrame_jTreePublication_mouseAdapter(MainFrame adaptee) {
1203        this.adaptee = adaptee;
1204      }
1205    
1206      public void mouseClicked(MouseEvent e) {
1207        adaptee.jTreePublication_mouseClicked(e);
1208      }
1209    }
1210    
1211    class MainFrame_jMenuHelp_aboutus_actionAdapter
1212        implements java.awt.event.ActionListener {
1213      MainFrame adaptee;
1214    
1215      MainFrame_jMenuHelp_aboutus_actionAdapter(MainFrame adaptee) {
1216        this.adaptee = adaptee;
1217      }
1218    
1219      public void actionPerformed(ActionEvent e) {
1220        adaptee.jMenuHelp_aboutus_actionPerformed(e);
1221      }
1222    
1223    }
1224    
1225    //Schedule
1226    class MainFrame_jMenuSchedule_add_actionAdapter
1227        implements java.awt.event.ActionListener {
1228      MainFrame adaptee;
1229    
1230      MainFrame_jMenuSchedule_add_actionAdapter(MainFrame adaptee) {
1231        this.adaptee = adaptee;
1232      }
1233    
1234      public void actionPerformed(ActionEvent e) {
1235        adaptee.jMenuSchedule_add_actionPerformed(e, null);
1236      }
1237    }
1238    
1239    class MainFrame_jMenuSchedule_edit_actionAdapter
1240        implements java.awt.event.ActionListener {
1241      MainFrame adaptee;
1242    
1243      MainFrame_jMenuSchedule_edit_actionAdapter(MainFrame adaptee) {
1244        this.adaptee = adaptee;
1245      }
1246    
1247      public void actionPerformed(ActionEvent e) {
1248        adaptee.jMenuSchedule_edit_actionPerformed(e, null);
1249      }
1250    }
1251    
1252    class MainFrame_jMenuSchedule_remove_actionAdapter
1253        implements java.awt.event.ActionListener {
1254      MainFrame adaptee;
1255    
1256      MainFrame_jMenuSchedule_remove_actionAdapter(MainFrame adaptee) {
1257        this.adaptee = adaptee;
1258      }
1259    
1260      public void actionPerformed(ActionEvent e) {
1261        adaptee.jMenuSchedule_remove_actionPerformed(e, null);
1262      }
1263    }





























































Powered by Drupal - Theme by Danger4k