public abstract class AbstractBox extends Rectangle2D.Double implements Cloneable
Area
(a rectangle by default) with some special properties
that determine how it must be drawn on screen. Some types of boxes can act as
containers for other boxes, establishing a hierarchy of dependences.
Box objects are always placed into a JComponent
.Rectangle2D.Double, Rectangle2D.Float
Modifier and Type | Field and Description |
---|---|
protected boolean |
border |
protected Shape |
shape |
protected boolean |
specialShape |
height, width, x, y
OUT_BOTTOM, OUT_LEFT, OUT_RIGHT, OUT_TOP
Constructor and Description |
---|
AbstractBox(AbstractBox parent,
JComponent container,
BoxBase boxBase) |
createIntersection, createUnion, getBounds2D, getHeight, getWidth, getX, getY, isEmpty, outcode, setRect, setRect, toString
add, add, add, contains, contains, equals, getPathIterator, getPathIterator, hashCode, intersect, intersects, intersectsLine, intersectsLine, outcode, setFrame, union
contains, getBounds, getCenterX, getCenterY, getFrame, getMaxX, getMaxY, getMinX, getMinY, intersects, setFrame, setFrame, setFrameFromCenter, setFrameFromCenter, setFrameFromDiagonal, setFrameFromDiagonal
protected boolean border
protected Shape shape
protected boolean specialShape
public AbstractBox(AbstractBox parent, JComponent container, BoxBase boxBase)
public Object clone()
clone
in class RectangularShape
public void setParent(AbstractBox parent)
public AbstractBox getParent()
public void end()
public void finalize() throws Throwable
public void setContainer(JComponent newContainer)
public JComponent getContainerX()
public JComponent getContainerResolve()
public void setBoxBase(BoxBase boxBase)
public BoxBase getBoxBaseResolve()
public BoxBase getBoxBaseX()
public void setHostedComponent(Component jc)
public Component getHostedComponent()
public void setShape(Shape setSh)
public Shape getShape()
public boolean contains(Point2D p)
contains
in interface Shape
contains
in class RectangularShape
public boolean update(Graphics2D g2, Rectangle dirtyRegion, ImageObserver io)
public abstract boolean updateContent(Graphics2D g2, Rectangle dirtyRegion, ImageObserver io)
protected void drawBorder(Graphics2D g2)
public Rectangle getBorderBounds()
public boolean hasBorder()
public void setBorder(boolean newVal)
public boolean isVisible()
public void setVisible(boolean newVal)
public boolean isTemporaryHidden()
public void setTemporaryHidden(boolean newVal)
public boolean isInactive()
public void setInactive(boolean newVal)
public boolean isInverted()
public void setInverted(boolean newVal)
public boolean isMarked()
public void setMarked(boolean newVal)
public boolean isFocused()
public void setFocused(boolean newVal)
public boolean isAlternative()
public void setAlternative(boolean newVal)
public void repaint()
public void setBounds(Rectangle2D r)
public void setBounds(double newX, double newY, double newWidth, double newHeight)
public void setLocation(Point2D p)
public void setLocation(double newX, double newY)
public void translate(double dx, double dy)
public void setSize(Dimension2D d)
public void setSize(double newWidth, double newHeight)
public Point2D getLocation()
protected void checkHostedComponent()
public Point2D getAbsoluteLocation()
public Point2D getAbsoulteMiddleLocation()
Copyright © 2004-15 Francesc Busquets (fbusquets@xtec.cat) & Departament d'Educació de la Generalitat de Catalunya (info@xtec.cat)
Licensed under the terms of the GNU General Public License.