KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > netbeans > modules > j2ee > blueprints > ui > BluePrintsTabPanel


1 /*
2  * The contents of this file are subject to the terms of the Common Development
3  * and Distribution License (the License). You may not use this file except in
4  * compliance with the License.
5  *
6  * You can obtain a copy of the License at http://www.netbeans.org/cddl.html
7  * or http://www.netbeans.org/cddl.txt.
8  *
9  * When distributing Covered Code, include this CDDL Header Notice in each file
10  * and include the License file at http://www.netbeans.org/cddl.txt.
11  * If applicable, add the following below the CDDL Header, with the fields
12  * enclosed by brackets [] replaced by your own identifying information:
13  * "Portions Copyrighted [year] [name of copyright owner]"
14  *
15  * The Original Software is NetBeans. The Initial Developer of the Original
16  * Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
17  * Microsystems, Inc. All Rights Reserved.
18  */

19
20 package org.netbeans.modules.j2ee.blueprints.ui;
21
22 /**
23  * Base class for tab panels that appear on the main BluePrints panel.
24  * This provides common functionality such as saving / restoring
25  * the current scroll position.
26  *
27  * @author Mark Roth
28  */

29 public abstract class BluePrintsTabPanel extends javax.swing.JPanel JavaDoc {
30
31     /** Creates new form BluePrintsTabPanel */
32     public BluePrintsTabPanel(BluePrintsPanel bluePrintsPanel) {
33         this.bluePrintsPanel = bluePrintsPanel;
34         initComponents();
35     }
36
37     /** This method is called from within the constructor to
38      * initialize the form.
39      * WARNING: Do NOT modify this code. The content of this method is
40      * always regenerated by the Form Editor.
41      */

42     private void initComponents() {//GEN-BEGIN:initComponents
43

44         setLayout(new java.awt.BorderLayout JavaDoc());
45         
46     }//GEN-END:initComponents
47

48     
49     // Variables declaration - do not modify//GEN-BEGIN:variables
50
// End of variables declaration//GEN-END:variables
51

52     /** The panel that contains this tab */
53     protected BluePrintsPanel bluePrintsPanel;
54     
55     /**
56      * Returns the current scroll position so that when the user navigates
57      * to a new article we can keep track of where the user was in this tab.
58      *
59      * @return The current scroll position in this tab.
60      */

61     public abstract int getScrollPosition();
62     
63     /**
64      * Sets the current scroll position so that when the user uses the
65      * Back or Forward button we can return the user to where they
66      * were reading before they left off.
67      *
68      * @param scrollPosition The scroll position in this tab.
69      */

70     public abstract void setScrollPosition(int scrollPosition);
71
72     /**
73      * Called when the tab needs to be updated because a new article has
74      * been selected.
75      */

76     public abstract void updateTab();
77 }
78
Popular Tags