edu.cmu.sun.view
Class ItemView
java.lang.Object
Component3D
edu.cmu.sun.view.ItemView
- All Implemented Interfaces:
- ModelListener
public class ItemView
- extends Component3D
- implements ModelListener
Draws the line-item that represents a file and handles click-events.
An ItemView is based on an ItemModel and updates its appearance whenever the
underlying model changes. It also functions as a listener to itself. When a mouse event
occours, the ItemView sends off the appropriate action to a controller.
- Author:
- Braden Kowitz, Jessica Smith
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
model
ItemModel model
controller
ItemController controller
textComp
TextComponent textComp
selectionComp
BoxComponent selectionComp
pinnedComp
Component3D pinnedComp
backdropComp
BoxComponent backdropComp
WIDTH
static final float WIDTH
- See Also:
- Constant Field Values
HEIGHT
static final float HEIGHT
- See Also:
- Constant Field Values
HIGHLIGHT_DEPTH
static final float HIGHLIGHT_DEPTH
- See Also:
- Constant Field Values
Z_LAYER_1
static final float Z_LAYER_1
- See Also:
- Constant Field Values
Z_LAYER_2
static final float Z_LAYER_2
- See Also:
- Constant Field Values
SPACING
static final float SPACING
- See Also:
- Constant Field Values
ICON_SIZE
static final float ICON_SIZE
- See Also:
- Constant Field Values
INSET
static final float INSET
- See Also:
- Constant Field Values
RIGHT_INSET
static final float RIGHT_INSET
- See Also:
- Constant Field Values
HIGHLIGHT_WIDTH
private static final float HIGHLIGHT_WIDTH
- See Also:
- Constant Field Values
SELECTED_APP
static final Appearance SELECTED_APP
PINNED_OUTLINE_C4F
static final javax.vecmath.Color4f PINNED_OUTLINE_C4F
LINE_WIDTH
static final float LINE_WIDTH
- See Also:
- Constant Field Values
LABEL_WIDTH
private static final float LABEL_WIDTH
- See Also:
- Constant Field Values
pinnedAppearance
static Appearance pinnedAppearance
pinnedGeometry
static Geometry pinnedGeometry
ItemView
public ItemView(ItemModel model)
initialize
private void initialize()
truncate
private java.lang.String truncate(java.lang.String name)
getPinnedGeometry
private Geometry getPinnedGeometry()
getPinnedAppearance
private Appearance getPinnedAppearance()
update
public void update()
- update the visual appearance of this view from the model.
processEvent
public void processEvent(LgEvent e)
getTargetEventClasses
public java.lang.Class<LgEvent>[] getTargetEventClasses()
modelChanged
public void modelChanged(Model m)
- Specified by:
modelChanged in interface ModelListener
getModel
public ItemModel getModel()