edu.cmu.sun.model
Class ItemModel
java.lang.Object
edu.cmu.sun.model.Model
edu.cmu.sun.model.ItemModel
public class ItemModel
- extends Model
An state model of an item in a list that represents a file or directory.
Contains the basic state of each list item of a file that is displayed on
the screen. Also, has some high level calls that help to handle model changes
after user actions.
- 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 |
CONTENT_HEIGHT
public static final float CONTENT_HEIGHT
- Height of a line of text with an icon
- See Also:
- Constant Field Values
SPACING
public static final float SPACING
- Spacing to be set between each text/icon line
- See Also:
- Constant Field Values
HEIGHT
public static final float HEIGHT
- Standard window height for 1 line of text;
- See Also:
- Constant Field Values
file
FileNodeModel file
parentList
ListModel parentList
selected
boolean selected
pinnedCount
int pinnedCount
ItemModel
public ItemModel(FileNodeModel file,
ListModel parentList)
getFile
public FileNodeModel getFile()
- returns the file that this item is based on.
- Returns:
isPinned
public boolean isPinned()
incrementPinCount
public void incrementPinCount()
decrementPinCount
public void decrementPinCount()
isSelected
public boolean isSelected()
setSelected
public void setSelected(boolean selected)
isForcedVisible
public boolean isForcedVisible()
deselectSiblings
public void deselectSiblings()
getParentListModel
public ListModel getParentListModel()
getPosition
public int getPosition()