de.esw.eengine.renderable.wtk
Class Component
java.lang.Object
de.esw.eengine.renderable.AbstractRenderable
de.esw.eengine.renderable.wtk.Component
- All Implemented Interfaces:
- IActivatable, IRenderable
- Direct Known Subclasses:
- AbstractButton, Container, Input, Label
public abstract class Component
- extends AbstractRenderable
- implements IActivatable
- Since:
- 1.0
- Version:
- $Id: Component.java 209 2005-07-23 00:39:50Z markusw $
- Author:
- markusw
|
Constructor Summary |
Component(int x,
int y,
int width,
int height)
|
Component(java.awt.Rectangle extents)
|
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Component
public Component(int x,
int y,
int width,
int height)
- Parameters:
x - X location of this Componenty - Y location of this Componentwidth - Width of this Componentheight - Height of this Component
Component
public Component(java.awt.Rectangle extents)
- Parameters:
extents - Extents of this Component
render
public void render(IRenderDevice renderDevice)
- Description copied from interface:
IRenderable
- Renders this entity to the current
IRenderDevice
- Specified by:
render in interface IRenderable
- Parameters:
renderDevice - IRenderDevice to render onto- See Also:
IRenderable.render(de.esw.eengine.core.IRenderDevice)
isActive
public boolean isActive()
- Specified by:
isActive in interface IActivatable
- Returns:
- True if
IActivatable is active, false otherwise - See Also:
IActivatable.isActive()
setActive
public void setActive(boolean active)
- Specified by:
setActive in interface IActivatable
- Parameters:
active - True if IActivatable should be active, false
otherwise- See Also:
IActivatable.setActive(boolean)
toggle
public void toggle()
- Description copied from interface:
IActivatable
- Switches activation state
- Specified by:
toggle in interface IActivatable
- See Also:
IActivatable.toggle()
contains
public boolean contains(java.awt.Point p)
- Parameters:
p - Point to check
- Returns:
- True if p is inside this
Component
getComponentAt
public Component getComponentAt(java.awt.Point p)
- Parameters:
p - Point to get Component from
- Returns:
- Component at p or null
getLocation
public java.awt.Point getLocation()
- Returns:
- The left, top location of this
Component
setLocation
public void setLocation(java.awt.Point p)
- Parameters:
p - The new left, top location of this Component
getClientRect
public final java.awt.Rectangle getClientRect()
- Returns the client area as rectable in absolute (screen) coordinates
- Returns:
- Client area rectangle
getBounds
public final java.awt.Rectangle getBounds()
- Returns the bounding rectangle for this
Component in
absolute (screen) coordinates.
- Returns:
- Bounding rectangle
getBorder
public final java.awt.Insets getBorder()
- Returns:
- Returns the border.
setBorder
public final void setBorder(java.awt.Insets border)
- Parameters:
border - The border to set.
setImage
public final void setImage(Image image)
throws EEngineException
- Parameters:
image - Image to use for rendering
- Throws:
EEngineException - Thrown if the given resourceId is no Image
move
public void move(int x,
int y)
- Parameters:
x - X delta to move Componenty - Y delta to move Component