All Packages Class Hierarchy This Package Previous Next Index
Class edu.cmu.owl.ui.twoD.TwoDBean
edu.cmu.owl.ui.twoD.TwoDBean
- public class TwoDBean
Bean that takes care of the 2-D view of the domain
- Version:
- 5/11/97
-
TwoDBean()
- Get the map data get construct the map.
-
addObjectSelectedListener(ObjectSelectedListener)
- adds the listener to lis of listeners
-
dispatchObjectSelectedEvent(MapElement)
- Sends event ObjectSelectedEvent to all it's listeners for this object
-
doLayout()
- Whenever layout is called (i.e.
-
getMap()
- What Map is currently being displayed?
-
getOrigin()
- Returns the upper-left corner coordinate of the 2-D map
-
getPreferredSize()
- The preferred size of this panel--hardwired.
-
groupCalled()
- This method gets called when user wants to group things
-
makeImage()
- Construct an off-screen image with the Map painted on it.
-
makeTip(MapElement)
- makeTip determines if a new TipBox has to be made and if so
changes the tipBox coordinates to fit the element that the mouse is
over right now denoted by over.
-
moveView(int, int, float)
- Moves the 2-D map to reflect the change of location of window on
the key Map.
-
paint(Graphics)
- Draw the Map (from the offscreen image), the tooltip, and the
selection box, making sure they're translated properly.
-
removeObjectSelectedListener(ObjectSelectedListener)
- removes the listener to lis of listeners
-
setKeyMap(KeyMapBean)
-
-
setMap(Map)
- Set the Map to display.
-
toUnits(int, int)
-
-
ungroupCalled()
-
TwoDBean
public TwoDBean()
- Get the map data get construct the map.
setKeyMap
public void setKeyMap(KeyMapBean keyMap)
setMap
public void setMap(Map theMap)
- Set the Map to display.
getMap
public Map getMap()
- What Map is currently being displayed?
getOrigin
public Point getOrigin()
- Returns the upper-left corner coordinate of the 2-D map
getPreferredSize
public Dimension getPreferredSize()
- The preferred size of this panel--hardwired. Should really be
as big as possible.
makeImage
protected void makeImage()
- Construct an off-screen image with the Map painted on it. THis
is what makes the image to display.
doLayout
public void doLayout()
- Whenever layout is called (i.e. this panel's size has changed),
make sure the offscreen image is redrawn.
paint
public void paint(Graphics g)
- Draw the Map (from the offscreen image), the tooltip, and the
selection box, making sure they're translated properly.
- Parameters:
- g - is the context in which graphical operations take place
makeTip
protected void makeTip(MapElement over)
- makeTip determines if a new TipBox has to be made and if so
changes the tipBox coordinates to fit the element that the mouse is
over right now denoted by over.
- Parameters:
- over - the MapElement that the mouse is over right now
toUnits
protected Point toUnits(int x,
int y)
moveView
public void moveView(int x,
int y,
float keyMapScale)
- Moves the 2-D map to reflect the change of location of window on
the key Map.
- Parameters:
- x - the x position of new location on the map
- y - the y position of new location on the map
groupCalled
public void groupCalled()
- This method gets called when user wants to group things
ungroupCalled
public void ungroupCalled()
addObjectSelectedListener
public synchronized void addObjectSelectedListener(ObjectSelectedListener lis)
- adds the listener to lis of listeners
- Parameters:
- lis - an object of type ObjectSelectedListener
removeObjectSelectedListener
public synchronized void removeObjectSelectedListener(ObjectSelectedListener lis)
- removes the listener to lis of listeners
- Parameters:
- lis - an object of type ObjectSelectedListener
dispatchObjectSelectedEvent
public synchronized void dispatchObjectSelectedEvent(MapElement sel)
- Sends event ObjectSelectedEvent to all it's listeners for this object
- Parameters:
- sel - the object that is selected
All Packages Class Hierarchy This Package Previous Next Index