All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class CH.ifa.draw.samples.javadraw.MyPanel

java.lang.Object
   |
   +----CH.ifa.draw.standard.AbstractFigure
           |
           +----CH.ifa.draw.standard.CompositeFigure
                   |
                   +----CH.ifa.draw.standard.PanelComposite
                           |
                           +----CH.ifa.draw.samples.javadraw.MyPanel

public class MyPanel
extends PanelComposite
A minimal implementation for PanelComposite. MyPanel has a rectangle as the frame and has no layout policy.


Variable Index

 o padding

Constructor Index

 o MyPanel()
 o MyPanel(Point, Point)

Method Index

 o acceptSubFigureChange(Point, Point)
Retrun true if the new display box as defined by origin and corner of a subfigure is acceptable.
 o accommodate(Figure)
Moves the subfigure if necessary to keep the current origin of this.
 o createRootFigure()
A factory method (or a hook) for creating the root figure.
 o createRootFigure(Point, Point)
A factory method (or a hook) for creating the root figure.
 o moveIn(Figure)
Move the subfigure inside of this if the subfigure extends either to the left or up (or both) of the origin of this.

Variables

 o padding
 protected Point padding

Constructors

 o MyPanel
 public MyPanel()
 o MyPanel
 public MyPanel(Point origin,
                Point corner)

Methods

 o createRootFigure
 protected RootFigure createRootFigure()
A factory method (or a hook) for creating the root figure.

Overrides:
createRootFigure in class PanelComposite
 o createRootFigure
 protected RootFigure createRootFigure(Point origin,
                                       Point corner)
A factory method (or a hook) for creating the root figure.

Overrides:
createRootFigure in class PanelComposite
 o acceptSubFigureChange
 public boolean acceptSubFigureChange(Point origin,
                                      Point corner)
Retrun true if the new display box as defined by origin and corner of a subfigure is acceptable.

Overrides:
acceptSubFigureChange in class CompositeFigure
 o moveIn
 protected void moveIn(Figure child)
Move the subfigure inside of this if the subfigure extends either to the left or up (or both) of the origin of this.

 o accommodate
 public void accommodate(Figure child)
Moves the subfigure if necessary to keep the current origin of this.

Overrides:
accommodate in class PanelComposite

All Packages  Class Hierarchy  This Package  Previous  Next  Index