Xoetrope
HomePage :: Categories :: PageIndex :: RecentChanges :: RecentlyCommented :: Login/Register
Most recent edit on 2007-10-22 11:46:23 by KingsleyElmes

Additions:
Carousel logo

Deletions:
Carousel logo



Edited on 2007-10-08 18:16:59 by KingsleyElmes

Additions:

1. Example

2. Constructor

3. Methods



Deletions:

1. Constructor

<?java
?>

2. Methods

<?java
?>
<?java
?>
<?java
?>
<?java
?>
<?java
?>

3. Example

<?java
?>




Edited on 2007-02-14 02:59:13 by KingsleY

Additions:
1. Constructor




Edited on 2007-02-14 02:58:49 by KingsleY

Additions:

3. Inner Class

2. Inner Class Methods



Deletions:

3. Inner Classes





Edited on 2007-02-14 02:58:08 by KingsleY

Additions:

3. Example





Edited on 2007-02-14 02:51:33 by KingsleY

Additions:
public static void main(String[] args) {
JFrame frame = new JFrame();
frame.setSize( 800, 600 );
JComponent glassPane = (JComponent)frame.getGlassPane();
glassPane.setSize( 800, 600 );
glassPane.setOpaque( false );
glassPane.setLayout( null )
XSvgImageMap imageMap = new XSvgImageMap();
imageMap.setURL( getClass().getResource( "Floor5.svg" ) );
imageMap.display();
JButton button = new JButton();
button.setBounds( 150, 100, 10, 10 );
glassPane.add( button );
ViewBoxListener listener = new ViewBoxListener( imageMap );
listener.registerComponent( button );
glassPane.setVisible( true );
frame.getContentPane().add( imageMap );
frame.setVisible( true );
}




Oldest known version of this page was edited on 2007-02-08 03:20:26 by KingsleY []
Page view:
Carousel logo

XViewBoxListener

class com.xoetrope.svg.XViewBoxListener

A component which listens for events on an SVG viewBox and repositions registered components within the glass pane accordingly.

1. Constructor


<?java
public XViewBoxListener( final XSvgImageMap imageMap )
?>


Constructor which takes an XSvgImageMap instance which will provide the viewBox.

2. Methods


1. setImageMap

<?java
public void registerComponent( Component component )
?>


Register a component to be repositioned if a viewBox event occurs.

2. removeComponent

<?java
public void removeComponent( Component component )
?>


Removes a previously registered component from the list of registered components.

3. Inner Classes


1. Constructor


<?java
public ViewBoxComponent( Component component )
?>


An inner class which stores location information for each registered component. Each registered component is stored within an instance of this class.

2. Methods


1. getComponent

<?java
public Component getComponent()
?>


Returns the component instance stored in this class.


2. getViewBoxLocation

<?java
public Point2D getViewBoxLocation()
?>


Returns the components initial location in SVG coordinates.
Page was generated in 0.4930 seconds