KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > netbeans > core > windows > model > ModeModel


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.core.windows.model;
21
22
23 import org.openide.windows.TopComponent;
24
25 import java.awt.*;
26 import java.util.List JavaDoc;
27 import java.util.Map JavaDoc;
28
29 import org.netbeans.core.windows.ModeImpl;
30 import org.netbeans.core.windows.SplitConstraint;
31 import org.openide.windows.TopComponent;
32
33
34 /**
35  *
36  * @author Peter Zavadsky
37  */

38 interface ModeModel {
39
40     // Mutators
41
/** Sets state. */
42     public void setState(int state);
43     /** Sets bounds. */
44     public void setBounds(Rectangle bounds);
45     /** */
46     public void setBoundsSeparatedHelp(Rectangle bounds);
47     /** Sets frame state. */
48     public void setFrameState(int frameState);
49     /** Sets selected TopComponent. */
50     public void setSelectedTopComponent(TopComponent selected);
51     /** Set top component that was selected before switching to/from maximized mode */
52     public void setPreviousSelectedTopComponent(TopComponent prevSelected);
53     /** Adds opened TopComponent. */
54     public void addOpenedTopComponent(TopComponent tc);
55     /** Inserts opened TopComponent. */
56     public void insertOpenedTopComponent(TopComponent tc, int index);
57     /** Adds closed TopComponent. */
58     public void addClosedTopComponent(TopComponent tc);
59     // XXX
60
public void addUnloadedTopComponent(String JavaDoc tcID);
61     // XXX
62
public void setUnloadedSelectedTopComponent(String JavaDoc tcID);
63     /** Set top component that was selected before switching to/from maximized mode */
64     public void setUnloadedPreviousSelectedTopComponent(String JavaDoc tcID);
65     /** Removes TopComponent from mode. */
66     public void removeTopComponent(TopComponent tc);
67     // XXX
68
public void removeClosedTopComponentID(String JavaDoc tcID);
69     
70     // Info about previous top component context, used by sliding kind of modes
71

72     /** Sets information of previous mode top component was in. */
73     public void setTopComponentPreviousMode(String JavaDoc tcID, ModeImpl mode, int prevIndex);
74     /** Sets information of previous constraints of mode top component was in. */
75     public void setTopComponentPreviousConstraints(String JavaDoc tcID, SplitConstraint[] constraints);
76
77     // Accessors
78
/** Gets programatic name of mode. */
79     public String JavaDoc getName();
80     /** Gets bounds. */
81     public Rectangle getBounds();
82     /** */
83     public Rectangle getBoundsSeparatedHelp();
84     /** Gets state. */
85     public int getState();
86     /** Gets kind. */
87     public int getKind();
88     /** Gets frame state. */
89     public int getFrameState();
90     /** Gets whether it is permanent. */
91     public boolean isPermanent();
92     /** */
93     public boolean isEmpty();
94     /** */
95     public boolean containsTopComponent(TopComponent tc);
96     /** Gets selected TopComponent. */
97     public TopComponent getSelectedTopComponent();
98     /** Gets the top component that was selected before switching to/from maximized mode */
99     public TopComponent getPreviousSelectedTopComponent();
100     /** Gets list of top components in mode. */
101     public List JavaDoc<TopComponent> getTopComponents();
102     /** Gets list of top components in mode. */
103     public List JavaDoc<TopComponent> getOpenedTopComponents();
104     // XXX
105
public List JavaDoc<String JavaDoc> getOpenedTopComponentsIDs();
106     public List JavaDoc<String JavaDoc> getClosedTopComponentsIDs();
107     public List JavaDoc<String JavaDoc> getTopComponentsIDs();
108     
109     // Info about previous top component context, used by sliding kind of modes
110

111     public ModeImpl getTopComponentPreviousMode(String JavaDoc tcID);
112     /** Gets the tab index of the top component in its previous mode */
113     public int getTopComponentPreviousIndex(String JavaDoc tcID);
114     
115     public SplitConstraint[] getTopComponentPreviousConstraints(String JavaDoc tcID);
116     
117 }
118
119
Popular Tags