-
- All Implemented Interfaces:
-
it.unibo.alchemist.boundary.wormhole.interfaces.ViewPort
public class ComponentViewPort implements ViewPort
Adapter class that adapts the AWT Component class to a generic ViewPort for usage in it.unibo.alchemist.boundary.wormhole.implementation.AbstractWormhole2D.
-
-
Constructor Summary
Constructors Constructor Description ComponentViewPort(Component component)
Default constructor.
-
Method Summary
Modifier and Type Method Description double
getWidth()
{@inheritDoc} double
getHeight()
{@inheritDoc} boolean
equals(Object o)
{@inheritDoc} int
hashCode()
{@inheritDoc} Component
getComponent()
Getter method for the component to be adapted. void
setComponent(Component component)
Setter method for the component to be adapted. -
-
Constructor Detail
-
ComponentViewPort
ComponentViewPort(Component component)
Default constructor.- Parameters:
component
- the component to adapt
-
-
Method Detail
-
getWidth
double getWidth()
{@inheritDoc}
-
getHeight
double getHeight()
{@inheritDoc}
-
hashCode
int hashCode()
{@inheritDoc}
-
getComponent
Component getComponent()
Getter method for the component to be adapted.
-
setComponent
void setComponent(Component component)
Setter method for the component to be adapted.
- Parameters:
component
- the component
-
-
-
-