net.sf.sdedit.ui.components
Interface Zoomable<T extends JComponent>

Type Parameters:
T - the subtype of JComponent that the implementing class extends
All Known Implementing Classes:
MultipagePaintDevice.MultipagePanel

public interface Zoomable<T extends JComponent>

A Zoomable object is an instance of a subclass of JComponent that has a public paintComponent(Graphics) method. According to the zoom factor set by the ZoomPane belonging to this Zoomable, the graphics is scaled before we paint on it.

Author:
Markus Strauch

Method Summary
 T asJComponent()
          Returns a JComponent reference to this Zoomable.
 int getAbsoluteHeight()
          Returns the absolute, unscaled height
 int getAbsoluteWidth()
          Returns the absolute, unscaled width.
 ZoomPane getZoomPane()
          Returns the ZoomPane that is used to display this Zoomable.
 void paintComponent(Graphics g)
          A JComponent#paintComponent(Graphics), made public.
 void setZoomPane(ZoomPane zoomPane)
          Sets the ZoomPane that is used to display this Zoomable.
 

Method Detail

paintComponent

void paintComponent(Graphics g)
A JComponent#paintComponent(Graphics), made public.

Parameters:
g -

asJComponent

T asJComponent()
Returns a JComponent reference to this Zoomable.

Returns:
a JComponent reference to this Zoomable

getAbsoluteWidth

int getAbsoluteWidth()
Returns the absolute, unscaled width.

Returns:
the absolute, unscaled width

getAbsoluteHeight

int getAbsoluteHeight()
Returns the absolute, unscaled height

Returns:
the absolute, unscaled height

setZoomPane

void setZoomPane(ZoomPane zoomPane)
Sets the ZoomPane that is used to display this Zoomable.

Parameters:
zoomPane - the ZoomPane that is used to display this Zoomable

getZoomPane

ZoomPane getZoomPane()
Returns the ZoomPane that is used to display this Zoomable.

Returns:
the ZoomPane that is used to display this Zoomable


Copyright © 2011. All Rights Reserved.