|
UC Berkeley Group for User Interface Research Updated November 17, 2000 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--edu.berkeley.guir.lib.satin.view.ViewImpl | +--edu.berkeley.guir.lib.satin.view.DefaultMultiViewImpl
A sample implementation of a MultiView, which just displays the view with the greatest display value.
This software is distributed under the Berkeley Software License.
Revisions: - SATIN-v1.0-1.0.0, Aug 11 1999, JH Created class - SATIN-v2.1-1.0.0, Aug 11 2000, JH Touched for SATIN release
Inner classes inherited from class edu.berkeley.guir.lib.satin.SatinConstants |
SatinConstants.ObjectPoolAffineTransform, SatinConstants.ObjectPoolPoint2D, SatinConstants.ObjectPoolPolygon2D, SatinConstants.ObjectPoolRectangle2D, SatinConstants.ObjectPoolStringBuffer, SatinConstants.UniqueAffineTransform, SatinConstants.UniquePoint2D, SatinConstants.UniquePolygon2D, SatinConstants.UniqueRectangle2D |
Fields inherited from class edu.berkeley.guir.lib.satin.view.ViewImpl |
gob, poly |
Constructor Summary | |
DefaultMultiViewImpl()
Does nothing. |
Method Summary | |
View |
add(View v)
Add a view to the MultiView, setting the GraphicalObject the added View is attached to (via View.setAttachedGraphicalObject(GraphicalObject) ) to be the same
as the one this MultiView is attached to. |
void |
clear()
Clear all of the views. |
Object |
clone()
Implementation of the Sorceror's Apprentice algorithm. |
protected DefaultMultiViewImpl |
clone(DefaultMultiViewImpl vm)
Clone chain. |
boolean |
contains(View v)
Check if we contain the specified view. |
View |
get(int index)
Get the view at the specified index. |
Polygon2D |
getBoundingPoints2DRef()
Returns the bounding box of all of the contained AND visible views. |
protected Iterator |
getValidViews()
Get an iterator over the valid views (views with display values greater than 0), sorted by their display values (high to low, descending order). |
float |
getViewDisplayValue()
Check whether or not this view is valid, ie can and should be displayed. |
boolean |
isVisible()
Checks if any contained views are visible. |
Iterator |
iterator()
Get an iterator over the views, sorted by their display values (high to low, descending order). |
View |
remove(View v)
Remove a view. |
void |
render(SatinGraphics g)
Render this view. |
GraphicalObject |
setAttachedGraphicalObject(GraphicalObject gob)
Also modify the attached GraphicalObject for every contained View. |
void |
setBoundingPoints2DRef(Polygon2D p)
Recursively calls setBoundingPoints2DRef() on all of the contained views. |
int |
size()
Get the number of views contained. |
protected void |
sortViewsByDisplayValue()
Sort the views by their display values, from high to low values (descending order). |
String |
toString()
Print out a list of all of the contained views. |
Methods inherited from class edu.berkeley.guir.lib.satin.view.ViewImpl |
clone, getAttachedGraphicalObject, getName, setName, setVisible |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface edu.berkeley.guir.lib.satin.view.View |
getAttachedGraphicalObject, getName, setName, setVisible |
Constructor Detail |
public DefaultMultiViewImpl()
Method Detail |
public void setBoundingPoints2DRef(Polygon2D p)
Chewbacca is a Wookie. Wookies are from Endor. Does this make sense? Or course it doesn't make sense! If it doesn't make sense, you must acquit!
setBoundingPoints2DRef
in interface View
setBoundingPoints2DRef
in class ViewImpl
edu.berkeley.guir.lib.satin.view.View
p
- is the polygon bounds. Assumes the bounds are already in
local coordinates.public GraphicalObject setAttachedGraphicalObject(GraphicalObject gob)
setAttachedGraphicalObject
in interface View
setAttachedGraphicalObject
in class ViewImpl
gob
- is the GraphicalObject to attach.public View add(View v)
MultiView
View.setAttachedGraphicalObject(GraphicalObject)
) to be the same
as the one this MultiView is attached to.add
in interface MultiView
edu.berkeley.guir.lib.satin.view.MultiView
v
- is the view to add.public View remove(View v)
MultiView
remove
in interface MultiView
edu.berkeley.guir.lib.satin.view.MultiView
v
- is the view to remove.public void clear()
MultiView
clear
in interface MultiView
public Polygon2D getBoundingPoints2DRef()
getBoundingPoints2DRef
in interface View
getBoundingPoints2DRef
in class ViewImpl
edu.berkeley.guir.lib.satin.view.View
public Iterator iterator()
iterator
in interface MultiView
edu.berkeley.guir.lib.satin.view.MultiView
public View get(int index)
MultiView
get
in interface MultiView
edu.berkeley.guir.lib.satin.view.MultiView
index
- is the index in the list to retrieve from.public boolean contains(View v)
MultiView
contains
in interface MultiView
public int size()
MultiView
size
in interface MultiView
protected Iterator getValidViews()
public float getViewDisplayValue()
View
getViewDisplayValue
in interface View
public boolean isVisible()
isVisible
in interface View
isVisible
in class ViewImpl
edu.berkeley.guir.lib.satin.view.View
protected void sortViewsByDisplayValue()
public void render(SatinGraphics g)
View
render
in interface View
public String toString()
toString
in class ViewImpl
public Object clone()
View
clone
in interface View
clone
in class ViewImpl
protected DefaultMultiViewImpl clone(DefaultMultiViewImpl vm)
|
Copyright Information | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |