diva.gui
Class ViewEvent

java.lang.Object
  extended by java.util.EventObject
      extended by diva.gui.ViewEvent
All Implemented Interfaces:
java.io.Serializable

public class ViewEvent
extends java.util.EventObject

A view event is generated when a view of a Document is iconified, selected, closed, and so on.

Version:
$Id: ViewEvent.java 38798 2005-07-08 20:00:01Z cxh $
Author:
John Reekie, Heloise Hse
See Also:
Serialized Form
Accepted Rating:
Red

Field Summary
private  int _id
          The event type.
static int VIEW_CLOSED
          The view closed event type
static int VIEW_CLOSING
          The view closing event type
static int VIEW_DESELECTED
          The view deselected event type
static int VIEW_HIDDEN
          The view hidden event type
static int VIEW_MOVED
          The view moved event type
static int VIEW_RESIZED
          The view resized event type
static int VIEW_SELECTED
          The view selected event type
static int VIEW_SHOWN
          The view shown event type
 
Fields inherited from class java.util.EventObject
source
 
Constructor Summary
ViewEvent(javax.swing.JComponent view, int id)
          Create a view event with the specified component and type.
 
Method Summary
 int getID()
          Return the event type.
 javax.swing.JComponent getView()
          Return the component/view that the event refers to
 
Methods inherited from class java.util.EventObject
getSource, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

VIEW_CLOSING

public static final int VIEW_CLOSING
The view closing event type

See Also:
Constant Field Values

VIEW_CLOSED

public static final int VIEW_CLOSED
The view closed event type

See Also:
Constant Field Values

VIEW_DESELECTED

public static final int VIEW_DESELECTED
The view deselected event type

See Also:
Constant Field Values

VIEW_HIDDEN

public static final int VIEW_HIDDEN
The view hidden event type

See Also:
Constant Field Values

VIEW_MOVED

public static final int VIEW_MOVED
The view moved event type

See Also:
Constant Field Values

VIEW_RESIZED

public static final int VIEW_RESIZED
The view resized event type

See Also:
Constant Field Values

VIEW_SELECTED

public static final int VIEW_SELECTED
The view selected event type

See Also:
Constant Field Values

VIEW_SHOWN

public static final int VIEW_SHOWN
The view shown event type

See Also:
Constant Field Values

_id

private int _id
The event type.

Constructor Detail

ViewEvent

public ViewEvent(javax.swing.JComponent view,
                 int id)
Create a view event with the specified component and type. The component is accessible either with the getSource() method or the more type-specific getView() method.

Method Detail

getID

public int getID()
Return the event type.


getView

public javax.swing.JComponent getView()
Return the component/view that the event refers to