|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.awt.Component | +--java.awt.Container | +--javax.swing.JComponent | +--SpaceView
View for a space in a warehouse in which an individual parcel can be placed.
Field Summary | |
protected Color |
highlightColor
Whether or not this space is highlighted. |
protected Space |
model
Space data model for this view. |
Fields inherited from class javax.swing.JComponent |
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW |
Fields inherited from class java.awt.Component |
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
Fields inherited from interface java.awt.image.ImageObserver |
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
SpaceView(Space s)
Constructs a view for the given space. |
Method Summary | |
protected Color |
heatColor()
Returns the correct transparent color for this space given the hit percentage for the data model. |
boolean |
isHighlighted()
Returns whether or not this space is highlighted. |
protected void |
paintBorder(Graphics g)
Paints the border for this space to the given graphics context. |
void |
paintComponent(Graphics g)
Paints this space to the given graphics context. |
void |
setHighlight(Color highlight)
Sets whether or not this space is highlighted. |
void |
update(Observable o,
Object obj)
Notifies this that its data model has changed. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
protected Space model
protected Color highlightColor
Constructor Detail |
public SpaceView(Space s)
Method Detail |
public void update(Observable o, Object obj)
update
in interface Observer
o
- the observable that has changedobj
- an arbitrary argument (ignored)public void setHighlight(Color highlight)
highlight
- the color of the highlight for this space,
or null
if this space is not highlightedpublic boolean isHighlighted()
protected void paintBorder(Graphics g)
paintBorder
in class JComponent
g
- the desired graphics contextpublic void paintComponent(Graphics g)
paintComponent
in class JComponent
g
- the desired graphics contextprotected Color heatColor()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |