1 19 20 package org.netbeans.core.windows.model; 21 22 23 import java.awt.Rectangle ; 24 import org.netbeans.core.windows.ModeImpl; 25 import org.netbeans.core.windows.SplitConstraint; 26 import org.netbeans.core.windows.TopComponentGroupImpl; 27 import org.netbeans.core.windows.WindowSystemSnapshot; 28 import org.openide.windows.TopComponent; 29 30 import java.util.Collection ; 31 import java.util.List ; 32 import java.util.Map ; 33 import java.util.Set ; 34 35 36 41 public interface Model { 42 43 48 public void setVisible(boolean visible); 49 50 public void setMainWindowBoundsJoined(Rectangle bounds); 51 52 public void setMainWindowBoundsSeparated(Rectangle bounds); 53 54 public void setMainWindowFrameStateJoined(int frameState); 55 56 public void setMainWindowFrameStateSeparated(int frameState); 57 58 public void setEditorAreaState(int editorAreaState); 59 60 public void setEditorAreaFrameState(int frameState); 61 62 public void setEditorAreaBounds(Rectangle editorAreaBounds); 63 64 public void setEditorAreaConstraints(SplitConstraint[] editorAreaConstraints); 65 66 public void setToolbarConfigName(String toolbarConfigName); 67 68 public void setActiveMode(ModeImpl mode); 69 70 public void setEditorMaximizedMode(ModeImpl maximizedMode); 71 72 public void setViewMaximizedMode(ModeImpl maximizedMode); 73 74 public void addMode(ModeImpl mode, SplitConstraint[] constraints); 75 76 public void addModeToSide(ModeImpl mode, ModeImpl attachMode, String side); 78 80 public void addModeAround(ModeImpl mode, String side); 81 83 public void addModeAroundEditor(ModeImpl mode, String side); 84 85 public void removeMode(ModeImpl mode); 86 87 public void setModeConstraints(ModeImpl mode, SplitConstraint[] constraints); 88 89 public void addTopComponentGroup(TopComponentGroupImpl tcGroup); 90 91 public void removeTopComponentGroup(TopComponentGroupImpl tcGroup); 92 93 public void addSlidingMode(ModeImpl mode, String side, Map <String ,Integer > slideInSizes); 94 95 public void reset(); 96 97 public void setSlideInSize(String side, TopComponent tc, int size); 98 101 public void setTopComponentMaximizedWhenSlidedIn( String tcid, boolean maximized ); 102 103 106 109 public boolean isVisible(); 110 111 public Rectangle getMainWindowBoundsJoined(); 112 113 public Rectangle getMainWindowBoundsSeparated(); 114 115 public int getMainWindowFrameStateJoined(); 116 117 public int getMainWindowFrameStateSeparated(); 118 119 public Rectangle getMainWindowBoundsSeparatedHelp(); 120 121 public int getEditorAreaState(); 122 123 public int getEditorAreaFrameState(); 124 125 public Rectangle getEditorAreaBounds(); 126 127 public Rectangle getEditorAreaBoundsHelp(); 128 129 public SplitConstraint[] getEditorAreaConstraints(); 130 131 public String getToolbarConfigName(); 132 133 public ModeImpl getActiveMode(); 134 135 public ModeImpl getEditorMaximizedMode(); 136 137 public ModeImpl getViewMaximizedMode(); 138 139 public Set <ModeImpl> getModes(); 140 141 public SplitConstraint[] getModeConstraints(ModeImpl mode); 142 144 public SplitConstraint[] getModelElementConstraints(ModelElement element); 145 146 public String getSlidingModeConstraints(ModeImpl mode); 147 148 public ModeImpl getSlidingMode(String side); 149 153 public Map <String ,Integer > getSlideInSizes(String side); 154 158 public DockingStatus getDefaultDockingStatus(); 159 162 public DockingStatus getMaximizedDockingStatus(); 163 170 public String getSlideSideForMode( ModeImpl mode ); 171 174 public boolean isTopComponentMaximizedWhenSlidedIn( String tcid ); 175 176 181 182 187 public void setModeState(ModeImpl mode, int state); 188 189 public void setModeBounds(ModeImpl mode, Rectangle bounds); 190 191 public void setModeFrameState(ModeImpl mode, int frameState); 192 193 public void setModeSelectedTopComponent(ModeImpl mode, TopComponent selected); 194 195 public void setModePreviousSelectedTopComponent(ModeImpl mode, TopComponent prevSelected); 196 197 public void addModeOpenedTopComponent(ModeImpl mode, TopComponent tc); 198 199 public void insertModeOpenedTopComponent(ModeImpl mode, TopComponent tc, int index); 200 201 public void addModeClosedTopComponent(ModeImpl mode, TopComponent tc); 202 204 public void addModeUnloadedTopComponent(ModeImpl mode, String tcID); 205 public void setModeUnloadedSelectedTopComponent(ModeImpl mode, String tcID); 207 208 public void setModeUnloadedPreviousSelectedTopComponent(ModeImpl mode, String tcID); 209 210 public void removeModeTopComponent(ModeImpl mode, TopComponent tc); 211 public void removeModeClosedTopComponentID(ModeImpl mode, String tcID); 213 214 216 217 public void setModeTopComponentPreviousMode(ModeImpl mode, String tcID, ModeImpl previousMode, int previousIndex); 218 219 public void setModeTopComponentPreviousConstraints(ModeImpl mode, String tcID, SplitConstraint[] constraints); 220 221 222 225 228 public String getModeName(ModeImpl mode); 229 230 public Rectangle getModeBounds(ModeImpl mode); 231 232 public Rectangle getModeBoundsSeparatedHelp(ModeImpl mode); 233 234 public int getModeState(ModeImpl mode); 235 236 public int getModeKind(ModeImpl mode); 237 238 public String getModeSide(ModeImpl mode); 239 240 public int getModeFrameState(ModeImpl mode); 241 242 public boolean isModePermanent(ModeImpl mode); 243 244 public boolean isModeEmpty(ModeImpl mode); 245 246 public boolean containsModeTopComponent(ModeImpl mode, TopComponent tc); 247 248 public TopComponent getModeSelectedTopComponent(ModeImpl mode); 249 250 public TopComponent getModePreviousSelectedTopComponent(ModeImpl mode); 251 252 public List <TopComponent> getModeTopComponents(ModeImpl mode); 253 254 public List <TopComponent> getModeOpenedTopComponents(ModeImpl mode); 255 public List <String > getModeOpenedTopComponentsIDs(ModeImpl mode); 257 public List <String > getModeClosedTopComponentsIDs(ModeImpl mode); 258 public List <String > getModeTopComponentsIDs(ModeImpl mode); 259 260 262 public ModeImpl getModeTopComponentPreviousMode(ModeImpl mode, String tcID); 263 public SplitConstraint[] getModeTopComponentPreviousConstraints(ModeImpl mode, String tcID); 264 265 public int getModeTopComponentPreviousIndex(ModeImpl mode, String tcID); 266 267 272 273 public Set <TopComponentGroupImpl> getTopComponentGroups(); 276 277 278 public String getGroupName(TopComponentGroupImpl tcGroup); 279 280 public void openGroup(TopComponentGroupImpl tcGroup, 281 Collection <TopComponent> openedTopComponents, 282 Collection <TopComponent> openedBeforeTopComponenets); 283 public void closeGroup(TopComponentGroupImpl tcGroup); 284 public boolean isGroupOpened(TopComponentGroupImpl tcGroup); 285 286 public Set <TopComponent> getGroupTopComponents(TopComponentGroupImpl tcGroup); 287 288 public Set <TopComponent> getGroupOpenedTopComponents(TopComponentGroupImpl tcGroup); 289 public Set <TopComponent> getGroupOpenedBeforeTopComponents(TopComponentGroupImpl tcGroup); 290 291 public Set <TopComponent> getGroupOpeningTopComponents(TopComponentGroupImpl tcGroup); 292 public Set <TopComponent> getGroupClosingTopComponents(TopComponentGroupImpl tcGroup); 293 294 public boolean addGroupUnloadedTopComponent(TopComponentGroupImpl tcGroup, String tcID); 295 public boolean removeGroupUnloadedTopComponent(TopComponentGroupImpl tcGroup, String tcID); 296 297 public boolean addGroupOpeningTopComponent(TopComponentGroupImpl tcGroup, TopComponent tc); 298 public boolean removeGroupOpeningTopComponent(TopComponentGroupImpl tcGroup, TopComponent tc); 299 300 public boolean addGroupUnloadedOpeningTopComponent(TopComponentGroupImpl tcGroup, String tcID); 301 public boolean removeGroupUnloadedOpeningTopComponent(TopComponentGroupImpl tcGroup, String tcID); 302 303 public boolean addGroupUnloadedClosingTopComponent(TopComponentGroupImpl tcGroup, String tcID); 304 public boolean removeGroupUnloadedClosingTopComponent(TopComponentGroupImpl tcGroup, String tcID); 305 306 public boolean addGroupUnloadedOpenedTopComponent(TopComponentGroupImpl tcGroup, String tcID); 308 309 public Set <String > getGroupTopComponentsIDs(TopComponentGroupImpl tcGroup); 311 public Set <String > getGroupOpeningSetIDs(TopComponentGroupImpl tcGroup); 312 public Set <String > getGroupClosingSetIDs(TopComponentGroupImpl tcGroup); 313 public Set <String > getGroupOpenedTopComponentsIDs(TopComponentGroupImpl tcGroup); 314 318 321 public void createModeModel(ModeImpl mode, String name, int state, int kind, boolean permanent); 322 323 public void createGroupModel(TopComponentGroupImpl tcGroup, String name, boolean opened); 324 325 public WindowSystemSnapshot createWindowSystemSnapshot(); 328 329 330 public void setMainWindowBoundsUserSeparatedHelp(Rectangle bounds); 334 public void setEditorAreaBoundsUserHelp(Rectangle bounds); 335 public void setModeBoundsSeparatedHelp(ModeImpl mode, Rectangle bounds); 336 337 public void setSplitWeights( ModelElement[] snapshots, double[] splitWeights ); 338 341 342 } 343 344 | Popular Tags |