edu.cmu.sun.model
Class ColumnModel
java.lang.Object
edu.cmu.sun.model.Model
edu.cmu.sun.model.ColumnModel
public class ColumnModel
- extends Model
Model for the state of a column of windows.
Contains a list of WindowModels for the contents of this column.
Also does some basic layout for the components within the column.
- Author:
- Braden Kowitz, Jake Pierson, Jessica Smith
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SPACING
public static final float SPACING
- See Also:
- Constant Field Values
UNSTACKED_WIDTH
public static final float UNSTACKED_WIDTH
- See Also:
- Constant Field Values
STACKED_WIDTH
public static final float STACKED_WIDTH
- See Also:
- Constant Field Values
windows
java.util.ArrayList<WindowModel> windows
activeWindowModel
WindowModel activeWindowModel
sceneModel
SceneModel sceneModel
stackedModel
ColumnModel.Stacked stackedModel
ColumnModel
public ColumnModel()
addWindow
public void addWindow(WindowModel win)
removeWindow
public void removeWindow(WindowModel win)
contains
public boolean contains(WindowModel model)
getWindowModels
public java.util.List<WindowModel> getWindowModels()
- returns a list of the windows in this model.
Note: this returns a COPY of the underlying structure.
- Returns:
getActiveWindowModel
public WindowModel getActiveWindowModel()
setActiveWindowModel
public void setActiveWindowModel(WindowModel activeWindowModel)
needsUpdate
protected void needsUpdate()
- Description copied from class:
Model
- Called by subclasses to signial that a model has changed and needs updating.
Really, the views need updating, the model needs to send out modelChanged(...)
updates.
- Overrides:
needsUpdate in class Model
resizeWindowModels
private void resizeWindowModels()
getSceneModel
public SceneModel getSceneModel()
setSceneModel
public void setSceneModel(SceneModel sceneModel)
getWidth
public float getWidth()
getNextColumn
public ColumnModel getNextColumn()
getPrevColumn
public ColumnModel getPrevColumn()
sortWindows
public void sortWindows()
getPosition
public int getPosition(WindowModel model)
getStackedModel
public ColumnModel.Stacked getStackedModel()
isEmpty
public boolean isEmpty()
getSize
public int getSize()