|
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 ViewsetBoundingPoints2DRef in class ViewImpledu.berkeley.guir.lib.satin.view.Viewp - is the polygon bounds. Assumes the bounds are already in
local coordinates.public GraphicalObject setAttachedGraphicalObject(GraphicalObject gob)
setAttachedGraphicalObject in interface ViewsetAttachedGraphicalObject in class ViewImplgob - is the GraphicalObject to attach.public View add(View v)
MultiViewView.setAttachedGraphicalObject(GraphicalObject)) to be the same
as the one this MultiView is attached to.add in interface MultiViewedu.berkeley.guir.lib.satin.view.MultiViewv - is the view to add.public View remove(View v)
MultiViewremove in interface MultiViewedu.berkeley.guir.lib.satin.view.MultiViewv - is the view to remove.public void clear()
MultiViewclear in interface MultiViewpublic Polygon2D getBoundingPoints2DRef()
getBoundingPoints2DRef in interface ViewgetBoundingPoints2DRef in class ViewImpledu.berkeley.guir.lib.satin.view.Viewpublic Iterator iterator()
iterator in interface MultiViewedu.berkeley.guir.lib.satin.view.MultiViewpublic View get(int index)
MultiViewget in interface MultiViewedu.berkeley.guir.lib.satin.view.MultiViewindex - is the index in the list to retrieve from.public boolean contains(View v)
MultiViewcontains in interface MultiViewpublic int size()
MultiViewsize in interface MultiViewprotected Iterator getValidViews()
public float getViewDisplayValue()
ViewgetViewDisplayValue in interface Viewpublic boolean isVisible()
isVisible in interface ViewisVisible in class ViewImpledu.berkeley.guir.lib.satin.view.Viewprotected void sortViewsByDisplayValue()
public void render(SatinGraphics g)
Viewrender in interface Viewpublic String toString()
toString in class ViewImplpublic Object clone()
Viewclone in interface Viewclone in class ViewImplprotected DefaultMultiViewImpl clone(DefaultMultiViewImpl vm)
|
Copyright Information | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||